Commit 0986b54d authored by gaoshiyao's avatar gaoshiyao

Merge branch 'dev'

parents 8c069f23 47be4751
......@@ -50,7 +50,7 @@ pipeline:
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: v3.0.2
version: v3.0.3
channel: alpha
args: "TARGETOS=linux,TARGETARCH=amd64" ## 不同架构的构建参数
registry: registry.cn-qingdao.aliyuncs.com
......@@ -69,8 +69,8 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -87,7 +87,7 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0
registry: registry.cn-qingdao.aliyuncs.com
secrets:
......@@ -107,7 +107,7 @@ pipeline:
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-arm64
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: v3.0.2
version: v3.0.3
channel: alpha-arm64
args: "TARGETOS=linux,TARGETARCH=arm64"
registry: registry.cn-qingdao.aliyuncs.com
......@@ -126,8 +126,8 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-alpha-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-arm64
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-alpha-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-arm64
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -136,7 +136,7 @@ pipeline:
target: REGISTRY_PASSWORD
when:
branch:
- master
- [master,dev]
# 生成最终arm版本
latest-arm64:
......@@ -144,7 +144,7 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-arm64
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-arm64
registry: registry.cn-qingdao.aliyuncs.com
secrets:
......@@ -154,7 +154,7 @@ pipeline:
target: REGISTRY_PASSWORD
when:
branch:
- master
- [master,dev]
docker-ppc64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
......@@ -163,7 +163,7 @@ pipeline:
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-ppc64le
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: v3.0.2
version: v3.0.3
channel: alpha-ppc64le
args: "TARGETOS=linux,TARGETARCH=ppc64le"
registry: registry.cn-qingdao.aliyuncs.com
......@@ -181,8 +181,8 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-alpha-ppc64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-ppc64le
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-alpha-ppc64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-ppc64le
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -198,7 +198,7 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-ppc64le
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-ppc64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-ppc64le
registry: registry.cn-qingdao.aliyuncs.com
secrets:
......@@ -217,7 +217,7 @@ pipeline:
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-mips64le
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: v3.0.2
version: v3.0.3
channel: alpha-mips64le
args: "TARGETOS=linux,TARGETARCH=mips64le"
registry: registry.cn-qingdao.aliyuncs.com
......@@ -235,8 +235,8 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-alpha-mips64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-mips64le
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-alpha-mips64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-mips64le
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -252,7 +252,7 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-mips64le
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-mips64le
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-mips64le
registry: registry.cn-qingdao.aliyuncs.com
secrets:
......@@ -269,9 +269,7 @@ pipeline:
namespace: apaas-v3
deployment: apaas-ui
container: apaas-ui
registry: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-alpha
registry: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.3-alpha
when:
branch:
- dev
......@@ -11,8 +11,10 @@ module.exports = {
assetsPublicPath: "/apaas/ui/",
proxyTable: {
"/apaas": {
//target: "https://apaas.cztest.local/apaas/",
target: "https://apaas3.wodcloud.com/apaas/",
changeOrigin: true,
secure: false,//https证书安全设置为false
pathRewrite: {
"^/apaas": ""
}
......
......@@ -6,19 +6,25 @@
{{ item.title }}
</p>
<p v-if="!(item.prop && item.prop == 'title')">
<span v-if="item.type == 'url'" style="white-space:pre-wrap;">
<span v-if="item.type == 'url'" style="white-space: pre-wrap">
访问地址:
<a :href="item.info" target="_blank">{{ item.info }}</a>
</span>
<span v-else-if="item.type == 'time'">{{ helper.dateStringTransform(item.info) }}</span>
<span v-else v-html="item.info" style="white-space:pre-wrap;"></span>
<span v-else-if="item.type == 'time'">{{
helper.dateStringTransform(item.info)
}}</span>
<span v-else v-html="item.info" style="white-space: pre-wrap"></span>
<span
v-if="item.type && item.type == 'down' && item.url != ''"
class="filebtn"
@click="download(item.url)"
>下载文件</span>
>下载文件</span
>
</p>
<slot v-if="item.type && item.type == 'solt'" :name="item.solt_name"></slot>
<slot
v-if="item.type && item.type == 'solt'"
:name="item.solt_name"
></slot>
</div>
</div>
</template>
......@@ -27,7 +33,7 @@ import helper from "@/services/helper";
export default {
data() {
return {
helper: helper
helper: helper,
};
},
props: ["list_arr"],
......@@ -42,8 +48,8 @@ export default {
a.setAttribute("download", ""); // download属性
a.setAttribute("href", val); // href链接
a.click(); // 自执行点击事件
}
}
},
},
};
</script>
......@@ -54,7 +60,7 @@ a {
.list p {
line-height: 32px;
color: #8890a7;
word-wrap:break-word;
word-wrap: break-word;
}
.list {
margin-bottom: 20px;
......
<template>
<div class="menu">
<img src="../assets/imgs/nav-logo.png" alt class="logo" />
<img
src="../assets/imgs/nav-logo.png"
alt
class="logo"
/>
<div
style="float: right; cursor: pointer; position: relative"
class="user_hover"
......@@ -8,14 +12,20 @@
<span
v-if="userInfo.user_name && userInfo.user_name != ''"
class="user"
>{{ userInfo.user_name }}</span
>
<span v-else @click="gotopage('login')" class="user">请登录</span>
>{{ userInfo.user_name }}</span>
<span
v-else
@click="gotopage('login')"
class="user"
>请登录</span>
<img
:class="userInfo.picture_path && false ? 'user_pic' : 'user_default'"
src="../assets/imgs/home_ic_user.png"
/>
<span class="has_msg" v-if="unreadMessageCount > 0"></span>
<span
class="has_msg"
v-if="unreadMessageCount > 0"
></span>
<!-- 菜单图片不需要动态渲染,只用ui给的图标 -->
<div
v-if="userInfo.user_name && userInfo.user_name != ''"
......@@ -56,7 +66,11 @@
:max="99"
class="number"
></el-badge>
<img src="../assets/imgs/home_ic_shop.png" alt class="car_img" />
<img
src="../assets/imgs/home_ic_shop.png"
alt
class="car_img"
/>
</div>
<div
v-if="userInfo.user_name && userInfo.user_name != ''"
......@@ -75,7 +89,10 @@
class="shop_img"
/>
<div class="shop_cell_msgs">
<p @click="getDetail(item.id)" class="shop_cell_name over_one">
<p
@click="getDetail(item.id)"
class="shop_cell_name over_one"
>
{{
item.service_id == 0
? item.application.app_name
......@@ -106,9 +123,11 @@
</div>
</div>
<div class="shop_footer">
<el-button @click="settlement" size="small" class="shop_settlement"
>去购物车申请结算</el-button
>
<el-button
@click="settlement"
size="small"
class="shop_settlement"
>去购物车申请结算</el-button>
</div>
</div>
<div
......@@ -150,7 +169,10 @@
: { left: '60px' }
"
></div>
<div class="bottom_show" v-if="now_menu == item.visit_url"></div>
<div
class="bottom_show"
v-if="now_menu == item.visit_url"
></div>
</div>
</div>
</div>
......@@ -158,6 +180,9 @@
<script>
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const gisPortalSiteName = window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal";
const state = window.serviceConfig.state;
export default {
data() {
......@@ -174,7 +199,7 @@ export default {
shopping_list: [],
menuCartNum: 0,
now_hover: -1,
show_shop_menu: false,
show_shop_menu: false
};
},
mounted() {
......@@ -193,7 +218,7 @@ export default {
},
getRouter() {
return this.$route.path;
},
}
},
watch: {
getMenuCartState(newVal) {
......@@ -207,7 +232,7 @@ export default {
) {
this.now_menu = val;
}
},
}
},
methods: {
change_now_hover(n) {
......@@ -218,7 +243,9 @@ export default {
if (state == "needLogin") {
window.location.href =
gisServiceUrl +
`/portal/sharing/rest/oauth2/signout?client_id=arcgisonline&redirect_uri=${window.location.protocol}//${window.location.host}/iam/api/logout`;
"/" +
gisPortalSiteName +
`/sharing/rest/oauth2/signout?client_id=arcgisonline&redirect_uri=${window.location.protocol}//${window.location.host}/iam/api/logout`;
} else {
window.location.href = "/iam/api/logout";
}
......@@ -234,7 +261,7 @@ export default {
},
deleteItem(id) {
let query = [id];
this.$api.serviceShop.delShoppingCart(query).then((response) => {
this.$api.serviceShop.delShoppingCart(query).then(response => {
if (response.data.success == 1) {
this.$store.commit("setCartState");
this.getList();
......@@ -257,6 +284,8 @@ export default {
} else if (parent == "/services_shop") {
this.$store.commit("serviceShopMenuAct", v.visit_url);
this.$router.push(v.visit_url);
} else if (v.visit_url.indexOf("#") > 0) {
window.open(v.visit_url);
} else {
this.$router.push(v.visit_url);
}
......@@ -264,7 +293,7 @@ export default {
}
},
getList() {
this.$api.serviceShop.getShoppingCart().then((response) => {
this.$api.serviceShop.getShoppingCart().then(response => {
if (response.data.success == "1") {
this.menuCartNum = response.data.data.valid
? response.data.data.valid.length
......@@ -282,12 +311,12 @@ export default {
console.log(this.now_menu);
},
getNowMenu() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => {
if (response.data.success == 1) {
let arr =
(response.data.data[0] && response.data.data[0].Child) || [];
let shop_index = arr.findIndex(
(item) => item.visit_url == "/shop/shopping_cart"
item => item.visit_url == "/shop/shopping_cart"
);
if (shop_index != -1) {
arr.splice(shop_index, 1);
......@@ -295,7 +324,7 @@ export default {
} else {
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) {
this.user_arr = arr[user_index].Child;
arr.splice(user_index, 1);
......@@ -305,8 +334,8 @@ export default {
this.getMenuIndex();
}
});
},
},
}
}
};
</script>
......
<template>
<div class="map_view">
<a class="map_view_action" href="#" @click.prevent.stop="viewAction">
<a
v-if="showView"
class="map_view_action"
href="#"
@click.prevent.stop="viewAction"
>
<img :src="require('../../assets/imgs/ic_yulan.png')" />
</a>
......@@ -13,7 +18,11 @@
:before-close="beforeClose"
>
<div class="map_view_container">
<iframe v-if="src" :src="src" frameborder="0"></iframe>
<iframe
v-if="src"
:src="src"
frameborder="0"
></iframe>
</div>
</el-dialog>
</transition>
......@@ -22,29 +31,41 @@
<script>
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const gisPortalSiteName = window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal";
export default {
name: "map-view",
data: () => ({
showDialog: false,
src: "",
showView: false,
src: ""
}),
props: {
id: {
type: [String, Number],
required: true,
},
required: true
}
},
methods: {
viewAction() {
this.src = gisServiceUrl + `/portal/apaasplat/viewer/previewMap.html?id=${this.id}`;
this.src =
gisServiceUrl +
"/" +
gisPortalSiteName +
`/apaasplat/viewer/previewMap.html?id=${this.id}`;
this.showDialog = true;
},
beforeClose(done) {
this.src = "";
done();
},
}
},
mounted() {
this.showView =
window.serviceConfig && window.serviceConfig.state == "needLogin";
}
};
</script>
......
<template>
<div class="map_view">
<a class="map_view_action" href="#" @click.prevent.stop="viewAction">
<a
v-if="showView"
class="map_view_action"
href="#"
@click.prevent.stop="viewAction"
>
<img :src="require('../../assets/imgs/ic_yulan.png')" />
</a>
......@@ -13,7 +18,11 @@
:before-close="beforeClose"
>
<div class="map_view_container">
<workflows-view :zoom="0.8" :id="id" :hideDetail="true"></workflows-view>
<workflows-view
:zoom="0.8"
:id="id"
:hideDetail="true"
></workflows-view>
</div>
</el-dialog>
</transition>
......@@ -21,19 +30,20 @@
</template>
<script>
import workflowsView from '@/components/work-flow/workflows-view'
import workflowsView from "@/components/work-flow/workflows-view";
export default {
name: "map-view",
components:{
workflowsView
components: {
workflowsView
},
data: () => ({
showDialog: false,
showView: false
}),
props: {
id: {
type: Number,
required: true,
required: true
}
},
methods: {
......@@ -42,8 +52,12 @@ export default {
},
beforeClose(done) {
done();
},
}
},
mounted() {
this.showView =
window.serviceConfig && window.serviceConfig.state == "needLogin";
}
};
</script>
......
......@@ -97,8 +97,8 @@ export default {
item.default = "shop_nav_iv_chanpinzy";
break;
default:
item.active = "1";
item.default = "1";
item.active = "shop_tool_ic_sjfw_sel";
item.default = "shop_tool_ic_sjfw";
break;
}
});
......
......@@ -478,31 +478,11 @@ export default {
},
], // 服务状态统计
starlistData: [
{
star: 5,
count: 0,
unit: "",
},
{
star: 4,
count: 0,
unit: "",
},
{
star: 3,
count: 0,
unit: "",
},
{
star: 2,
count: 0,
unit: "",
},
{
star: 1,
count: 0,
unit: "",
},
{ star: 5, count: 0, unit: "" },
{ star: 4, count: 0, unit: "" },
{ star: 3, count: 0, unit: "" },
{ star: 2, count: 0, unit: "" },
{ star: 1, count: 0, unit: "" },
], // 服务评分
starlistTotal: 0,
hotSearchHeader: [], // 热门搜索 表头
......
......@@ -497,8 +497,14 @@ export default {
toplistTargetValue: 40, // 服务调用排名分析 目标值
commentlistData: [], // 服务评价
linelistData: [], // 服务状态统计
starlistData: [], // 服务评分
starlistTotal: 15,
starlistData: [
{ star: 5, count: 0, unit: "" },
{ star: 4, count: 0, unit: "" },
{ star: 3, count: 0, unit: "" },
{ star: 2, count: 0, unit: "" },
{ star: 1, count: 0, unit: "" },
], // 服务评分
starlistTotal: 0,
hotSearchHeader: [], // 热门搜索 表头
hotSearchData: [], // 热门搜索 数据
graph_arr: {
......@@ -951,4 +957,4 @@ export default {
word-break: break-all;
white-space: nowrap;
}
</style>
\ No newline at end of file
</style>
......@@ -495,8 +495,14 @@ export default {
toplistTargetValue: 40, // 服务调用排名分析 目标值
commentlistData: [], // 服务评价
linelistData: [], // 服务状态统计
starlistData: [], // 服务评分
starlistTotal: 15,
starlistData: [
{ star: 5, count: 0, unit: "" },
{ star: 4, count: 0, unit: "" },
{ star: 3, count: 0, unit: "" },
{ star: 2, count: 0, unit: "" },
{ star: 1, count: 0, unit: "" },
], // 评分
starlistTotal: 10,
hotSearchHeader: [], // 热门搜索 表头
hotSearchData: [], // 热门搜索 数据
graph_arr: {
......@@ -715,26 +721,30 @@ export default {
})
.then((response) => {
if (response.data.success == 1) {
let _data = response.data.data;
if (this.right_3_state == 0) {
let data = response.data.data || [];
this.commentlistData = data.concat(this.commentlistData);
_data = _data || [];
this.commentlistData = _data.concat(this.commentlistData);
if (this.commentlistData && this.commentlistData.length != 0) {
this.last_id = this.commentlistData[0].last_id;
}
} else {
let data = response.data.data;
this.starlistData[0].count = data.score5;
this.starlistData[1].count = data.score4;
this.starlistData[2].count = data.score3;
this.starlistData[3].count = data.score2;
this.starlistData[4].count = data.score1;
this.starlistTotal =
data.score5 +
data.score4 +
data.score3 +
data.score2 +
data.score1;
console.log(this.starlistData, this.starlistTotal);
if (_data) {
this.starlistData[0].count = _data.score5;
this.starlistData[1].count = _data.score4;
this.starlistData[2].count = _data.score3;
this.starlistData[3].count = _data.score2;
this.starlistData[4].count = _data.score1;
this.starlistTotal =
_data.score5 +
_data.score4 +
_data.score3 +
_data.score2 +
_data.score1;
}
}
}
});
......@@ -957,4 +967,4 @@ export default {
word-break: break-all;
white-space: nowrap;
}
</style>
\ No newline at end of file
</style>
......@@ -14,17 +14,16 @@
</info-list>
<div class="footout">
<span class="applybtn" @click="sub_service()">提交申请</span>
<span
class="applybtn"
@click="sub_service()"
>提交申请</span>
<div class="count_money">
<p>
费用总计:&nbsp;&nbsp;&nbsp; <span>{{ all_cost }}</span
><span>金币</span>
费用总计:&nbsp;&nbsp;&nbsp; <span>{{ all_cost }}</span><span>金币</span>
</p>
<p>
<span>{{ service_arr.length }}项服务</span
><span
>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账户余额: {{ now_money }}金币</span
>
<span>{{ service_arr.length }}项服务</span><span>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账户余额: {{ now_money }}金币</span>
</p>
</div>
</div>
......@@ -40,14 +39,14 @@ export default {
components: {
infoList,
applyForm,
serviceList,
serviceList
},
data() {
return {
formInline: {
depart: "",
preson: "",
phone: "",
phone: ""
},
all_cost: 0,
now_money: 0,
......@@ -55,13 +54,13 @@ export default {
{
title: "服务申请",
type: "solt",
solt_name: "apply_info",
solt_name: "apply_info"
},
{
title: "申请的服务",
type: "solt",
solt_name: "apply_service",
},
solt_name: "apply_service"
}
],
post_arr: [],
service_arr: [
......@@ -112,18 +111,18 @@ export default {
"",
{
name: "共享",
val: "share",
val: "share"
},
{
name: "受限",
val: "limit",
val: "limit"
},
{
name: "敏感",
val: "mg",
},
val: "mg"
}
],
temp_sub_arr: [],
temp_sub_arr: []
};
},
watch: {},
......@@ -136,7 +135,7 @@ export default {
} else {
// console.log(JSON.parse(window.sessionStorage.getItem("shoppingCart")));
var temp_arr = [];
JSON.parse(window.sessionStorage.getItem("shoppingCart")).forEach((e) => {
JSON.parse(window.sessionStorage.getItem("shoppingCart")).forEach(e => {
temp_arr.push(e.id);
});
this.get_car_list(temp_arr);
......@@ -146,7 +145,7 @@ export default {
mounted() {},
methods: {
get_account_money() {
this.$http.get(`/apaas/backmgt/user/myAccount`).then((res) => {
this.$http.get(`/apaas/backmgt/user/myAccount`).then(res => {
if (res.data.success) {
this.now_money = res.data.data.account_balance || 0;
}
......@@ -155,7 +154,7 @@ export default {
get_one_app(app_data) {
this.$http
.get(`/apaas/serviceapp/v3/shopcart/appinfo?app_id=${app_data.app_id}`)
.then((response) => {
.then(response => {
console.log(response);
let data = response.data.data;
if (response.data.success && data) {
......@@ -189,7 +188,7 @@ export default {
.get(
`/apaas/serviceapp/v3/shopcart/serviceinfo?service_id=${service_data.service_id}`
)
.then((response) => {
.then(response => {
console.log(response);
let data = response.data.data;
if (response.data.success && data) {
......@@ -209,14 +208,14 @@ export default {
objs.tips = [
{
tip: this.share_arr[data.openness].name,
type: this.share_arr[data.openness].val,
},
type: this.share_arr[data.openness].val
}
];
objs.auth = data.organization_name;
objs.size = "";
objs.count = "";
let request_spcs_info = data.request_spcs_info || [];
request_spcs_info.forEach((el) => {
request_spcs_info.forEach(el => {
if (service_data.spec_id == el.id) {
let size = "";
let count = "";
......@@ -249,7 +248,7 @@ export default {
.catch(() => {});
},
deal_data(data) {
data.forEach((e) => {
data.forEach(e => {
if (e.selected) {
e.selected = 1;
} else {
......@@ -262,7 +261,7 @@ export default {
},
abc() {
return new Promise((resolve, reject) => {
this.$refs.apply_info.$refs.ruleForm.validate((valid) => {
this.$refs.apply_info.$refs.ruleForm.validate(valid => {
console.log(valid);
if (valid) {
flag = true;
......@@ -279,13 +278,13 @@ export default {
});
},
sub_service() {
if (this.all_cost > this.now_money) {
if (parseFloat(this.all_cost) > parseFloat(this.now_money)) {
this.$message.error("余额不足,请进行充值");
return;
}
let formInline = this.$refs.apply_info.formInline;
let flag = null;
this.$refs.apply_info.$refs.ruleForm.validate((valid) => {
this.$refs.apply_info.$refs.ruleForm.validate(valid => {
console.log(valid);
if (valid) {
var phone_ruler = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
......@@ -296,9 +295,9 @@ export default {
var temp = {
apply_part: {
o_name: formInline.preson,
o_mobile: formInline.phone,
o_mobile: formInline.phone
},
carts: [],
carts: []
};
var temp1 = this.$refs.apply_service.$refs.apply_service_state;
this.post_arr.forEach((e, idx) => {
......@@ -313,7 +312,7 @@ export default {
app_id: 0,
scene: temp1[idx].sceneinput,
apply_file: temp1[idx].fileList,
apply_fields: [],
apply_fields: []
});
// 判断表格ref是否存在
this.temp_sub_arr = temp1[idx].$refs.apply_service_state_table
......@@ -334,7 +333,7 @@ export default {
app_id: e.app_id,
scene: this.$refs.apply_service.$refs.apply_service_state[idx]
.sceneinput,
apply_file: "",
apply_file: ""
});
}
});
......@@ -351,7 +350,7 @@ export default {
this.$http
.post(`/apaas/serviceapp/v3/shopcart/apply`, temp)
.then((response) => {
.then(response => {
console.log(response);
if (response.data.success) {
this.$store.commit("setMenuCartState");
......@@ -376,10 +375,10 @@ export default {
var temp_cost = 0;
this.$http
.get(`/apaas/serviceapp/v3/shopcart/list`)
.then((response) => {
.then(response => {
console.log(response);
let data = response.data.data.valid;
data.forEach((e) => {
data.forEach(e => {
if (car_arr.indexOf(e.id) == -1) {
return;
}
......@@ -412,8 +411,8 @@ export default {
this.service_arr[l]["tips"] = [
{
tip: this.share_arr[e.service.openness].name,
type: this.share_arr[e.service.openness].val,
},
type: this.share_arr[e.service.openness].val
}
];
this.service_arr[l]["auth"] = e.service.organization_name;
this.service_arr[l]["size"] = "";
......@@ -452,7 +451,7 @@ export default {
this.all_cost = temp_cost;
// this.service_arr =
})
.catch((response) => {});
.catch(response => {});
},
floatAdd(arg1, arg2) {
let r1, r2, m, c;
......@@ -485,8 +484,8 @@ export default {
arg2 = Number(arg2.toString().replace(".", ""));
}
return (arg1 + arg2) / m;
},
},
}
}
};
</script>
......
This diff is collapsed.
......@@ -9,56 +9,69 @@
</div>
<div class="main-container">
<iframe ref="intelligent_appbuilder_iframe" width="100%" height="100%" scrolling="no" :src='appbuilderUrl' frameborder="0"></iframe>
<iframe
ref="intelligent_appbuilder_iframe"
width="100%"
height="100%"
scrolling="no"
:src='appbuilderUrl'
frameborder="0"
></iframe>
</div>
</div>
</template>
<script>
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const gisPortalSiteName = window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal";
export default {
data() {
return {
originUrl: gisServiceUrl + '/portal/apps/webappbuilder/index.html'
originUrl:
gisServiceUrl +
"/" +
gisPortalSiteName +
"/apps/webappbuilder/index.html"
};
},
computed:{
appbuilderUrl(){
computed: {
appbuilderUrl() {
let _self = this;
if(_self.$route.name == 'intelligent_appbuilder'){
return `${_self.originUrl}?title=${_self.$route.query.title}&tags=${_self.$route.query.tags}&summary=${_self.$route.query.summary}&sharewithwebmap=${_self.$route.query.sharewithwebmap}&webmap=${_self.$route.query.webmap}`
if (_self.$route.name == "intelligent_appbuilder") {
return `${_self.originUrl}?title=${_self.$route.query.title}&tags=${_self.$route.query.tags}&summary=${_self.$route.query.summary}&sharewithwebmap=${_self.$route.query.sharewithwebmap}&webmap=${_self.$route.query.webmap}`;
}
},
getAppBuilderParams() {
return this.$store.state.appBuilderParams;
},
}
},
watch: {
getAppBuilderParams(newVal) {
console.log('智能制图应用程序参数'+newVal)
},
console.log("智能制图应用程序参数" + newVal);
}
},
mounted() {
this.$nextTick(() => {
window.addEventListener('message',this.postmassageevt);
})
window.addEventListener("message", this.postmassageevt);
});
},
methods: {
postmassageevt(event){
postmassageevt(event) {
let data = event.data;
// App Builder发布服务
if (data.cmd == 'appbuildermsg'){
if (data.cmd == "appbuildermsg") {
console.log(data);
this.$store.commit("setAppBuilderParams", data.params);
this.$router.push(`/fwzc/fwcs?map=4`);
}
}
},
destroyed () {
window.removeEventListener('message',this.postmassageevt);
}
destroyed() {
window.removeEventListener("message", this.postmassageevt);
}
};
</script>
<style scoped>
......@@ -80,7 +93,10 @@ export default {
.intelligent_appbuilder-container .apass_breadcrumb {
padding: 0 20px;
}
.intelligent_appbuilder-container .apass_breadcrumb > .el-breadcrumb .el-breadcrumb__inner {
.intelligent_appbuilder-container
.apass_breadcrumb
> .el-breadcrumb
.el-breadcrumb__inner {
color: #626de9;
}
.intelligent_appbuilder-container
......
......@@ -9,63 +9,73 @@
</div>
<div class="main-container">
<iframe ref="intelligent_details_iframe" width="100%" height="100%" scrolling="no" :src='itemUrl' frameborder="0"></iframe>
<iframe
ref="intelligent_details_iframe"
width="100%"
height="100%"
scrolling="no"
:src='itemUrl'
frameborder="0"
></iframe>
</div>
</div>
</template>
<script>
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const gisPortalSiteName = window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal";
export default {
data() {
return {
originUrl: gisServiceUrl + '/portal/apaasplat/viewer/item.html',
originUrl:
gisServiceUrl + "/" + gisPortalSiteName + "/apaasplat/viewer/item.html"
};
},
computed:{
itemUrl(){
computed: {
itemUrl() {
let _self = this;
if(_self.$route.name == 'intelligent_details'){
return `${_self.originUrl}?id=${_self.$route.query.id}&activeMenu=${_self.$route.query.activeMenu}`
if (_self.$route.name == "intelligent_details") {
return `${_self.originUrl}?id=${_self.$route.query.id}&activeMenu=${_self.$route.query.activeMenu}`;
}
}
},
mounted() {
this.$nextTick(() => {
window.addEventListener('message',this.postmassageevt)
})
window.addEventListener("message", this.postmassageevt);
});
},
methods: {
postmassageevt(event){
postmassageevt(event) {
let data = event.data;
// App Builder页面 -- 新窗口打开
if (data.cmd == 'mapviewtoapp'){
if (data.cmd == "mapviewtoapp") {
let params = {
title: data.params.title,
tags: data.params.tags,
sharewithwebmap:data.params.shareWithWebMap,
webmap:data.params.id,
summary: data.params.summary,
sharewithwebmap: data.params.shareWithWebMap,
webmap: data.params.id,
summary: data.params.summary
};
let routeData = this.$router.resolve({
name: "intelligent_appbuilder",
query: params,
query: params
});
window.open(routeData.href, '_blank');
window.open(routeData.href, "_blank");
// this.$store.commit("setAppBuilderParams", data.params);
};
if (data.cmd == 'mapdetailtoview'){
}
if (data.cmd == "mapdetailtoview") {
console.log(data);
this.$store.commit("setZnztDetailsParams", data.params);
this.$router.push('/intelligent_drawing')
this.$router.push("/intelligent_drawing");
}
}
},
destroyed () {
window.removeEventListener('message',this.postmassageevt)
destroyed() {
window.removeEventListener("message", this.postmassageevt);
}
};
</script>
<style scoped>
......@@ -87,7 +97,10 @@ export default {
.intelligent_details-container .apass_breadcrumb {
padding: 0 20px;
}
.intelligent_details-container .apass_breadcrumb > .el-breadcrumb .el-breadcrumb__inner {
.intelligent_details-container
.apass_breadcrumb
> .el-breadcrumb
.el-breadcrumb__inner {
color: #626de9;
}
.intelligent_details-container
......
......@@ -8,7 +8,14 @@
</div>
<div class="main-container">
<iframe ref="intelligent_drawing_iframe" width="100%" height="100%" scrolling="no" :src="znztUrl" frameborder="0"></iframe>
<iframe
ref="intelligent_drawing_iframe"
width="100%"
height="100%"
scrolling="no"
:src="znztUrl"
frameborder="0"
></iframe>
</div>
</div>
</template>
......@@ -16,102 +23,109 @@
<script>
import { mapState } from "vuex";
const gisServiceUrl = window.serviceConfig.gisServiceRoot;
const gisPortalSiteName = window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal";
export default {
data() {
return {
url: gisServiceUrl + '/portal/apaasplat/viewer/mapViewer.html',
queryType: '',
id: '',
url:
gisServiceUrl +
"/" +
gisPortalSiteName +
"/apaasplat/viewer/mapViewer.html",
queryType: "",
id: ""
};
},
computed:{
...mapState(['znztDetailsParams']),
computed: {
...mapState(["znztDetailsParams"]),
getZnztParams() {
return this.$store.state.znztParams;
},
znztUrl(){
if(this.queryType == 'webmap'){
znztUrl() {
if (this.queryType == "webmap") {
return this.url + `?webmap=${this.id}`;
}else if (this.queryType == 'layers'){
} else if (this.queryType == "layers") {
return this.url + `?layers=${this.id}`;
}else {
return this.url
} else {
return this.url;
}
},
}
},
watch: {
getZnztParams(newVal) {
console.log('智能制图参数'+newVal)
},
console.log("智能制图参数" + newVal);
}
},
mounted() {
this.id = this.znztDetailsParams.id;
this.queryType = this.znztDetailsParams.queryType;
this.$nextTick(() => {
window.addEventListener('message',this.postmassageevt);
})
window.addEventListener("message", this.postmassageevt);
});
},
methods: {
postmassageevt(event){
postmassageevt(event) {
let data = event.data;
// 智能制图发布服务
if (data.cmd == 'mapviewmsg'){
if (data.cmd == "mapviewmsg") {
console.log(data);
this.$store.commit("setZnztParams", data.params);
this.$router.push(`/fwzc/fwcs?map=1`);
}
// App Builder页面 -- 新窗口打开
if (data.cmd == 'mapviewtoapp'){
if (data.cmd == "mapviewtoapp") {
console.log(data);
let params = {
title: data.params.title,
tags: data.params.tags,
sharewithwebmap:data.params.shareWithWebMap,
webmap:data.params.id,
summary: data.params.summary,
sharewithwebmap: data.params.shareWithWebMap,
webmap: data.params.id,
summary: data.params.summary
};
let routeData = this.$router.resolve({
name: "intelligent_appbuilder",
query: params,
query: params
});
window.open(routeData.href, '_blank');
window.open(routeData.href, "_blank");
// this.$store.commit("setAppBuilderParams", data.params);
}
// 智能制图服务详情--新窗口打开
if (data.cmd == 'mapdetailmsg'){
if (data.cmd == "mapdetailmsg") {
console.log(data);
let routeData = this.$router.resolve({
name: "intelligent_details",
query: data.params,
query: data.params
});
window.open(routeData.href, '_blank');
window.open(routeData.href, "_blank");
}
// 智能制图页面跳转
if (data.cmd == 'mapviewurl'){
if (data.cmd == "mapviewurl") {
console.log(data);
switch (data.params.queryType) {
case 'webmap':
this.queryType = 'webmap';
case "webmap":
this.queryType = "webmap";
this.$store.commit("setZnztIdParams", data.params.id);
this.id = data.params.id;
break;
case 'layers':
this.queryType = 'layers';
case "layers":
this.queryType = "layers";
this.$store.commit("setZnztIdParams", data.params.id);
this.id = data.params.id;
break;
default:
this.queryType = '';
this.$store.commit("setZnztIdParams", '');
this.id = '';
this.queryType = "";
this.$store.commit("setZnztIdParams", "");
this.id = "";
break;
}
}
}
},
destroyed () {
window.removeEventListener('message',this.postmassageevt);
}
destroyed() {
window.removeEventListener("message", this.postmassageevt);
}
};
</script>
......@@ -134,7 +148,10 @@ export default {
.intelligent_drawing-container .apass_breadcrumb {
padding: 0 20px;
}
.intelligent_drawing-container .apass_breadcrumb > .el-breadcrumb .el-breadcrumb__inner {
.intelligent_drawing-container
.apass_breadcrumb
> .el-breadcrumb
.el-breadcrumb__inner {
color: #626de9;
}
.intelligent_drawing-container
......
......@@ -53,7 +53,10 @@
>
<el-form-item prop="result">
<p class="formname">审批结果:</p>
<el-select v-model="form.result" placeholder="请选择">
<el-select
v-model="form.result"
placeholder="请选择"
>
<el-option
v-for="item in resultoptions"
:key="item.value"
......@@ -71,10 +74,14 @@
></el-input>
</el-form-item>
<el-form-item class="btnsty">
<el-button @click="onSubmit('form')" class="right"
>提交</el-button
>
<el-button class="right" @click="backpage">取消</el-button>
<el-button
@click="onSubmit('form')"
class="right"
>提交</el-button>
<el-button
class="right"
@click="backpage"
>取消</el-button>
</el-form-item>
</el-form>
</div>
......@@ -97,13 +104,13 @@ export default {
serviceHeader,
infoList,
tableUm,
processCard,
processCard
},
data() {
return {
form: {
result: "",
option: "",
option: ""
},
id: "",
zd_table_arr: [],
......@@ -116,20 +123,20 @@ export default {
min: 0,
max: 200,
message: "长度应小于200个字符",
trigger: "blur",
},
],
trigger: "blur"
}
]
},
resultvalue: "",
resultoptions: [
{
label: "通过",
value: 1,
value: 1
},
{
label: "不通过",
value: -1,
},
value: -1
}
],
approval_arr: [
[],
......@@ -157,39 +164,39 @@ export default {
// },
// ]
// },
],
]
],
header_arr: [
{
prop: "name",
label: "字段名称",
minWidth: "20%",
align: "left",
align: "left"
},
{
prop: "field_type",
label: "字段编码",
width: "100px",
align: "center",
align: "center"
},
{
prop: "show_type",
label: "字段类型",
width: "100px",
align: "center",
align: "center"
},
{
prop: "descript",
label: "字段说明",
minWidth: "30%",
align: "left",
align: "left"
},
{
prop: "example",
label: "字段示例数值",
width: "120px",
align: "left",
},
align: "left"
}
],
color_arr: ["#e15260", '"#ef9433', "#515fe7"],
service_header_arr: {
......@@ -200,25 +207,25 @@ export default {
first: [
{
name: "服务类型",
text: "",
text: ""
},
{
name: "服务领域",
text: "",
text: ""
},
{
name: "审批状态",
text: "",
color: "#ef9433",
},
color: "#ef9433"
}
],
second: [
{
name: "申请时间",
text: "",
},
text: ""
}
],
fixed: false,
fixed: false
},
service_arr: ["服务申请信息", "服务审批"],
now_service: 0,
......@@ -229,86 +236,86 @@ export default {
title: "审批信息:",
prop: "title",
type: "solt",
solt_name: "sp_card",
solt_name: "sp_card"
},
{
title: "一级审批:",
prop: "title",
type: "solt",
solt_name: "sp_result",
},
solt_name: "sp_result"
}
],
[
{
title: "审批信息:",
prop: "title",
type: "solt",
solt_name: "sp_card",
solt_name: "sp_card"
},
{
title: "二级审批:",
prop: "title",
type: "solt",
solt_name: "sp_result",
},
],
solt_name: "sp_result"
}
]
],
list_arr: [
{
title: "申请单位:",
info: "",
info: ""
},
{
title: "申请人:",
info: "",
info: ""
},
{
title: "申请人联系电话:",
info: "",
info: ""
},
{
title: "业务系统名称:",
info: "",
info: ""
},
{
title: "业务系统访问地址:",
info: "",
info: ""
},
{
title: "场景描述:",
info: "",
info: ""
},
{
title: "申请文件:",
info: "",
url: "",
type: "down",
type: "down"
},
{
title: "申请内容:",
info: "",
type: "solt",
solt_name: "zd_table",
solt_name: "zd_table"
},
{
title: "申请时长:",
info: "",
info: ""
},
{
title: "申请规格:",
info: "",
info: ""
},
{
title: "总价:",
info: "",
},
],
info: ""
}
]
};
},
watch: {},
computed: {
...mapGetters(["level"]),
...mapState(["userInfo"]),
...mapState(["userInfo"])
},
created() {
console.log(this.level);
......@@ -334,7 +341,7 @@ export default {
});
},
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
this.$refs[formName].validate(valid => {
if (valid) {
this.set_approval();
} else {
......@@ -351,18 +358,18 @@ export default {
.post("/apaas/service/v3/service/approval/applied/approval", {
apply_id: this.id,
state: this.form.result,
message: this.form.option,
message: this.form.option
})
.then((res) => {
.then(res => {
console.log(res);
if (res.data.success) {
this.$message.success("审批成功");
this.$router.back(-1);
} else {
this.$message.error("审批失败");
this.$message.error("审批失败" + res.data.errMsg);
}
})
.catch((res) => {
.catch(res => {
this.$message.error(res);
});
},
......@@ -374,7 +381,7 @@ export default {
.get(
`/apaas/service/v3/service/approval/applied?apply_id=${this.$route.params.id}`
)
.then((response) => {
.then(response => {
console.log(response.data.data);
if (!response.data.success) {
this.$message.error(response.data.errMsg);
......@@ -487,7 +494,7 @@ export default {
// console.log(data)
if (data.data_service_type1 == 36) {
this.list_arr.splice(6, 2);
this.service_arr = ["产品申请信息", "产品审批"]
this.service_arr = ["产品申请信息", "产品审批"];
}
this.id = data.service_apply_info.id;
if (data.service_apply_info.approval_status !== 0) {
......@@ -503,7 +510,7 @@ export default {
this.servicead_arr[this.now_user].splice(0, 1);
}
if (data.service_apply_info.approval_process) {
data.service_apply_info.approval_process.forEach((e) => {
data.service_apply_info.approval_process.forEach(e => {
this.approval_arr[this.now_user].push({
title: e.level == 1 ? "一级审批" : "二级审批",
result:
......@@ -511,7 +518,7 @@ export default {
? "审批未通过"
: e.status == 0
? "审批中"
: "审批通过",
: "审批通过"
});
if (e.status !== 0) {
this.approval_arr[this.now_user][
......@@ -519,22 +526,22 @@ export default {
]["arr"] = [
{
title: "审批时间:",
info: e.approval_time.split("+")[0].replace("T", " "),
info: e.approval_time.split("+")[0].replace("T", " ")
},
{
title: "审批单位:",
info: e.user_info.department_name
? e.user_info.department_name
: "",
: ""
},
{
title: "审批人:",
info: e.user_info.user_name,
info: e.user_info.user_name
},
{
title: "审批意见:",
info: e.comments,
},
info: e.comments
}
];
}
});
......@@ -544,14 +551,14 @@ export default {
? JSON.parse(data.service_apply_info.res_fields)
: [];
if (data.data_service_type1 != 5) {
this.list_arr.splice(7, 1)
this.list_arr.splice(7, 1);
}
})
.catch(function (response) {
.catch(function(response) {
this.$message.error("请求失败");
});
},
},
}
}
};
</script>
......
This diff is collapsed.
......@@ -982,16 +982,18 @@ export default {
pic: require("@/assets/imgs/home_tool_ic_lcsj.png"),
bg: "#e6ebfe",
color: "#515fe7",
url: "/progress",
// url: "/progress",
url: "/lcyq/ui/#/process/model",
target: 1
},
{
/* {
text: "可视化图表",
pic: require("@/assets/imgs/home_tool_ic_kshbb.png"),
bg: "#fff2e2",
color: "#ea7d19",
url: "/iam/api/bi/token",
target: 1
},
}, */
{
text: "应用创新",
pic: require("@/assets/imgs/home_tool_ic_yycx.png"),
......@@ -1412,11 +1414,16 @@ export default {
.then(response => {
console.log(response);
let data = response.data.data;
var temp = Math.round(
(data.seriesData[0].value /
(data.seriesData[0].value + data.seriesData[1].value)) *
100
);
var temp = 0
if(data.seriesData[0].value + data.seriesData[1].value==0){
temp = 0
}else{
temp = Math.round(
(data.seriesData[0].value /
(data.seriesData[0].value + data.seriesData[1].value)) *
100
);
}
console.log(temp);
this.init_health(temp);
})
......
......@@ -270,11 +270,11 @@ export default {
this.tableData.push({
icon:e.podStatus.status=="ContainerCreating"||e.podStatus.status=="Pending"?'3':e.podStatus.status=="Succeeded"?'2':e.podStatus.status=="Failed"?'4':'1',
icon:e.status=="ContainerCreating"||e.status=="Pending"?'3':e.status=="Succeeded"?'2':e.status=="Failed"?'4':'1',
name:e.objectMeta.name,
tag:temp_tag,
node:e.nodeName,
state:e.podStatus.status,
state:e.status,
times:e.restartCount,
cpu:e.metrics&&e.metrics.cpuUsageHistory?this.cpu_deal(e.metrics.cpuUsageHistory):[],
cpu_use:e.metrics&&e.metrics.cpuUsage?e.metrics.cpuUsage:'',
......
......@@ -16,7 +16,7 @@ const tip = msg => {
* 跳转登录页
* 携带当前页面路由,以期在登录页面完成登录后返回当前页面
* 登录用 bg-login ,具体链接晚几天加
*/
*/
const toLogin = () => {
window.location.href = "/iam/login/#/login?redirect=" + router.currentRoute.fullPath
}
......
......@@ -21,6 +21,7 @@ const store = new Vuex.Store({
menuCartState: 0, //购物车操作都要修改这个值,menu监听这个值的变化实时获取购物车列表
cartState: 0,
znztParams: null, //智能制图传入过来的数据
cesiumMapParams: null, //三维制图传入过来的数据
appBuilderParams: null, //应用程序传入过来的数据
znztIdParams: '', //智能制图服务id
znztDetailsParams: {
......@@ -32,11 +33,13 @@ const store = new Vuex.Store({
},
getters: {
// 1:超管 2:组织管理员 3:普通用户 4:开发者
is_admin: (state) => {
is_admin: (state) =>
{
return (state.userInfo && state.userInfo.is_admin) || 3;
},
// 0:普通用户,1:组织管理员,2:超级管理员
level: (state, getters) => {
level: (state, getters) =>
{
if (getters.is_admin == 1) {
return 2;
} else if (getters.is_admin == 2) {
......@@ -47,37 +50,52 @@ const store = new Vuex.Store({
},
},
mutations: {
userInfofun(state, newValue) {
userInfofun (state, newValue)
{
state.userInfo = newValue;
},
rolefun(state, newValue) {
rolefun (state, newValue)
{
state.role = newValue;
},
serviceShopMenuAct(state, newValue) {
serviceShopMenuAct (state, newValue)
{
state.serviceShopMenu = newValue;
},
setShoppingCart(state, newValue) {
setShoppingCart (state, newValue)
{
state.shoppingCart = newValue;
},
setMenuCartState(state) {
setMenuCartState (state)
{
state.menuCartState++;
},
setCartState(state) {
setCartState (state)
{
state.cartState++;
},
setZnztParams(state, newValue) {
setZnztParams (state, newValue)
{
state.znztParams = newValue;
},
setAppBuilderParams(state, newValue) {
setCesiumMapParams (state, newValue)
{
state.cesiumMapParams = newValue;
},
setAppBuilderParams (state, newValue)
{
state.appBuilderParams = newValue;
},
setZnztIdParams(state, newValue) {
setZnztIdParams (state, newValue)
{
state.znztIdParams = newValue;
},
setZnztDetailsParams(state, newValue) {
setZnztDetailsParams (state, newValue)
{
state.znztDetailsParams = newValue;
},
setUnreadMessageCount(state, newValue) {
setUnreadMessageCount (state, newValue)
{
state.unreadMessageCount = newValue;
},
},
......
function getRole(){
return new Promise((resolve,reject)=>{
if(true){
function getRole() {
return new Promise((resolve, reject) => {
if (true) {
resolve(1)
}else{
} else {
reject('error')
}
})
}
//时间戳转时间格式
var formatDateTime_date = function (date) {
//时间戳转时间格式
var formatDateTime_date = function (date) {
var y = date.getFullYear();
var M = date.getMonth() + 1;
M = M < 10 ? ('0' + M) : M;
......@@ -21,10 +21,101 @@ function getRole(){
m = m < 10 ? ('0' + m) : m;
var s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
return y + '-' + M + '-' + d+' '+h + ':' + m + ':' + s;
return y + '-' + M + '-' + d + ' ' + h + ':' + m + ':' + s;
};
import CryptoJS from 'crypto-js' //加密js
var data_flag = true
export{
//标准时间转换成时间戳
var formatDateTime = function (te) {
if (te == '') {
return ''
} else {
var time = new Date(te);
var dateTime = time.getTime();
return dateTime;
}
}
// 取得cookie
function getCookie(name) {
if (document.cookie.length > 0) {
var arr = document.cookie.split('; '); //这里显示的格式需要切割一下自己可输出看下
console.log(arr)
for (var i = 0; i < arr.length; i++) {
var arr2 = arr[i].split('='); //再次切割
//这里会切割出以username为第0项的数组、以password为第0项的数组,判断查找相对应的值
if (arr2[0] == 'username') {
name = arr2[1]; //拿到账号
} else if (arr2[0] == 'password') {
//拿到拿到加密后的密码arr2[1]并解密
var bytes = CryptoJS.AES.decrypt(arr2[1].toString(), 'swuE9cmCZQwrkYRV');
var plaintext = bytes.toString(CryptoJS.enc.Utf8); //拿到解密后的密码(登录时输入的密码)
name = plaintext;
}
}
}
// var nameEQ = name + '='
// var ca = document.cookie.split(';') // 把cookie分割成组
// for (var i = 0; i < ca.length; i++) {
// var c = ca[i] // 取得字符串
// while (c.charAt(0) == ' ') { // 判断一下字符串有没有前导空格
// c = c.substring(1, c.length) // 有的话,从第二位开始取
// }
// if (c.indexOf(nameEQ) == 0) { // 如果含有我们要的name
// return unescape(c.substring(nameEQ.length, c.length)) // 解码并截取我们要值
// }
// }
// return false
}
// 清除cookie
function clearCookie(name) {
setCookie(name, "", -1);
}
// 设置cookie
function setCookie(username, password, days) {
var text = CryptoJS.AES.encrypt(password, 'swuE9cmCZQwrkYRV');//使用CryptoJS方法加密
var saveDays = new Date(); //获取时间
saveDays.setTime(saveDays.getTime() + 24 * 60 * 60 * 1000 * days); //保存的天数
console.log(saveDays)
console.log(saveDays.toGMTString())
//字符串拼接存入cookie
window.document.cookie = "username" + "=" + username + ";path=/;expires=" + saveDays.toGMTString();
window.document.cookie = "password" + "=" + text + ";path=/;expires=" + saveDays.toGMTString();
// seconds = seconds || 0; //seconds有值就直接赋值,没有为0,这个根php不一样。
// var expires = "";
// if (seconds != 0 ) { //设置cookie生存时间
// var date = new Date();
// date.setTime(date.getTime()+(seconds*1000));
// expires = "; expires="+date.toGMTString();
// }
// document.cookie = name+"="+escape(value)+expires+"; path=/"; //转码并赋值
}
export {
data_flag,
getRole,
formatDateTime,
getCookie,
clearCookie,
setCookie,
formatDateTime_date
}
\ No newline at end of file
}
window.serviceConfig = {
gisServiceRoot: 'https://apaasgis.wodcloud.com',
gisPortalSiteName: "portal",
state: "needLogin", // needLogin / notNeedLogin
cloudServiceRoot: 'https://cloud4.wodcloud.com/awecloud/login/#/',
};
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>Portal Web Map</title>
......@@ -10,21 +10,25 @@
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script src="/apaas/ui/static/config/configmap.js"></script>
<script>
require([
"esri/config",
"esri/views/MapView",
"esri/WebMap"
], function(esriConfig, MapView, WebMap) {
], function (esriConfig, MapView, WebMap) {
//使用portal门户的地图资源
esriConfig.portalUrl = "https://apaasgis.wodcloud.com/portal";
esriConfig.portalUrl = window.serviceConfig.gisServiceRoot + "/" + (window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal");
var webmap = new WebMap({
portalItem: {
id: "aa912ada83904d7c901066673ee1a5aa"
......@@ -38,6 +42,7 @@
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
......
......@@ -34,13 +34,16 @@
<script src="https://apaas3.wodcloud.com/mapstatic/js/jquery-3.3.1.min.js"></script>
<script src="https://apaas3.wodcloud.com/mapstatic/js/echarts.min.js"></script>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script src="/apaas/ui/static/config/configmap.js"></script>
<script>
require([
"esri/config",
"esri/views/MapView",
"esri/WebMap"
], function (esriConfig, MapView, WebMap) {
esriConfig.portalUrl = "https://apaasgis.wodcloud.com/portal";
esriConfig.portalUrl = window.serviceConfig.gisServiceRoot + "/" + (window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal");
var webmap = new WebMap({
portalItem: {
id: "b4f4797eb32342c5b679082bfbbef553"
......
<!DOCTYPE html>
<html>
<head>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>Portal Web Map</title>
......@@ -10,29 +10,35 @@
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
.esri-view-width-xlarge .esri-popup__main-container {
width: 505px;
}
.esri-view-height-xlarge .esri-popup__main-container {
max-height: none;
}
.esri-popup__main-container {
max-height: none;
}
</style>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script src="/apaas/ui/static/config/configmap.js"></script>
<script>
require([
"esri/config",
"esri/views/MapView",
"esri/WebMap"
], function(esriConfig, MapView, WebMap) {
esriConfig.portalUrl = "https://apaasgis.wodcloud.com/portal";
], function (esriConfig, MapView, WebMap) {
esriConfig.portalUrl = window.serviceConfig.gisServiceRoot + "/" + (window.serviceConfig.gisPortalSiteName
? window.serviceConfig.gisPortalSiteName
: "portal");
// 使用本地字体文件
esriConfig.fontsUrl = "https://apaas.wodcloud.com/mapstatic/font";
var webmap = new WebMap({
......@@ -46,11 +52,13 @@
container: "viewDiv"
});
view.when(function() {
view.popup.watch("selectedFeature", function(graphic) {
if (graphic && graphic.sourceLayer) {
view.when(function () {
view.popup.watch("selectedFeature", function (graphic) {
if (graphic && graphic.sourceLayer)
{
var layerName = graphic.sourceLayer.title;
switch (layerName) {
switch (layerName)
{
case "贵州视频监控要素微服务":
var name = graphic.attributes.NAME;
var code = graphic.attributes.CODE;
......@@ -72,7 +80,8 @@
var videoDomain = "https://apaas3.wodcloud.com/mapstatic/video/{0}.mp4";
var videoCode = code;
var videoSrc = undefined;
if (videoCode) {
if (videoCode)
{
videoSrc = videoDomain.replace("{0}", videoCode);
}
return "<iframe id='cameraiframe' src='https://apaas3.wodcloud.com/mapstatic/iframe/videoplay4test.html?camlist=" + videoCode + "&videosrc=" + videoSrc +
......@@ -81,6 +90,7 @@
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
......
......@@ -2450,6 +2450,11 @@ crypto-browserify@^3.11.0:
randombytes "^2.0.0"
randomfill "^1.0.3"
crypto-js@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.0.0.tgz#2904ab2677a9d042856a2ea2ef80de92e4a36dcc"
integrity sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==
css-color-names@0.0.4, css-color-names@^0.0.4:
version "0.0.4"
resolved "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
......
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