Commit 0986b54d authored by gaoshiyao's avatar gaoshiyao

Merge branch 'dev'

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