Commit 968a6bff authored by 张洋's avatar 张洋

修改

parent fef01f11
Pipeline #72417 passed with stage
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
proxyTable: { proxyTable: {
"/apaas": { "/apaas": {
//target: "https://apaas.cztest.local/apaas/", //target: "https://apaas.cztest.local/apaas/",
target: "https://apaas3.wodcloud.com/apaas/", target: "https://apaas-jzapi.test.wodcloud.com/apaas/",
changeOrigin: true, changeOrigin: true,
secure: false,//https证书安全设置为false secure: false,//https证书安全设置为false
pathRewrite: { pathRewrite: {
...@@ -27,7 +27,7 @@ module.exports = { ...@@ -27,7 +27,7 @@ module.exports = {
} }
}, },
"/vmap": { "/vmap": {
target: "https://apaas3.wodcloud.com/vmap/", target: "https://apaas-jzapi.test.wodcloud.com/vmap/",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/vmap": "" "^/vmap": ""
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
@click="settlement" @click="settlement"
size="small" size="small"
class="shop_settlement" class="shop_settlement"
>购物车申请</el-button> >申请结算</el-button>
</div> </div>
</div> </div>
<div <div
...@@ -151,16 +151,17 @@ ...@@ -151,16 +151,17 @@
v-if="item.Child && item.Child.length" v-if="item.Child && item.Child.length"
style="left: 30px" style="left: 30px"
> >
<div <template v-for="(v, indexs) in item.Child">
v-for="(v, indexs) in item.Child" <div
:key="indexs + 700" :key="indexs + 700"
@mouseleave.stop="change_now_hover(-1)" @mouseleave.stop="change_now_hover(-1)"
@mouseenter.stop="change_now_hover(indexs)" @mouseenter.stop="change_now_hover(indexs)"
@click.stop="gotoChildPage(v, item.visit_url)" @click.stop="gotoChildPage(v, item.visit_url)"
v-if="v.menu_name != '在线组件工具'" v-if="v.menu_name != '在线组件工具'"
> >
{{ v.menu_name }} {{ v.menu_name }}
</div> </div>
</template>
</div> </div>
<div <div
class="sj" class="sj"
...@@ -201,7 +202,7 @@ export default { ...@@ -201,7 +202,7 @@ export default {
shopping_list: [], shopping_list: [],
menuCartNum: 0, menuCartNum: 0,
now_hover: -1, now_hover: -1,
show_shop_menu: false show_shop_menu: false,
}; };
}, },
mounted() { mounted() {
...@@ -220,7 +221,7 @@ export default { ...@@ -220,7 +221,7 @@ export default {
}, },
getRouter() { getRouter() {
return this.$route.path; return this.$route.path;
} },
}, },
watch: { watch: {
getMenuCartState(newVal) { getMenuCartState(newVal) {
...@@ -234,7 +235,7 @@ export default { ...@@ -234,7 +235,7 @@ export default {
) { ) {
this.now_menu = val; this.now_menu = val;
} }
} },
}, },
methods: { methods: {
change_now_hover(n) { change_now_hover(n) {
...@@ -263,7 +264,7 @@ export default { ...@@ -263,7 +264,7 @@ export default {
}, },
deleteItem(id) { deleteItem(id) {
let query = [id]; let query = [id];
this.$api.serviceShop.delShoppingCart(query).then(response => { this.$api.serviceShop.delShoppingCart(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.$store.commit("setCartState"); this.$store.commit("setCartState");
this.getList(); this.getList();
...@@ -297,7 +298,7 @@ export default { ...@@ -297,7 +298,7 @@ export default {
} }
}, },
getList() { getList() {
this.$api.serviceShop.getShoppingCart().then(response => { this.$api.serviceShop.getShoppingCart().then((response) => {
if (response.data.success == "1") { if (response.data.success == "1") {
this.menuCartNum = response.data.data.valid this.menuCartNum = response.data.data.valid
? response.data.data.valid.length ? response.data.data.valid.length
...@@ -315,12 +316,12 @@ export default { ...@@ -315,12 +316,12 @@ export default {
console.log(this.now_menu); console.log(this.now_menu);
}, },
getNowMenu() { getNowMenu() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
let arr = let arr =
(response.data.data[0] && response.data.data[0].Child) || []; (response.data.data[0] && response.data.data[0].Child) || [];
let shop_index = arr.findIndex( let shop_index = arr.findIndex(
item => item.visit_url == "/shop/shopping_cart" (item) => item.visit_url == "/shop/shopping_cart"
); );
if (shop_index != -1) { if (shop_index != -1) {
arr.splice(shop_index, 1); arr.splice(shop_index, 1);
...@@ -328,7 +329,7 @@ export default { ...@@ -328,7 +329,7 @@ export default {
} else { } else {
this.show_shop_menu = false; this.show_shop_menu = false;
} }
let user_index = arr.findIndex(item => item.visit_url == "/user"); let user_index = arr.findIndex((item) => item.visit_url == "/user");
if (user_index != -1) { if (user_index != -1) {
this.user_arr = arr[user_index].Child; this.user_arr = arr[user_index].Child;
arr.splice(user_index, 1); arr.splice(user_index, 1);
...@@ -338,8 +339,8 @@ export default { ...@@ -338,8 +339,8 @@ export default {
this.getMenuIndex(); this.getMenuIndex();
} }
}); });
} },
} },
}; };
</script> </script>
......
...@@ -7,11 +7,17 @@ ...@@ -7,11 +7,17 @@
> >
<div class="main_container"> <div class="main_container">
<div class="main_container-left"> <div class="main_container-left">
<img :src="datas.logo" width="100%" /> <img
:src="datas.logo"
width="100%"
/>
</div> </div>
<div class="main_container-right"> <div class="main_container-right">
<div class="service_title"> <div class="service_title">
<span class="service_name" v-text="datas.app_name"></span> <span
class="service_name"
v-text="datas.app_name"
></span>
<div style="margin-right:auto"> <div style="margin-right:auto">
<span class="service_access_info1"> <span class="service_access_info1">
<img :src="require('@/assets/imgs/icon_liulan.png')" /> <img :src="require('@/assets/imgs/icon_liulan.png')" />
...@@ -23,54 +29,95 @@ ...@@ -23,54 +29,95 @@
</span> </span>
</div> </div>
<span class="service_access_info"> <span class="service_access_info">
<el-button class="service_now_buy" @click="applyImmediately"> <el-button
class="service_now_buy"
@click="applyImmediately"
>
立即申请 立即申请
</el-button> </el-button>
</span> </span>
<span class="service_access_info"> <span class="service_access_info">
<el-button class="service_add_cart" @click="addToCart"> <el-button
加入购物车 class="service_add_cart"
@click="addToCart"
>
加入申请单
</el-button> </el-button>
</span> </span>
</div> </div>
<div class="baseInfo_box"> <div class="baseInfo_box">
<tr class="flex_3"> <tr class="flex_3">
<td>部署来源: <td>部署来源:
<el-tooltip class="item" effect="dark" :content="datas.online_state_name" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="datas.online_state_name"
placement="top-start"
>
<span>{{datas.online_state_name}}</span> <span>{{datas.online_state_name}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td>业务领域: <td>业务领域:
<el-tooltip class="item" effect="dark" :content="datas.ywly_name" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="datas.ywly_name"
placement="top-start"
>
<span>{{datas.ywly_name}}</span> <span>{{datas.ywly_name}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td>应用类型: <td>应用类型:
<el-tooltip class="item" effect="dark" :content="datas.type_name" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="datas.type_name"
placement="top-start"
>
<span>{{datas.type_name}}</span> <span>{{datas.type_name}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
<tr class="flex_3"> <tr class="flex_3">
<td>提供组织: <td>提供组织:
<el-tooltip class="item" effect="dark" :content="datas.organization_name" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="datas.organization_name"
placement="top-start"
>
<span>{{datas.organization_name}}</span> <span>{{datas.organization_name}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td>联系人: <td>联系人:
<el-tooltip class="item" effect="dark" :content="datas.username" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="datas.username"
placement="top-start"
>
<span>{{datas.username}}</span> <span>{{datas.username}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td>联系方式: <td>联系方式:
<el-tooltip class="item" effect="dark" :content="datas.phone" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="datas.phone"
placement="top-start"
>
<span>{{datas.phone}}</span> <span>{{datas.phone}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
<tr class="flex_3"> <tr class="flex_3">
<td>上线时间: <td>上线时间:
<el-tooltip class="item" effect="dark" :content="helper.dateStringTransform(datas.create_date)" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="helper.dateStringTransform(datas.create_date)"
placement="top-start"
>
<span>{{helper.dateStringTransform(datas.create_date)}}</span> <span>{{helper.dateStringTransform(datas.create_date)}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
...@@ -121,7 +168,7 @@ export default { ...@@ -121,7 +168,7 @@ export default {
}, },
addToCart() { addToCart() {
// console.log("addToCart"); // console.log("addToCart");
console.log(this.datas) console.log(this.datas);
this.$http this.$http
.post("/apaas/serviceapp/v3/shopcart/add", { .post("/apaas/serviceapp/v3/shopcart/add", {
service_id: 0, // 0表示不是服务 service_id: 0, // 0表示不是服务
...@@ -147,7 +194,7 @@ export default { ...@@ -147,7 +194,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
message: `添加购物车失败`, message: `添加申请单失败`,
type: "warning", type: "warning",
}); });
}); });
......
...@@ -6,8 +6,15 @@ ...@@ -6,8 +6,15 @@
v-if="data" v-if="data"
> >
<div class="main_container"> <div class="main_container">
<div class="main_container-left" v-if="data.cover"> <div
<img :src="data.cover" width="100%" v-if="!(data.type == 'workflow' && data.workflows_id != 0) || !(data.type === 'Map Service')" /> class="main_container-left"
v-if="data.cover"
>
<img
:src="data.cover"
width="100%"
v-if="!(data.type == 'workflow' && data.workflows_id != 0) || !(data.type === 'Map Service')"
/>
<workflows-view <workflows-view
:isShop="true" :isShop="true"
:id="parseInt(data.workflows_id)" :id="parseInt(data.workflows_id)"
...@@ -31,12 +38,25 @@ ...@@ -31,12 +38,25 @@
( {{ data.version }} ) ( {{ data.version }} )
</span> </span>
</span> </span>
<span class="service_type" v-if="data.type" v-text="data.type"></span> <span
<span v-if="data.openness == 1" class="tags shared">共享</span> class="service_type"
<span v-else-if="data.openness == 2" class="tags restricted"> v-if="data.type"
v-text="data.type"
></span>
<span
v-if="data.openness == 1"
class="tags shared"
>共享</span>
<span
v-else-if="data.openness == 2"
class="tags restricted"
>
受限 受限
</span> </span>
<span v-else class="tags sensitive">敏感</span> <span
v-else
class="tags sensitive"
>敏感</span>
<span class="service_access_info"> <span class="service_access_info">
<el-button <el-button
class="service_now_buy" class="service_now_buy"
...@@ -50,7 +70,7 @@ ...@@ -50,7 +70,7 @@
class="service_add_cart" class="service_add_cart"
@click="addToCart" @click="addToCart"
> >
加入购物车 加入申请单
</el-button> </el-button>
</span> </span>
</div> </div>
...@@ -58,21 +78,36 @@ ...@@ -58,21 +78,36 @@
<tr class="flex_3"> <tr class="flex_3">
<td> <td>
服务类型: 服务类型:
<el-tooltip class="item" effect="dark" :content="baseInfo.fwlx" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="baseInfo.fwlx"
placement="top-start"
>
<span>{{baseInfo.fwlx}}</span> <span>{{baseInfo.fwlx}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td> <td>
服务领域: 服务领域:
<el-tooltip class="item" effect="dark" :content="baseInfo.fwly" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="baseInfo.fwly"
placement="top-start"
>
<span>{{baseInfo.fwly}}</span> <span>{{baseInfo.fwly}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td> <td>
提供组织: 提供组织:
<el-tooltip class="item" effect="dark" :content="baseInfo.tgzz" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="baseInfo.tgzz"
placement="top-start"
>
<span>{{baseInfo.tgzz}}</span> <span>{{baseInfo.tgzz}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
...@@ -80,22 +115,37 @@ ...@@ -80,22 +115,37 @@
<tr class="flex_3"> <tr class="flex_3">
<td> <td>
联系人: 联系人:
<el-tooltip class="item" effect="dark" :content="baseInfo.lxr" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="baseInfo.lxr"
placement="top-start"
>
<span>{{baseInfo.lxr}}</span> <span>{{baseInfo.lxr}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td> <td>
联系方式: 联系方式:
<el-tooltip class="item" effect="dark" :content="baseInfo.lxfs" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="baseInfo.lxfs"
placement="top-start"
>
<span>{{baseInfo.lxfs}}</span> <span>{{baseInfo.lxfs}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td> <td>
发布时间: 发布时间:
<el-tooltip class="item" effect="dark" :content="helper.dateStringTransform(baseInfo.fbsj)" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="helper.dateStringTransform(baseInfo.fbsj)"
placement="top-start"
>
<span>{{helper.dateStringTransform(baseInfo.fbsj)}}</span> <span>{{helper.dateStringTransform(baseInfo.fbsj)}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
...@@ -103,22 +153,31 @@ ...@@ -103,22 +153,31 @@
<tr class="flex_3"> <tr class="flex_3">
<td> <td>
最近更新时间: 最近更新时间:
<el-tooltip class="item" effect="dark" :content="helper.dateStringTransform(baseInfo.zjgxsj)" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="helper.dateStringTransform(baseInfo.zjgxsj)"
placement="top-start"
>
<span>{{helper.dateStringTransform(baseInfo.zjgxsj)}}</span> <span>{{helper.dateStringTransform(baseInfo.zjgxsj)}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td> <td>
服务描述: 服务描述:
<el-tooltip class="item" effect="dark" :content="baseInfo.fwms" placement="top-start"> <el-tooltip
class="item"
effect="dark"
:content="baseInfo.fwms"
placement="top-start"
>
<span>{{baseInfo.fwms}}</span> <span>{{baseInfo.fwms}}</span>
</el-tooltip> </el-tooltip>
</td> </td>
<td></td> <td></td>
</tr> </tr>
</div> </div>
</div> </div>
</div> </div>
</BlockRadius> </BlockRadius>
...@@ -152,29 +211,32 @@ export default { ...@@ -152,29 +211,32 @@ export default {
duration: 1, // 时长 duration: 1, // 时长
showTime: false, showTime: false,
baseInfo: { baseInfo: {
fwlx: '', fwlx: "",
fwly: '', fwly: "",
tgzz: '', tgzz: "",
lxr: '', lxr: "",
lxfs: '', lxfs: "",
fbsj: '', fbsj: "",
zjgxsj: '', zjgxsj: "",
fwms: '' fwms: "",
}, },
}), }),
computed: {}, computed: {},
watch: {}, watch: {},
methods: { methods: {
getBaseInfo() { getBaseInfo() {
let data = {...this.data} let data = { ...this.data };
this.baseInfo.fwlx = data.data_service_type && data.data_service_type.length > 0? data.data_service_type.join(' ') : '' this.baseInfo.fwlx =
this.baseInfo.fwly = data.sectors_name data.data_service_type && data.data_service_type.length > 0
this.baseInfo.tgzz = data.organization_name ? data.data_service_type.join(" ")
this.baseInfo.lxr = data.user_name : "";
this.baseInfo.lxfs = data.phone this.baseInfo.fwly = data.sectors_name;
this.baseInfo.fbsj = data.create_time this.baseInfo.tgzz = data.organization_name;
this.baseInfo.zjgxsj = data.update_date this.baseInfo.lxr = data.user_name;
this.baseInfo.fwms = data.descript this.baseInfo.lxfs = data.phone;
this.baseInfo.fbsj = data.create_time;
this.baseInfo.zjgxsj = data.update_date;
this.baseInfo.fwms = data.descript;
}, },
dateTransform(datestr = "") { dateTransform(datestr = "") {
return helper.dateStringTransform(datestr); return helper.dateStringTransform(datestr);
...@@ -217,7 +279,7 @@ export default { ...@@ -217,7 +279,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
message: `添加购物车失败`, message: `添加申请单失败`,
type: "warning", type: "warning",
}); });
}); });
...@@ -236,7 +298,7 @@ export default { ...@@ -236,7 +298,7 @@ export default {
}, },
}, },
created() { created() {
this.getBaseInfo() this.getBaseInfo();
}, },
}; };
</script> </script>
......
<template> <template>
<div class="com_card"> <div class="com_card">
<div class="com_card_top"> <div class="com_card_top">
<img :src="cellData.logo" class="com_card_img" /> <img
:src="cellData.logo"
class="com_card_img"
/>
<div class="com_card_name_v"> <div class="com_card_name_v">
<div class="com_card_msg_name">{{ cellData.app_name }}</div> <div class="com_card_msg_name">{{ cellData.app_name }}</div>
<div class="com_card_msg_version">V{{ cellData.version }}</div> <div class="com_card_msg_version">V{{ cellData.version }}</div>
...@@ -20,8 +23,16 @@ ...@@ -20,8 +23,16 @@
<div class="com_card_msg_num1">{{ cellData.deploy_times }}</div> <div class="com_card_msg_num1">{{ cellData.deploy_times }}</div>
</div> </div>
<div class="com_card_btn"> <div class="com_card_btn">
<el-button size="medium" class="btn_1" @click="addShop(cellData.app_id)">加入购物车</el-button> <el-button
<el-button size="medium" class="btn_2" @click="goUrl(cellData.app_id)">查看详情</el-button> size="medium"
class="btn_1"
@click="addShop(cellData.app_id)"
>加入申请单</el-button>
<el-button
size="medium"
class="btn_2"
@click="goUrl(cellData.app_id)"
>查看详情</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -72,7 +83,7 @@ export default { ...@@ -72,7 +83,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
message: `添加购物车失败`, message: `添加申请单失败`,
type: "warning", type: "warning",
}); });
}); });
......
...@@ -15,7 +15,12 @@ ...@@ -15,7 +15,12 @@
}}</span> }}</span>
</p> </p>
<div class="info_contain"> <div class="info_contain">
<el-form ref="form" :rules="rules" :model="form" label-width="0px"> <el-form
ref="form"
:rules="rules"
:model="form"
label-width="0px"
>
<el-form-item prop="account"> <el-form-item prop="account">
<p class="formname">用户账号:</p> <p class="formname">用户账号:</p>
<el-input <el-input
...@@ -23,13 +28,20 @@ ...@@ -23,13 +28,20 @@
:disabled="tranform_flag(edit_flag)" :disabled="tranform_flag(edit_flag)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password" :class="{ shortpass: edit_flag }"> <el-form-item
prop="password"
:class="{ shortpass: edit_flag }"
>
<p class="formname">登录密码:</p> <p class="formname">登录密码:</p>
<el-input <el-input
v-model="form.password" v-model="form.password"
:disabled="tranform_flag(edit_flag)" :disabled="tranform_flag(edit_flag)"
></el-input> ></el-input>
<div v-if="edit_flag" class="fixpass" @click="change_pass()"> <div
v-if="edit_flag"
class="fixpass"
@click="change_pass()"
>
修改密码 修改密码
</div> </div>
</el-form-item> </el-form-item>
...@@ -53,20 +65,27 @@ ...@@ -53,20 +65,27 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="systemname" v-if="form.type !== 1"> <el-form-item
prop="systemname"
v-if="form.type !== 1"
>
<p class="formname">业务系统名称:</p> <p class="formname">业务系统名称:</p>
<el-input v-model="form.systemname"></el-input> <el-input v-model="form.systemname"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="domain" v-if="form.type == 3 || form.type == 4"> <el-form-item
prop="domain"
v-if="form.type == 3 || form.type == 4"
>
<p class="formname">域名:</p> <p class="formname">域名:</p>
<el-input v-model="form.domain"></el-input> <el-input v-model="form.domain"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="ip" v-if="form.type == 3 || form.type == 4"> <el-form-item
prop="ip"
v-if="form.type == 3 || form.type == 4"
>
<p class="formname">IP白名单:</p> <p class="formname">IP白名单:</p>
<!-- <el-input v-model="form.ip"></el-input> --> <!-- <el-input v-model="form.ip"></el-input> -->
<div <div style="width:1022px;min-height:60px;border:1px solid #dcdfe6;border-radius:4px;padding:5px;">
style="width:1022px;min-height:60px;border:1px solid #dcdfe6;border-radius:4px;padding:5px;"
>
<el-tag <el-tag
v-if="form.ip.length" v-if="form.ip.length"
:key="tag" :key="tag"
...@@ -92,8 +111,7 @@ ...@@ -92,8 +111,7 @@
class="button-new-tag" class="button-new-tag"
size="small" size="small"
@click="showInput" @click="showInput"
>新增</el-button >新增</el-button>
>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="contact"> <el-form-item prop="contact">
...@@ -108,9 +126,15 @@ ...@@ -108,9 +126,15 @@
<p class="formname">邮箱:</p> <p class="formname">邮箱:</p>
<el-input v-model="form.email"></el-input> <el-input v-model="form.email"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="origin" v-if="form.type !== 1"> <el-form-item
prop="origin"
v-if="form.type !== 1"
>
<p class="formname">用户组织机构:</p> <p class="formname">用户组织机构:</p>
<el-select v-model="form.origin" placeholder="请选择"> <el-select
v-model="form.origin"
placeholder="请选择"
>
<el-option <el-option
v-for="item in originoptions" v-for="item in originoptions"
:key="item.value + 100" :key="item.value + 100"
...@@ -122,7 +146,10 @@ ...@@ -122,7 +146,10 @@
</el-form-item> </el-form-item>
<el-form-item prop="able"> <el-form-item prop="able">
<p class="formname">是否禁用:</p> <p class="formname">是否禁用:</p>
<el-select v-model="form.able" placeholder="请选择"> <el-select
v-model="form.able"
placeholder="请选择"
>
<el-option <el-option
v-for="item in ableoptions" v-for="item in ableoptions"
:key="item.value + 200" :key="item.value + 200"
...@@ -135,17 +162,26 @@ ...@@ -135,17 +162,26 @@
<el-form-item prop="desc"> <el-form-item prop="desc">
<p class="formname">描述:</p> <p class="formname">描述:</p>
<el-input type="textarea" v-model="form.desc"></el-input> <el-input
type="textarea"
v-model="form.desc"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="person"> <el-form-item prop="person">
<p class="formname">登记人:</p> <p class="formname">登记人:</p>
<el-input v-model="form.person" disabled></el-input> <el-input
v-model="form.person"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="date"> <el-form-item prop="date">
<p class="formname">登记日期:</p> <p class="formname">登记日期:</p>
<el-input v-model="form.date" disabled></el-input> <el-input
v-model="form.date"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="apaas_button"> <el-form-item class="apaas_button">
...@@ -153,12 +189,17 @@ ...@@ -153,12 +189,17 @@
@click="resetForm('form')" @click="resetForm('form')"
class="left" class="left"
v-if="$route.name == 'usersadd'" v-if="$route.name == 'usersadd'"
>重置</el-button >重置</el-button>
> <el-button
<el-button type="primary" v-if="now_user==2" @click="onSubmit('form')" class="right" type="primary"
>保存</el-button v-if="now_user==2"
> @click="onSubmit('form')"
<el-button class="right" @click="backPage">取消</el-button> class="right"
>保存</el-button>
<el-button
class="right"
@click="backPage"
>取消</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -186,7 +227,8 @@ export default { ...@@ -186,7 +227,8 @@ export default {
}); });
}; };
var check_email = (rule, value, callback) => { var check_email = (rule, value, callback) => {
var email_ruler = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var email_ruler =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
setTimeout(() => { setTimeout(() => {
if (value && !email_ruler.test(value)) { if (value && !email_ruler.test(value)) {
callback(new Error("请输入正确邮箱地址")); callback(new Error("请输入正确邮箱地址"));
...@@ -196,7 +238,8 @@ export default { ...@@ -196,7 +238,8 @@ export default {
}); });
}; };
var checkip = (rule, value, callback) => { var checkip = (rule, value, callback) => {
var reg = /(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3});/g; var reg =
/(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3});/g;
setTimeout(() => { setTimeout(() => {
if (!reg.test(value)) { if (!reg.test(value)) {
callback(new Error("请使用;隔开ip地址")); callback(new Error("请使用;隔开ip地址"));
...@@ -273,7 +316,7 @@ export default { ...@@ -273,7 +316,7 @@ export default {
{ required: true, message: "请输入账号", trigger: "blur" }, { required: true, message: "请输入账号", trigger: "blur" },
{ max: 16, message: "长度请不大于16个字符", trigger: "blur" }, { max: 16, message: "长度请不大于16个字符", trigger: "blur" },
{ min: 3, message: "长度请不小于3个字符", trigger: "blur" }, { min: 3, message: "长度请不小于3个字符", trigger: "blur" },
{ validator: user_name_pass, trigger: "blur" } { validator: user_name_pass, trigger: "blur" },
], ],
password: [ password: [
{ required: true, message: "请输入密码", trigger: "blur" }, { required: true, message: "请输入密码", trigger: "blur" },
...@@ -460,7 +503,7 @@ export default { ...@@ -460,7 +503,7 @@ export default {
// this.$message.error("获取组织失败"); // this.$message.error("获取组织失败");
} }
}) })
.catch(function(response) { .catch(function (response) {
// this.$message.error("获取组织失败"); // this.$message.error("获取组织失败");
}); });
}, },
...@@ -479,14 +522,14 @@ export default { ...@@ -479,14 +522,14 @@ export default {
user_id: this.form.account, // 用户名 user_id: this.form.account, // 用户名
password: this.form.password, password: this.form.password,
user_name: this.form.nickname, // 昵称 user_name: this.form.nickname, // 昵称
system_name: this.form.type>=2?this.form.systemname:'', //系统名称 system_name: this.form.type >= 2 ? this.form.systemname : "", //系统名称
phone: this.form.phone + "", // 电话号 phone: this.form.phone + "", // 电话号
email: this.form.email, // 邮箱 email: this.form.email, // 邮箱
department_id: this.form.type>=2?this.form.origin:'', // 组织id department_id: this.form.type >= 2 ? this.form.origin : "", // 组织id
is_admin: this.form.type, is_admin: this.form.type,
state: this.form.able, // 用户状态,1——启用,0 禁用 state: this.form.able, // 用户状态,1——启用,0 禁用
domain_name: this.form.type>=3?this.form.domain:'', // domain_name: this.form.type >= 3 ? this.form.domain : "", //
ip_whitelist: this.form.type>=3?this.form.ip:[], // ip_whitelist: this.form.type >= 3 ? this.form.ip : [], //
description: this.form.desc, //描述 description: this.form.desc, //描述
link_man: this.form.contact, link_man: this.form.contact,
}; };
...@@ -509,14 +552,19 @@ export default { ...@@ -509,14 +552,19 @@ export default {
var temp = { var temp = {
user_id: this.form.account, // 用户名 user_id: this.form.account, // 用户名
user_name: this.form.nickname, // 昵称 user_name: this.form.nickname, // 昵称
system_name: this.form.type>=2?this.form.systemname:'', //系统名称 system_name: this.form.type >= 2 ? this.form.systemname : "", //系统名称
phone: this.form.phone + "", // 电话号 phone: this.form.phone + "", // 电话号
email: this.form.email, // 邮箱 email: this.form.email, // 邮箱
department_id: this.form.type>=2?this.form.origin:'', // 组织id department_id: this.form.type >= 2 ? this.form.origin : "", // 组织id
is_admin: this.form.type, is_admin: this.form.type,
state: this.form.able, // 用户状态,1——启用,0 禁用 state: this.form.able, // 用户状态,1——启用,0 禁用
domain_name: this.form.type>=3?this.form.domain:'', // domain_name: this.form.type >= 3 ? this.form.domain : "", //
ip_whitelist: this.form.type>=3?this.form.ip && this.form.ip.length ? this.form.ip : []:[], // ip_whitelist:
this.form.type >= 3
? this.form.ip && this.form.ip.length
? this.form.ip
: []
: [], //
description: this.form.desc, //描述 description: this.form.desc, //描述
link_man: this.form.contact, link_man: this.form.contact,
}; };
...@@ -541,7 +589,7 @@ export default { ...@@ -541,7 +589,7 @@ export default {
}, },
onSubmit(formName) { onSubmit(formName) {
console.log("submit!"); console.log("submit!");
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid, err) => {
if (valid) { if (valid) {
if (this.edit_flag == 0) { if (this.edit_flag == 0) {
this.check_user().then((res) => { this.check_user().then((res) => {
...@@ -556,6 +604,7 @@ export default { ...@@ -556,6 +604,7 @@ export default {
this.set_user(); this.set_user();
} }
} else { } else {
console.log(err);
console.log("error submit!!"); console.log("error submit!!");
return false; return false;
} }
......
<template> <template>
<div class="services_shop-container"> <div class="services_shop-container">
<div class="services_shop-carousel"> <div class="services_shop-carousel">
<el-carousel height="400px" arrow="never"> <el-carousel
height="400px"
arrow="never"
>
<el-carousel-item <el-carousel-item
v-for="(banner, index) in banners" v-for="(banner, index) in banners"
:key="'banner_' + index" :key="'banner_' + index"
> >
<img :src="banner.image_url" width="100%" @click="goto(banner.url)" /> <img
:src="banner.image_url"
width="100%"
@click="goto(banner.url)"
/>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
<ul class="services_shop-info"> <ul class="services_shop-info">
<template v-for="(item, index) in servicesShopInfo"> <template v-for="(item, index) in servicesShopInfo">
<li class="info_item" :key="'info_' + index"> <li
class="info_item"
:key="'info_' + index"
>
<div class="left-contianer"> <div class="left-contianer">
<img :src="item.icon" width="100%" /> <img
:src="item.icon"
width="100%"
/>
</div> </div>
<div class="right-container"> <div class="right-container">
<p v-text="item.name"></p> <p v-text="item.name"></p>
...@@ -32,35 +45,15 @@ ...@@ -32,35 +45,15 @@
</ul> </ul>
</div> </div>
<!-- 热门数据 --> <!-- 热门服务 -->
<shop-list <shop-list
name="热门数据" name="热门服务"
to="/shop/data_service_list/5" to="/shop/data_service_list/5"
detail-path="/shop/sjfwDetail/" detail-path="/shop/sjfwDetail/"
:data="hot_datas" :data="hot_datas"
:showImg="false" :showImg="false"
:showSummary="true" :showSummary="true"
></shop-list> ></shop-list>
<!-- 精品地图 -->
<shop-list
name="精品地图"
to="/shop/space_time_service_list/6"
detail-path="/shop/skfwDetail/"
:data="map_datas"
:showImg="true"
:showSummary="false"
></shop-list>
<!-- 融合服务 -->
<shop-list
name="融合服务"
to="/shop/comprehensive_app_list/21"
detail-path="/shop/zhfwDetail/"
:data="comprehensive_datas"
:showImg="true"
:showSummary="false"
></shop-list>
</div> </div>
</template> </template>
...@@ -116,10 +109,6 @@ export default { ...@@ -116,10 +109,6 @@ export default {
this.$api.serviceShop.getFeaturedList({ type }).then((response) => { this.$api.serviceShop.getFeaturedList({ type }).then((response) => {
if (type == "hotdata") { if (type == "hotdata") {
this.hot_datas = response.data.data; this.hot_datas = response.data.data;
} else if (type == "hgmap") {
this.map_datas = response.data.data;
} else if (type == "zhapp") {
this.comprehensive_datas = response.data.data;
} }
}); });
}, },
...@@ -150,8 +139,6 @@ export default { ...@@ -150,8 +139,6 @@ export default {
mounted() { mounted() {
this.getBenner(); this.getBenner();
this.init("hotdata"); this.init("hotdata");
this.init("hgmap");
this.init("zhapp");
this.getGeneralOverview(); this.getGeneralOverview();
}, },
}; };
......
...@@ -44,50 +44,50 @@ export default { ...@@ -44,50 +44,50 @@ export default {
this.name = "基础支撑服务"; this.name = "基础支撑服务";
this.urlFilter = "5"; this.urlFilter = "5";
this.url = "/shop/sjfwDetail"; this.url = "/shop/sjfwDetail";
this.filterNames = ["基础支撑服务类型", "服务领域", "数据来源机构"]; this.filterNames = ["服务类型", "业务领域", "服务发布单位"];
break; break;
case "space_time_service_list": case "space_time_service_list":
this.name = "基础地图服务"; this.name = "基础地图服务";
this.urlFilter = "6"; this.urlFilter = "6";
this.url = "/shop/skfwDetail"; this.url = "/shop/skfwDetail";
this.filterNames = ["基础地图服务类型", "服务领域", "服务来源组织"]; this.filterNames = ["服务类型", "业务领域", "服务发布单位"];
break; break;
case "video_service_list": case "video_service_list":
this.name = "视频图像服务"; this.name = "视频图像服务";
this.urlFilter = "7"; this.urlFilter = "7";
this.url = "/shop/spfwDetail"; this.url = "/shop/spfwDetail";
this.filterNames = ["", "服务领域", "服务来源组织"]; this.filterNames = ["", "业务领域", "服务发布单位"];
break;
case "perception_service_list":
this.name = "感知服务";
this.urlFilter = "10";
this.url = "/shop/gzfwDetail";
this.filterNames = ["", "服务领域", "服务来源组织"];
break; break;
// case "perception_service_list":
// this.name = "感知服务";
// this.urlFilter = "10";
// this.url = "/shop/gzfwDetail";
// this.filterNames = ["", "服务领域", "服务来源组织"];
// break;
case "comprehensive_app_list": case "comprehensive_app_list":
this.name = "执法办案服务"; this.name = "执法办案服务";
this.urlFilter = "21"; this.urlFilter = "21";
this.url = "/shop/zhfwDetail"; this.url = "/shop/zhfwDetail";
this.filterNames = ["服务类型", "服务领域", "服务来源组织"]; this.filterNames = ["服务类型", "业务领域", "服务发布单位"];
break;
case "app_store_list":
this.name = "应用商店";
this.urlFilter = "app";
this.url = "/shop/yysdDetail";
this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
break;
case "products_list":
this.name = "产品资源";
this.urlFilter = "36";
this.url = "/shop/cpDetail";
this.filterNames = ["产品类型", "产品领域", "产品来源组织"];
break;
default:
this.name = "";
this.urlFilter = "";
this.url = "";
this.filterNames = [];
break; break;
// case "app_store_list":
// this.name = "应用商店";
// this.urlFilter = "app";
// this.url = "/shop/yysdDetail";
// this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
// break;
// case "products_list":
// this.name = "产品资源";
// this.urlFilter = "36";
// this.url = "/shop/cpDetail";
// this.filterNames = ["产品类型", "产品领域", "产品来源组织"];
// break;
// default:
// this.name = "";
// this.urlFilter = "";
// this.url = "";
// this.filterNames = [];
// break;
} }
}, },
}, },
......
<template> <template>
<div class="shopping"> <div class="shopping">
<div class="shopping_title">我的购物车</div> <div class="shopping_title">我的申请</div>
<ShoppingCart /> <ShoppingCart />
</div> </div>
</template> </template>
...@@ -10,13 +10,13 @@ import ShoppingCart from "@/components/shopping-cart/shopping-cart-com"; ...@@ -10,13 +10,13 @@ import ShoppingCart from "@/components/shopping-cart/shopping-cart-com";
export default { export default {
components: { components: {
ShoppingCart ShoppingCart,
}, },
data: () => ({ data: () => ({
datas: {} datas: {},
}), }),
mounted() {}, mounted() {},
methods: {} methods: {},
}; };
</script> </script>
<style scoped> <style scoped>
......
<template> <template>
<div class="fwcs"> <div class="fwcs">
<el-breadcrumb <el-breadcrumb
v-if="is_map != 0" v-if="is_map != 0"
separator="/" separator="/"
class="bread_crumb" class="bread_crumb"
...@@ -62,41 +62,8 @@ ...@@ -62,41 +62,8 @@
</el-button> </el-button>
</el-row> </el-row>
<div class="gray_line"></div> <div class="gray_line"></div>
<div v-if="activeBtn == 4">
<div class="sqxx_title">服务类型:</div> <div v-show="activeBtn == 0 || activeBtn == 3 || activeBtn == 2">
<el-select
@change="changeZhType"
v-model="zhyyVal"
placeholder="请选择"
class="zhyy_select"
>
<el-option
v-for="item in optionsZhyy"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
<div
v-if="activeBtn == 4 && zhyyVal == 24"
class="lc_alert"
>
<i class="el-icon-warning-outline"></i>
<p>
说明:支持多个流程服务接口的注册,若流程服务包含多个接口,每个接口需分别注册为独立的服务地址才可使用。<br />
示例:http(s)://www.apaas.com(自有域名)/xxx,其中xxx为该流程服务的不同接口后缀,需分别进行单个接口的注册。<br />
比如:服务地址1:http(s)://www.apaas.com(自有域名)/create(用于新建流程实例)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服务地址2:http(s)://www.apaas.com(自有域名)/query
(用于查询流程状态)
</p>
</div>
<div v-show="
(activeBtn == 4 && zhyyVal == 24) ||
activeBtn == 3 ||
activeBtn == 2
">
<div class="fwcs_fwdz"> <div class="fwcs_fwdz">
上传接口文档 上传接口文档
<span class="title_bc">(请上传所有服务地址完整接口文档)</span> <span class="title_bc">(请上传所有服务地址完整接口文档)</span>
...@@ -115,20 +82,29 @@ ...@@ -115,20 +82,29 @@
:list="jkwds" :list="jkwds"
></upload-file> ></upload-file>
</div> </div>
<div v-if="activeBtn == 3"> <div v-if="activeBtn == 0">
<div class="fwcs_fwdz">返回数据格式</div> <div class="skfw_fwlx">服务类型:</div>
<el-radio-group <div class="skfw_fwlx_radios">
v-model="gz_fhsjgs" <el-radio
class="gz_fhsjgs_rad" v-for="item in jczcfwRadios"
> :key="item.name"
<el-radio label="JSON">JSON</el-radio> v-model="jczcfwQqt"
<el-radio label="xml">XML</el-radio> :label="item.id"
</el-radio-group> >{{ item.name }}</el-radio>
</div>
</div> </div>
<div <div v-if="activeBtn == 1">
v-if="!(activeBtn == 4 && zhyyVal == 24)" <div class="skfw_fwlx">服务类型:</div>
class="fwcs_fwdz" <div class="skfw_fwlx_radios">
> <el-radio
v-for="item in skfwRadios"
:key="item.name"
v-model="skfwQqt"
:label="item.id"
>{{ item.name }}</el-radio>
</div>
</div>
<div class="fwcs_fwdz">
服务地址: 服务地址:
</div> </div>
<div <div
...@@ -296,148 +272,13 @@ ...@@ -296,148 +272,13 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div v-if="activeBtn == 1">
<div class="skfw_fwlx">服务类型:</div>
<div class="skfw_fwlx_radios">
<el-radio
v-for="item in skfwRadios"
:key="item.name"
v-model="skfwQqt"
:label="item.id"
>{{ item.name }}</el-radio>
</div>
</div>
<div v-if="activeBtn == 4 && zhyyVal != 34 && zhyyVal != 24">
<el-tabs
v-model="activeZh"
class="fwcs_tabs"
@tab-click="clickTab"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table
ref="fwcs_zhfw_qq"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="datasZh"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="changeTable"
></ces-table>
</el-tab-pane>
<el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt">
<el-radio-group
v-model="zhfwQqt"
@change="changeZhfwQqt"
>
<el-radio label="JSON">JSON</el-radio>
<el-radio label="form-data">form-data</el-radio>
<el-radio label="x-www-form-urlencoded">x-www-form-urlencoded</el-radio>
</el-radio-group>
</div>
<div v-show="zhfwQqt == 'JSON'">
<v-apaas-code
:key="'code' + code_2_index"
ref="zhfwJsonCodes"
></v-apaas-code>
</div>
<div v-show="zhfwQqt == 'form-data'">
<ces-table
ref="fwcs_zhfw_qq_form"
size="mini"
:border="true"
:headers="zhfwQqcsForm"
url
:datas="datasZhForm"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@primary-del="delItemQq"
></ces-table>
</div>
<div v-show="zhfwQqt == 'x-www-form-urlencoded'">
<ces-table
ref="fwcs_zhfw_www"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="datasZhwww"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</div>
</el-tab-pane>
<el-tab-pane
label="请求头Header"
name="2"
>
<ces-table
ref="fwcs_zhfw_qqtcs"
size="mini"
:border="true"
:headers="sjfwQqtcs"
url
:datas="datasQqu"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</el-tab-pane>
</el-tabs>
</div>
</block-radius> </block-radius>
<block-radius v-show="resultShow"> <block-radius v-show="resultShow">
<div v-show=" <div v-show="
(activeBtn == 0 || (activeBtn == 0 ||
activeBtn == 3 || activeBtn == 3
(activeBtn == 4 && (zhyyVal == 22 || zhyyVal == 23))) && ) &&
resSuccess resSuccess
"> ">
<div class="sjfw_qqcstx">请求参数信息填写:</div> <div class="sjfw_qqcstx">请求参数信息填写:</div>
...@@ -485,8 +326,7 @@ ...@@ -485,8 +326,7 @@
</div> </div>
<div v-show=" <div v-show="
(activeBtn == 1 || (activeBtn == 1 ||
activeBtn == 2 || activeBtn == 2 ) &&
(activeBtn == 4 && zhyyVal == 34)) &&
resSuccess resSuccess
"> ">
<div class="skfw_csfwxx">测试服务信息:</div> <div class="skfw_csfwxx">测试服务信息:</div>
...@@ -503,8 +343,7 @@ ...@@ -503,8 +343,7 @@
(activeBtn == 0 || (activeBtn == 0 ||
activeBtn == 1 || activeBtn == 1 ||
activeBtn == 2 || activeBtn == 2 ||
activeBtn == 3 || activeBtn == 3 ) &&
activeBtn == 4) &&
!resSuccess !resSuccess
"> ">
<div class="skfw_csfwxx">测试服务信息:</div> <div class="skfw_csfwxx">测试服务信息:</div>
...@@ -534,257 +373,6 @@ ...@@ -534,257 +373,6 @@
</el-button> </el-button>
</div> </div>
</block-radius> </block-radius>
<div v-if="activeBtn == 4 && zhyyVal == 24">
<!-- 24 -->
<block-radius
v-for="(itemOne, indexOne) in liucheng_list"
:key="`liucheng_${indexOne}`"
>
<div class="one_service">
<div class="one_name">服务接口名称:</div>
<div class="one_name_in">
<el-form
:model="itemOne"
:rules="rulesOne"
:ref="`ruleFormOne_${indexOne}`"
>
<el-form-item prop="one_input">
<el-input
v-model="itemOne.one_input"
placeholder="请输入内容"
>
</el-input>
</el-form-item>
</el-form>
</div>
<div class="one_url">服务地址{{ indexOne + 1 }}</div>
<div class="fwcs_fwdz_inner">
<el-input
placeholder="请输入内容"
@input="
(val) => {
getUrlOne(val, indexOne);
}
"
v-model="itemOne.serviceUrl"
class="input-with-select"
>
<el-select
v-model="itemOne.select"
slot="prepend"
placeholder="请选择"
>
<el-option
v-for="item in optionType"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-input>
<el-button
@click="clickFwcsOne(indexOne)"
class="fwcs_btn_fwcs"
>服务测试</el-button>
</div>
<el-tabs
v-model="itemOne.activeName"
class="fwcs_tabs"
@tab-click="clickTabOne"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table
:ref="`one_qqcs_${indexOne}`"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="itemOne.datasSj"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="
(val) => {
changeTableOne(val, indexOne);
}
"
></ces-table>
</el-tab-pane>
<el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt">
<el-radio-group v-model="itemOne.sjfwQqt">
<el-radio label="JSON">JSON</el-radio>
</el-radio-group>
</div>
<v-apaas-code
:key="'code' + indexOne"
:ref="`one_json_${indexOne}`"
></v-apaas-code>
</el-tab-pane>
<el-tab-pane
label="授权信息"
name="2"
>
<el-row class="sqxx_row">
<el-col :span="6">
<div class="sqxx_title">授权方式:</div>
<el-select
v-model="itemOne.sqfsVal"
placeholder="请选择"
class="sqxx_select"
>
<el-option
v-for="item in optionsSq"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-col>
<el-col
:span="2"
class="center_line_c"
>
<div class="center_line_one"></div>
</el-col>
<el-col :span="16">
<div class="sqxx_title">Token:</div>
<el-input
v-model="itemOne.tokenVal"
placeholder="请输入内容"
></el-input>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane
label="请求头Header"
name="3"
>
<ces-table
ref="fwcs_zhfw_qqtcs"
size="mini"
:border="true"
:headers="sjfwQqtcs"
url
:datas="datasQqu"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</el-tab-pane>
</el-tabs>
<div v-show="itemOne.resultShow">
<div v-show="itemOne.resSuccess">
<div class="sjfw_qqcstx">请求参数信息填写:</div>
<ces-table
:ref="`one_qqxx_${indexOne}`"
size="mini"
:border="true"
:headers="sjfwQqcstx"
url
:datas="itemOne.datasQqcs"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
<div class="sjfw_fhcstx">返回参数信息填写:</div>
<ces-table
:ref="`one_fhxx_${indexOne}`"
size="mini"
:border="true"
:headers="sjfwFhcstx"
url
:datas="itemOne.datasFhcs"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</div>
<div v-show="!itemOne.resSuccess">
<div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ">
<div class="skcs_jg">
<img
src="@/assets/imgs/test_icon_error.png"
class="skcs_jg_img"
/>&nbsp;测试失败
</div>
</div>
</div>
</div>
<div class="btn_footer_one">
<el-button
v-if="
indexOne + 1 == liucheng_list.length && itemOne.resSuccess
"
class="new_one"
@click="newOne(indexOne)"
>新增服务地址</el-button>
<el-button
v-if="!(indexOne == liucheng_list.length || liucheng_list.length == 1)"
class="del_one"
@click="delOne(indexOne)"
>移除</el-button>
<el-button
v-if="itemOne.resultShow"
class="reset_one"
@click="resetOne(indexOne)"
>重置</el-button>
<el-button
v-if="
indexOne + 1 == liucheng_list.length && itemOne.resSuccess
"
class="next_one"
@click="nextOne"
>
下一步
</el-button>
</div>
</div>
</block-radius>
</div>
</div> </div>
<div v-else> <div v-else>
<block-radius> <block-radius>
...@@ -948,7 +536,7 @@ export default { ...@@ -948,7 +536,7 @@ export default {
CesTable, CesTable,
apassDialog, apassDialog,
"v-apaas-code": Codes, "v-apaas-code": Codes,
uploadFile uploadFile,
}, },
data() { data() {
return { return {
...@@ -971,14 +559,14 @@ export default { ...@@ -971,14 +559,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 + gisServiceUrl +
...@@ -986,19 +574,19 @@ export default { ...@@ -986,19 +574,19 @@ export default {
gisPortalSiteName + gisPortalSiteName +
"/apaasplat/viewer/addPortalItem.html", "/apaasplat/viewer/addPortalItem.html",
btnList: [], btnList: [],
activeBtn: null, activeBtn: 0,
serviceUrl: "", serviceUrl: "",
select: "GET", select: "GET",
optionType: [ optionType: [
{ 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",
...@@ -1007,9 +595,9 @@ export default { ...@@ -1007,9 +595,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" },
...@@ -1019,13 +607,13 @@ export default { ...@@ -1019,13 +607,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: "是否必须*",
...@@ -1035,11 +623,11 @@ export default { ...@@ -1035,11 +623,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" },
...@@ -1049,9 +637,9 @@ export default { ...@@ -1049,9 +637,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" },
...@@ -1063,15 +651,15 @@ export default { ...@@ -1063,15 +651,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: "操作",
...@@ -1081,21 +669,21 @@ export default { ...@@ -1081,21 +669,21 @@ export default {
btnList: [ btnList: [
{ {
type: "primary-del", type: "primary-del",
label: "删除" label: "删除",
} },
] ],
} },
], ],
sjfwQqtcs:[ sjfwQqtcs: [
{ {
label: "key", label: "key",
prop: "requestEncoding", prop: "requestEncoding",
type: "input", type: "input",
align: "left" align: "left",
}, },
{ label: "value", prop: "requestValue", type: "input", align: "left" } { label: "value", prop: "requestValue", type: "input", align: "left" },
], ],
datasQqu:[], datasQqu: [],
datasZhForm: [], datasZhForm: [],
datasZhwww: [], datasZhwww: [],
emptyText: "暂无数据", emptyText: "暂无数据",
...@@ -1108,6 +696,8 @@ export default { ...@@ -1108,6 +696,8 @@ export default {
zhfwQqt: "JSON", zhfwQqt: "JSON",
skfwQqt: "", skfwQqt: "",
skfwRadios: [], skfwRadios: [],
jczcfwQqt: "",
jczcfwRadios: [],
optionsZhyy: [], optionsZhyy: [],
zhyyVal: 22, zhyyVal: 22,
jcxxtx: false, jcxxtx: false,
...@@ -1117,12 +707,12 @@ export default { ...@@ -1117,12 +707,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" },
...@@ -1130,18 +720,18 @@ export default { ...@@ -1130,18 +720,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: [
...@@ -1150,8 +740,8 @@ export default { ...@@ -1150,8 +740,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" },
...@@ -1159,16 +749,16 @@ export default { ...@@ -1159,16 +749,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: [],
...@@ -1189,7 +779,7 @@ export default { ...@@ -1189,7 +779,7 @@ export default {
dialogInfo: { dialogInfo: {
title: "时空服务参数已修改", title: "时空服务参数已修改",
msg: "", msg: "",
submit: null submit: null,
}, },
is_portal: false, is_portal: false,
portal_id: "", portal_id: "",
...@@ -1201,7 +791,7 @@ export default { ...@@ -1201,7 +791,7 @@ export default {
user_id: "", user_id: "",
fwR: false, fwR: false,
mapR: false, mapR: false,
proR: false proR: false,
}; };
}, },
computed: {}, computed: {},
...@@ -1249,8 +839,8 @@ export default { ...@@ -1249,8 +839,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;
...@@ -1339,9 +929,14 @@ export default { ...@@ -1339,9 +929,14 @@ export default {
} }
} }
} }
if(this.activeBtn == 0 || this.activeBtn == 2 || this.activeBtn == 3 || this.activeBtn == 4){ if (
this.activeBtn == 0 ||
this.activeBtn == 2 ||
this.activeBtn == 3 ||
this.activeBtn == 4
) {
let requestHeader = this.$refs.fwcs_zhfw_qqtcs.getTableData(); let requestHeader = this.$refs.fwcs_zhfw_qqtcs.getTableData();
for (let i = 0; i < requestHeader.length; i++) { for (let i = 0; i < requestHeader.length; i++) {
if ( if (
requestHeader[i] && requestHeader[i] &&
requestHeader[i].requestEncoding && requestHeader[i].requestEncoding &&
...@@ -1349,12 +944,19 @@ export default { ...@@ -1349,12 +944,19 @@ export default {
requestHeader[i].requestEncoding != "" && requestHeader[i].requestEncoding != "" &&
requestHeader[i].requestValue != "" requestHeader[i].requestValue != ""
) { ) {
console.log(Object.keys(requestHeaderDataObj).indexOf(requestHeader[i].requestEncoding) == -1) console.log(
Object.keys(requestHeaderDataObj).indexOf(
requestHeader[i].requestEncoding
) == -1
);
if ( if (
Object.keys(requestHeaderDataObj).indexOf(requestHeader[i].requestEncoding) == -1 Object.keys(requestHeaderDataObj).indexOf(
requestHeader[i].requestEncoding
) == -1
) { ) {
requestHeaderDataObj[requestHeader[i].requestEncoding] = []; requestHeaderDataObj[requestHeader[i].requestEncoding] = [];
requestHeaderDataObj[requestHeader[i].requestEncoding][0] = requestHeader[i].requestValue; requestHeaderDataObj[requestHeader[i].requestEncoding][0] =
requestHeader[i].requestValue;
} else { } else {
requestHeaderDataObj[requestHeader[i].requestEncoding].push( requestHeaderDataObj[requestHeader[i].requestEncoding].push(
requestHeader[i].requestValue requestHeader[i].requestValue
...@@ -1362,7 +964,7 @@ export default { ...@@ -1362,7 +964,7 @@ export default {
} }
} }
} }
headers = Object.assign(headers, requestHeaderDataObj) headers = Object.assign(headers, requestHeaderDataObj);
} }
let bodys = ""; let bodys = "";
let contentType = ""; let contentType = "";
...@@ -1384,11 +986,11 @@ export default { ...@@ -1384,11 +986,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);
...@@ -1405,15 +1007,15 @@ export default { ...@@ -1405,15 +1007,15 @@ 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 == 0 this.activeBtn == 0
? 12 ? this.jczcfwQqt
: this.activeBtn == 1 : this.activeBtn == 1
? this.skfwQqt ? this.skfwQqt
: 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;
...@@ -1550,9 +1152,9 @@ export default { ...@@ -1550,9 +1152,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;
...@@ -1566,9 +1168,9 @@ export default { ...@@ -1566,9 +1168,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;
...@@ -1583,7 +1185,7 @@ export default { ...@@ -1583,7 +1185,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;
...@@ -1612,9 +1214,9 @@ export default { ...@@ -1612,9 +1214,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 = {
...@@ -1639,12 +1241,12 @@ export default { ...@@ -1639,12 +1241,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("服务发布成功");
...@@ -1663,7 +1265,7 @@ export default { ...@@ -1663,7 +1265,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;
...@@ -1675,9 +1277,9 @@ export default { ...@@ -1675,9 +1277,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("服务发布成功");
...@@ -1703,7 +1305,7 @@ export default { ...@@ -1703,7 +1305,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) ||
...@@ -1743,7 +1345,7 @@ export default { ...@@ -1743,7 +1345,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 == 0 this.activeBtn == 0
? 12 ? this.jczcfwQqt
: this.activeBtn == 1 : this.activeBtn == 1
? this.skfwQqt ? this.skfwQqt
: this.activeBtn == 4 : this.activeBtn == 4
...@@ -1770,11 +1372,11 @@ export default { ...@@ -1770,11 +1372,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("服务注册成功");
...@@ -1795,7 +1397,7 @@ export default { ...@@ -1795,7 +1397,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) {
...@@ -1803,7 +1405,7 @@ export default { ...@@ -1803,7 +1405,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",
...@@ -1820,7 +1422,7 @@ export default { ...@@ -1820,7 +1422,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 = {
...@@ -1835,9 +1437,9 @@ export default { ...@@ -1835,9 +1437,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("服务注册成功");
...@@ -1896,7 +1498,7 @@ export default { ...@@ -1896,7 +1498,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 {
...@@ -1905,10 +1507,10 @@ export default { ...@@ -1905,10 +1507,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";
...@@ -1939,13 +1541,21 @@ export default { ...@@ -1939,13 +1541,21 @@ export default {
} }
}); });
this.btnList = arr; this.btnList = arr;
this.jczcfwRadios = this.btnList[0].childDomains;
if (
this.btnList[0].childDomains &&
this.btnList[0].childDomains.length > 0
) {
this.jczcfwQqt = this.btnList[0].childDomains[0].id;
}
let skfwRadios = this.btnList[1].childDomains; let skfwRadios = this.btnList[1].childDomains;
skfwRadios = skfwRadios.filter(function(item) { skfwRadios = skfwRadios.filter(function (item) {
return item.name != "地图" && item.name != "三维地图"; return item.name != "地图" && item.name != "三维地图";
}); });
this.skfwRadios = skfwRadios; this.skfwRadios = skfwRadios;
this.skfwQqt = this.skfwRadios[0].id; this.skfwQqt = this.skfwRadios[0].id;
this.optionsZhyy = this.btnList[4].childDomains;
this.activeBtn = 0; this.activeBtn = 0;
} else { } else {
console.log(response.data.errMsg); console.log(response.data.errMsg);
...@@ -2047,8 +1657,8 @@ export default { ...@@ -2047,8 +1657,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,
} },
}, },
"*" "*"
); );
...@@ -2058,7 +1668,7 @@ export default { ...@@ -2058,7 +1668,7 @@ export default {
document.getElementById("listener").contentWindow.postMessage( document.getElementById("listener").contentWindow.postMessage(
{ {
cmd: "getPortalItemInfo", cmd: "getPortalItemInfo",
params: itemid params: itemid,
}, },
"*" "*"
); );
...@@ -2083,7 +1693,7 @@ export default { ...@@ -2083,7 +1693,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
}`; }`;
...@@ -2110,7 +1720,7 @@ export default { ...@@ -2110,7 +1720,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;
...@@ -2122,7 +1732,7 @@ export default { ...@@ -2122,7 +1732,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);
...@@ -2146,7 +1756,7 @@ export default { ...@@ -2146,7 +1756,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}中的信息`);
...@@ -2266,9 +1876,9 @@ export default { ...@@ -2266,9 +1876,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;
...@@ -2334,7 +1944,7 @@ export default { ...@@ -2334,7 +1944,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;
...@@ -2361,7 +1971,7 @@ export default { ...@@ -2361,7 +1971,7 @@ export default {
if (appmap_data) { if (appmap_data) {
_self.$store.commit("setAppBuilderParams", appmap_data); _self.$store.commit("setAppBuilderParams", appmap_data);
} }
} },
}; };
</script> </script>
...@@ -2473,7 +2083,7 @@ export default { ...@@ -2473,7 +2083,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.skfw_fwlx_radios { .skfw_fwlx_radios {
margin: 10px 0 0; margin: 10px 0px 0 15px;
} }
.test_succ { .test_succ {
width: 100%; width: 100%;
......
<template>
<div class="fwcs">
<el-breadcrumb
v-if="is_map != 0"
separator="/"
class="bread_crumb"
>
<el-breadcrumb-item :to="{ path: '/workplace' }">
在线组件工具
</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/intelligent_drawing' }">
智能制图
</el-breadcrumb-item>
<el-breadcrumb-item>发布信息填写</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb
v-else-if="process_id != ''"
separator="/"
class="bread_crumb"
>
<el-breadcrumb-item :to="{ path: '/workplace' }">
在线组件工具
</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/progress/designer' }">
流程设计
</el-breadcrumb-item>
<el-breadcrumb-item>发布信息填写</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb
v-else
separator="/"
class="bread_crumb"
>
<el-breadcrumb-item :to="{ path: '/fwzc' }">服务注册</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-if="jcxxtx">基础信息填写</el-breadcrumb-item>
</el-breadcrumb>
<div v-if="!jcxxtx">
<block-radius>
<el-row>
<el-button
v-for="(item, index) in btnList"
:key="item.id"
@click="clickBtn(index)"
:class="activeBtn == index ? 'fwcs_btn_act' : 'fwcs_btn_dis'"
>
<img
v-if="activeBtn == index"
:src="require('@/assets/imgs/' + item.active + '.png')"
class="fwcs_btn_img"
/>
<img
v-else
:src="require('@/assets/imgs/' + item.default + '.png')"
class="fwcs_btn_img"
/>
{{ item.name }}
</el-button>
</el-row>
<div class="gray_line"></div>
<div v-if="activeBtn == 4">
<div class="sqxx_title">服务类型:</div>
<el-select
@change="changeZhType"
v-model="zhyyVal"
placeholder="请选择"
class="zhyy_select"
>
<el-option
v-for="item in optionsZhyy"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
<div
v-if="activeBtn == 4 && zhyyVal == 24"
class="lc_alert"
>
<i class="el-icon-warning-outline"></i>
<p>
说明:支持多个流程服务接口的注册,若流程服务包含多个接口,每个接口需分别注册为独立的服务地址才可使用。<br />
示例:http(s)://www.apaas.com(自有域名)/xxx,其中xxx为该流程服务的不同接口后缀,需分别进行单个接口的注册。<br />
比如:服务地址1:http(s)://www.apaas.com(自有域名)/create(用于新建流程实例)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服务地址2:http(s)://www.apaas.com(自有域名)/query
(用于查询流程状态)
</p>
</div>
<div v-show="
(activeBtn == 4 && zhyyVal == 24) ||
activeBtn == 3 ||
activeBtn == 2
">
<div class="fwcs_fwdz">
上传接口文档
<span class="title_bc">(请上传所有服务地址完整接口文档)</span>
</div>
<upload-file
:multiple="false"
:unique="false"
:max="1"
type="zip"
:readOnly="false"
:drag="true"
@getNewList="getNewListOne"
class="lc_upf"
up_fz="支持.pdf,.docx,.doc,.zip,.rar 格式文件"
accepts=".pdf, .docx, .doc, .zip, .rar"
:list="jkwds"
></upload-file>
</div>
<div v-if="activeBtn == 3">
<div class="fwcs_fwdz">返回数据格式</div>
<el-radio-group
v-model="gz_fhsjgs"
class="gz_fhsjgs_rad"
>
<el-radio label="JSON">JSON</el-radio>
<el-radio label="xml">XML</el-radio>
</el-radio-group>
</div>
<div
v-if="!(activeBtn == 4 && zhyyVal == 24)"
class="fwcs_fwdz"
>
服务地址:
</div>
<div
v-if="!(activeBtn == 4 && zhyyVal == 24)"
class="fwcs_fwdz_inner"
>
<el-input
placeholder="请输入内容"
@input="getUrl"
v-model="serviceUrl"
class="input-with-select"
>
<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-if="activeBtn == 2 || activeBtn == 3"
v-model="select"
slot="prepend"
placeholder="请选择"
>
<el-option
v-for="item in optionType2"
: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
v-for="item in optionType"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-input>
<el-button
@click="clickFwcs()"
class="fwcs_btn_fwcs"
>
服务测试
</el-button>
</div>
<div v-if="activeBtn == 0 || activeBtn == 2 || activeBtn == 3">
<el-tabs
v-model="activeName"
class="fwcs_tabs"
@tab-click="clickTab"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table
ref="fwcs_sjfw_qq"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="datasSj"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="changeTable"
></ces-table>
</el-tab-pane>
<el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt">
<el-radio-group v-model="sjfwQqt">
<el-radio label="JSON">JSON</el-radio>
</el-radio-group>
</div>
<v-apaas-code
:key="'code' + code_1_index"
ref="jsonCodes"
></v-apaas-code>
</el-tab-pane>
<el-tab-pane
label="授权信息"
name="2"
>
<el-row class="sqxx_row">
<el-col :span="6">
<div class="sqxx_title">授权方式:</div>
<el-select
v-model="sqfsVal"
placeholder="请选择"
class="sqxx_select"
>
<el-option
v-for="item in optionsSq"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-col>
<el-col
:span="2"
class="center_line_c"
>
<div class="center_line"></div>
</el-col>
<el-col :span="16">
<div class="sqxx_title">Token:</div>
<el-input
v-model="tokenVal"
placeholder="请输入内容"
></el-input>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane
label="请求头Header"
name="3"
>
<ces-table
ref="fwcs_zhfw_qqtcs"
size="mini"
:border="true"
:headers="sjfwQqtcs"
url
:datas="datasQqu"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</el-tab-pane>
</el-tabs>
</div>
<div v-if="activeBtn == 1">
<div class="skfw_fwlx">服务类型:</div>
<div class="skfw_fwlx_radios">
<el-radio
v-for="item in skfwRadios"
:key="item.name"
v-model="skfwQqt"
:label="item.id"
>{{ item.name }}</el-radio>
</div>
</div>
<div v-if="activeBtn == 4 && zhyyVal != 34 && zhyyVal != 24">
<el-tabs
v-model="activeZh"
class="fwcs_tabs"
@tab-click="clickTab"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table
ref="fwcs_zhfw_qq"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="datasZh"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="changeTable"
></ces-table>
</el-tab-pane>
<el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt">
<el-radio-group
v-model="zhfwQqt"
@change="changeZhfwQqt"
>
<el-radio label="JSON">JSON</el-radio>
<el-radio label="form-data">form-data</el-radio>
<el-radio label="x-www-form-urlencoded">x-www-form-urlencoded</el-radio>
</el-radio-group>
</div>
<div v-show="zhfwQqt == 'JSON'">
<v-apaas-code
:key="'code' + code_2_index"
ref="zhfwJsonCodes"
></v-apaas-code>
</div>
<div v-show="zhfwQqt == 'form-data'">
<ces-table
ref="fwcs_zhfw_qq_form"
size="mini"
:border="true"
:headers="zhfwQqcsForm"
url
:datas="datasZhForm"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@primary-del="delItemQq"
></ces-table>
</div>
<div v-show="zhfwQqt == 'x-www-form-urlencoded'">
<ces-table
ref="fwcs_zhfw_www"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="datasZhwww"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</div>
</el-tab-pane>
<el-tab-pane
label="请求头Header"
name="2"
>
<ces-table
ref="fwcs_zhfw_qqtcs"
size="mini"
:border="true"
:headers="sjfwQqtcs"
url
:datas="datasQqu"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</el-tab-pane>
</el-tabs>
</div>
</block-radius>
<block-radius v-show="resultShow">
<div v-show="
(activeBtn == 0 ||
activeBtn == 3 ||
(activeBtn == 4 && (zhyyVal == 22 || zhyyVal == 23))) &&
resSuccess
">
<div class="sjfw_qqcstx">请求参数信息填写:</div>
<ces-table
ref="fwcs_sjfw_qqcs"
size="mini"
:border="true"
:headers="sjfwQqcstx"
url
:datas="datasQqcs"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
<div class="sjfw_fhcstx">返回参数信息填写:</div>
<ces-table
ref="fwcs_sjfw_fhcs"
size="mini"
:border="true"
:headers="sjfwFhcstx"
url
:datas="datasFhcs"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</div>
<div v-show="
(activeBtn == 1 ||
activeBtn == 2 ||
(activeBtn == 4 && zhyyVal == 34)) &&
resSuccess
">
<div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ">
<div class="skcs_jg">
<img
src="@/assets/imgs/test_icon_success.png"
class="skcs_jg_img"
/>&nbsp;测试成功
</div>
</div>
</div>
<div v-show="
(activeBtn == 0 ||
activeBtn == 1 ||
activeBtn == 2 ||
activeBtn == 3 ||
activeBtn == 4) &&
!resSuccess
">
<div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ">
<div class="skcs_jg">
<img
src="@/assets/imgs/test_icon_error.png"
class="skcs_jg_img"
/>&nbsp;测试失败
</div>
</div>
</div>
<div class="btn_footer">
<el-button
class="reset"
v-if="activeBtn == 0 && resSuccess"
@click="resetSjfw"
>
重置
</el-button>
<el-button
:disabled="!resSuccess"
:class="resSuccess ? 'next' : ''"
@click="nextJcxx"
>
下一步
</el-button>
</div>
</block-radius>
<div v-if="activeBtn == 4 && zhyyVal == 24">
<!-- 24 -->
<block-radius
v-for="(itemOne, indexOne) in liucheng_list"
:key="`liucheng_${indexOne}`"
>
<div class="one_service">
<div class="one_name">服务接口名称:</div>
<div class="one_name_in">
<el-form
:model="itemOne"
:rules="rulesOne"
:ref="`ruleFormOne_${indexOne}`"
>
<el-form-item prop="one_input">
<el-input
v-model="itemOne.one_input"
placeholder="请输入内容"
>
</el-input>
</el-form-item>
</el-form>
</div>
<div class="one_url">服务地址{{ indexOne + 1 }}</div>
<div class="fwcs_fwdz_inner">
<el-input
placeholder="请输入内容"
@input="
(val) => {
getUrlOne(val, indexOne);
}
"
v-model="itemOne.serviceUrl"
class="input-with-select"
>
<el-select
v-model="itemOne.select"
slot="prepend"
placeholder="请选择"
>
<el-option
v-for="item in optionType"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-input>
<el-button
@click="clickFwcsOne(indexOne)"
class="fwcs_btn_fwcs"
>服务测试</el-button>
</div>
<el-tabs
v-model="itemOne.activeName"
class="fwcs_tabs"
@tab-click="clickTabOne"
>
<el-tab-pane
label="请求参数"
name="0"
>
<ces-table
:ref="`one_qqcs_${indexOne}`"
size="mini"
:border="true"
:headers="sjfwQqcs"
url
:datas="itemOne.datasSj"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
@changeTable="
(val) => {
changeTableOne(val, indexOne);
}
"
></ces-table>
</el-tab-pane>
<el-tab-pane
label="请求体"
name="1"
>
<div class="sjfw_qqt">
<el-radio-group v-model="itemOne.sjfwQqt">
<el-radio label="JSON">JSON</el-radio>
</el-radio-group>
</div>
<v-apaas-code
:key="'code' + indexOne"
:ref="`one_json_${indexOne}`"
></v-apaas-code>
</el-tab-pane>
<el-tab-pane
label="授权信息"
name="2"
>
<el-row class="sqxx_row">
<el-col :span="6">
<div class="sqxx_title">授权方式:</div>
<el-select
v-model="itemOne.sqfsVal"
placeholder="请选择"
class="sqxx_select"
>
<el-option
v-for="item in optionsSq"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-col>
<el-col
:span="2"
class="center_line_c"
>
<div class="center_line_one"></div>
</el-col>
<el-col :span="16">
<div class="sqxx_title">Token:</div>
<el-input
v-model="itemOne.tokenVal"
placeholder="请输入内容"
></el-input>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane
label="请求头Header"
name="3"
>
<ces-table
ref="fwcs_zhfw_qqtcs"
size="mini"
:border="true"
:headers="sjfwQqtcs"
url
:datas="datasQqu"
:searchShow="false"
:addRowBtn="false"
:autoAdd="true"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</el-tab-pane>
</el-tabs>
<div v-show="itemOne.resultShow">
<div v-show="itemOne.resSuccess">
<div class="sjfw_qqcstx">请求参数信息填写:</div>
<ces-table
:ref="`one_qqxx_${indexOne}`"
size="mini"
:border="true"
:headers="sjfwQqcstx"
url
:datas="itemOne.datasQqcs"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
<div class="sjfw_fhcstx">返回参数信息填写:</div>
<ces-table
:ref="`one_fhxx_${indexOne}`"
size="mini"
:border="true"
:headers="sjfwFhcstx"
url
:datas="itemOne.datasFhcs"
:searchShow="false"
:addRowBtn="false"
:autoAdd="false"
:isDialog="false"
:isSelection="false"
:isIndex="true"
:radius="true"
:emptyText="emptyText"
:stripe="false"
:paginationShow="false"
:pageSizeShow="false"
headerCellClassName="th_pink"
></ces-table>
</div>
<div v-show="!itemOne.resSuccess">
<div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ">
<div class="skcs_jg">
<img
src="@/assets/imgs/test_icon_error.png"
class="skcs_jg_img"
/>&nbsp;测试失败
</div>
</div>
</div>
</div>
<div class="btn_footer_one">
<el-button
v-if="
indexOne + 1 == liucheng_list.length && itemOne.resSuccess
"
class="new_one"
@click="newOne(indexOne)"
>新增服务地址</el-button>
<el-button
v-if="!(indexOne == liucheng_list.length || liucheng_list.length == 1)"
class="del_one"
@click="delOne(indexOne)"
>移除</el-button>
<el-button
v-if="itemOne.resultShow"
class="reset_one"
@click="resetOne(indexOne)"
>重置</el-button>
<el-button
v-if="
indexOne + 1 == liucheng_list.length && itemOne.resSuccess
"
class="next_one"
@click="nextOne"
>
下一步
</el-button>
</div>
</div>
</block-radius>
</div>
</div>
<div v-else>
<block-radius>
<div class="fwcs_add">
<el-form
ref="form"
:model="form"
:rules="process_id == '' ? rules : rules_process"
>
<el-form-item prop="name">
<p class="formname">服务名称:</p>
<el-input
v-model="form.name"
placeholder="请输入服务名称"
class="form_in"
></el-input>
</el-form-item>
<el-form-item prop="desc">
<p class="formname">服务描述:</p>
<el-input
type="textarea"
v-model="form.desc"
placeholder="请输入服务描述"
class="form_in"
></el-input>
</el-form-item>
<el-form-item prop="area">
<p class="formname">服务领域:</p>
<el-select
v-model="form.area"
placeholder="请选择"
class="form_in"
>
<el-option
v-for="item in optionsArea"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item prop="origin">
<p class="formname">所属组织:</p>
<el-input
v-model="form.origin"
class="form_in"
:disabled="true"
></el-input>
</el-form-item>
<el-form-item>
<p class="formname">服务封面:</p>
<upload-file
:multiple="false"
:max="1"
type="cropper"
:readOnly="false"
:list="cover"
@getNewList="getNewList"
></upload-file>
</el-form-item>
<el-form-item>
<p class="formname">接口编码:</p>
<el-input
v-model="form.code"
class="form_in"
:disabled="true"
></el-input>
</el-form-item>
<el-form-item prop="resource">
<p class="formname">开放程度:</p>
<el-radio-group v-model="form.resource">
<el-radio :label="1">共享</el-radio>
<el-radio :label="2">受限</el-radio>
<el-radio :label="3">敏感</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="is_map != 0"
class="btn_footer"
>
<el-button
class="previous"
@click="goBack('map')"
>
{{ mapBackText }}
</el-button>
<el-button
class="registe"
:disabled="mapR"
@click="registeMap"
>
服务发布
</el-button>
</el-form-item>
<el-form-item
v-else-if="process_id != ''"
class="btn_footer"
>
<el-button
class="previous"
@click="goBack('process')"
>
返回流程管理
</el-button>
<el-button
class="registe"
:disabled="proR"
@click="registeProcess"
>
服务发布
</el-button>
</el-form-item>
<el-form-item
v-else
class="btn_footer"
>
<el-button
class="previous"
@click="previous"
>上一步</el-button>
<el-button
class="registe"
:disabled="fwR"
@click="registe"
>服务注册</el-button>
</el-form-item>
</el-form>
</div>
</block-radius>
</div>
<div style="display: none">
<iframe
id="listener"
:src="addPortalItemUrl"
></iframe>
</div>
<apass-dialog
ref="alertChange"
:title="dialogInfo.title"
:msg="dialogInfo.msg"
:submit="dialogInfo.submit"
:cancelHide="true"
></apass-dialog>
</div>
</template>
<script>
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const gisPortalSiteName = window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal";
import BlockRadius from "@/components/general/block-radius";
import CesTable from "@/components/table/table-um";
import Codes from "@/components/general/codes";
import uploadFile from "@/components/general/upload_file";
import helper from "@/services/helper";
import apassDialog from "@/components/apass-dialog";
export default {
components: {
BlockRadius,
CesTable,
apassDialog,
"v-apaas-code": Codes,
uploadFile
},
data() {
return {
liucheng_list: [
{
one_input: "",
select: "GET",
serviceUrl: "",
datasSj: [],
sjfwQqt: "JSON",
sqfsVal: "",
tokenVal: "",
noSearchUrl: "",
resultShow: false,
resSuccess: false,
requestRules: 0,
responseRules: 0,
request_fields: [],
response_fields: [],
checkPass: false,
dataType: "",
body_fields: [],
param_fields: []
}
],
rulesOne: {
one_input: [
{ required: true, message: "请输入服务名称", trigger: "blur" },
{ min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }
]
},
addPortalItemUrl:
gisServiceUrl +
"/" +
gisPortalSiteName +
"/apaasplat/viewer/addPortalItem.html",
btnList: [],
activeBtn: null,
serviceUrl: "",
select: "GET",
optionType: [
{ label: "GET", value: "GET" },
{ label: "POST", value: "POST" },
{ label: "PUT", value: "PUT" },
{ label: "DELETE", value: "DELETE" }
],
optionType1: [{ label: "GET", value: "GET" }],
optionType2: [
{ label: "GET", value: "GET" },
{ label: "POST", value: "POST" }
],
activeName: "0",
activeZh: "0",
sjfwQqcs: [
{
label: "请求字段编码",
prop: "requestEncoding",
type: "input",
align: "left"
},
{ label: "请求值", prop: "requestValue", type: "input", align: "left" }
],
sjfwQqcstx: [
{ label: "字段编码", prop: "name", type: "", align: "left" },
{ label: "示例值", prop: "example", type: "input", align: "left" },
{
label: "字段类型",
prop: "show_type",
type: "",
align: "left",
width: "140"
},
{
label: "字段名称*",
prop: "label",
type: "input",
align: "left"
},
{
label: "是否必须*",
prop: "is_must",
type: "select",
align: "left",
width: 100,
selectArr: [
{ label: "", value: 1 },
{ label: "", value: 0 }
],
hasDefault: true
},
{ label: "字段说明", prop: "descript", type: "input", align: "left" }
],
sjfwFhcstx: [
{ label: "字段编码", prop: "name", type: "", align: "left" },
{ label: "示例值", prop: "example", type: "input", align: "left" },
{ label: "字段类型", prop: "show_type", type: "", align: "left" },
{
label: "字段名称*",
prop: "label",
type: "input",
align: "left"
},
{ label: "字段说明", prop: "descript", type: "input", align: "left" }
],
zhfwQqcsForm: [
{ label: "请求字段编码", prop: "key", type: "input", align: "left" },
{
label: "参数类型",
prop: "field_type",
type: "select",
align: "center",
width: 100,
selectArr: [
{ label: "text", value: "text" },
{ label: "file", value: "file" }
]
},
{
label: "请求值",
prop: "val",
type: "upload",
align: "center",
uploadKey: "field_type"
},
{
label: "操作",
type: "Button",
align: "center",
width: 100,
btnList: [
{
type: "primary-del",
label: "删除"
}
]
}
],
sjfwQqtcs:[
{
label: "key",
prop: "requestEncoding",
type: "input",
align: "left"
},
{ label: "value", prop: "requestValue", type: "input", align: "left" }
],
datasQqu:[],
datasZhForm: [],
datasZhwww: [],
emptyText: "暂无数据",
resultShow: false,
resSuccess: false,
optionsSq: [{ label: "Bearer Token", value: "Bearer" }],
sqfsVal: "",
tokenVal: "",
sjfwQqt: "JSON",
zhfwQqt: "JSON",
skfwQqt: "",
skfwRadios: [],
optionsZhyy: [],
zhyyVal: 22,
jcxxtx: false,
form: {
name: "",
desc: "",
area: "",
origin: "",
code: "自动生成",
resource: 1
},
rules: {
name: [
{ required: true, message: "请输入服务名称", trigger: "blur" },
{ min: 0, max: 15, message: "服务名称不超过15个字", trigger: "blur" }
],
desc: [
{ required: true, message: "请输入服务描述", trigger: "blur" },
{
min: 0,
max: 200,
message: "服务描述不超过200个字",
trigger: "blur"
}
],
area: [
{ required: true, message: "请选择服务领域", trigger: "change" }
],
origin: [
{ required: true, message: "请选择所属组织", trigger: "blur" }
],
resource: [
{ required: true, message: "请选择开放程度", trigger: "blur" }
]
},
rules_process: {
name: [
{ required: true, message: "请输入服务名称", trigger: "blur" },
{
min: 0,
max: 100,
message: "服务名称不超过100个字",
trigger: "blur"
}
],
desc: [
{ required: true, message: "请输入服务描述", trigger: "blur" },
{
min: 0,
max: 400,
message: "服务描述不超过400个字",
trigger: "blur"
}
],
area: [{ required: true, message: "请选择服务领域", trigger: "blur" }],
origin: [
{ required: true, message: "请选择所属组织", trigger: "blur" }
],
resource: [
{ required: true, message: "请选择开放程度", trigger: "blur" }
]
},
cover: [],
optionsArea: [],
datasSj: [],
datasZh: [],
datasQqcs: [],
datasFhcs: [],
request_fields: [],
response_fields: [],
noSearchUrl: "",
requestRules: 0,
responseRules: 0,
is_map: 0,
mapBackText: "返回智能制图",
process_id: "",
param_fields: [],
body_fields: [],
dialogInfo: {
title: "时空服务参数已修改",
msg: "",
submit: null
},
is_portal: false,
portal_id: "",
dataType: "",
jkwds: [],
gz_fhsjgs: "JSON",
code_1_index: 0,
code_2_index: 0,
user_id: "",
fwR: false,
mapR: false,
proR: false
};
},
computed: {},
watch: {},
methods: {
getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
} else {
console.log(data.errMsg);
}
});
},
clickBtn(val) {
this.resultShow = false;
this.activeBtn = val;
this.select = "GET";
this.serviceUrl = "";
this.noSearchUrl = "";
this.gz_fhsjgs = "JSON";
this.zhyyVal = 22;
this.datasSj = [];
this.tokenVal = "";
this.datasZh = [];
this.zhfwQqt = "JSON";
this.datasZhForm = [];
this.datasZhwww = [];
this.liucheng_list = [
{
one_input: "",
select: "GET",
serviceUrl: "",
datasSj: [],
sjfwQqt: "JSON",
sqfsVal: "",
tokenVal: "",
noSearchUrl: "",
resultShow: false,
resSuccess: false,
requestRules: 0,
responseRules: 0,
request_fields: [],
response_fields: [],
checkPass: false,
dataType: "",
body_fields: [],
param_fields: []
}
];
this.activeName = "0";
this.code_1_index += 1;
this.code_2_index += 1;
this.jkwds = [];
},
getUrl(enUrl) {
enUrl = enUrl.replace(/\s*/g, "");
let url = decodeURI(enUrl);
let arr = [];
if (url.indexOf("?") != -1) {
this.noSearchUrl = url.substring(0, url.indexOf("?"));
let search = url.substring(url.indexOf("?") + 1);
let vars = search.split("&");
for (let i = 0; i < vars.length; i++) {
if (vars[i] != "") {
let pair = vars[i].split("=");
arr[i] = {};
arr[i].requestEncoding = pair[0] ? pair[0] : "";
arr[i].requestValue = pair[1] ? pair[1] : "";
}
}
} else {
this.noSearchUrl = enUrl;
}
this.serviceUrl = url;
if (this.activeBtn == 0 || this.activeBtn == 3) {
this.datasSj = arr;
} else if (this.activeBtn == 4) {
this.datasZh = arr;
}
},
clickFwcs() {
let headers = {};
let requestData = {};
let requestHeaderDataObj = {};
if (this.activeBtn == 0 || this.activeBtn == 3) {
if (this.sqfsVal != "") {
headers.Authorization = [];
headers.Authorization[0] = this.sqfsVal + " " + this.tokenVal;
}
let request = this.$refs.fwcs_sjfw_qq.getTableData();
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
);
}
}
}
} else if (this.activeBtn == 1) {
} else if (this.activeBtn == 4 && this.zhyyVal != 34) {
let request = this.$refs.fwcs_zhfw_qq.getTableData();
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
);
}
}
}
}
if(this.activeBtn == 0 || this.activeBtn == 2 || this.activeBtn == 3 || this.activeBtn == 4){
let requestHeader = this.$refs.fwcs_zhfw_qqtcs.getTableData();
for (let i = 0; i < requestHeader.length; i++) {
if (
requestHeader[i] &&
requestHeader[i].requestEncoding &&
requestHeader[i].requestValue &&
requestHeader[i].requestEncoding != "" &&
requestHeader[i].requestValue != ""
) {
console.log(Object.keys(requestHeaderDataObj).indexOf(requestHeader[i].requestEncoding) == -1)
if (
Object.keys(requestHeaderDataObj).indexOf(requestHeader[i].requestEncoding) == -1
) {
requestHeaderDataObj[requestHeader[i].requestEncoding] = [];
requestHeaderDataObj[requestHeader[i].requestEncoding][0] = requestHeader[i].requestValue;
} else {
requestHeaderDataObj[requestHeader[i].requestEncoding].push(
requestHeader[i].requestValue
);
}
}
}
headers = Object.assign(headers, requestHeaderDataObj)
}
let bodys = "";
let contentType = "";
if (this.activeBtn == 0 || this.activeBtn == 3) {
bodys = this.$refs.jsonCodes ? this.$refs.jsonCodes.getCodesVal() : "";
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == "1") {
contentType = this.zhfwQqt;
if (this.zhfwQqt == "JSON") {
bodys = this.$refs.zhfwJsonCodes
? this.$refs.zhfwJsonCodes.getCodesVal()
: "";
} else if (this.zhfwQqt == "form-data") {
let request = this.$refs.fwcs_zhfw_qq_form.getTableData().concat();
request.pop();
bodys = JSON.stringify(request);
} else if (this.zhfwQqt == "x-www-form-urlencoded") {
let request = this.$refs.fwcs_zhfw_www.getTableData().concat();
let arr = [];
request.pop();
request.forEach(item => {
arr.push({
key: item.requestEncoding,
val: item.requestValue,
field_type: "text"
});
});
bodys = JSON.stringify(arr);
}
}
}
let query = {
method: this.select,
url: this.serviceUrl,
headers: headers,
params: requestData,
body: bodys,
content_type: contentType,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2:
this.activeBtn == 0
? 12
: this.activeBtn == 1
? this.skfwQqt
: this.activeBtn == 4
? this.zhyyVal
: 0,
response_type: this.activeBtn == 3 ? this.gz_fhsjgs : "JSON"
};
this.$api.workbench.fwzcFwcs(query).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.body_fields = data.body_fields;
this.param_fields = data.param_fields;
if (data.body_fields && data.body_fields.length != 0) {
this.datasQqcs = data.body_fields;
this.dataType = "body";
} else {
this.datasQqcs = data.param_fields;
this.dataType = "param";
}
this.datasFhcs = data.response_fields;
this.resSuccess = true;
this.resultShow = true;
} else {
this.resSuccess = false;
this.resultShow = true;
console.log(response.data.errMsg);
}
});
},
clickTab() {},
resetSjfw() {
this.clickFwcs();
},
nextJcxx() {
if (
this.activeBtn == 0 ||
this.activeBtn == 2 ||
this.activeBtn == 3 ||
(this.activeBtn == 4 && (this.zhyyVal == 22 || this.zhyyVal == 23))
) {
if (this.activeBtn == 2 || this.activeBtn == 3) {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
if (
this.activeBtn == 2 ||
(this.activeBtn == 4 && this.zhyyVal == 22)
) {
this.request_fields = [];
this.response_fields = [];
this.jcxxtx = true;
this.getOrganization();
} else {
let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData();
let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData();
this.requestRules = 0;
this.responseRules = 0;
this.checkTable(requestData, 0);
this.checkTable(responseData, 1);
if (this.requestRules == 0 && this.responseRules == 0) {
this.request_fields = requestData;
this.response_fields = responseData;
this.jcxxtx = true;
this.getOrganization();
} else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) {
this.$message.error("请完善返回参数信息中的字段名称");
}
}
}
} else {
let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData();
let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData();
this.requestRules = 0;
this.responseRules = 0;
this.checkTable(requestData, 0);
this.checkTable(responseData, 1);
if (this.requestRules == 0 && this.responseRules == 0) {
this.request_fields = requestData;
this.response_fields = responseData;
this.jcxxtx = true;
this.getOrganization();
} else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) {
this.$message.error("请完善返回参数信息中的字段名称");
}
}
} else if (this.activeBtn == 1) {
let value = helper.getQueryString("id", this.serviceUrl);
console.log(value);
if (value && value != "") {
this.getItemInfo(value);
} else {
this.form.name = "";
this.form.desc = "";
this.form.area = "";
this.cover = [];
}
this.request_fields = [];
this.response_fields = [];
this.jcxxtx = true;
this.getOrganization();
} else {
this.request_fields = [];
this.response_fields = [];
this.jcxxtx = true;
this.getOrganization();
}
},
checkTable(arr, rule) {
let self = this;
for (let i = 0; i < arr.length; i++) {
if (arr[i].name && arr[i].name != "") {
if (!arr[i].label || arr[i].label == "") {
if (rule == 0) {
this.requestRules = 1;
} else if (rule == 1) {
this.responseRules = 1;
}
return false;
}
}
if (arr[i].children && arr[i].children.length != 0) {
self.checkTable(arr[i].children, rule);
}
}
},
// edit form
getNewList(val) {
this.cover[0] = val[0].url;
},
previous() {
this.datasQqcs = this.request_fields;
this.datasFhcs = this.response_fields;
this.jcxxtx = false;
},
getNewListOne(val) {
this.jkwds[0] = val[0].url;
},
getOrganization() {
if (this.$store.state.userInfo && this.$store.state.userInfo.user_id) {
let query = {
id: this.$store.state.userInfo.user_id
};
this.$api.user.getUserDetail(query).then(request => {
if (request.data.success == 1) {
this.form.origin = request.data.data.department;
this.oid = request.data.data.department_id;
} else {
console.log(response.data.errMsg);
}
});
} else {
let self = this;
self.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
self.$store.commit("userInfofun", data.data);
let query = {
id: self.$store.state.userInfo.user_id
};
self.$api.user.getUserDetail(query).then(request => {
if (request.data.success == 1) {
self.form.origin = request.data.data.department;
self.oid = request.data.data.department_id;
} else {
console.log(response.data.errMsg);
}
});
} else {
console.log(data.errMsg);
}
});
}
},
registeMap() {
this.$refs.form.validate(valid => {
if (valid) {
if (this.cover.length != 0) {
this.mapR = true;
let query = {};
if (this.is_map == 1 || this.is_map == 5) {
query = {
name: this.form.name,
sectors: this.form.area,
organization: this.form.origin,
cover: this.cover[0],
openness: this.form.resource,
descript: this.form.desc,
data_service_type1: 6,
data_service_type2: this.skfwQqt,
encode_method: this.form.code,
portal_id: this.portal_id,
doc_file: "",
urls: [
{
name: "",
response_type: "JSON",
req_auth_mthod: 0,
req_auth_token: "",
method: "GET",
url: this.serviceUrl,
request_fields: [],
request_query_fields: [],
response_fields: [],
content_type: "JSON"
}
]
};
} else if (this.is_map == 4) {
query = {
name: this.form.name,
sectors: this.form.area,
organization: this.form.origin,
cover: this.cover[0],
openness: this.form.resource,
descript: this.form.desc,
data_service_type1: 21,
data_service_type2: 34,
encode_method: this.form.code,
portal_id: this.portal_id,
urls: [
{
name: "",
response_type: "JSON",
req_auth_mthod: 0,
req_auth_token: "",
method: "GET",
url: this.serviceUrl,
request_fields: [],
request_query_fields: [],
response_fields: [],
content_type: "JSON"
}
]
};
}
this.$api.workbench.serviceAdd(query).then(response => {
this.mapR = false;
if (response.data.success == 1) {
this.$message.success("服务发布成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
} else {
this.$message.error("请上传服务封面");
}
} else {
this.$message.error("请完善服务基本信息");
}
});
},
registeProcess() {
this.$refs.form.validate(valid => {
if (valid) {
if (this.cover.length != 0) {
this.proR = true;
let query = {
workflows_id: Number(this.process_id), // 服务流程id
service_name: this.form.name, // 服务名称
describe: this.form.desc, // 服务描述
sector: this.form.area, // 服务领域id
oid: this.oid, // 组织id
encode_method: this.form.code, // 接口编码
cover: this.cover[0], // 服务封面
openness: this.form.resource // 开放程度,1共享/2受限/3敏感
};
this.$api.workbench.releaseProcess(query).then(response => {
this.proR = false;
if (response.data.success == 1) {
this.$message.success("服务发布成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
} else {
this.$message.error("请上传服务封面");
}
} else {
this.$message.error("请完善服务基本信息");
}
});
},
registe() {
if (this.activeBtn == 4 && this.zhyyVal == 24) {
this.registeOne();
} else {
this.registePt();
}
},
registePt() {
this.$refs.form.validate(valid => {
if (valid) {
if (
(this.activeBtn == 2 && this.jkwds.length == 0) ||
(this.activeBtn == 3 && this.jkwds.length == 0)
) {
this.$message.error("请上传接口文档");
} else {
if (this.cover.length != 0) {
let contentType = "";
if (
this.activeBtn == 1 &&
!this.is_portal &&
window.serviceConfig &&
window.serviceConfig.state == "needLogin"
) {
this.addPortalItem();
} else {
this.fwR = true;
if (
this.activeBtn == 0 ||
this.activeBtn == 2 ||
this.activeBtn == 3
) {
contentType = this.sjfwQqt;
} else if (this.activeBtn == 4) {
if (this.activeZh == "1") {
contentType = this.zhfwQqt;
}
}
let query = {
name: this.form.name,
sectors: this.form.area,
organization: this.form.origin,
cover: this.cover[0],
openness: this.form.resource,
descript: this.form.desc,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2:
this.activeBtn == 0
? 12
: this.activeBtn == 1
? this.skfwQqt
: this.activeBtn == 4
? this.zhyyVal
: 0,
portal_id: this.portal_id,
encode_method: this.form.code,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
urls: [
{
name: "",
response_type:
this.activeBtn == 3 ? this.gz_fhsjgs : "JSON",
req_auth_mthod: 0,
req_auth_token: this.tokenVal,
method: this.select,
url: this.serviceUrl,
request_fields:
this.dataType == "body"
? this.request_fields
: this.body_fields,
request_query_fields:
this.dataType == "param"
? this.request_fields
: this.param_fields,
response_fields: this.response_fields,
content_type: contentType
}
]
};
this.$api.workbench.serviceAdd(query).then(response => {
this.fwR = false;
if (response.data.success == 1) {
this.$message.success("服务注册成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
}
} else {
this.$message.error("请上传服务封面");
}
}
} else {
this.$message.error("请完善服务基本信息");
}
});
},
registeOne() {
this.$refs.form.validate(valid => {
if (valid) {
if (this.cover.length != 0) {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
this.fwR = true;
let urls = [];
this.liucheng_list.forEach(item => {
urls.push({
req_name: item.one_input,
response_type: "JSON",
req_auth_mthod: 0,
req_auth_token: item.tokenVal,
method: item.select,
url: item.serviceUrl,
request_fields:
item.dataType == "body"
? item.request_fields
: item.body_fields,
request_query_fields:
item.dataType == "param"
? item.request_fields
: item.param_fields,
response_fields: item.response_fields,
content_type: "JSON"
});
});
let query = {
name: this.form.name,
sectors: this.form.area,
organization: this.form.origin,
cover: this.cover[0],
openness: this.form.resource,
descript: this.form.desc,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: 24,
portal_id: this.portal_id,
encode_method: this.form.code,
urls: urls,
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : ""
};
this.$api.workbench.serviceAdd(query).then(response => {
this.fwR = false;
if (response.data.success == 1) {
this.$message.success("服务注册成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
}
} else {
this.$message.error("请上传服务封面");
}
} else {
this.$message.error("请完善服务基本信息");
}
});
},
changeTable(val) {
let search = "?";
for (let i = 0; i < val.length; i++) {
if (val[i].requestEncoding != "") {
search =
search +
val[i].requestEncoding +
"=" +
(val[i].requestValue ? val[i].requestValue : "") +
"&";
}
}
let searchDel = search.substring(0, search.length - 1);
this.serviceUrl = this.noSearchUrl + searchDel;
},
delItemQq(val) {
let arr = this.$refs.fwcs_zhfw_qq_form.getTableData();
this.delById(arr, val.id);
},
delById(arr, id) {
let self = this;
for (let i = 0; i < arr.length; i++) {
if (arr[i].id == id) {
arr.splice(i, 1);
return false;
}
if (arr[i].children && arr[i].children.length != 0) {
self.delById(arr[i].children, id);
}
}
},
changeZhType(val) {
this.serviceUrl = "";
this.select = "GET";
this.activeZh = "0";
this.resultShow = false;
this.resSuccess = false;
},
changeZhfwQqt() {},
getArea() {
this.$api.workbench.getServiceAreaList().then(response => {
if (response.data.success == 1) {
this.optionsArea = response.data.data;
} else {
console.log(response.data.errMsg);
}
});
},
getServiceType1() {
this.$api.workbench.getServiceTypeList().then(response => {
if (response.data.success == 1) {
let arr = response.data.data;
arr.forEach(item => {
switch (item.id) {
case 5:
item.default = "nav_ic_shujufw";
item.active = "nav_ic_shujufw_sel";
break;
case 6:
item.default = "nav_ic_shikongfw";
item.active = "nav_ic_shikongfw_sel";
break;
case 7:
item.default = "nav_ic_shipinfw";
item.active = "nav_ic_shipinfw_sel";
break;
case 10:
item.default = "nav_ic_ganzhifw";
item.active = "nav_ic_ganzhifw_sel";
break;
case 21:
item.default = "nav_ic_zonghefw";
item.active = "nav_ic_zonghefw_sel";
break;
case 36:
item.default = "nav_ic_chanpinzy";
item.active = "nav_ic_chanpinzy_sel";
break;
default:
break;
}
});
this.btnList = arr;
let skfwRadios = this.btnList[1].childDomains;
skfwRadios = skfwRadios.filter(function(item) {
return item.name != "地图" && item.name != "三维地图";
});
this.skfwRadios = skfwRadios;
this.skfwQqt = this.skfwRadios[0].id;
this.optionsZhyy = this.btnList[4].childDomains;
this.activeBtn = 0;
} else {
console.log(response.data.errMsg);
}
});
},
judgeMap() {
let self = this;
if (self.$route.query.map && self.$route.query.map != 0) {
self.is_map = self.$route.query.map;
self.jcxxtx = true;
if (self.$store.state.znztParams) {
self.mapBackText = "返回智能制图";
let data = this.$store.state.znztParams;
self.form.name = data.name;
self.form.desc = data.descript;
self.form.area = Number(data.sectors);
self.serviceUrl = data.url;
self.skfwQqt = Number(data.data_service_type2);
self.cover[0] = data.cover;
self.portal_id = data.portalid;
self.is_portal = true;
} else if (self.$store.state.cesiumMapParams) {
self.mapBackText = "返回三维制图";
let data = this.$store.state.cesiumMapParams;
self.form.name = data.name;
self.form.desc = data.descript;
self.form.area = Number(data.sectors);
self.serviceUrl = data.url;
self.skfwQqt = Number(data.data_service_type2);
self.cover[0] = data.cover;
self.portal_id = data.portalid;
self.is_portal = true;
} else if (self.$store.state.appBuilderParams) {
self.mapBackText = "返回Web应用程序";
let data = this.$store.state.appBuilderParams;
self.form.name = data.name;
self.form.desc = data.descript;
self.form.area = Number(data.sectors);
self.serviceUrl = data.url;
self.skfwQqt = Number(data.data_service_type2);
self.cover[0] = data.cover;
self.portal_id = data.portalid;
self.is_portal = true;
}
this.getOrganization();
} else if (self.$route.query.process) {
self.process_id = self.$route.query.process;
self.jcxxtx = true;
this.getProcessDetail();
this.getOrganization();
} else {
self.is_map = 0;
self.getServiceType1();
}
},
goBack(type) {
let self = this;
if (type == "map") {
// self.$store.commit("setZnztDetailsParams", {
// type: "",
// queryType: "webmap",
// id: self.portal_id,
// });
// this.$router.push("/intelligent_drawing");
if (self.is_map == 1) {
let shareWebMapParam = JSON.parse(
window.sessionStorage.getItem("shareWebMapParam")
);
window.location.href =
"/vmap/#/map" + `?id=${shareWebMapParam.portalid}`;
} else if (self.is_map == 4) {
self.$router.back(-1);
} else if (self.is_map == 5) {
let shareCesiumMapParam = JSON.parse(
window.sessionStorage.getItem("shareCesiumMapParam")
);
window.location.href =
"/cesiummap/#/map" + `?id=${shareCesiumMapParam.portalid}`;
} else {
let shareWebMapParam = JSON.parse(
window.sessionStorage.getItem("shareWebMapParam")
);
window.location.href =
"/vmap/#/map" + `?id=${shareWebMapParam.portalid}`;
}
} else if (type == "process") {
this.$router.push("/progress/designer");
}
},
addPortalItem() {
console.log("添加portal");
let self = this;
document.getElementById("listener").contentWindow.postMessage(
{
cmd: "addPortalItem",
params: {
name: self.form.name,
url: self.serviceUrl,
sectors: self.form.area,
data_service_type2: self.skfwQqt,
descript: self.form.desc
}
},
"*"
);
},
getItemInfo(itemid) {
console.log(`获取portal参数${itemid}`);
document.getElementById("listener").contentWindow.postMessage(
{
cmd: "getPortalItemInfo",
params: itemid
},
"*"
);
},
listeners(event) {
let self = this;
if (event && event.origin == gisServiceUrl && event.data) {
if (event.data.cmd == "getPortalItemInfo") {
console.log(event.data.params);
let data = event.data.params;
self.form.name = data.name;
self.form.desc = data.descript;
self.form.area = Number(data.sectors);
self.portal_id = data.portalid;
self.cover[0] = data.cover;
if (
self.serviceUrl != data.url ||
self.skfwQqt != Number(data.data_service_type2)
) {
self.serviceUrl = data.url;
self.skfwQqt = Number(data.data_service_type2);
self.dialogInfo.msg = `您的时空服务地址已更新为${
self.serviceUrl
},服务类型更新为${
self.skfwRadios.find(item => {
return item.id == self.skfwQqt;
}).name
}`;
self.dialogInfo.submit = () => {
self.$refs.alertChange.hide();
};
self.$refs.alertChange.show();
}
self.is_portal = true;
} else if (event.data.cmd == "getPortalItemInfoError") {
console.log(event.data.params);
self.is_portal = false;
} else if (event.data.cmd == "addPortalItem") {
console.log(event.data.params);
self.portal_id = event.data.params;
self.is_portal = true;
self.registe();
} else if (event.data.cmd == "addPortalItemError") {
console.log(event.data.params);
self.is_portal = false;
}
}
},
getProcessDetail() {
this.$api.workbench
.getProcessDetail({ id: this.process_id })
.then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.form.name = data.name;
this.form.desc = data.describe;
this.cover.push(
"/apaas/static/docs/image/image/blob_75dc5c77-754c-440d-8320-92ba68d239d5.blob"
);
}
});
},
newOne(indexOne) {
this.$refs["ruleFormOne_" + indexOne][0].validate(valid => {
if (valid) {
if (this.liucheng_list[indexOne].resSuccess) {
this.checkOne(indexOne, true);
console.log(this.liucheng_list[indexOne]);
if (this.liucheng_list[indexOne].checkPass) {
this.liucheng_list.push({
one_input: "",
select: "GET",
serviceUrl: "",
datasSj: [],
sjfwQqt: "JSON",
sqfsVal: "",
tokenVal: "",
noSearchUrl: "",
resultShow: false,
resSuccess: false,
requestRules: 0,
responseRules: 0,
request_fields: [],
response_fields: [],
checkPass: false,
dataType: "",
body_fields: [],
param_fields: []
});
} else {
this.$message.error(`请完善服务${indexOne + 1}中的信息`);
}
} else {
this.$message.error("请完善该服务测试");
}
} else {
this.$message.error("请填写该服务名称");
}
});
},
getUrlOne(enUrl, indexOne) {
enUrl = enUrl.replace(/\s*/g, "");
let url = decodeURI(enUrl);
let arr = [];
if (url.indexOf("?") != -1) {
this.liucheng_list[indexOne].noSearchUrl = url.substring(
0,
url.indexOf("?")
);
let search = url.substring(url.indexOf("?") + 1);
let vars = search.split("&");
for (let i = 0; i < vars.length; i++) {
if (vars[i] != "") {
let pair = vars[i].split("=");
arr[i] = {};
arr[i].requestEncoding = pair[0] ? pair[0] : "";
arr[i].requestValue = pair[1] ? pair[1] : "";
}
}
} else {
this.liucheng_list[indexOne].noSearchUrl = enUrl;
}
this.liucheng_list[indexOne].serviceUrl = url;
this.liucheng_list[indexOne].datasSj = arr;
},
clickTabOne() {},
changeTableOne(val, indexOne) {
let search = "?";
for (let i = 0; i < val.length; i++) {
if (val[i].requestEncoding != "") {
search =
search +
val[i].requestEncoding +
"=" +
(val[i].requestValue ? val[i].requestValue : "") +
"&";
}
}
let searchDel = search.substring(0, search.length - 1);
this.liucheng_list[indexOne].serviceUrl =
this.liucheng_list[indexOne].noSearchUrl + searchDel;
},
resetOne(indexOne) {
this.clickFwcsOne(indexOne);
},
nextOne() {
let hasError = false;
this.liucheng_list.forEach((item, index) => {
this.checkOne(index, false);
if (!item.checkPass) {
hasError = true;
this.$message.error(`请完善服务${index + 1}中的参数信息`);
return false;
}
});
if (!hasError) {
this.jcxxtx = true;
this.getOrganization();
}
},
delOne(indexOne) {
this.liucheng_list.splice(indexOne, 1);
},
clickFwcsOne(indexOne) {
// console.log(this.$refs["one_qqcs_" + indexOne][0]);
let headers = {};
let requestData = {};
let dataOne = this.liucheng_list[indexOne];
if (dataOne.sqfsVal != "") {
headers.Authorization = [];
headers.Authorization[0] = dataOne.sqfsVal + " " + dataOne.tokenVal;
}
let request = this.$refs["one_qqcs_" + indexOne][0].getTableData();
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 bodys = "";
let contentType = "";
bodys = this.$refs["one_json_" + indexOne][0].getCodesVal();
contentType = dataOne.sjfwQqt;
let query = {
method: dataOne.select,
url: dataOne.serviceUrl,
headers: headers,
params: requestData,
body: bodys,
content_type: contentType,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: 24,
response_type: "JSON"
};
this.$api.workbench.fwzcFwcs(query).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.liucheng_list[indexOne].body_fields = data.body_fields;
this.liucheng_list[indexOne].param_fields = data.param_fields;
if (data.body_fields && data.body_fields.length != 0) {
this.liucheng_list[indexOne].datasQqcs = data.body_fields;
this.liucheng_list[indexOne].dataType = "body";
} else {
this.liucheng_list[indexOne].datasQqcs = data.param_fields;
this.liucheng_list[indexOne].dataType = "param";
}
this.liucheng_list[indexOne].datasFhcs = data.response_fields;
this.liucheng_list[indexOne].resSuccess = true;
this.liucheng_list[indexOne].resultShow = true;
} else {
this.liucheng_list[indexOne].resSuccess = false;
this.liucheng_list[indexOne].resultShow = true;
console.log(response.data.errMsg);
}
});
},
checkOne(indexOne, showEveryOne) {
let requestData = this.$refs["one_qqxx_" + indexOne][0].getTableData();
let responseData = this.$refs["one_fhxx_" + indexOne][0].getTableData();
this.requestRules = 0;
this.responseRules = 0;
this.checkTableOne(requestData, 0, indexOne);
this.checkTableOne(responseData, 1, indexOne);
if (this.requestRules == 0 && this.responseRules == 0) {
this.liucheng_list[indexOne].request_fields = requestData;
this.liucheng_list[indexOne].response_fields = responseData;
this.liucheng_list[indexOne].checkPass = true;
} else if (this.liucheng_list[indexOne].requestRules != 0) {
if (showEveryOne) {
this.$message.error(
`请完善服务${indexOne + 1}中请求参数信息中的字段名称`
);
}
this.liucheng_list[indexOne].checkPass = false;
} else if (this.liucheng_list[indexOne].responseRules != 0) {
if (showEveryOne) {
this.$message.error(
`请完善服务${indexOne + 1}中返回参数信息中的字段名称`
);
}
this.liucheng_list[indexOne].checkPass = false;
}
},
checkTableOne(arr, rule, indexOne) {
let self = this;
for (let i = 0; i < arr.length; i++) {
if (arr[i].name && arr[i].name != "") {
if (!arr[i].label || arr[i].label == "") {
if (rule == 0) {
this.requestRules = 1;
} else if (rule == 1) {
this.responseRules = 1;
}
return false;
}
}
if (arr[i].children && arr[i].children.length != 0) {
self.checkTable(arr[i].children, rule, indexOne);
}
}
}
},
mounted() {
let self = this;
window.addEventListener("message", self.listeners, false);
self.judgeMap();
self.getArea();
},
created() {
let _self = this;
_self.getCurrentUser();
let webmap_data = JSON.parse(sessionStorage.getItem("shareWebMapParam"));
if (webmap_data) {
_self.$store.commit("setZnztParams", webmap_data);
}
let cesiummap_data = JSON.parse(
sessionStorage.getItem("shareCesiumMapParam")
);
if (cesiummap_data) {
_self.$store.commit("setCesiumMapParams", cesiummap_data);
}
let appmap_data = JSON.parse(
sessionStorage.getItem("shareAppBuilderParam")
);
if (appmap_data) {
_self.$store.commit("setAppBuilderParams", appmap_data);
}
}
};
</script>
<style scoped>
.fwcs {
width: 1200px;
margin: 0 auto;
margin-top: -157px;
margin-bottom: 20px;
}
.fwcs_btn_act {
background-color: #e56600;
color: #ffffff;
}
.fwcs_btn_dis {
background-color: #e3e5ef;
color: #8890a7;
}
.fwcs_btn_img {
position: relative;
top: 2px;
margin-right: 4px;
}
.gray_line {
width: 100%;
margin: 20px auto;
height: 1px;
background-color: #dcdfe6;
}
.fwcs_fwdz {
color: #58617a;
margin: 20px 15px 15px;
font-size: 14px;
}
.input-with-select {
width: 70%;
}
.fwcs_btn_fwcs {
background-color: #0f2683;
color: #ffffff;
margin-left: 10px;
}
.sjfw_qqcstx {
color: #58617a;
margin: 10px 15px;
font-size: 14px;
}
.skfw_csfwxx {
color: #58617a;
margin: 10px 15px;
font-size: 14px;
}
.sjfw_fhcstx {
color: #58617a;
margin: 40px 15px 10px;
font-size: 14px;
}
.btn_footer {
display: flex;
justify-content: flex-end;
margin: 40px 10px 10px;
}
.btn_footer .reset {
width: 100px;
background-color: #c3caf8;
color: #0f2683;
}
.btn_footer .next {
width: 100px;
background-color: #0f2683;
color: #f8f9fd;
}
.btn_footer .previous {
background-color: #c3caf8;
color: #0f2683;
}
.btn_footer .registe {
width: 100px;
background-color: #0f2683;
color: #f8f9fd;
}
.sqxx_row {
padding: 0 20px;
}
.sqxx_title {
color: #58617a;
font-size: 14px;
margin: 10px 15px;
}
.sqxx_select {
width: 100%;
}
.center_line_c {
margin: 0 auto;
}
.center_line {
background-color: #f4f7fc;
width: 2px;
height: 400px;
position: relative;
left: 50%;
}
.sjfw_qqt {
margin: 0 20px 15px;
}
.skfw_fwlx {
margin: 20px 15px;
color: #58617a;
font-size: 14px;
}
.skfw_fwlx_radios {
margin: 10px 0 0;
}
.test_succ {
width: 100%;
margin: 0 auto;
}
.skcs_jg {
height: 100px;
display: flex;
align-items: center;
justify-content: center;
color: #0f2683;
font-size: 20px;
}
.skcs_jg_img {
position: relative;
top: 3px;
}
.zhyy_select {
width: 70%;
}
.fwcs_add .formname {
color: #58617a;
font-size: 14px;
margin-left: 10px;
}
.form_in {
width: 1000px;
}
.one_service {
width: 100%;
}
.one_name {
color: #58617a;
font-size: 14px;
margin: 0 15px 10px 15px;
}
.one_name_in {
width: 70%;
}
.one_url {
color: #58617a;
font-size: 14px;
margin: 20px 15px 10px;
}
.btn_footer_one {
margin: 40px 10px 10px;
}
.new_one {
background-color: #515fe7;
color: #e6ebfe;
}
.del_one {
width: 100px;
background-color: #e15260;
color: #fcfafa;
}
.reset_one {
width: 100px;
background-color: #c3caf8;
color: #0f2683;
}
.next_one {
width: 100px;
background-color: #0f2683;
color: #e6ebfe;
float: right;
}
.center_line_one {
background-color: #f4f7fc;
width: 2px;
height: 100px;
position: relative;
left: 50%;
}
.lc_alert {
margin-top: 20px;
background-color: #f8f9fd;
border-radius: 8px;
width: 70%;
padding: 20px;
display: flex;
justify-content: space-between;
color: #8890a7;
}
.lc_alert i {
position: relative;
top: 4px;
}
.lc_alert p {
width: calc(100% - 24px);
}
.title_bc {
color: #a9aec0;
}
.lc_upf {
width: 70%;
}
.gz_fhsjgs_rad {
margin-left: 10px;
}
.ip_block {
border-radius: 8px;
border: solid 1px #e3e5ef;
padding: 10px 0 0 10px;
line-height: 24px;
}
.ip_item {
display: inline-block;
position: relative;
background-color: #e6ebfe;
border-radius: 4px;
color: #0f2683;
font-size: 12px;
line-height: 24px;
padding: 0 26px 0 8px;
margin-right: 10px;
margin-bottom: 10px;
}
.ip_del {
position: absolute;
right: 8px;
top: 6px;
font-size: 14px;
color: #6573ae;
cursor: pointer;
}
.ip_del:hover {
color: #e56600;
}
.add_ip {
background-color: #495feb;
border-radius: 4px;
color: #f8f9fd;
font-size: 12px;
line-height: 24px;
padding: 0 8px;
margin-right: 10px;
margin-bottom: 10px;
}
.ip_input {
width: 110px;
margin-right: 10px;
margin-bottom: 10px;
}
.filebtn {
width: 76px;
height: 32px;
line-height: 32px;
text-align: center;
color: #e6ebfe;
background-color: #515fe7;
border-radius: 6px;
display: inline-block;
font-size: 14px;
margin-left: 8px;
cursor: pointer;
text-decoration: none;
}
.cp_mb {
padding: 0 0 16px 8px;
}
</style>
<style>
.fwcs_fwdz_inner .el-select .el-input {
width: 130px;
background-color: #0f2683;
color: #ffffff;
border-radius: 8px 0px 0px 8px;
}
.fwcs_tabs .el-tabs__header {
margin: 20px 0;
}
.zhyy_select .el-input__prefix,
.el-input__suffix {
position: absolute;
top: 0;
right: 10px;
-webkit-transition: all 0.3s;
height: 100%;
color: #c0c4cc;
text-align: right;
}
.lc_upf .el-upload {
width: 100%;
}
.lc_upf .el-upload-dragger {
width: 100%;
}
.ip_input .el-input__inner {
border-radius: 4px;
padding: 0 8px;
font-size: 12px;
line-height: 24px;
height: 24px;
}
</style>
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