Commit 88e7b7b1 authored by gaoshiyao's avatar gaoshiyao

Merge branch 'dev' into master

parents 972a92fa 3a3d3014
clone:
git:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-git-arm64:1.0
pipeline:
read-cache:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache-arm64:1.0
restore: true
check: yarn.lock
mount:
- ./node_modules
- ./yarn.lock
volumes:
- /data/cache:/cache
build:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-node-arm64:12.18.2-buster
volumes:
- /data/cache/yarn:/usr/local/share/.cache/yarn
commands:
- yarn install
- yarn run build
store-cache:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache-arm64:1.0
rebuild: true
mount:
- ./node_modules
- ./yarn.lock
volumes:
- /data/cache:/cache
docker:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base-arm64:2.0
repo: wod/apaas-ui-arm64
version: "v3.0.2"
channel: alpha
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: dev
harbor:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base-arm64:2.0
repo: wod/apaas-ui-arm64
version: "v3.0.2"
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: master
latest:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base-arm64:2.0
repo: wod/apaas-ui-arm64
version: "v3.1"
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: master
branches: [master,dev]
platform: 10.11.92.33
platform: 10.11.92.34
clone:
git:
image: registry.cn-qingdao.aliyuncs.com/wod-devops/git:1.4.0
image: registry.cn-qingdao.aliyuncs.com/wod/devops-git:1.0
pull: true
dns: 223.5.5.5
pipeline:
## 读缓存
read-cache:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache:1.0.0-alpha
image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache:1.0
restore: true
check: yarn.lock
mount:
- ./node_modules
- ./yarn.lock
volumes:
- /data/cache:/cache
## 构建
build:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-node:12.18.0-stretch
dns: 223.5.5.5
volumes:
- /data/cache/yarn:/usr/local/share/.cache/yarn
commands:
- yarn install
- yarn run build
- yarn
- yarn build
store-cache:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache:1.0.0-alpha
image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache:1.0
rebuild: true
mount:
- ./node_modules
- ./yarn.lock
volumes:
- /data/cache:/cache
## 编译成静态文件
docker:
image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: "v3.0"
version: v3.0.2
channel: alpha
args: "TARGETOS=linux,TARGETARCH=amd64" ## 不同架构的构建参数
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -45,14 +51,56 @@ pipeline:
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: dev
branch:
- dev
## 更换dev生成镜像的名称
harbor:
image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0
- /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
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
# 生成最终amd版本
latest:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
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
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
# 构建arm64位镜像
docker-arm64:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-arm64
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: "v3.0"
version: v3.0.2
channel: alpha-arm64
args: "TARGETOS=linux,TARGETARCH=arm64"
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -60,14 +108,55 @@ pipeline:
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: master
latest:
image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0
branch:
- dev
## 更换dev生成arm64镜像的名称
harbor-arm64:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0
- /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
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
# 生成最终arm版本
latest-arm64:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
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
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-arm64
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
docker-ppc64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-ppc64le
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: "v3.0"
version: v3.0.2
channel: alpha-ppc64le
args: "TARGETOS=linux,TARGETARCH=ppc64le"
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
......@@ -75,15 +164,103 @@ pipeline:
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch: master
deploy:
image: registry.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0
namespace: apaas-v3
deployment: apaas-ui
container: apaas-ui
branch:
- dev
harbor-ppc64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
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
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
latest-ppc64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
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
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-ppc64le
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
docker-mips64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
volumes:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-mips64le
dockerfile: .beagle/dockerfile
repo: wod/apaas-ui
version: v3.0.2
channel: alpha-mips64le
args: "TARGETOS=linux,TARGETARCH=mips64le"
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
branches: [master,dev]
when:
branch:
- dev
harbor-mips64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
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
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
latest-mips64le:
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
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
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0-mips64le
registry: registry.cn-qingdao.aliyuncs.com
secrets:
- source: REGISTRY_USER_ALIYUN
target: REGISTRY_USER
- source: REGISTRY_PASSWORD_ALIYUN
target: REGISTRY_PASSWORD
when:
branch:
- master
deploy:
image: registry.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0
namespace: apaas-v3
deployment: apaas-ui
container: apaas-ui
registry: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:v3.0.2-alpha
when:
branch:
- dev
ARG BASE
FROM $BASE
ARG AUTHOR
ARG VERSION
LABEL maintainer=${AUTHOR} version=${VERSION}
ARG TARGETOS
ARG TARGETARCH
ADD ./dist /www
ADD ./build/conf.yaml /www/conf.yaml
\ No newline at end of file
......@@ -228,13 +228,14 @@ div {
.el-dialog__header {
border-bottom: 1px solid #edf0ff;
padding: 20px 16px;
}
.el-dialog__title {
font-size: 16px;
font-size: 18px;
font-weight: 700;
color: #1d1e20;
padding-left: 8px;
padding-left: 12px;
position: relative;
}
......@@ -246,7 +247,19 @@ div {
border-radius: 2px;
background-color: #515fe7;
left: 0;
top: 2px;
top: 5px;
}
.el-dialog__headerbtn {
top: 24px;
}
.el-dialog__headerbtn .el-dialog__close {
color: #8890a7;
}
.el-dialog__headerbtn:focus .el-dialog__close, .el-dialog__headerbtn:hover .el-dialog__close {
color: #515fe7;
}
.el-dialog__body {
......@@ -1071,6 +1084,10 @@ border-radius:8px;
background-color: #242c43 !important;
}
.el-picker-panel__icon-btn {
color: #0c3ff7;
}
.el-date-table th {
border-bottom: 1px solid #3f4864 !important;
color: #e3e5ef !important;
......@@ -1197,4 +1214,43 @@ border-radius:8px;
}
.el-date-editor .el-range-input {
width: 36%;
}
.el-input__inner:focus {
border-color: #515fe7;
}
.el-textarea__inner:focus {
border-color: #515fe7;
}
.el-select .el-input .el-select__caret {
color: #515fe7;
}
.el-input-number__decrease, .el-input-number__increase {
color: #515fe7;
}
.el-input__inner::-webkit-input-placeholder,
.el-textarea__inner::-webkit-input-placeholder {
color: #a9aec0;
}
.el-input__inner:-moz-placeholder,
.el-textarea__inner:-moz-placeholder {/* Firefox 18- */
color: #a9aec0;
}
.el-input__inner::-moz-placeholder,
.el-textarea__inner::-moz-placeholder {/* Firefox 19+ */
color: #a9aec0;
}
.el-input__inner:-ms-input-placeholder,
.el-textarea__inner:-ms-input-placeholder {
color: #a9aec0;
}
[class*=" el-icon-"], [class^=el-icon-] {
font-weight: 700;
}
.el-rate__item .el-rate__icon {
font-size: 18px;
margin-right: 0;
}
\ No newline at end of file
......@@ -75,6 +75,13 @@
@click.stop="item.callback && item.callback(scope.row)"
></a>
</div>
<div v-else-if="item.type === 'button-oo'" class="row_action">
<a
class="btn-oo"
v-text="scope.row[item.prop]"
@click.stop="item.callback && item.callback(scope.row)"
></a>
</div>
<div v-else-if="item.type === 'icon'">
<img
src="../assets/imgs/ic_true.png"
......@@ -447,6 +454,11 @@ export default {
.btn_up {
background-image: url("../assets/imgs/btn_fold.png");
}
.btn-oo {
font-size: 14px;
font-weight: bold;
color: #0f2683;
}
.charts {
position: relative;
}
......
......@@ -12,10 +12,11 @@
<p class="comment-user_name" v-text="item.user_name"></p>
<div class="commnet-rate">
<el-rate
:colors="['#e69232', '#e69232', '#e69232']"
:colors="['#fac266', '#fac266', '#fac266']"
:value="item.score"
disabled
score-template="{value}"
disabled-void-color="#d9dce5"
>
</el-rate>
</div>
......
......@@ -7,9 +7,10 @@
<p class="comment-full_score">满分5分</p>
<div class="comment-total_rata">
<el-rate
:colors="['#e69232', '#e69232', '#e69232']"
:colors="['#fac266', '#fac266', '#fac266']"
:value="data.score"
disabled
disabled-void-color="#d9dce5"
>
</el-rate>
</div>
......@@ -23,7 +24,7 @@
>
<el-rate
class="comments_score_item-rate"
:colors="['#8890a7', '#8890a7', '#8890a7']"
:colors="['#fac266', '#fac266', '#fac266']"
:value="item.star"
disabled
disabled-void-color="transparent"
......
......@@ -25,10 +25,11 @@
</p>
<div class="commnet-rate">
<el-rate
:colors="['#e69232', '#e69232', '#e69232']"
:colors="['#fac266', '#fac266', '#fac266']"
:value="item.score"
disabled
score-template="{value}"
disabled-void-color="#d9dce5"
></el-rate>
</div>
<p class="comment-description" v-text="item.message"></p>
......@@ -158,10 +159,10 @@ export default {
<style>
.comment-right > .commnet-rate .el-rate {
height: 20px;
height: 18px;
}
.comment-right > .commnet-rate .el-rate__icon {
font-size: 20px;
font-size: 18px;
margin-right: 0;
}
</style>
<template>
<ul class="star_list apaas_scroll">
<li class="item_list" v-for="(option, index) in options" :key="'star_info_' + index">
<li
class="item_list"
v-for="(option, index) in options"
:key="'star_info_' + index"
>
<el-rate
v-if="show_star"
class="item-rate"
:colors="['#8890a7', '#8890a7', '#8890a7']"
:colors="['#fac266', '#fac266', '#fac266']"
:value="option.star"
disabled
disabled-void-color="transparent"
......@@ -12,11 +16,15 @@
<span v-else class="data_title">{{ option.title }}</span>
<el-progress
class="item-progress"
:percentage="getPercent(option.count)"
:percentage="Number(getPercent(option.count))"
:show-text="false"
:color="show_star ? color : colors[index]"
></el-progress>
<span v-if="!show_star" class="item_text_1" v-text="option.percent + '%'"></span>
<span
v-if="!show_star"
class="item_text_1"
v-text="option.percent + '%'"
></span>
<span class="item-text" v-text="option.count + '个'"></span>
</li>
</ul>
......@@ -27,28 +35,33 @@ export default {
props: {
options: {
type: Array,
default: () => []
default: () => [],
},
total: {
type: Number,
default: () => 10
default: () => 10,
},
show_star: {
type: Boolean,
default: true
}
default: true,
},
},
data() {
return {
color: "#e56600",
colors: ["#25bdb1", "#f5ab4c", "#e15260", "#274fee", "#58617a"]
colors: ["#25bdb1", "#f5ab4c", "#e15260", "#274fee", "#58617a"],
};
},
methods: {
getPercent(value) {
return Math.min((value / this.total) * 100, 100);
}
}
if (value == 0) {
return 0;
} else {
let num = Math.min((value / this.total) * 100, 100);
return num;
}
},
},
};
</script>
......
......@@ -46,7 +46,7 @@ export default {
}
if (this.datas) {
let obj = "";
console.log(typeof JSON.parse(this.datas));
// console.log(typeof JSON.parse(this.datas));
try {
if (typeof JSON.parse(this.datas) == "object") {
obj = JSON.stringify(JSON.parse(this.datas), null, "\t");
......
......@@ -31,8 +31,8 @@
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<span class="up_fz">将文件拖到此处,或</span>
<em>点击上传</em><br />
<span class="up_fz">{{ up_fz }}</span>
<em>点击上传</em>
<div class="up_fz_1">{{ up_fz }}</div>
</div>
</div>
<el-button size="small" type="primary" v-if="!drag && type == 'default'"
......@@ -130,10 +130,17 @@ export default {
var getListImg = [];
if (value && value.length != 0) {
for (var i = 0; i < value.length; i++) {
getListImg.push({
name: value[i],
url: value[i],
});
if (typeof value[i] == "string") {
getListImg.push({
name: value[i],
url: value[i],
});
} else {
getListImg.push({
name: value[i].name,
url: value[i].url,
});
}
}
}
this.fileArray = [...getListImg];
......@@ -160,7 +167,13 @@ export default {
this.$message.error("上传图片大小不能超过 10MB!");
}
return isJPG && isLt10M;
} else {
} else if (this.type == "md") {
console.log(file);
const isMd = file.name.substring(file.name.length - 3) == ".md";
if (!isMd) {
this.$message.error("上传文件只能是md格式文件!");
}
return isMd;
}
},
handleAvatarSuccess(response, file, fileList) {
......@@ -240,4 +253,10 @@ export default {
.up_fz {
color: #a9aec0;
}
.up_fz_1 {
line-height: 24px;
color: #a9aec0;
position: relative;
bottom: 6px;
}
</style>
\ No newline at end of file
......@@ -209,6 +209,7 @@
:colors="colors"
show-score
score-template="{value}"
disabled-void-color="#d9dce5"
></el-rate>
</div>
<p>填写评价:</p>
......@@ -310,6 +311,7 @@
v-model="message.score"
disabled
:colors="colors"
disabled-void-color="#d9dce5"
></el-rate>
</div>
<div class="msg_title">评价详情:</div>
......@@ -334,7 +336,7 @@ export default {
},
data: () => ({
visible: false,
colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
colors: ["#fac266", "#fac266", "#fac266"],
serviceRate: null,
textarea: "",
showMsgBox: false,
......@@ -391,12 +393,12 @@ export default {
});
} else if (this.cellItem.order_type == 2) {
let query = {
app: this.cellItem.app_id,
app_id: this.cellItem.app_id,
content: this.textarea,
score: this.serviceRate,
apply_id: this.cellItem.apply_id,
};
this.$api.user.addServiceEvaluation(query).then((response) => {
this.$api.user.addAppEvaluation(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "评价订单成功",
......@@ -436,11 +438,12 @@ export default {
});
},
nextApply() {
console.log(this.cellItem.spec_app)
let query = {};
if (this.cellItem.order_type == 1) {
query = {
service_id: parseFloat(this.cellItem.service_id),
spcs_id: this.cellItem.spcs_id,
spec_id: this.cellItem.svc_spec_id,
duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit,
};
......@@ -451,7 +454,7 @@ export default {
} else if (this.cellItem.order_type == 2) {
query = {
app_id: parseFloat(this.cellItem.app_id),
spec_id: this.cellItem.spec_app++,
spec_id: this.cellItem.svc_spec_id,
duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit,
};
......@@ -723,7 +726,7 @@ export default {
font-size: 24px;
}
.pop_rate .el-rate__text {
font-size: 20px;
font-size: 18px;
margin-left: 20px;
position: relative;
top: 1px;
......
......@@ -34,7 +34,7 @@ export default {
},
created() {
if(this.data.length<=1&&this.data[this.data.length-1].result=='审批通过'){
if(this.data.length<=1&&this.data[this.data.length-1]&&this.data[this.data.length-1].result=='审批通过'){
this.data.push({
title: "二级审批",
result: "审批中",
......
......@@ -105,7 +105,7 @@
<label v-for="(item, index) in data.second" :key="index + 2500">
{{ item.name }}:
<a
v-if="item.name.indexOf('地址') !== -1"
v-if="item.name.indexOf('地址') !== -1 && item.text != '暂无'"
style="color:#515fe7;text-decoration: none;"
target="_blank"
:href="item.text"
......
......@@ -114,11 +114,11 @@ export default {
},
addToCart() {
// console.log("addToCart");
console.log(this.datas)
this.$http
.post("/apaas/serviceapp/v3/shopcart/add", {
service_id: 0, // 0表示不是服务
app_id: parseFloat(this.data.app_id),
app_id: parseFloat(this.datas.app_id),
spec_id: this.specificationID,
duration: 1,
duration_method: 1,
......@@ -151,7 +151,7 @@ export default {
this.$router.push({
path: "/shop/shop_car_apply",
query: {
app_id: parseFloat(this.data.app_id),
app_id: parseFloat(this.datas.app_id),
spec_id: this.specificationID,
duration: 1,
duration_unit: 1,
......@@ -464,4 +464,43 @@ export default {
.service_info .el-input-number {
width: 128px;
}
.service_info .el-input-number .el-input-number__decrease {
top: 1px;
left: 1px;
line-height: 34px;
border-radius: 5px 0 0 5px;
border-right-width: 1px;
}
.service_info .el-input-number .el-input-number__increase {
top: 1px;
right: 1px;
line-height: 34px;
border-radius: 0 5px 5px 0;
border-left-width: 1px;
}
.service_info .el-input-number .el-input__inner {
border-width: 1px;
height: 36px;
line-height: 36px;
}
.service_info .el-input-number {
width: 128px;
line-height: 36px;
}
.service_info
.el-input-number__decrease:hover:not(.is-disabled)
~ .el-input
.el-input__inner:not(.is-disabled),
.el-input-number__increase:hover:not(.is-disabled)
~ .el-input
.el-input__inner:not(.is-disabled) {
border-color: #515fe7;
}
.service_info .el-input__inner:focus {
border-color: #515fe7;
}
.service_info .el-input-number__decrease:hover,
.el-input-number__increase:hover {
color: #515fe7;
}
</style>
......@@ -60,7 +60,7 @@ export default {
background-color: #8f93a1;
}
.map_view_container {
height: 666px;
/* height: 666px; */
}
.map_view_container > iframe {
display: block;
......
......@@ -25,7 +25,12 @@
</div>
<div class="main_container-right">
<div class="service_title">
<span class="service_name" v-text="data.name"></span>
<span class="service_name">
{{ data.name }}
<span v-if="data.version && data.version != ''">
( {{ data.version }} )
</span>
</span>
<span class="service_type" v-if="data.type" v-text="data.type"></span>
<span v-if="data.openness == 1" class="tags shared">共享</span>
<span v-else-if="data.openness == 2" class="tags restricted">
......@@ -44,7 +49,9 @@
<p class="des_p">{{ data.descript }}</p>
<div class="jiage_d">
<div class="dbn_wkdn">
<span class="gnekg_fwf"><span style="margin-right: 30px;"></span>格:</span><span class="ndwa_indowa">
<span class="gnekg_fwf"
><span style="margin-right: 30px"></span>格:</span
><span class="ndwa_indowa">
{{
specification && specification.money
? specification.money * (showTime ? duration : 1)
......@@ -54,8 +61,11 @@
<span class="kfdf_jffa">金币</span>
</div>
<div class="nmd_kwd">
<span class="bgnerighur">月售:<span class="ndwa_dn">{{ data.month_sale }}</span
></span>
<span class="bgnerighur"
>月售:<span class="ndwa_dn"
>{{ data.month_sale }}
</span></span
>
<img src="@/assets/imgs/shop_ic_star.png" class="dwin_diwa" />
<span class="dn_wjd">{{ data.scoreDetail.avgScore }}</span>
</div>
......@@ -94,12 +104,13 @@
{{
specification && specification.spcs_type == 1
? specification.descript
: data.serviceRequestSpcs.spcs_type_1 && data.serviceRequestSpcs.spcs_type_1.length != 0 ? data.serviceRequestSpcs.spcs_type_1[0].descript : ""
: data.serviceRequestSpcs.spcs_type_1 &&
data.serviceRequestSpcs.spcs_type_1.length != 0
? data.serviceRequestSpcs.spcs_type_1[0].descript
: ""
}}
</div>
<div
class="commodity_information"
>
<div class="commodity_information">
<span class="guige_title">时长收费:</span>
<span
v-if="
......@@ -389,8 +400,8 @@ export default {
}
.service_title > .service_type {
flex-shrink: 0;
height: 24px;
padding: 0 12px;
height: 22px;
padding: 0 7px;
border: 1px solid #5362ee;
background-color: #5362ee;
border-radius: 4px;
......@@ -542,7 +553,7 @@ export default {
position: absolute;
width: 1px;
height: 14px;
background-color:#eccb8a;
background-color: #eccb8a;
top: 8px;
left: -44px;
}
......@@ -563,16 +574,16 @@ export default {
border-radius: 6px;
color: #fcefd6;
font-size: 16px;
margin-right: 24px;
margin-right: 14px;
}
.tags {
display: inline-block;
margin-left: 8px;
height: 24px;
padding: 0 12px;
height: 22px;
padding: 0 7px;
font-size: 12px;
font-weight: 500;
line-height: 24px;
line-height: 22px;
border-radius: 4px;
position: relative;
top: 1px;
......@@ -622,7 +633,7 @@ export default {
.spec_des {
margin-left: 128px;
color: rgba(88, 97, 122, 0.5);
font-size: 14px;
font-size: 12px;
line-height: 14px;
margin-top: 8px;
}
......@@ -639,25 +650,42 @@ export default {
border-color: #515fe7;
}
.service_info .el-input-number .el-input-number__decrease {
top: 2px;
left: 2px;
width: 38px;
line-height: 36px;
border-radius: 8px 0 0 8px;
border-right-width: 2px;
top: 1px;
left: 1px;
line-height: 34px;
border-radius: 5px 0 0 5px;
border-right-width: 1px;
}
.service_info .el-input-number .el-input-number__increase {
top: 2px;
right: 2px;
width: 38px;
line-height: 36px;
border-radius: 0 8px 8px 0;
border-left-width: 2px;
top: 1px;
right: 1px;
line-height: 34px;
border-radius: 0 5px 5px 0;
border-left-width: 1px;
}
.service_info .el-input-number .el-input__inner {
border-width: 2px;
border-width: 1px;
height: 36px;
line-height: 36px;
}
.service_info .el-input-number {
width: 128px;
line-height: 36px;
}
.service_info
.el-input-number__decrease:hover:not(.is-disabled)
~ .el-input
.el-input__inner:not(.is-disabled),
.el-input-number__increase:hover:not(.is-disabled)
~ .el-input
.el-input__inner:not(.is-disabled) {
border-color: #515fe7;
}
.service_info .el-input__inner:focus {
border-color: #515fe7;
}
.service_info .el-input-number__decrease:hover,
.el-input-number__increase:hover {
color: #515fe7;
}
</style>
......@@ -7,7 +7,10 @@
<div class="com_cell_up_right">
<div class="up_title">
<div class="up_tit_name_in">
<span class="up_tit_name" :title="cellData.app_name + ' ( V' + cellData.version + ' )'">
<span
class="up_tit_name"
:title="cellData.app_name + ' ( V' + cellData.version + ' )'"
>
{{ cellData.app_name }} ( V{{ cellData.version }} )
</span>
</div>
......@@ -19,6 +22,8 @@
show-score
text-color="#ea7d19"
score-template="{value}"
:colors="['#fac266', '#fac266', '#fac266']"
disabled-void-color="#d9dce5"
></el-rate>
<p class="get_num">
获取次数:
......@@ -38,14 +43,14 @@
{{ cellData.yyjj }}
</p>
<el-row :gutter="16">
<el-col :span="14" class="com_other">
<el-col :span="14" class="com_other1">
<span class="name_title">应用类型:</span>
{{ cellData.type_name }}
&nbsp;&nbsp;{{ cellData.data_service_type2_name }} &nbsp;&nbsp;{{
cellData.data_service_type3_name
}}
</el-col>
<el-col :span="10" class="com_other">
<el-col :span="10" class="com_other1">
<span class="name_title">业务领域:</span>
{{ cellData.area_name }}
</el-col>
......@@ -158,13 +163,13 @@ export default {
.tags {
display: inline-block;
margin-left: 8px;
padding: 2px 8px 3px;
padding: 3px 8px 3px;
font-size: 12px;
font-weight: 500;
line-height: 12px;
border-radius: 4px;
position: relative;
top: 1px;
top: 0px;
}
.map_service {
background-color: #626de9;
......@@ -197,7 +202,7 @@ export default {
-webkit-line-clamp: 2;
overflow: hidden;
height: 42px;
margin-bottom: 8px;
margin-bottom: 5px;
}
.com_other {
color: #58617a;
......@@ -207,15 +212,19 @@ export default {
-webkit-line-clamp: 1;
overflow: hidden;
}
.com_other1 {
color: #58617a;
margin-bottom: 9px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.name_title {
color: #8890a7;
}
</style>
<style>
.com_cell .el-rate__item .el-rate__icon {
font-size: 20px;
margin-right: 0;
}
.com_cell .el-rate__text {
margin-left: 4px;
position: relative;
......
......@@ -9,6 +9,9 @@
<div class="up_tit_name_in">
<span class="up_tit_name" :title="cellData.name">
{{ cellData.name }}
<span v-if="cellData.version && cellData.version != ''">
( {{ cellData.version }} )</span
>
</span>
</div>
<span
......@@ -29,7 +32,9 @@
disabled
show-score
text-color="#ea7d19"
:colors="['#fac266', '#fac266', '#fac266']"
score-template="{value}"
disabled-void-color="#d9dce5"
></el-rate>
<p class="get_num">
获取次数:
......@@ -49,21 +54,49 @@
{{ cellData.descript }}
</p>
<el-row :gutter="16">
<el-col :span="14" class="com_other">
<el-col
:span="14"
class="com_other1"
v-if="cellData.data_service_type1 != 36"
:title="`服务类型:${cellData.data_service_type1_name} ${cellData.data_service_type2_name} ${cellData.data_service_type3_name}`"
>
<span class="name_title">服务类型:</span>
{{ cellData.data_service_type1_name }}
&nbsp;&nbsp;{{ cellData.data_service_type2_name }} &nbsp;&nbsp;{{
cellData.data_service_type3_name
}}
</el-col>
<el-col :span="10" class="com_other">
<span class="name_title">服务领域:</span>
<el-col
:span="10"
class="com_other1"
:title="`${cellData.data_service_type1 != 36 ? '服务领域:' : '产品领域:'}${cellData.sectors_name}`"
>
<span class="name_title">{{ cellData.data_service_type1 != 36 ? '服务领域:' : '产品领域:' }}</span>
{{ cellData.sectors_name }}
</el-col>
<el-col :span="14" class="com_other">
<el-col
:span="14"
class="com_other"
:title="`更新时间:${helper.dateStringTransform(
cellData.update_date
)}`"
>
<span class="name_title">更新时间:</span>
{{ helper.dateStringTransform(cellData.update_date) }}
</el-col>
<el-col
:span="24"
v-if="urlFilter == '36'"
class="com_other1"
:title="`${getTags(cellData.tags)}`"
>
<span
class="card_tag"
v-for="(item, tag_index) in cellData.tags"
:key="`tg_${tag_index}`"
>{{ item }}</span
>
</el-col>
</el-row>
</div>
</div>
......@@ -77,9 +110,12 @@ export default {
props: {
url: { type: String, default: "" },
cellData: { type: Object, default: {} },
urlFilter: { type: String, default: "" },
},
data: () => ({ helper: helper }),
computed: {},
computed: {
},
watch: {},
methods: {
goUrl(parame) {
......@@ -87,6 +123,14 @@ export default {
this.$router.push(this.url + "/" + parame);
}
},
getTags(arr) {
if (arr && arr.length != 0) {
let str = arr.join(" / ");
return str;
} else {
return "";
}
},
},
mounted() {},
};
......@@ -95,17 +139,17 @@ export default {
<style scoped>
.com_cell {
width: 496px;
height: 208px;
/* height: 208px; */
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.04);
border-radius: 12px 12px 8px 8px;
border-radius: 8px 8px 8px 8px;
border: solid 1px #e3e4ef;
margin-bottom: 24px;
}
.com_cell_up {
height: 88px;
background-color: #f9fafc;
border-radius: 12px 12px 0px 0px;
border-radius: 8px 8px 0px 0px;
padding: 16px;
display: flex;
position: relative;
......@@ -169,13 +213,13 @@ export default {
.tags {
display: inline-block;
margin-left: 8px;
padding: 2px 8px 3px;
padding: 3px 8px 3px;
font-size: 12px;
font-weight: 500;
line-height: 12px;
border-radius: 4px;
position: relative;
top: 1px;
top: 0px;
}
.map_service {
background-color: #626de9;
......@@ -198,7 +242,7 @@ export default {
color: #e15260;
}
.com_cell_down {
padding: 12px 16px 0 16px;
padding: 12px 16px 6px 16px;
}
.com_detail {
color: #8890a7;
......@@ -208,7 +252,7 @@ export default {
-webkit-line-clamp: 2;
overflow: hidden;
height: 42px;
margin-bottom: 8px;
margin-bottom: 5px;
}
.com_other {
color: #58617a;
......@@ -218,15 +262,34 @@ export default {
-webkit-line-clamp: 1;
overflow: hidden;
}
.com_other1 {
color: #58617a;
margin-bottom: 9px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.name_title {
color: #8890a7;
}
.card_tags {
display: inline-block;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.card_tag {
display: inline-block;
color: #515fe7;
margin-right: 16px;
border: solid 1px #b4c0f5;
background-color: #eeeffd;
border-radius: 4px;
padding: 2px 6px;
}
</style>
<style>
.com_cell .el-rate__item .el-rate__icon {
font-size: 20px;
margin-right: 0;
}
.com_cell .el-rate__text {
margin-left: 4px;
position: relative;
......
......@@ -41,6 +41,8 @@
show-score
text-color="#58617a"
score-template="{value}"
:colors="['#fac266', '#fac266', '#fac266']"
disabled-void-color="#d9dce5"
></el-rate>
<div class="com_cell_right_text">
<span class="com_cell_right_time_tit">本月获取次数:</span>
......
......@@ -14,6 +14,7 @@
:cellData="item"
:url="url"
:key="item.id"
:urlFilter="urlFilter"
></commodity-cell>
</div>
<!-- 分页 -->
......
......@@ -92,6 +92,10 @@ export default {
item.active = "shop_ic_yysd_sel";
item.default = "shop_ic_yysd";
break;
case "products_list":
item.active = "shop_nav_iv_chanpinzy_pre";
item.default = "shop_nav_iv_chanpinzy";
break;
default:
item.active = "1";
item.default = "1";
......@@ -138,7 +142,7 @@ export default {
color: #515fe7;
}
.menu_img {
width: 24px;
/* width: 24px; */
margin-right: 6px;
}
.menu_item {
......
......@@ -19,6 +19,12 @@
:src="require('@/assets/imgs/shop_img_hqlc_yingyong.png')"
/>
</div>
<div class="step_div" v-else-if="item.type == 'step_cp'">
<img
class="step_img"
:src="require('@/assets/imgs/shop_img_hqlc_chanpin.png')"
/>
</div>
<p
v-else-if="item.type == 'text'"
class="detail-text"
......@@ -33,11 +39,19 @@
<table class="xq_table">
<tr>
<td>数据领域:{{ item.value.sectors_name }}</td>
<td>服务类型:{{ item.value.data_service_type1_name }}&nbsp;&nbsp;&nbsp;&nbsp;{{ item.value.data_service_type2_name }}</td>
<td>
服务类型:{{
item.value.data_service_type1_name
}}&nbsp;&nbsp;&nbsp;&nbsp;{{ item.value.data_service_type2_name }}
</td>
</tr>
<tr>
<td>发布时间:{{ helper.dateStringTransform(item.value.create_time) }}</td>
<td>更新时间:{{ helper.dateStringTransform(item.value.update_date) }}</td>
<td>
发布时间:{{ helper.dateStringTransform(item.value.create_time) }}
</td>
<td>
更新时间:{{ helper.dateStringTransform(item.value.update_date) }}
</td>
</tr>
<tr>
<td>请求方式:{{ item.value.req_type }}</td>
......@@ -57,6 +71,26 @@
</tr>
</table>
</div>
<div v-else-if="item.type == 'cp-list'">
<table class="xq_table">
<tr>
<td>产品领域:{{ item.value.cp_area }}</td>
<td>
更新时间:{{ helper.dateStringTransform(item.value.fb_time) }}
</td>
</tr>
<tr>
<td>
所属业务系统:<a :href="item.value.org_url" target="blank">{{
item.value.org
}}</a>
</td>
<td class="tags" :title="`产品标签:${getTags(item.value.tags)}`">
产品标签:{{ getTags(item.value.tags) }}
</td>
</tr>
</table>
</div>
<workflows-view
v-else-if="item.type == 'workflows'"
:id="item.value"
......@@ -119,9 +153,20 @@ export default {
},
data() {
return {
helper
}
}
helper,
};
},
computed: {},
methods: {
getTags(arr) {
if (arr.length != 0) {
let str = arr.join(" / ");
return str;
} else {
return "";
}
},
},
};
</script>
......@@ -201,4 +246,12 @@ export default {
.xq_table tbody > tr:last-child > td {
border-bottom-width: 0;
}
.tags {
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.tag_sp {
margin-right: 8px;
}
</style>
......@@ -74,7 +74,7 @@ export default {
},
{
label: "价格",
prop: "spcs",
prop: "spce",
align: "center",
width: "200"
},
......
......@@ -58,7 +58,7 @@ export default {
},
providerTitle: {
type: String,
default: () => "提供组织",
default: () => "服务机构及规格信息",
},
commentsTitle: {
type: String,
......
......@@ -4,7 +4,7 @@
<el-breadcrumb-item :to="{ path: '/shop' }">服务超市</el-breadcrumb-item>
<el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
</el-breadcrumb>
<block-radius :paddingNum="24">
<block-radius :borRadius="8" :paddingNum="24">
<el-form
ref="form"
:inline="true"
......@@ -44,7 +44,7 @@
</el-row>
</el-form>
</block-radius>
<block-radius :paddingNum="24">
<block-radius :borRadius="8" :paddingNum="24">
<el-tabs v-model="activeName" class="cloud_form" @tab-click="tabClick">
<el-tab-pane label="申请新的工作区域" name="0">
<el-form ref="formNew" :model="formNew" :rules="ruleNew">
......@@ -609,7 +609,7 @@
</el-tab-pane>
</el-tabs>
</block-radius>
<block-radius v-if="!(activeName == 1 && !formShow)">
<block-radius :borRadius="8" v-if="!(activeName == 1 && !formShow)">
<div class="btn_footer fyzj_item">
<div class="fyzj">
<p class="fyzj_p">
......@@ -951,7 +951,7 @@
</div>
<div class="clear_xxx"></div>
</div>
<div class="btn_footer">
<div class="btn_footer acc">
<el-button class="cancel" @click="cancel">取消</el-button>
<el-button class="submit1" @click="determineSubmit">确定提交</el-button>
</div>
......@@ -1181,13 +1181,13 @@ export default {
formNew: {
handler() {
if (this.formNew.containerGroup % 1 != 0) {
this.formNew.containerGroup = Math.floor(this.formNew.containerGroup)
this.formNew.containerGroup = Math.floor(this.formNew.containerGroup);
}
if (this.formNew.dataDisk % 1 != 0) {
this.formNew.dataDisk = Math.floor(this.formNew.dataDisk)
this.formNew.dataDisk = Math.floor(this.formNew.dataDisk);
}
if (this.formNew.appDuration % 1 != 0) {
this.formNew.appDuration = Math.floor(this.formNew.appDuration)
this.formNew.appDuration = Math.floor(this.formNew.appDuration);
}
},
deep: true,
......@@ -1195,17 +1195,17 @@ export default {
formOld: {
handler() {
if (this.formOld.containerGroup % 1 != 0) {
this.formOld.containerGroup = Math.floor(this.formOld.containerGroup)
this.formOld.containerGroup = Math.floor(this.formOld.containerGroup);
}
if (this.formOld.dataDisk % 1 != 0) {
this.formOld.dataDisk = Math.floor(this.formOld.dataDisk)
this.formOld.dataDisk = Math.floor(this.formOld.dataDisk);
}
if (this.formOld.appDuration % 1 != 0) {
this.formOld.appDuration = Math.floor(this.formOld.appDuration)
this.formOld.appDuration = Math.floor(this.formOld.appDuration);
}
},
deep: true,
}
},
},
data() {
var checkName = (rule, value, callback) => {
......@@ -2015,6 +2015,8 @@ export default {
.btn_footer {
display: flex;
justify-content: flex-end;
}
.acc {
margin: 0 20px;
}
.btn_footer .submit {
......@@ -2022,6 +2024,9 @@ export default {
background-color: #e56600;
color: #f8f9fd;
}
.btn_footer .submit:focus {
border: #d93d00 1px solid;
}
.btn_footer .nosubmit {
width: 220px;
background-color: #a9aec0;
......@@ -2125,7 +2130,7 @@ export default {
}
.ckfymx_qian {
display: inline-block;
margin-left: 20px;
margin-left: 30px;
position: relative;
}
.ckfymx_qian::after {
......@@ -2134,7 +2139,7 @@ export default {
width: 1px;
height: 16px;
background: #bcc1d0;
left: -10px;
left: -16px;
top: 2px;
}
.yebz {
......@@ -2274,6 +2279,8 @@ export default {
background-color: #f7f8f9;
border-radius: 6px;
color: #242c43;
font-size: inherit;
font-family: Microsoft YaHei, sans-serif;
}
.form_item .el-form-item__content {
width: 100%;
......
......@@ -152,6 +152,7 @@
:row="scope.row"
:ids="item.id"
:detailsUrl="detailsUrl"
:ites="ites"
></v-apaas-table-umhref>
<!-- could edit -->
<v-apaas-table-input
......@@ -400,6 +401,10 @@ export default {
maxheight: {
type: [String, Number],
default: " "
},
ites: {
type: Boolean,
default: false,
}
},
data() {
......
<template>
<span>
<span v-if="this.row.id||ids" class="href" @click="goHref(baseVal)">{{ text }}</span>
<span v-else>{{text}}</span>
<span v-if="this.row.id || ids" class="href" @click="goHref(baseVal)">{{
text
}}</span>
<span v-else>{{ text }}</span>
</span>
</template>
......@@ -10,35 +12,42 @@ import helper from "@/services/helper";
import format from "string-format";
export default {
props: ["header", "row", "detailsUrl","ids"],
props: ["header", "row", "detailsUrl", "ids", "ites"],
computed: {
text: function() {
text: function () {
let text = helper.GetProperty(this.row, this.header.prop);
return text;
},
// get row.id value
baseVal: function() {
baseVal: function () {
let baseVal = helper.GetProperty(this.row, "id");
return baseVal;
},
},
created(){
},
created() {},
methods: {
// Jump routing using id as parameter
goHref(val) {
if(this.ids){
if(this.ids.indexOf('.')==-1){
this.$router.push(this.detailsUrl + this.row[this.ids])
}else{
this.$router.push(this.detailsUrl + this.row[this.ids.split('.')[0]][this.ids.split('.')[1]])
if (this.ids) {
if (this.ids.indexOf(".") == -1) {
if (this.ites) {
console.log(this.row)
this.$router.push(this.detailsUrl + this.row[this.ids] + "/" + this.row.app_id);
} else {
this.$router.push(this.detailsUrl + this.row[this.ids]);
}
} else {
this.$router.push(
this.detailsUrl +
this.row[this.ids.split(".")[0]][this.ids.split(".")[1]]
);
}
}else{
this.$router.push(this.detailsUrl + val)
} else {
console.log("!123");
this.$router.push(this.detailsUrl + val);
}
}
}
},
},
};
</script>
<style scoped>
......
......@@ -70,7 +70,7 @@ export default {
node.img = require("@/assets/svg/topology_ic_ganzhifw.svg");
node.size = [15, 15];
break;
case "综合应用":
case "融合服务":
node.type = "image";
node.img = require("@/assets/svg/topology_ic_zonghefw.svg");
node.size = [15, 15];
......@@ -313,7 +313,7 @@ export default {
type: "image",
img: require("@/assets/svg/topology_ic_zonghefw.svg"),
size: [15, 15],
label: "综合应用",
label: "融合服务",
},
],
};
......
<template>
<div class="workflows-view" ref="flowContainer" :style="{ zoom: zoom }">
<div class="workflows-view" ref="flowContainer" :style="{ zoom: zoom, height: Number(max_height + 180) + 'px' }">
<super-flow
ref="superFlow"
:node-list="nodeList"
......@@ -86,6 +86,7 @@ export default {
origin: [],
nodeList: [],
linkList: [],
max_height: 650,
};
},
methods: {
......@@ -120,10 +121,17 @@ export default {
...node,
};
}
});
});
nodeList.forEach(item => {
// console.log(item.coordinate)
if (item.coordinate[1] > this.max_height) {
this.max_height = item.coordinate[1]
}
});
this.nodeList = nodeList;
this.linkList = linkList;
console.log(this.max_height)
})
.catch(function (error) {
console.log(error);
......@@ -157,7 +165,7 @@ export default {
<style scoped>
.workflows-view {
width: 100%;
height: 830px;
/* height: 830px; */
background-color: #fbfcfe;
border-radius: 10px;
margin-top: 10px;
......
......@@ -497,7 +497,7 @@ export default {
this.backPage();
this.$message.success("新增成功");
} else {
this.$message.error("新增失败");
this.$message.error(response.data.errMsg);
}
})
.catch((response) => {
......
......@@ -252,7 +252,7 @@
<el-col :span="24" class="in_block">
<block-radius
:show_header="true"
title="服务开程度统计"
title="服务开程度统计"
:buttons_arr="['发布的服务', '调用的服务']"
@changeButton="changeOpenessBtnindex"
class="block"
......@@ -472,31 +472,31 @@ export default {
starlistData: [
{
star: 5,
count: 5,
count: 0,
unit: "",
},
{
star: 4,
count: 4,
count: 0,
unit: "",
},
{
star: 3,
count: 3,
count: 0,
unit: "",
},
{
star: 2,
count: 2,
count: 0,
unit: "",
},
{
star: 1,
count: 1,
count: 0,
unit: "",
},
], // 服务评分
starlistTotal: 15,
starlistTotal: 0,
hotSearchHeader: [], // 热门搜索 表头
hotSearchData: [], // 热门搜索 数据
graph_arr: {
......@@ -588,7 +588,7 @@ export default {
};
// top5_rank
this.hotSearchData = [];
if (data.top5_rank && data.top5_rank.length) {
if (data.top5_rank && data.top5_rank.length != 0) {
data.top5_rank.forEach((e, idx) => {
this.hotSearchData.push({
id: e.service_id,
......@@ -722,10 +722,27 @@ export default {
})
.then((response) => {
if (response.data.success == 1) {
this.commentlistData = response.data.data.concat(
this.commentlistData
);
this.last_id = this.commentlistData[0].last_id;
if (this.right_3_state == 0) {
let data = response.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)
}
}
});
},
......
......@@ -315,7 +315,7 @@ export default {
now_app_count: 14,
now_app_deploy: 1,
now_app_evalute: 1,
now_app_approval: 0,
now_app_approval: 14,
now_app_approval_state: 0,
mult_data: [
{ name: "基础工具", value: 0 },
......
......@@ -207,7 +207,7 @@
<el-col :span="24" class="in_block">
<block-radius
:show_header="true"
title="服务开程度统计"
title="服务开程度统计"
:buttons_arr="['发布的服务', '调用的服务']"
@changeButton="changeOpenessBtnindex"
class="block"
......@@ -325,7 +325,7 @@ export default {
{ name: "时空服务", value: 0 },
{ name: "视频服务", value: 0 },
{ name: "感知服务", value: 0 },
{ name: "合服务", value: 0 },
{ name: "合服务", value: 0 },
],
fwsp_data: [
{ name: "已审批", value: 0 },
......@@ -500,7 +500,7 @@ export default {
};
// top5_rank
this.hotSearchData = [];
if (data.top5_rank && data.top5_rank.length) {
if (data.top5_rank && data.top5_rank.length != 0) {
data.top5_rank.forEach((e, idx) => {
this.hotSearchData.push({
id: e.service_id,
......@@ -634,12 +634,27 @@ export default {
})
.then((response) => {
if (response.data.success == 1) {
if (response.data.data) {
this.commentlistData = response.data.data.concat(
this.commentlistData
);
if (this.right_3_state == 0) {
let data = response.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)
}
this.last_id = this.commentlistData[0].last_id;
}
});
},
......
......@@ -309,7 +309,7 @@ export default {
now_app_count: 14,
now_app_deploy: 1,
now_app_evalute: 1,
now_app_approval: 0,
now_app_approval: 14,
now_app_approval_state: 0,
mult_data: [
{ name: "基础工具", value: 0 },
......@@ -711,10 +711,7 @@ export default {
.then((response) => {
if (response.data.success == 1) {
let data = response.data.data;
this.serviceSpData = {
xAxisData: data.data,
seriesData: data.series,
};
this.Yysp_data = data.series[0].data;
}
});
},
......
......@@ -201,7 +201,7 @@
<el-col :span="24" class="in_block">
<block-radius
:show_header="true"
title="服务开程度统计"
title="服务开程度统计"
:buttons_arr="['发布的服务', '调用的服务']"
@changeButton="changeOpenessBtnindex"
class="block"
......@@ -319,7 +319,7 @@ export default {
{ name: "时空服务", value: 0 },
{ name: "视频服务", value: 0 },
{ name: "感知服务", value: 0 },
{ name: "合服务", value: 0 },
{ name: "合服务", value: 0 },
],
fwsp_data: [
{ name: "已审批", value: 0 },
......@@ -494,7 +494,7 @@ export default {
};
// top5_rank
this.hotSearchData = [];
if (data.top5_rank && data.top5_rank.length) {
if (data.top5_rank && data.top5_rank.length != 0) {
data.top5_rank.forEach((e, idx) => {
this.hotSearchData.push({
id: e.service_id,
......@@ -628,11 +628,26 @@ export default {
})
.then((response) => {
if (response.data.success == 1) {
if (response.data.data) {
this.commentlistData = response.data.data.concat(
this.commentlistData
);
this.last_id = this.commentlistData[0].last_id;
if (this.right_3_state == 0) {
let data = response.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)
}
}
});
......
......@@ -161,22 +161,22 @@ export default {
{
name: "服务类型",
prop: "fwlx",
data: ["数据服务", "时空服务", "视频服务", "感知服务", "综合应用"]
data: ["数据服务", "时空服务", "视频服务", "感知服务", "融合服务"]
},
{
name: "服务领域",
prop: "fwly",
data: ["数据服务", "时空服务", "视频服务", "感知服务", "综合应用"]
data: ["数据服务", "时空服务", "视频服务", "感知服务", "融合服务"]
},
{
name: "开放程度",
prop: "kfcd",
data: ["数据服务", "时空服务", "视频服务", "感知服务", "综合应用"]
data: ["数据服务", "时空服务", "视频服务", "感知服务", "融合服务"]
},
{
name: "服务状态",
prop: "fwzt",
data: ["数据服务", "时空服务", "视频服务", "感知服务", "综合应用"]
data: ["数据服务", "时空服务", "视频服务", "感知服务", "融合服务"]
}
],
params: {
......
<template>
<div class="sevice_detail">
<div class="apass_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item to="/shop">服务超市</el-breadcrumb-item>
<el-breadcrumb-item to="/shop/products_list/36">
产品资源
</el-breadcrumb-item>
<el-breadcrumb-item>服务详情信息</el-breadcrumb-item>
</el-breadcrumb>
</div>
<service-info :data="baseInfo" v-if="baseInfo"></service-info>
<service-tabs
:detail-data="detailData"
:provider-data="providerData"
:comments-data="commentsData"
:comments-url="commentsUrl"
></service-tabs>
</div>
</template>
<script>
import serviceInfo from "@/components/service-info/service-info";
import serviceTabs from "@/components/service-tabs/service-tabs";
export default {
components: {
serviceInfo,
serviceTabs,
},
data: () => ({
baseInfo: null,
detailData: null,
providerData: null,
commentsData: null,
}),
computed: {
id() {
return this.$route.params.id;
},
commentsUrl() {
return `/apaas/serviceapp/v3/servicemarket/estimates?serviceId=${this.id}`;
},
},
methods: {
init() {
this.$http
.get("/apaas/serviceapp/v3/servicemarket/detail", {
params: {
serviceId: this.id,
},
})
.then(({ data }) => {
let datas = data.data;
this.baseInfo = {
service_id: this.id,
app_id: 0,
name: datas.name,
// type: "",
openness: datas.openness,
view_count: datas.view_count,
apply_count: datas.apply_count,
cover: datas.cover,
organization_name: datas.organization_name,
create_time: datas.create_time,
update_date: datas.update_date,
sectors_name: datas.sectors_name,
data_service_type: [
datas.data_service_type1_name,
datas.data_service_type2_name,
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs || {
spcs_type_1: [],
spcs_type_2: [],
},
scoreDetail: datas.scoreDetail,
month_sale: datas.month_sale,
version: datas.version,
};
this.detailData = [
{
name: "获取流程",
type: "step_cp",
value: ["产品申请", "信息填写", "审核确认", "获取资源"],
},
{
name: "产品信息",
type: "cp-list",
value: {
cp_area: datas.sectors_name,
fb_time: datas.update_date,
org: datas.system_name,
org_url: datas.domain_name,
tags: datas.tags,
},
},
{
name: "产品详情",
type: "rich-text",
value: "",
},
];
if (datas.doc_file != "") {
this.getMd(datas.doc_file);
}
let arr1 = datas.serviceRequestSpcs.spcs_type_1 || [];
let arr2 = datas.serviceRequestSpcs.spcs_type_2 || [];
let arr = arr1.concat(arr2);
arr.map((item) => {
item.type = item.spcs_type == 1 ? "计次收费规格" : "时长收费规格";
item.spce =
item.spcs_type == 1
? `${item.money}金币/${item.spcs_count}次(${(
item.money / item.spcs_count
).toFixed(2)}金币/1次)`
: `${item.money}金币/月(次数不限)`;
item.times = item.spcs_type == 1 ? "不限时长" : "按月";
});
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.organization_picture,
user_name: datas.register_user_info.user_name,
phone: datas.register_user_info.phone,
serviceRequestSpcsTable: arr,
};
this.commentsData = datas.scoreDetail;
})
.catch(function (error) {
console.log(error);
});
},
getTableData(tableStr) {
let tabledata = (tableStr && JSON.parse(tableStr)) || [];
let addRowId = (data, baseId = "") => {
data.forEach((item, index) => {
let rowId = baseId + (index + 1) + "";
item.rowId = rowId;
if (item.children && item.children.length) {
addRowId(item.children, rowId);
}
});
};
addRowId(tabledata);
return tabledata;
},
getMd(url) {
if (url == "") {
this.detailData[2].value = "";
} else {
this.$http
.get(url)
.then((response) => {
this.detailData[2].value = response.data;
})
.catch(function (error) {
console.log(error);
});
}
},
},
mounted() {
this.init();
},
};
</script>
......@@ -73,7 +73,7 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs,
serviceRequestSpcs: datas.serviceRequestSpcs || {spcs_type_1: [],spcs_type_2: []},
scoreDetail: datas.scoreDetail,
month_sale: datas.month_sale,
};
......
......@@ -45,9 +45,9 @@
:showSummary="false"
></shop-list>
<!-- 综合应用 -->
<!-- 融合服务 -->
<shop-list
name="综合应用"
name="融合服务"
to="/shop/comprehensive_app_list/21"
detail-path="/shop/zhfwDetail/"
:data="comprehensive_datas"
......
<template>
<div class="apply_container">
<info-list :list_arr="module_arr">
<apply-form :formInline="formInline" ref="apply_info" slot="apply_info"></apply-form>
<service-list ref="apply_service" slot="apply_service" :service_arr="service_arr"></service-list>
<apply-form
:formInline="formInline"
ref="apply_info"
slot="apply_info"
></apply-form>
<service-list
ref="apply_service"
slot="apply_service"
:service_arr="service_arr"
></service-list>
</info-list>
<div class="footout">
<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>
......@@ -129,17 +141,16 @@ export default {
});
this.get_car_list(temp_arr);
}
this.get_account_money()
this.get_account_money();
},
mounted() {},
methods: {
get_account_money(){
this.$http
.get(`/apaas/backmgt/user/myAccount`).then(res=>{
if(res.data.success){
this.now_money = res.data.data.account_balance || 0
}
})
get_account_money() {
this.$http.get(`/apaas/backmgt/user/myAccount`).then((res) => {
if (res.data.success) {
this.now_money = res.data.data.account_balance || 0;
}
});
},
get_one_app(app_data) {
this.$http
......@@ -160,14 +171,17 @@ export default {
this.service_arr[0]["title"] = data.app_name;
this.service_arr[0]["type"] = data.type_name;
this.service_arr[0]["auth"] = data.org_name;
this.service_arr[0]["size"] ="应用镜像部署权限:"+data.price+"金币/月";
this.service_arr[0]["size"] =
"应用镜像部署权限:" + data.price + "金币/月";
this.service_arr[0]["applytype"] =
"申请方式:" + (app_data.duration_unit == 1 ? "" : "");
this.service_arr[0]["num"] = `${app_data.duration}个月`;
this.service_arr[0]["count"] = app_data.duration*parseFloat(data.price)+'金币';
this.service_arr[0]["count"] =
app_data.duration * parseFloat(data.price) + "金币";
this.service_arr[0]["isMg"] = false;
this.service_arr[0]["isapp"] = true;
this.all_cost = app_data.duration*parseFloat(data.price)
console.log(data, this.service_arr);
this.all_cost = app_data.duration * parseFloat(data.price);
}
});
},
......@@ -189,44 +203,51 @@ export default {
);
this.post_arr[0].duration = parseInt(service_data.duration);
this.post_arr[0].id = "";
this.service_arr.push({});
this.service_arr[0]["img"] = data.cover;
this.service_arr[0]["title"] = data.name;
this.service_arr[0]["type"] = data.data_service_type1_name;
this.service_arr[0]["tips"] = [
let objs = {};
objs.img = data.cover;
objs.title = data.name;
objs.type = data.data_service_type1_name;
objs.tips = [
{
tip: this.share_arr[data.openness].name,
type: this.share_arr[data.openness].val,
},
];
this.service_arr[0]["auth"] = data.organization_name;
this.service_arr[0]["size"] = "";
this.service_arr[0]["count"] = "";
data.request_spcs_info.forEach((el) => {
objs.auth = data.organization_name;
objs.size = "";
objs.count = "";
let request_spcs_info = data.request_spcs_info || [];
request_spcs_info.forEach((el) => {
if (service_data.spec_id == el.id) {
let size = "";
let count = "";
if (el.spcs_type==1) {
size = `计次收费:${el.money}金币/${el.spcs_count}次`;
this.service_arr[0]["num"] = "不限时长"
count = el.money;
} else {
size = `${el.money}金币/${el.duration_unit == 1 ? "" : ""}`;
this.service_arr[0]["num"] = service_data.duration + (el.duration_unit == 1 ? "个月" : "");
count = service_data.duration*el.money;
}
this.service_arr[0]["size"] = size;
this.service_arr[0]["count"] = count+'金币';
this.all_cost = count;
let size = "";
let count = "";
if (el.spcs_type == 1) {
size = `计次收费:${el.money}金币/${el.spcs_count}次`;
objs.num = "不限时长";
count = el.money;
} else {
size = `${el.money}金币/${
el.duration_unit == 1 ? "" : ""
}`;
objs.num =
service_data.duration +
(el.duration_unit == 1 ? "个月" : "");
count = service_data.duration * el.money;
}
objs.size = size;
objs.count = count + "金币";
this.all_cost = count;
}
});
this.service_arr[0]["applytype"] =
objs.applytype =
"申请方式:" + (service_data.duration_unit == 1 ? "" : "");
this.service_arr[0]["isMg"] = data.openness == 3;
this.service_arr[0]["data"] = JSON.parse(data.res_fields);
console.log(this.service_arr[0]["data"]);
this.service_arr[0]["isapp"] = false;
objs.isMg = data.openness == 3;
if (data.data_service_type1 != 36) {
objs.data = JSON.parse(data.res_fields);
}
objs.isapp = false;
this.service_arr = [objs];
console.log(objs, this.service_arr);
} else {
this.$message.error(response.data.errMsg);
}
......@@ -264,9 +285,9 @@ export default {
});
},
sub_service() {
if(this.all_cost>this.now_money){
this.$message.error('余额不足,请进行充值')
return
if (this.all_cost > this.now_money) {
this.$message.error("余额不足,请进行充值");
return;
}
let formInline = this.$refs.apply_info.formInline;
let flag = null;
......@@ -358,7 +379,7 @@ export default {
get_car_list(car_arr) {
this.service_arr = [];
this.post_arr = [];
var temp_cost = 0
var temp_cost = 0;
this.$http
.get(`/apaas/serviceapp/v3/shopcart/list`)
.then((response) => {
......@@ -377,14 +398,21 @@ export default {
this.service_arr[l]["title"] = e.application.app_name;
this.service_arr[l]["type"] = e.application.type_name;
this.service_arr[l]["auth"] = e.application.org_name;
this.service_arr[l]["size"] ="应用镜像部署权限:"+e.application.price+"金币/月";
this.service_arr[l]["size"] =
"应用镜像部署权限:" + e.application.price + "金币/月";
this.service_arr[l]["applytype"] =
"申请方式:" + (e.duration_method == 1 ? "" : "");
this.service_arr[l]["num"] = `${e.duration}${e.duration_unit == 1 ? "个月" : ""}`;
this.service_arr[l]["count"] = e.duration*parseFloat(e.application.price)+'金币';
this.service_arr[l]["num"] = `${e.duration}${
e.duration_unit == 1 ? "个月" : ""
}`;
this.service_arr[l]["count"] =
e.duration * parseFloat(e.application.price) + "金币";
this.service_arr[l]["isMg"] = false;
this.service_arr[l]["isapp"] = true;
temp_cost = this.floatAdd(temp_cost, e.duration*parseFloat(e.application.price))
temp_cost = this.floatAdd(
temp_cost,
e.duration * parseFloat(e.application.price)
);
} else {
//服务
this.service_arr[l]["img"] = e.service.cover;
......@@ -402,20 +430,26 @@ export default {
let spcs_type_1 = e.service.request_spcs_info.spcs_type_1 || [];
let spcs_type_2 = e.service.request_spcs_info.spcs_type_2 || [];
spcs_type_1.forEach((el,ind) => {
spcs_type_1.forEach((el, ind) => {
if (e.spec_id == el.id) {
this.service_arr[l]["size"] = `计次收费:${el.money}金币/${el.spcs_count}次`;
this.service_arr[l][
"size"
] = `计次收费:${el.money}金币/${el.spcs_count}次`;
this.service_arr[l]["num"] = "不限时长";
this.service_arr[l]["count"] = e.duration*el.money+'金币';
temp_cost = this.floatAdd(temp_cost, e.duration*el.money);
this.service_arr[l]["count"] = e.duration * el.money + "金币";
temp_cost = this.floatAdd(temp_cost, e.duration * el.money);
}
});
spcs_type_2.forEach((el,ind) => {
spcs_type_2.forEach((el, ind) => {
if (e.spec_id == el.id) {
this.service_arr[l]["size"] = `时长收费:${el.money}金币/${el.duration_unit == 1 ? "" : ""}`;
this.service_arr[l]["num"] = `${e.duration}${el.duration_unit == 1 ? "个月" : ""}`;
this.service_arr[l]["count"] = e.duration*el.money+'金币';
temp_cost = this.floatAdd(temp_cost, e.duration*el.money);
this.service_arr[l]["size"] = `时长收费:${el.money}金币/${
el.duration_unit == 1 ? "" : ""
}`;
this.service_arr[l]["num"] = `${e.duration}${
el.duration_unit == 1 ? "个月" : ""
}`;
this.service_arr[l]["count"] = e.duration * el.money + "金币";
temp_cost = this.floatAdd(temp_cost, e.duration * el.money);
}
});
......@@ -424,12 +458,12 @@ export default {
this.service_arr[l]["isMg"] = e.service.openness == 3;
this.service_arr[l]["data"] = e.service.res_fields
? JSON.parse(e.service.res_fields)
: "[]";
: [];
console.log(this.service_arr[l]["data"]);
this.service_arr[l]["isapp"] = false;
}
});
this.all_cost = temp_cost
this.all_cost = temp_cost;
// this.service_arr =
})
.catch((response) => {});
......@@ -466,7 +500,7 @@ export default {
}
return (arg1 + arg2) / m;
},
}
},
};
</script>
......@@ -498,29 +532,29 @@ export default {
margin-left: 20px;
cursor: pointer;
}
.count_money{
.count_money {
float: right;
margin-top: -10px;
}
.count_money p:nth-of-type(1){
.count_money p:nth-of-type(1) {
font-size: 18px;
color: #242c43;
margin-bottom: 10px;
}
.count_money p:nth-of-type(1) span{
.count_money p:nth-of-type(1) span {
color: #e56600;
}
.count_money p:nth-of-type(1) span:nth-of-type(1){
.count_money p:nth-of-type(1) span:nth-of-type(1) {
font-size: 24px;
}
.count_money p:nth-of-type(1) span:nth-of-type(2){
.count_money p:nth-of-type(1) span:nth-of-type(2) {
font-size: 14px;
}
.count_money p:nth-of-type(2){
.count_money p:nth-of-type(2) {
font-size: 14px;
color: #58617a;
}
.count_money p:nth-of-type(2) span:nth-of-type(2){
.count_money p:nth-of-type(2) span:nth-of-type(2) {
color: #a9aec0;
margin-left: 20px;
}
......
......@@ -76,6 +76,12 @@ export default {
this.url = "/shop/yysdDetail";
this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
break;
case "products_list":
this.name = "产品资源";
this.urlFilter = "36";
this.url = "/shop/cpDetail";
this.filterNames = ["产品类型", "产品领域", "产品来源组织"];
break;
default:
this.name = "";
this.urlFilter = "";
......
......@@ -73,7 +73,7 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs,
serviceRequestSpcs: datas.serviceRequestSpcs || {spcs_type_1: [],spcs_type_2: []},
scoreDetail: datas.scoreDetail,
month_sale: datas.month_sale,
};
......
......@@ -82,7 +82,7 @@ export default {
descript: datas.descript,
scoreDetail: datas.scoreDetail,
month_sale: datas.month_sale,
serviceRequestSpcs: datas.serviceRequestSpcs,
serviceRequestSpcs: datas.serviceRequestSpcs || {spcs_type_1: [],spcs_type_2: []},
};
this.detailData = [
......
......@@ -73,7 +73,7 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs,
serviceRequestSpcs: datas.serviceRequestSpcs || {spcs_type_1: [],spcs_type_2: []},
scoreDetail: datas.scoreDetail,
month_sale: datas.month_sale,
};
......
......@@ -113,7 +113,8 @@ export default {
this.$api.serviceShop
.getExtendedInfo({ id: this.id })
.then((response) => {
this.baseInfo.app_id = data.data.app_id;
console.log(data)
this.baseInfo.app_id = response.data.data.app_id;
this.baseInfo.app_name = data.data.app_name;
this.baseInfo.apply_id = data.data.apply_id;
this.baseInfo.apply_times = data.data.apply_times;
......@@ -137,13 +138,14 @@ export default {
this.baseInfo.price_style = response.data.data.price_style;
this.baseInfo.sale = response.data.data.sale;
this.baseInfo.star = response.data.data.star;
this.detailData[1].value = {
online_state_name: data.data.online_state_name,
type_name: data.data.type_name,
ywly_name: data.data.ywly_name,
create_date: data.data.create_date,
};
console.log(this.baseInfo)
});
this.detailData[1].value = {
online_state_name: data.data.online_state_name,
type_name: data.data.type_name,
ywly_name: data.data.ywly_name,
create_date: data.data.create_date,
};
})
.catch(function (error) {
console.log(error);
......
......@@ -74,7 +74,7 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
serviceRequestSpcs: datas.serviceRequestSpcs,
serviceRequestSpcs: datas.serviceRequestSpcs || {spcs_type_1: [],spcs_type_2: []},
scoreDetail: datas.scoreDetail,
month_sale: datas.month_sale,
};
......
......@@ -151,8 +151,11 @@ export default {
{
label: "SDK类型",
prop: "style_name",
type: "button",
type: "button-oo",
width: 240,
callback: function(value) {
console.log(value);
}
},
{
label: "版本号",
......
......@@ -97,6 +97,7 @@
:colors="colors"
show-score
score-template="{value}"
disabled-void-color="#d9dce5"
></el-rate>
</div>
<p>填写评价:</p>
......@@ -188,6 +189,7 @@
v-model="message.score"
disabled
:colors="colors"
disabled-void-color="#d9dce5"
></el-rate>
</div>
<div class="msg_title">评价详情:</div>
......@@ -276,7 +278,7 @@
{{ orderDetail.single_money }}金币/
{{
orderDetail.spcs_type == 1
? orderDetail.spec_count + ""
? orderDetail.spcs_count + ""
: ""
}}
</span>
......@@ -486,7 +488,7 @@ export default {
data: () => ({
helper: helper,
visible: false,
colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
colors: ["#fac266", "#fac266", "#fac266"],
serviceRate: 0,
textarea: "",
orderDetail: {},
......@@ -653,12 +655,12 @@ export default {
});
} else if (this.orderDetail.order_type == 2) {
let query = {
app: this.orderDetail.app_id,
app_id: this.orderDetail.app_id,
content: this.textarea,
score: this.serviceRate,
apply_id: this.orderDetail.apply_id,
};
this.$api.user.addServiceEvaluation(query).then((response) => {
this.$api.user.addAppEvaluation(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "评价订单成功",
......@@ -727,6 +729,9 @@ export default {
this.approval_arr1[i].arr[1].info = data[i].department_name;
this.approval_arr1[i].arr[2].info = data[i].user_name;
this.approval_arr1[i].arr[3].info = data[i].comments;
if (data[i].level == 2) {
this.approval_arr1[i].arr.splice(1, 1);
}
}
this.approval_arr1.splice(data.length);
} else {
......@@ -747,7 +752,7 @@ export default {
if (this.orderDetail.order_type == 1) {
query = {
service_id: parseFloat(this.orderDetail.service_id),
spcs_id: this.orderDetail.spcs_id,
spec_id: this.orderDetail.svc_spec_id,
duration: this.orderDetail.duration,
duration_unit: this.orderDetail.duration_unit,
};
......@@ -759,7 +764,7 @@ export default {
} else if (this.orderDetail.order_type == 2) {
query = {
app_id: parseFloat(this.orderDetail.app_id),
spcs_id: this.orderDetail.spcs_id,
spec_id: this.orderDetail.svc_spec_id,
duration: this.orderDetail.duration,
duration_unit: this.orderDetail.duration_unit,
};
......
......@@ -165,6 +165,7 @@ export default {
},
deleteData() {
if (this.selected_date.length) {
this.reason_form.reason = "";
this.diaDel = true;
} else {
this.$message.error("请先选择要删除的数据");
......@@ -219,10 +220,12 @@ export default {
},
del_q(val) {
this.selected_date = [{ id: val.id }];
this.reason_form.reason = "";
this.diaDel = true;
},
del_a(val) {
this.selected_date = [{ id: val.id }];
this.reason_form.reason = "";
this.diaDel = true;
},
getQList() {
......@@ -232,11 +235,11 @@ export default {
style: 3,
create_user: this.search_user,
start:
this.search_date && this.search_date.length != 0
this.search_date && this.search_date[0]
? this.search_date[0]
: "",
end:
this.search_date && this.search_date.length != 0
this.search_date && this.search_date[1]
? this.search_date[1]
: "",
limit: this.currentlimit,
......@@ -245,7 +248,7 @@ export default {
};
this.$api.user.getQuestionList(query).then((response) => {
if (response.data.success == 1) {
this.tableData = response.data.data;
this.tableData = response.data.data || [];
this.total_list = response.data.total;
}
});
......@@ -257,11 +260,11 @@ export default {
style: 3,
create_user: this.search_user,
start:
this.search_date && this.search_date.length != 0
this.search_date && this.search_date[0]
? this.search_date[0]
: "",
end:
this.search_date && this.search_date.length != 0
this.search_date && this.search_date[1]
? this.search_date[1]
: "",
limit: this.currentlimit,
......@@ -269,7 +272,7 @@ export default {
};
this.$api.user.getAnswerList(query).then((response) => {
if (response.data.success == 1) {
this.tableData = response.data.data;
this.tableData = response.data.data || [];
this.total_list = response.data.total;
}
});
......@@ -281,6 +284,7 @@ export default {
});
this.$api.user.delQuestions(items).then((response) => {
if (response.data.success == 1) {
this.getQList();
this.$message({
message: "删除成功",
type: "success",
......@@ -295,6 +299,7 @@ export default {
});
this.$api.user.delAnswers(items).then((response) => {
if (response.data.success == 1) {
this.getAList();
this.$message({
message: "删除成功",
type: "success",
......
......@@ -567,9 +567,9 @@ export default {
},
delIp(index, type) {
if (type == "white") {
this.ruleForm_1.ip_white.splice(index, 1);
this.formBusiness.ip_white.splice(index, 1);
} else if (type == "black") {
this.ruleForm_1.ip_black.splice(index, 1);
this.formBusiness.ip_black.splice(index, 1);
}
},
addIp(type) {
......
......@@ -11,7 +11,7 @@
<div
v-for="(item, index) in service_arr"
:key="index + 1000"
class="type_select"
:class="item == '' ? '' : 'type_select'"
@click="now_service = index"
:style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
......@@ -41,7 +41,11 @@
</el-select>
<div
class="port_bg_box"
style="padding:20px;background-color:#f8f9fd;margin-top:10px;"
style="
padding: 20px;
background-color: #f8f9fd;
margin-top: 10px;
"
>
<info-list :list_arr="port_solt_arr">
<table-um
......@@ -101,7 +105,9 @@
v-else
:list_arr="
now_service == 0
? list_arr
? data_service_type1 == 36
? cp_arr
: list_arr
: now_service == 1
? servicead_arr
: apply_arr
......@@ -128,6 +134,15 @@
:data="use_approval_arr"
slot="approval"
></process-card>
<mavon-editor
slot="cp_md"
v-model="cp_arr[6].item"
:boxShadow="false"
:toolbarsFlag="false"
:subfield="false"
defaultOpen="preview"
:editable="false"
/>
</info-list>
</div>
</div>
......@@ -510,6 +525,7 @@ export default {
},
],
service_arr: ["服务基本信息", "接口详细信息", "申请审批信息"],
data_service_type1: "",
service_header_arr: {
id: "",
isMap: false,
......@@ -577,6 +593,38 @@ export default {
info: "",
},
],
cp_arr: [
{
title: "产品简介:",
info: "",
},
{
title: "产品领域:",
info: "",
},
{
title: "产品标签:",
info: "",
},
{
title: "所属组织:",
info: "",
},
{
title: "开放程度:",
info: "",
},
{
title: "注册发布时间:",
info: "",
},
{
title: "产品详情:",
type: "solt",
solt_name: "cp_md",
item: "",
},
],
servicead_arr: [
{
title: "请求方式:",
......@@ -585,10 +633,14 @@ export default {
{
title: "请求参数:",
info: "",
type: "solt",
solt_name: "request_table",
},
{
title: "请求示例:",
info: "",
type: "solt",
solt_name: "request_code",
},
{
title: "编码格式:",
......@@ -614,19 +666,19 @@ export default {
},
{
title: "场景描述:",
info: "申请mapvideos服务用于贵州省疫情监控决策指挥系统。",
info: "",
},
{
title: "调用业务系统:",
info: "决策指挥系统",
info: "",
},
{
title: "业务系统域名:",
info: "https://apaas.wodcloud.com/",
info: "",
},
{
title: "申请文件:",
info: "mapvideos申请书.docx",
info: "",
type: "down",
},
{
......@@ -744,34 +796,74 @@ export default {
"text",
data.data_service_type1_name
);
this.$set(
this.service_header_arr["first"][1],
"text",
data.service_apply_info.approval_status == 1
? "待审批"
: data.service_apply_info.approval_status == 2
? "审批中"
: data.service_apply_info.approval_status == 3
? "审批通过"
: "审批未通过"
);
this.$set(
this.service_header_arr["first"][1],
"color",
data.service_apply_info.approval_status == 1
? "#ef9433"
: data.service_apply_info.approval_status == 2
? "#ef9433"
: data.service_apply_info.approval_status == 3
? "#515fe7"
: "#e15260"
);
this.$set(
this.service_header_arr["second"][0],
"text",
data.service_apply_info.urls[0].req_url
);
if (data.data_service_type1 == 36) {
this.$set(this.service_header_arr["first"][1], "name", "是否授权");
this.$set(
this.service_header_arr["first"][1],
"text",
data.service_apply_info.approval_status == 1
? "待授权"
: data.service_apply_info.approval_status == 2
? "待授权"
: data.service_apply_info.approval_status == 3
? "已授权"
: "未授权"
);
this.$set(
this.service_header_arr["first"][1],
"color",
data.service_apply_info.approval_status == 1
? "#ef9433"
: data.service_apply_info.approval_status == 2
? "#ef9433"
: data.service_apply_info.approval_status == 3
? "#515fe7"
: "#e15260"
);
this.$set(this.service_header_arr["second"][0], "name", "申请次数");
this.$set(
this.service_header_arr["second"][0],
"text",
data.service_apply_info.spcs_type == 1
? data.service_apply_info.spcs_count + ""
: "不限次数"
);
} else {
this.$set(
this.service_header_arr["first"][1],
"text",
data.service_apply_info.approval_status == 1
? "待审批"
: data.service_apply_info.approval_status == 2
? "审批中"
: data.service_apply_info.approval_status == 3
? "审批通过"
: "审批未通过"
);
this.$set(
this.service_header_arr["first"][1],
"color",
data.service_apply_info.approval_status == 1
? "#ef9433"
: data.service_apply_info.approval_status == 2
? "#ef9433"
: data.service_apply_info.approval_status == 3
? "#515fe7"
: "#e15260"
);
if (data.service_apply_info.approval_status == 3) {
this.$set(
this.service_header_arr["second"][0],
"text",
data.service_apply_info.urls[0].req_url
);
} else {
this.$set(
this.service_header_arr["second"][0],
"text", "暂无"
);
}
}
this.$set(this.service_header_arr, "url", data.cover);
//判断是否是服务注册出来的流程服务
......@@ -860,16 +952,30 @@ export default {
.replace(/T|Z/g, " ")
.split("+")[0]
);
this.$set(this.service_header_arr["first"][3], "text", "不限次数");
}
if (data.data_service_type1 == 36) {
this.service_header_arr["first"].pop();
this.service_header_arr["second"][1] = {
name: "",
value: "",
};
this.$set(this.service_header_arr["second"][1], "name", "可用次数");
this.$set(
this.service_header_arr["second"][1],
"text",
data.service_apply_info.spcs_type == 1
? data.service_apply_info.left_request_count + ""
: "不限次数"
);
}
if (this.process_in_up) {
var temp_sj = this.service_header_arr.first.pop();
this.service_header_arr.second = [];
this.service_header_arr.second.push(temp_sj);
}
this.$set(this.list_arr[0], "info", data.descript);
this.$set(this.list_arr[1], "info", data.data_service_type2_name);
this.$set(this.list_arr[1], "info", data.sectors_name);
this.$set(
this.list_arr[2],
"info",
......@@ -888,20 +994,70 @@ export default {
"info",
data.create_time == "0001-01-01T00:00:00Z"
? "-"
: data.create_time.replace("T", " ").split("+")[0]
: data.create_time
.replace("T", " ")
.replace("Z", "")
.split("+")[0]
);
this.$set(this.cp_arr[0], "info", data.descript);
this.$set(this.cp_arr[1], "info", data.sectors_name);
let strtags = "";
if (data.tags && data.tags.length != 0) {
data.tags.forEach((item) => {
strtags += item + " ";
});
}
this.$set(this.cp_arr[2], "info", strtags);
this.$set(this.cp_arr[3], "info", data.organization_name);
this.$set(this.cp_arr[4], "info", data.openness_name);
this.$set(
this.cp_arr[5],
"info",
data.create_time == "0001-01-01T00:00:00Z"
? "-"
: data.create_time
.replace("T", " ")
.replace("Z", "")
.split("+")[0]
);
this.data_service_type1 = data.data_service_type1;
if (this.data_service_type1 == "36") {
this.service_arr[0] = "产品基本信息";
this.service_arr[1] = "";
this.service_arr[2] = "申请审批信息";
console.log("123");
this.getMd(data.doc_file);
console.log("123");
}
console.log("123");
this.$set(
this.servicead_arr[0],
"info",
this.request_arr[data.req_type]
this.request_arr[data.service_apply_info.urls[0].req_type]
);
this.$set(
this.servicead_arr[1],
"info",
data.req_query ? data.req_query : ""
data.service_apply_info.urls[0].req_fields != ""
? data.service_apply_info.urls[0].req_fields
: data.service_apply_info.urls[0].req_query != ""
? data.service_apply_info.urls[0].req_query
: ""
);
this.$set(
this.servicead_arr[2],
"info",
data.service_apply_info.urls[0].req_fields_example != ""
? data.service_apply_info.urls[0].req_fields_example
: data.service_apply_info.urls[0].req_query_example != ""
? data.service_apply_info.urls[0].req_query_example
: ""
);
this.$set(
this.servicead_arr[3],
"info",
data.service_apply_info.urls[0].encode_method
);
this.$set(this.servicead_arr[2], "info", data.req_fields);
this.$set(this.servicead_arr[3], "info", data.encode_method);
// this.$set(this.apply_arr[0], "info", data.apply_user_info.phone);
this.$set(this.apply_arr[1], "info", data.descript);
this.$set(
......@@ -926,22 +1082,22 @@ export default {
"url",
data.service_apply_info.apply_file
);
console.log(data);
let spcs = "";
if (data.service_apply_info.spcs_type === 1) {
spcs = `${data.service_apply_info.single_money}金币/${data.service_apply_info.spcs_count}次`;
} else {
spcs = `${data.service_apply_info.single_money}金币/${
data.service_apply_info.duration_unit == 1 ? "" : ""
}`;
spcs = `${data.service_apply_info.single_money}金币/月`;
}
this.$set(this.apply_arr[6], "info", spcs);
this.$set(
this.apply_arr[7],
"info",
data.service_apply_info.duration +
(data.service_apply_info.duration_unit == 1 ? "" : "")
data.service_apply_info.spcs_type == 1
? "不限时长"
: data.service_apply_info.duration +
(data.service_apply_info.duration_unit == 1 ? "" : "")
);
this.$set(
this.apply_arr[8],
......@@ -953,7 +1109,7 @@ export default {
this.$set(
this.apply_arr[9],
"info",
data.service_apply_info.total_money
data.service_apply_info.total_money + "金币"
);
this.res_table_arr = JSON.parse(
data.service_apply_info.res_fields || "[]"
......@@ -961,12 +1117,16 @@ export default {
if (this.res_table_arr.length === 0) {
this.$set(this.servicead_arr[4], "info", "无响应参数");
}
this.res_code_arr = data.res_fields_example || ""; // 响应示例
this.res_code_arr =
data.service_apply_info.urls[0].res_fields_example || ""; // 响应示例
if (!this.res_code_arr) {
this.$set(this.servicead_arr[5], "type", "");
this.$set(this.servicead_arr[5], "info", "无响应示例");
}
console.log(this.res_table_arr);
if (data.data_service_type1_name != "数据服务") {
this.servicead_arr = this.servicead_arr.slice(0, 4);
}
console.log(data.service_apply_info);
if (data.service_apply_info.approval_process) {
data.service_apply_info.approval_process.forEach((e) => {
this.use_approval_arr.push({
......@@ -1001,6 +1161,11 @@ export default {
},
];
}
if (e.level == 2) {
this.use_approval_arr[this.use_approval_arr.length - 1][
"arr"
].splice(1, 1)
}
});
} else {
this.use_approval_arr.push({
......@@ -1008,9 +1173,26 @@ export default {
result: "待审批",
});
}
if (data.data_service_type1 != 5) {
this.apply_arr.splice(5, 1)
}
this.res_data = JSON.parse(data.res_fields);
})
.catch(function(response) {});
.catch(function (response) {});
},
getMd(url) {
if (url == "") {
this.cp_arr[6].item = "";
} else {
this.$http
.get(url)
.then((response) => {
this.cp_arr[6].item = response.data;
})
.catch(function (error) {
console.log(error);
});
}
},
},
};
......
......@@ -9,41 +9,75 @@
<div class="type_box">
<div class="type_title">
<div
v-for="(item,index) in service_arr"
:key="index+1000"
v-for="(item, index) in service_arr"
:key="index + 1000"
class="type_select"
@click="now_service=index"
:style="now_service==index?{borderBottom: '4px solid #f5ab4c'}:{}"
>{{item}}</div>
@click="now_service = index"
:style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
"
>
{{ item }}
</div>
</div>
<div class="type_box_select">
<info-list @download="download" :list_arr="now_service==0?list_arr:servicead_arr[now_user]">
<table-um :headers="header_arr" :datas="zd_table_arr" slot="zd_table"></table-um>
<process-card type="approval" :data="approval_arr[now_user]" slot="sp_card" v-if="(now_user==1&&service_header_arr['first'][2].text!=='待审批')||now_user==2"></process-card>
<div class="info_contain1" slot="sp_result" v-if="service_header_arr['first'][2].text=='待审批'">
<el-form ref="form" :rules="rules" :model="form" label-width="0px">
<info-list
@download="download"
:list_arr="now_service == 0 ? list_arr : servicead_arr[now_user]"
>
<table-um
:headers="header_arr"
:datas="zd_table_arr"
slot="zd_table"
></table-um>
<process-card
type="approval"
:data="approval_arr[now_user]"
slot="sp_card"
v-if="
(now_user == 1 &&
service_header_arr['first'][2].text !== '待审批') ||
now_user == 2
"
></process-card>
<div
class="info_contain1"
slot="sp_result"
v-if="service_header_arr['first'][2].text == '待审批'"
>
<el-form
ref="form"
:rules="rules"
:model="form"
label-width="0px"
>
<el-form-item prop="result">
<p class="formname">审批结果:</p>
<el-select v-model="form.result" placeholder="请选择">
<el-option
v-for="item in resultoptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<p class="formname">审批结果:</p>
<el-select v-model="form.result" placeholder="请选择">
<el-option
v-for="item in resultoptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="option">
<p class="formname">审批意见:</p>
<el-input v-model="form.option" placeholder="请输入审批意见,不少于10个字"></el-input>
<p class="formname">审批意见:</p>
<el-input
v-model="form.option"
placeholder="请输入审批意见"
></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>
</el-form>
</div>
</info-list>
</div>
</div>
......@@ -56,107 +90,108 @@ import serviceHeader from "@/components/service-header";
import infoList from "@/components/infoList";
import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card";
import { mapGetters,mapState } from 'vuex'
import { mapGetters, mapState } from "vuex";
export default {
props: {},
components: {
serviceHeader,
infoList,
tableUm,
processCard
processCard,
},
data() {
return {
form:{
result:'',
option:''
form: {
result: "",
option: "",
},
id:'',
zd_table_arr:[],
id: "",
zd_table_arr: [],
now_user: 0, //0:普通用户,1:组织管理员,2:超级管理员
rules:{
result:[
{ required: true, message: '请选择意见', trigger: 'change' },
],
option:[
{ required: true, message: '请输入意见', trigger: 'blur' },
{
min: 10,max:200, message: '长度应大于10个小于200个字符', trigger: 'blur'
}
]
rules: {
result: [{ required: true, message: "请选择意见", trigger: "change" }],
option: [
{ required: true, message: "请输入意见", trigger: "blur" },
{
min: 0,
max: 200,
message: "长度应小于200个字符",
trigger: "blur",
},
],
},
resultvalue: "",
resultoptions: [
{
label: "通过",
value: 1
value: 1,
},
{
label: "不通过",
value: -1
}
value: -1,
},
],
approval_arr:[
[],
[],
[
// {
// title:'一级审批',
// result:'',
// arr:[
// {
// title:'审批时间:',
// info:''
// },
// {
// title:'审批单位:',
// info:''
// },
// {
// title:'审批人:',
// info:''
// },
// {
// title:'审批意见:',
// info:''
// },
// ]
// },
]
approval_arr: [
[],
[],
[
// {
// title:'一级审批',
// result:'',
// arr:[
// {
// title:'审批时间:',
// info:''
// },
// {
// title:'审批单位:',
// info:''
// },
// {
// title:'审批人:',
// info:''
// },
// {
// title:'审批意见:',
// info:''
// },
// ]
// },
],
],
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'],
color_arr: ["#e15260", '"#ef9433', "#515fe7"],
service_header_arr: {
id: "",
isMap: false,
......@@ -165,127 +200,124 @@ 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,
servicead_arr: [
[],
[
{
title: "审批信息:",
prop: "title",
type: "solt",
solt_name: "sp_card"
},
{
{
title: "审批信息:",
prop: "title",
type: "solt",
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"
},
{
title: "二级审批:",
prop: "title",
type: "solt",
solt_name: "sp_result"
},
]
{
title: "审批信息:",
prop: "title",
type: "solt",
solt_name: "sp_card",
},
{
title: "二级审批:",
prop: "title",
type: "solt",
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"
url: "",
type: "down",
},
{
title: "申请内容:",
info: "",
type: "solt",
solt_name: "zd_table"
solt_name: "zd_table",
},
{
title: "申请时长:",
info: ""
info: "",
},
{
title: "申请规格:",
info: ""
info: "",
},
{
title: "总价:",
info: "",
},
]
],
};
},
watch: {},
computed: {
...mapGetters([
'level',
]),
...mapState(['userInfo']),
...mapGetters(["level"]),
...mapState(["userInfo"]),
},
created() {
console.log(this.level);
if(this.userInfo){
this.now_user = this.level
this.get_service_info()
}else{
this.getCurrentUser()
if (this.userInfo) {
this.now_user = this.level;
this.get_service_info();
} else {
this.getCurrentUser();
}
},
mounted() {},
methods: {
......@@ -293,125 +325,233 @@ export default {
this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
this.now_user = this.level
this.get_service_info()
console.log(this.level);
this.now_user = this.level;
this.get_service_info();
console.log(this.level);
} else {
console.log(data.errMsg);
}
});
},
onSubmit(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.set_approval()
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.set_approval();
} else {
console.log("error submit!!");
return false;
}
});
},
backpage() {
this.$router.back(-1);
},
set_approval() {
this.$http
.post("/apaas/service/v3/service/approval/applied/approval", {
apply_id: this.id,
state: this.form.result,
message: this.form.option,
})
.then((res) => {
console.log(res);
if (res.data.success) {
this.$message.success("审批成功");
this.$router.back(-1);
} else {
console.log('error submit!!');
return false;
this.$message.error("审批失败");
}
})
.catch((res) => {
this.$message.error(res);
});
},
backpage(){
this.$router.back(-1)
},
set_approval(){
this.$http.post('/apaas/service/v3/service/approval/applied/approval',{
apply_id:this.id,
state:this.form.result,
message:this.form.option
}).then((res)=>{
console.log(res);
if(res.data.success){
this.$message.success('审批成功')
this.$router.back(-1)
}else{
this.$message.error('审批失败')
},
download(val) {
console.log(val);
},
get_service_info() {
this.$http
.get(
`/apaas/service/v3/service/approval/applied?apply_id=${this.$route.params.id}`
)
.then((response) => {
console.log(response.data.data);
if (!response.data.success) {
this.$message.error(response.data.errMsg);
return;
}
let data = response.data.data;
this.$set(this.service_header_arr, "portal_id", data.portal_id); // 时空服务id
this.$set(this.service_header_arr, "workflows_id", data.workflows_id); // 时空服务id
this.$set(
this.service_header_arr,
"isMap",
data.data_service_type1 === 6
);
this.$set(
this.service_header_arr,
"isProcess",
data.data_service_type2 === 24
);
this.$set(this.service_header_arr, "name", data.name);
this.$set(
this.service_header_arr["first"][0],
"text",
data.data_service_type1_name
);
this.$set(
this.service_header_arr["first"][1],
"text",
data.sectors_name
);
this.$set(
this.service_header_arr["first"][2],
"text",
data.service_apply_info.approval_status == 0
? "待审批"
: data.service_apply_info.approval_status == 1
? "审批通过"
: "审批未通过"
);
this.$set(
this.service_header_arr["first"][2],
"color",
this.color_arr[data.service_apply_info.approval_status + 1]
);
this.$set(
this.service_header_arr["second"][0],
"text",
data.service_apply_info.apply_time.replace("T", " ").split("+")[0]
);
this.$set(this.service_header_arr, "url", data.cover);
this.$set(
this.list_arr[0],
"info",
data.service_apply_info.apply_user_info.department_name
);
this.$set(
this.list_arr[1],
"info",
data.service_apply_info.apply_user_info.user_name
);
this.$set(
this.list_arr[2],
"info",
data.service_apply_info.apply_user_info.phone
);
this.$set(
this.list_arr[3],
"info",
data.service_apply_info.business_name
);
this.$set(
this.list_arr[4],
"info",
data.service_apply_info.business_url
);
this.$set(this.list_arr[5], "info", data.descript);
this.$set(
this.list_arr[6],
"info",
data.service_apply_info.apply_file.split("/")[
data.service_apply_info.apply_file.split("/").length - 1
]
);
this.$set(
this.list_arr[6],
"url",
data.service_apply_info.apply_file
);
this.$set(
this.list_arr[8],
"info",
data.service_apply_info.spcs_type == 1
? "不限时长"
: data.service_apply_info.duration + ""
);
this.$set(
this.list_arr[9],
"info",
data.service_apply_info.spcs_type == 1
? data.service_apply_info.single_money +
"金币/" +
data.service_apply_info.spcs_count +
""
: data.service_apply_info.single_money + "金币/月"
);
this.$set(
this.list_arr[10],
"info",
data.service_apply_info.total_money + "金币"
);
// console.log(data)
if (data.data_service_type1 == 36) {
this.list_arr.splice(6, 2);
this.service_arr = ["产品申请信息", "产品审批"]
}
this.id = data.service_apply_info.id;
if (data.service_apply_info.approval_status !== 0) {
this.servicead_arr[this.now_user].splice(1, 1);
}
if (
!(
(this.now_user == 1 &&
this.service_header_arr["first"][2].text !== "待审批") ||
this.now_user == 2
)
) {
this.servicead_arr[this.now_user].splice(0, 1);
}
if (data.service_apply_info.approval_process) {
data.service_apply_info.approval_process.forEach((e) => {
this.approval_arr[this.now_user].push({
title: e.level == 1 ? "一级审批" : "二级审批",
result:
e.status == -1
? "审批未通过"
: e.status == 0
? "审批中"
: "审批通过",
});
if (e.status !== 0) {
this.approval_arr[this.now_user][
this.approval_arr[this.now_user].length - 1
]["arr"] = [
{
title: "审批时间:",
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,
},
{
title: "审批意见:",
info: e.comments,
},
];
}
});
}
console.log(this.approval_arr);
this.zd_table_arr = data.service_apply_info.res_fields
? JSON.parse(data.service_apply_info.res_fields)
: [];
if (data.data_service_type1 != 5) {
this.list_arr.splice(7, 1)
}
}).catch((res)=>{
this.$message.error(res)
})
},
download(val){
console.log(val);
},
get_service_info(){
this.$http
.get(`/apaas/service/v3/service/approval/applied?apply_id=${this.$route.params.id}`)
.then((response) => {
console.log(response.data.data);
if(!response.data.success){
this.$message.error(response.data.errMsg)
return
}
let data = response.data.data;
this.$set(this.service_header_arr, "portal_id", data.portal_id); // 时空服务id
this.$set(this.service_header_arr, "workflows_id", data.workflows_id); // 时空服务id
this.$set(this.service_header_arr, "isMap", data.data_service_type1 === 6);
this.$set(this.service_header_arr, "isProcess", data.data_service_type2 === 24);
this.$set(this.service_header_arr, "name", data.name);
this.$set(this.service_header_arr['first'][0], 'text', data.data_service_type1_name);
this.$set(this.service_header_arr['first'][1], 'text', data.sectors_name);
this.$set(this.service_header_arr['first'][2], 'text', data.service_apply_info.approval_status==0?'待审批':data.service_apply_info.approval_status==1?'审批通过':'审批未通过');
this.$set(this.service_header_arr['first'][2], 'color', this.color_arr[data.service_apply_info.approval_status+1]);
this.$set(this.service_header_arr['second'][0], "text", data.service_apply_info.apply_time.replace('T'," ").split('+')[0]);
this.$set(this.service_header_arr, "url", data.cover);
this.$set(this.list_arr[0], "info", data.service_apply_info.apply_user_info.department_name);
this.$set(this.list_arr[1], "info", data.service_apply_info.apply_user_info.user_name);
this.$set(this.list_arr[2], "info", data.service_apply_info.apply_user_info.phone);
this.$set(this.list_arr[3], "info", data.service_apply_info.business_name);
this.$set(this.list_arr[4], "info", data.service_apply_info.business_url);
this.$set(this.list_arr[5], "info", data.descript);
this.$set(this.list_arr[6], "info", data.service_apply_info.apply_file.split('/')[data.service_apply_info.apply_file.split('/').length - 1]);
this.$set(this.list_arr[6], "url", data.service_apply_info.apply_file);
this.$set(this.list_arr[8], "info", data.service_apply_info.duration+(data.service_apply_info.duration_unit==1?'':''));
this.$set(this.list_arr[9], "info", "访问次数:"+(data.service_apply_info.request_spcs&&data.service_apply_info.request_spcs.pv||'-')+"次/日 访问量:"+(data.service_apply_info.request_spcs&&data.service_apply_info.request_spcs.count||'-')+"次/日");
this.$set(this.list_arr[10], "info", data.service_apply_info.total_money);
this.id = data.service_apply_info.id
if(data.service_apply_info.approval_status!==0){
this.servicead_arr[this.now_user].splice(1,1)
}
if(!((this.now_user==1&&this.service_header_arr['first'][2].text!=='待审批')||this.now_user==2)){
this.servicead_arr[this.now_user].splice(0,1)
}
if(data.service_apply_info.approval_process){
data.service_apply_info.approval_process.forEach(e => {
this.approval_arr[this.now_user].push(
{
title:e.level==1?'一级审批':'二级审批',
result:e.status==-1?'审批未通过':e.status==0?'审批中':'审批通过',
}
)
if(e.status!==0){
this.approval_arr[this.now_user][this.approval_arr[this.now_user].length - 1]['arr']=[
{
title:'审批时间:',
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
},
{
title:'审批意见:',
info:e.comments
},
]
}
});
}
console.log(this.approval_arr);
this.zd_table_arr = data.service_apply_info.res_fields?JSON.parse(data.service_apply_info.res_fields):[]
})
.catch(function(response) {
this.$message.error('请求失败')
});
},
}
.catch(function (response) {
this.$message.error("请求失败");
});
},
},
};
</script>
......@@ -420,21 +560,21 @@ export default {
.type_box_select .el-form {
width: 1022px;
}
.info_contain1 .el-input__inner{
.info_contain1 .el-input__inner {
background-color: #f7f8f9;
width: 1022px;
}
.info_contain1 .el-input{
.info_contain1 .el-input {
width: 1022px;
}
.btnsty .el-button{
background-color: #c3caf8;
color: #0f2683;
.btnsty .el-button {
background-color: #c3caf8;
color: #0f2683;
}
.btnsty .el-button:nth-of-type(1){
background-color: #0f2683;
color: #f8f9fd;
.btnsty .el-button:nth-of-type(1) {
background-color: #0f2683;
color: #f8f9fd;
}
</style>
<style scoped>
......@@ -480,19 +620,19 @@ export default {
padding: 30px 10px 10px 10px;
width: 100%;
}
.formname{
.formname {
color: #58617a;
}
.right{
.right {
float: right;
margin-left: 20px;
}
.btnsty{
position: absolute;
bottom: 20px;
right: 20px;
.btnsty {
position: absolute;
bottom: 20px;
right: 20px;
}
.info_contain1{
margin-bottom: 70px;
.info_contain1 {
margin-bottom: 70px;
}
</style>
......@@ -221,13 +221,13 @@ export default {
this.deleteUrl = "/apaas/service/v3/service/manager";
this.listHeader = [
{
label: "服务名称",
label: "名称",
prop: "name",
type: "button",
callback: this.detailItem,
},
{
label: "服务领域",
label: "所属领域",
prop: "sectors_name",
align: "center",
},
......@@ -237,7 +237,7 @@ export default {
align: "center",
},
{
label: "服务描述",
label: "简介描述",
prop: "descript",
},
{
......@@ -251,7 +251,7 @@ export default {
align: "center",
},
{
label: "服务类型",
label: "所属类型",
prop: "data_service_type1_name",
align: "center",
},
......@@ -316,7 +316,7 @@ export default {
],
},
{
name: "服务状态",
name: "状态",
prop: "state",
data: [
{
......@@ -345,13 +345,13 @@ export default {
this.deleteUrl = "/apaas/service/v3/service/apply/service";
this.listHeader = [
{
label: "服务名称",
label: "名称",
prop: "name",
type: "button",
callback: this.detailItem,
},
{
label: "服务领域",
label: "所属领域",
prop: "sectors_name",
align: "center",
},
......@@ -361,7 +361,7 @@ export default {
align: "center",
},
{
label: "服务描述",
label: "简介描述",
prop: "descript",
},
{
......@@ -378,7 +378,7 @@ export default {
align: "center",
},
{
label: "服务类型",
label: "所属类型",
prop: "data_service_type1_name",
align: "center",
},
......@@ -610,13 +610,13 @@ export default {
this.listUrl = "/apaas/service/v3/service/manager/list";
this.listHeader = [
{
label: "服务名称",
label: "名称",
prop: "name",
type: "button",
callback: this.detailItem,
},
{
label: "服务领域",
label: "所属领域",
prop: "sectors_name",
align: "center",
},
......@@ -634,7 +634,7 @@ export default {
align: "center",
},
{
label: "服务描述",
label: "简介描述",
prop: "descript",
},
{
......@@ -648,12 +648,12 @@ export default {
align: "center",
},
{
label: "服务类型",
label: "所属类型",
prop: "data_service_type1_name",
align: "center",
},
{
label: "服务状态",
label: "状态",
prop: "state",
getText(item) {
return ["已下架", "已上架", "上架审核中", "下架审核中"][
......@@ -683,7 +683,7 @@ export default {
],
},
{
name: "服务状态",
name: "状态",
prop: "state",
data: [
{
......@@ -712,11 +712,11 @@ export default {
this.deleteUrl = "/apaas/service/v3/service/approval/applied";
this.listHeader = [
{
label: "服务名称",
label: "名称",
prop: "name",
},
{
label: "服务领域",
label: "所属领域",
prop: "sectors_name",
align: "center",
},
......@@ -734,7 +734,7 @@ export default {
align: "center",
},
{
label: "服务描述",
label: "简介描述",
prop: "descript",
},
{
......@@ -755,7 +755,7 @@ export default {
align: "center",
},
{
label: "服务类型",
label: "所属类型",
prop: "data_service_type1_name",
align: "center",
},
......@@ -1013,13 +1013,13 @@ export default {
this.deleteUrl = "/apaas/service/v3/service/manager";
this.listHeader = [
{
label: "服务名称",
label: "名称",
prop: "name",
type: "button",
callback: this.detailItem,
},
{
label: "服务领域",
label: "所属领域",
prop: "sectors_name",
align: "center",
},
......@@ -1037,7 +1037,7 @@ export default {
align: "center",
},
{
label: "服务描述",
label: "简介描述",
prop: "descript",
},
{
......@@ -1051,7 +1051,7 @@ export default {
align: "center",
},
{
label: "服务类型",
label: "所属类型",
prop: "data_service_type1_name",
align: "center",
},
......@@ -1127,11 +1127,11 @@ export default {
this.deleteUrl = "/apaas/service/v3/service/approval/applied";
this.listHeader = [
{
label: "服务名称",
label: "名称",
prop: "name",
},
{
label: "服务领域",
label: "所属领域",
prop: "sectors_name",
align: "center",
},
......@@ -1149,7 +1149,7 @@ export default {
align: "center",
},
{
label: "服务描述",
label: "简介描述",
prop: "descript",
},
{
......@@ -1170,7 +1170,7 @@ export default {
align: "center",
},
{
label: "服务类型",
label: "所属类型",
prop: "data_service_type1_name",
align: "center",
},
......
......@@ -19,20 +19,32 @@
<div
v-for="(item, index) in service_arr[now_user]"
:key="index + 1000"
class="type_select"
:class="item == '' ? '' : 'type_select'"
@click="now_service = index"
:style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
"
v-if="index<3||in_origin_ser"
v-if="index < 3 || in_origin_ser"
>
{{ item }}
</div>
</div>
<div class="type_box_select">
<info-list
:list_arr="now_service == 0 ? list_arr : servicead_arr"
v-if="now_service == 0 || (now_service == 1&&!workflows_id&&!perception_in&&!process_in_up)"
:list_arr="
now_service != 0
? servicead_arr
: data_service_type1 == '36'
? cp_arr
: list_arr
"
v-if="
now_service == 0 ||
(now_service == 1 &&
!workflows_id &&
!perception_in &&
!process_in_up)
"
>
<table-um
:headers="req_header_arr"
......@@ -40,29 +52,61 @@
:stripe="true"
slot="req_table"
></table-um>
<v-apaas-code :datas="req_code_arr" slot="req_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="req_code_arr"
slot="req_code"
:readOnly="true"
></v-apaas-code>
<table-um
:headers="res_header_arr"
:datas="res_data"
:stripe="true"
slot="res_table"
></table-um>
<v-apaas-code :datas="res_code_arr" slot="res_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="res_code_arr"
slot="res_code"
:readOnly="true"
></v-apaas-code>
<mavon-editor
slot="cp_md"
v-model="cp_arr[6].item"
:boxShadow="false"
:toolbarsFlag="false"
:subfield="false"
defaultOpen="preview"
:editable="false"
/>
</info-list>
<p v-if="now_service == 1&&(workflows_id&&!process_in_up)">
<p v-if="now_service == 1 && workflows_id && !process_in_up">
流程服务接口说明见文档中心流程服务接口文档
</p>
<info-list :list_arr="process_in_up_arr" v-if="now_service == 1&&!workflows_id&&process_in_up">
<info-list
:list_arr="process_in_up_arr"
v-if="now_service == 1 && !workflows_id && process_in_up"
>
<div slot="service_port" class="service_port">
<el-select v-model="port_select" placeholder="" @change="change_port">
<el-select
v-model="port_select"
placeholder=""
@change="change_port"
>
<el-option
v-for="item in port_options"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
<div class="port_bg_box" style="padding:20px;background-color:#f8f9fd;margin-top:10px;">
<div
class="port_bg_box"
style="
padding: 20px;
background-color: #f8f9fd;
margin-top: 10px;
"
>
<info-list :list_arr="port_solt_arr">
<table-um
:headers="req_solt_header_arr"
......@@ -70,46 +114,99 @@
:stripe="true"
slot="request_table"
></table-um>
<v-apaas-code :datas="req_solt_code_arr" slot="request_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="req_solt_code_arr"
slot="request_code"
:readOnly="true"
></v-apaas-code>
<table-um
:headers="res_solt_header_arr"
:datas="res_solt_data"
:stripe="true"
slot="response_table"
></table-um>
<v-apaas-code :datas="res_solt_code_arr" slot="response_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="res_solt_code_arr"
slot="response_code"
:readOnly="true"
></v-apaas-code>
</info-list>
</div>
</div>
</info-list>
<info-list :list_arr="gz_solt_arr" v-if="now_service == 1&&perception_in">
<info-list
:list_arr="gz_solt_arr"
v-if="now_service == 1 && perception_in"
>
<table-um
:headers="req_gz_header_arr"
:datas="req_gz_solt_data"
:stripe="true"
slot="request_table"
></table-um>
<v-apaas-code :datas="req_solt_code_arr" slot="request_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="req_solt_code_arr"
slot="request_code"
:readOnly="true"
></v-apaas-code>
<table-um
:headers="res_gz_header_arr"
:datas="res_gz_solt_data"
:stripe="true"
slot="response_table"
></table-um>
<v-apaas-code :datas="res_solt_code_arr" slot="response_code" :readOnly="true"></v-apaas-code>
<v-apaas-code
:datas="res_solt_code_arr"
slot="response_code"
:readOnly="true"
></v-apaas-code>
</info-list>
<div v-show="now_service == 2">
<p class="service_title"><span></span>服务运行概况</p>
<div class="service_port" style="margin-bottom:20px;" v-if="process_in_up">
<el-select v-model="port_select_server" placeholder="" ref="select_icon" @change="iconChange">
<div
class="service_port"
style="margin-bottom: 20px"
v-if="process_in_up"
>
<el-select
v-model="port_select_server"
placeholder=""
ref="select_icon"
@change="iconChange"
>
<el-option
v-for="item in port_options"
:key="item.value"
:label="item.label"
:value="item.value+','+item.able">
<span v-if="!item.able" :style="{display:'inline-block',marginRight:'8px',width:'36px',height:'18px',marginLeft:'-10px',borderRadius:'4px',backgroundColor:'#e15260',lineHeight:'18px',textAlign:'center'}">故障</span>
<span v-else :style="{display:'inline-block',marginRight:'8px',width:'36px',height:'18px',borderRadius:'4px',marginLeft:'-10px',}"></span>
{{item.label}}
:value="item.value + ',' + item.able"
>
<span
v-if="!item.able"
:style="{
display: 'inline-block',
marginRight: '8px',
width: '36px',
height: '18px',
marginLeft: '-10px',
borderRadius: '4px',
backgroundColor: '#e15260',
lineHeight: '18px',
textAlign: 'center',
}"
>故障</span
>
<span
v-else
:style="{
display: 'inline-block',
marginRight: '8px',
width: '36px',
height: '18px',
borderRadius: '4px',
marginLeft: '-10px',
}"
></span>
{{ item.label }}
</el-option>
</el-select>
</div>
......@@ -117,13 +214,17 @@
<div class="service_title_card">
<nor-card title="服务状态" class="service_card">
<template>
<div style="height:115px;padding-top:10px;">
<div style="height: 115px; padding-top: 10px">
<waveIcon
:state="yx_state.state"
style="margin:10px auto;"
style="margin: 10px auto"
></waveIcon>
<p
style="color: #58617a;font-size: 16px;text-align:center;"
style="
color: #58617a;
font-size: 16px;
text-align: center;
"
>
{{ yx_state.state }}
</p>
......@@ -132,7 +233,7 @@
</nor-card>
<nor-card title="平均响应时间" class="service_card">
<template>
<div style="height:115px;" class="service_num">
<div style="height: 115px" class="service_num">
<p>{{ yx_state.averageTime }}</p>
<p>最大响应时间:{{ yx_state.maxTime }}</p>
</div>
......@@ -140,7 +241,7 @@
</nor-card>
<nor-card title="吞吐率" class="service_card">
<template>
<div style="height:115px;" class="service_num">
<div style="height: 115px" class="service_num">
<p>{{ yx_state.averageTraffic }}</p>
<p>最大吞吐率:{{ yx_state.maxTraffic }}</p>
</div>
......@@ -149,7 +250,7 @@
<nor-card title="资源使用" class="service_card">
<template>
<div
style="height:115px;padding-top:30px;"
style="height: 115px; padding-top: 30px"
class="service_num"
>
<p>{{ yx_state.memory }}</p>
......@@ -158,12 +259,12 @@
</nor-card>
</div>
<nor-card title="服务调用拓扑图" class="service_card_charts">
<Topology :datas="datas" />
<Topology :datas="datas" class="topology" />
</nor-card>
</div>
<p class="service_title"><span></span>服务调用列表</p>
<table-um
v-if="!process_in_up&&!perception_in"
v-if="!process_in_up && !perception_in"
:headers="header_use_arr"
:datas="service_use_arr"
></table-um>
......@@ -187,7 +288,7 @@
></list-pagination>
</div>
<div v-show="now_service == 3">
<p style="color: #8890a7;">服务规格:</p>
<p style="color: #8890a7">服务规格:</p>
<table-um
:stripe="true"
:headers="service_size_arr"
......@@ -212,7 +313,7 @@
</div>
<p
v-if="now_user == 1 && sizeset_flag"
style="color: #8890a7;margin-bottom:10px;"
style="color: #8890a7; margin-bottom: 10px"
>
规格设置:
</p>
......@@ -257,25 +358,25 @@
<div slot="trans_all" class="trans_all">
<div class="trans_box">
<div class="trans_middle">
<img src="../../../assets/imgs/ic_shouyizonge.png" alt="">
<img src="../../../assets/imgs/ic_shouyizonge.png" alt="" />
<p>服务收益总额</p>
<p>{{trans_all_obj.all}} </p>
<p>{{ trans_all_obj.all }}</p>
<span>金币</span>
</div>
</div>
<div class="trans_box">
<div class="trans_middle">
<img src="../../../assets/imgs/ic_jiaoyizs.png" alt="">
<img src="../../../assets/imgs/ic_jiaoyizs.png" alt="" />
<p>交易总数</p>
<p>{{trans_all_obj.times}} </p>
<p>{{ trans_all_obj.times }}</p>
<span></span>
</div>
</div>
<div class="trans_box">
<div class="trans_middle">
<img src="../../../assets/imgs/ic_yuejiaoyi.png" alt="">
<img src="../../../assets/imgs/ic_yuejiaoyi.png" alt="" />
<p>本月交易总数</p>
<p>{{trans_all_obj.month}} </p>
<p>{{ trans_all_obj.month }}</p>
<span></span>
</div>
</div>
......@@ -299,7 +400,7 @@
</div>
</div>
</div>
<dialog-action ref="myConfirm"></dialog-action>
</div>
</template>
......@@ -332,9 +433,9 @@ export default {
data() {
return {
now_user: 0, //0:普通用户,1:组织管理员,2:超级管理员
process_in_up:false,//是否是服务注册产生的流程服务
perception_in:false,//是否是感知服务
in_origin_ser:false,//是否是组织内部的服务
process_in_up: false, //是否是服务注册产生的流程服务
perception_in: false, //是否是感知服务
in_origin_ser: false, //是否是组织内部的服务
buy_style: [1],
// editstr:'<h1>1221312</h1>wuqwyequ827812731731',
listTotal: 0,
......@@ -346,7 +447,7 @@ export default {
pageSizes: [10, 20, 50],
responseParamUrl: "",
codeExampleUrl: "",
port_select_server:'',
port_select_server: "",
yx_state: {
state: "",
averageTime: "",
......@@ -355,35 +456,35 @@ export default {
maxTraffic: "",
memory: "",
},
port_select:'',
port_select: "",
service_use_arr: [],
req_solt_data:[],
res_solt_data:[],
req_gz_solt_data:[],
res_gz_solt_data:[],
service_gz_process_arr:[],
trans_all_obj:{
all:0,
times:0,
month:0,
req_solt_data: [],
res_solt_data: [],
req_gz_solt_data: [],
res_gz_solt_data: [],
service_gz_process_arr: [],
trans_all_obj: {
all: 0,
times: 0,
month: 0,
},
trans_log_arr:[
trans_log_arr: [
{
title: "服务交易概览",
info: "",
prop:'title',
prop: "title",
type: "solt",
solt_name: "trans_all",
},
{
title: "服务交易记录",
info: "",
prop:'title',
prop: "title",
type: "solt",
solt_name: "trans_log",
},
],
trans_log_header:[
trans_log_header: [
{
prop: "department_name",
label: "申请单位",
......@@ -427,7 +528,7 @@ export default {
align: "center",
},
],
trans_log_data:[],
trans_log_data: [],
res_solt_header_arr: [
{
prop: "name",
......@@ -632,15 +733,27 @@ export default {
], // 响应参数-header
res_data: [], // 响应参数
res_code_arr: "", // 响应示例
req_solt_code_arr:'11',
res_solt_code_arr:'11',
req_solt_code_arr: "11",
res_solt_code_arr: "11",
buy_type: "",
workflows_id:'',//判断是否是流程服务
workflows_id: "", //判断是否是流程服务
sizeset_flag: false, //规格设置是否显示
service_arr: [
["服务基本信息", "接口详细信息", "服务运行状态"],
["服务基本信息", "接口详细信息", "服务运行状态", "服务计费规则","服务交易记录"],
["服务基本信息", "接口详细信息", "服务运行状态", "服务规格","服务交易记录"],
[
"服务基本信息",
"接口详细信息",
"服务运行状态",
"服务计费规则",
"服务交易记录",
],
[
"服务基本信息",
"接口详细信息",
"服务运行状态",
"服务规格",
"服务交易记录",
],
],
service_size_data: [], //服务规格数组
service_header_arr: {
......@@ -673,7 +786,7 @@ export default {
text: "",
},
],
fixed: true,
fixed: false,
fixedurl: this.$route.path.replace("servicedetail", "serviceedit"),
},
now_service: 0,
......@@ -685,12 +798,12 @@ export default {
minWidth: "20%",
align: "left",
},
{
prop: "dyr",
label: "调用人",
width: "100px",
align: "center",
},
// {
// prop: "dyr",
// label: "调用人",
// width: "100px",
// align: "center",
// },
{
prop: "dyyw",
label: "调用业务系统",
......@@ -703,30 +816,36 @@ export default {
minWidth: "20%",
align: "left",
},
{
prop: "cjms",
label: "场景描述",
minWidth: "40%",
align: "left",
},
{
prop: "sqgg",
label: "申请规格",
minWidth: "40%",
align: "center",
},
{
prop: "sqsc",
label: "申请时长",
minWidth: "40%",
align: "center",
},
// {
// prop: "cjms",
// label: "场景描述",
// minWidth: "40%",
// align: "left",
// },
// {
// prop: "sqgg",
// label: "申请规格",
// minWidth: "40%",
// align: "center",
// },
// {
// prop: "sqsc",
// label: "申请时长",
// minWidth: "40%",
// align: "center",
// },
{
prop: "sqsj",
label: "申请调用时间",
width: "160px",
align: "right",
},
{
prop: "state",
label: "调用状态",
width: "160px",
align: "right",
},
],
header_gz_process_arr: [
{
......@@ -814,9 +933,9 @@ export default {
label: "调用时间",
minWidth: "20%",
align: "center",
}
},
],
service_process_arr:[],
service_process_arr: [],
service_size_arr: [
{
prop: "index",
......@@ -852,20 +971,23 @@ export default {
edit_size_arr: [
{
prop: "spcs_type",
label: '规格类型<span title="计次收费规格:仅依据服务调用次数进行收费,不限时长。&#10;时长收费规格:按月为时间单位进行收费,每月使用次数不限。"><img style="margin-left:5px;vertical-align:-3px;" src="'+require('../../../assets/imgs/money_table_ico.png')+'" alt=""></span>',
label:
'规格类型<span title="计次收费规格:仅依据服务调用次数进行收费,不限时长。&#10;时长收费规格:按月为时间单位进行收费,每月使用次数不限。"><img style="margin-left:5px;vertical-align:-3px;" src="' +
require("../../../assets/imgs/money_table_ico.png") +
'" alt=""></span>',
width: "180px",
align: "center",
type: "select",
selectArr:[
selectArr: [
{
label:'计次收费规格',
value:1
label: "计次收费规格",
value: 1,
},
{
label:'时长收费规格',
value:2
}
]
label: "时长收费规格",
value: 2,
},
],
},
{
prop: "money",
......@@ -876,7 +998,10 @@ export default {
},
{
prop: "pv",
label: '调用次数<span title="该规格提供的服务调用次数。"><img style="margin-left:5px;vertical-align:-3px;" src="'+require('../../../assets/imgs/money_table_ico.png')+'" alt=""></span>',
label:
'调用次数<span title="该规格提供的服务调用次数。"><img style="margin-left:5px;vertical-align:-3px;" src="' +
require("../../../assets/imgs/money_table_ico.png") +
'" alt=""></span>',
width: "150px",
align: "center",
type: "input",
......@@ -891,14 +1016,14 @@ export default {
prop: "time",
label: "时长",
width: "150px",
align: "left"
align: "left",
},
{
prop: "descript",
label: "规格说明",
minWidth: "33.33%",
align: "left",
type:'input'
type: "input",
},
{
label: "操作",
......@@ -949,7 +1074,7 @@ export default {
solt_name: "res_code",
},
],
process_in_up_arr:[
process_in_up_arr: [
{
title: "接口文档:",
info: "",
......@@ -961,9 +1086,9 @@ export default {
info: "",
type: "solt",
solt_name: "service_port",
}
},
],
port_solt_arr:[
port_solt_arr: [
{
title: "服务地址:",
info: "",
......@@ -1001,7 +1126,7 @@ export default {
solt_name: "response_code",
},
],
gz_solt_arr:[
gz_solt_arr: [
{
title: "请求方式:",
info: "12123",
......@@ -1035,13 +1160,13 @@ export default {
solt_name: "response_code",
},
],
port_options:[],
port_options: [],
service_type_arr: [
"数据服务",
"时空服务",
"视频服务",
"感知服务",
"综合应用",
"融合服务",
],
scrvice_area_arr: [
"经济建设",
......@@ -1084,6 +1209,39 @@ export default {
info: "",
},
],
cp_arr: [
{
title: "产品简介:",
info: "",
},
{
title: "产品领域:",
info: "",
},
{
title: "产品标签:",
info: "",
},
{
title: "所属组织:",
info: "",
},
{
title: "开放程度:",
info: "",
},
{
title: "注册发布时间:",
info: "",
},
{
title: "产品详情:",
type: "solt",
solt_name: "cp_md",
item: "",
},
],
data_service_type1: "",
};
},
computed: {
......@@ -1095,15 +1253,15 @@ export default {
if (n == 2) {
this.getData();
}
}
},
},
created() {
if (this.userInfo) {
this.now_user = this.level;
if(this.now_user==1||this.now_user==2){
this.in_origin_ser = true
}else{
this.in_origin_ser = false
if (this.now_user == 1 || this.now_user == 2) {
this.in_origin_ser = true;
} else {
this.in_origin_ser = false;
}
} else {
this.getCurrentUser();
......@@ -1114,16 +1272,16 @@ export default {
},
mounted() {},
methods: {
change_port(val){
this.port_options.forEach(e => {
if(e.value == val){
this.$set(this.port_solt_arr[0],'info',e.value)
this.$set(this.port_solt_arr[1],'info',e.req_type)
this.$set(this.port_solt_arr[2],'info',e.encode_method)
this.req_solt_data = e.req_fields
this.res_solt_data = e.res_fields
this.req_solt_code_arr = e.req_fields_example
this.res_solt_code_arr = e.res_fields_example
change_port(val) {
this.port_options.forEach((e) => {
if (e.value == val) {
this.$set(this.port_solt_arr[0], "info", e.value);
this.$set(this.port_solt_arr[1], "info", e.req_type);
this.$set(this.port_solt_arr[2], "info", e.encode_method);
this.req_solt_data = e.req_fields;
this.res_solt_data = e.res_fields;
this.req_solt_code_arr = e.req_fields_example;
this.res_solt_code_arr = e.res_fields_example;
}
});
},
......@@ -1135,7 +1293,7 @@ export default {
transchangePageSize(value) {
this.transpageSize = value;
this.transcurrentPage = 1;
this.get_trans_data()
this.get_trans_data();
},
changeCurrentPage(value) {
this.currentPage = value;
......@@ -1143,33 +1301,35 @@ export default {
},
transchangeCurrentPage(value) {
this.transcurrentPage = value;
this.get_trans_data()
this.get_trans_data();
},
iconChange (val) {
iconChange(val) {
// el-select实际上是两层div包裹的input
this.port_select_server = val;
// 获取当前el-select标签第一层div
const dom = this.$refs['select_icon'].$el;
if(dom.children[0].children[0].tagName == 'SPAN'){
dom.children[0].children[0].remove()
const dom = this.$refs["select_icon"].$el;
if (dom.children[0].children[0].tagName == "SPAN") {
dom.children[0].children[0].remove();
}
// 创建需要添加到其中的标签 并填充内容
const svgDom = document.createElement('span'); // ('<svg-icon ref="iconRef" icon-class="' + val + '" style="float: left;width: 3%;height: 30px;border: 1px solid #dcdfe6;border-right:none;" />');
svgDom.setAttribute('class', 'el-input__prefix');
if(val.split(',')[1]=='true'){
svgDom.innerHTML = '<span class="el-input__prefix-inner" style="margin-top:15px;margin-left:10px;display:inline-block;width:0px;height:18px;border-radius:4px;"></span>';
}else{
svgDom.innerHTML = '<span class="el-input__prefix-inner" style="margin-top:10px;margin-left:10px;display:inline-block;width:36px;color:#fff;height:18px;border-radius:4px;background-color:#e15260;">故障</span>';
const svgDom = document.createElement("span"); // ('<svg-icon ref="iconRef" icon-class="' + val + '" style="float: left;width: 3%;height: 30px;border: 1px solid #dcdfe6;border-right:none;" />');
svgDom.setAttribute("class", "el-input__prefix");
if (val.split(",")[1] == "true") {
svgDom.innerHTML =
'<span class="el-input__prefix-inner" style="margin-top:15px;margin-left:10px;display:inline-block;width:0px;height:18px;border-radius:4px;"></span>';
} else {
svgDom.innerHTML =
'<span class="el-input__prefix-inner" style="margin-top:10px;margin-left:10px;display:inline-block;width:36px;color:#fff;height:18px;border-radius:4px;background-color:#e15260;">故障</span>';
}
// 将创建的标签添加到父节点(第二层div)
dom.children[0].appendChild(svgDom);
// 得到el-select中的input标签
const inputDom = dom.children[0].children[0];
inputDom.setAttribute('style', 'padding-left: 60px;');
inputDom.setAttribute("style", "padding-left: 60px;");
// 将添加的标签放到input前面
dom.children[0].insertBefore(svgDom, inputDom);
this.getData()
this.getData();
},
get_use_list() {
this.service_use_arr = [];
......@@ -1182,29 +1342,35 @@ export default {
if (response.data.success) {
this.listTotal = response.data.data.total;
let data = response.data.data.data || [];
console.log(data)
data.forEach((e) => {
this.service_use_arr.push({
dydw: e.apply_org_name,
dyr: e.apply_user_info.user_name,
dyr: e.apply_user_info ? e.apply_user_info.user_name : "",
dyyw: e.business_name,
ywxt: e.business_url,
cjms: e.scene,
sqsj: e.apply_time.split("+")[0].replace("T", " "),
sqsj: e.apply_time || "-",
sqgg: e.request_spcs
? `访问次数:${e.request_spcs.count}/日 访问量:${e.request_spcs.pv}/日`
: "",
sqsc: e.duration + ["", "个月", ""][e.duration_unit || 0],
jkmc:e.req_name||'',
jkdz:e.req_url||'',
state:(e.req_status||e.req_status==0)?e.req_status==-1?'失败':'成功':'',
time:e.last_request_time?e.last_request_time.split("+")[0].replace("T", " "):'-',
count:e.req_num||'-'
jkmc: e.req_name || "",
jkdz: e.req_url || "",
state:
e.req_status || e.req_status == 0
? e.req_status == -1
? "失败"
: "成功"
: "",
time: e.last_request_time || "-",
count: e.req_num || "-",
});
});
console.log(this.service_use_arr)
}
})
.catch(function(response) {});
.catch(function (response) {});
},
change_buy(val) {
if (this.buy_style.indexOf(val) !== -1) {
......@@ -1218,10 +1384,10 @@ export default {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
this.now_user = this.level;
if(this.now_user==1||this.now_user==2){
this.in_origin_ser = true
}else{
this.in_origin_ser = false
if (this.now_user == 1 || this.now_user == 2) {
this.in_origin_ser = true;
} else {
this.in_origin_ser = false;
}
console.log(this.level);
} else {
......@@ -1230,35 +1396,37 @@ export default {
});
},
getData() {
console.log(this.namespace)
this.$api.workbench.getServiceRunningTopology({ namespace: this.namespace }).then((response) => {
this.datas = response.data.elements;
});
this.$api.workbench
.getServiceRunningTopology({ service_id: this.$route.params.id })
.then((response) => {
this.datas = response.data.elements;
});
},
get_trans_data(){
get_trans_data() {
this.$http
.get(
`/apaas/service/v3/service/manager/service/trade/list?page=${this.currentPage}&size=${this.pageSize}&service_id=${this.$route.params.id}`
).then(res=>{
)
.then((res) => {
console.log(res);
// listTotal: 0,
if(res.data.success){
this.translistTotal = res.data.data.total
var temp = res.data.data.list||[]
temp.forEach(e => {
if(e.spcs_type==1){
e.duration_name = '不限时长'
e.gg = `${e.spcs_count}次/ ${e.single_money} 元`
}else if(e.spcs_type==2){
e.duration_name = e.duration+''
e.gg = `${e.single_money} 元/月`
if (res.data.success) {
this.translistTotal = res.data.data.total;
var temp = res.data.data.list || [];
temp.forEach((e) => {
if (e.spcs_type == 1) {
e.duration_name = "不限时长";
e.gg = `${e.spcs_count}次/ ${e.single_money} 元`;
} else if (e.spcs_type == 2) {
e.duration_name = e.duration + "";
e.gg = `${e.single_money} 元/月`;
}
e.trade_times = helper.dateStringTransform(e.trade_time);
e.total_moneys = e.total_money + "金币";
});
this.trans_log_data = temp
this.trans_log_data = temp;
}
})
});
},
getServiceInfo() {
this.$http
......@@ -1270,13 +1438,17 @@ export default {
if (response.data.success === 1) {
let data = response.data.data;
this.namespace = data.urls[0].namespace;
if(data.workflows_id){
this.workflows_id = data.workflows_id
}else{
this.workflows_id = false
if (data.workflows_id) {
this.workflows_id = data.workflows_id;
} else {
this.workflows_id = false;
}
this.$set(this.service_header_arr, "portal_id", data.portal_id); // 时空服务id
this.$set(this.service_header_arr, "workflows_id", data.workflows_id); // 时空服务id
this.$set(
this.service_header_arr,
"workflows_id",
data.workflows_id
); // 时空服务id
this.$set(
this.service_header_arr,
"isMap",
......@@ -1314,78 +1486,127 @@ export default {
data.urls[0].req_url
);
this.$set(this.service_header_arr, "url", data.cover);
if (this.now_user == 1) {
this.$set(this.service_header_arr, "fixed", false);
if (this.now_user != 1) {
this.$set(this.service_header_arr, "fixed", true);
}
this.$set(
this.service_header_arr,
"fixedurl",
this.$route.path.replace("servicedetail", "serviceedit")
);
this.trans_all_obj={
all:data.sale_total_money,
times:data.sale_total,
month:data.sale_month_total,
}
this.trans_all_obj = {
all: data.sale_total_money,
times: data.sale_total,
month: data.sale_month_total,
};
//判断是否是服务注册出来的流程服务
if(data.data_service_type2 == 24&&data.workflows_id==0){
this.process_in_up = true
this.$set(this.process_in_up_arr[0],'info',data.doc_file.split('/')[data.doc_file.split('/').length-1])
this.$set(this.process_in_up_arr[0],'url',data.doc_file)
var temp_port_arr = []
data.urls.forEach(e => {
if (data.data_service_type2 == 24 && data.workflows_id == 0) {
this.process_in_up = true;
this.$set(
this.process_in_up_arr[0],
"info",
data.doc_file.split("/")[data.doc_file.split("/").length - 1]
);
this.$set(this.process_in_up_arr[0], "url", data.doc_file);
var temp_port_arr = [];
data.urls.forEach((e) => {
temp_port_arr.push({
label:e.req_name,
value:e.req_url,
able:e.state==-1?false:true,
...e
})
label: e.req_name,
value: e.req_url,
able: e.state == -1 ? false : true,
...e,
});
});
this.port_options = temp_port_arr
if(this.port_options[0]){
this.port_select = this.port_options[0].value
this.$set(this.port_solt_arr[0],'info',this.port_options[0].value)
this.$set(this.port_solt_arr[1],'info',this.port_options[0].req_type)
this.$set(this.port_solt_arr[2],'info',this.port_options[0].encode_method)
this.req_solt_data = this.port_options[0].req_fields
this.res_solt_data = this.port_options[0].res_fields
this.req_solt_code_arr = this.port_options[0].req_fields_example
this.res_solt_code_arr = this.port_options[0].res_fields_example
this.port_options = temp_port_arr;
if (this.port_options[0]) {
this.port_select = this.port_options[0].value;
this.$set(
this.port_solt_arr[0],
"info",
this.port_options[0].value
);
this.$set(
this.port_solt_arr[1],
"info",
this.port_options[0].req_type
);
this.$set(
this.port_solt_arr[2],
"info",
this.port_options[0].encode_method
);
this.req_solt_data = this.port_options[0].req_fields;
this.res_solt_data = this.port_options[0].res_fields;
this.req_solt_code_arr = this.port_options[0].req_fields_example;
this.res_solt_code_arr = this.port_options[0].res_fields_example;
}
}else{
this.process_in_up = false
} else {
this.process_in_up = false;
}
if(data.service_data_type_1 == 10){
this.perception_in = true
this.$set(this.gz_solt_arr[0],'info',data.urls[0].req_url)
this.$set(this.gz_solt_arr[1],'info',data.urls[0].encode_method)
this.req_gz_solt_data = data.urls[0].req_fields
this.res_gz_solt_data = data.urls[0].res_fields
this.req_solt_code_arr = data.urls[0].req_fields_example
this.res_solt_code_arr = data.urls[0].res_fields_example
}else{
this.perception_in = false
if (data.service_data_type_1 == 10) {
this.perception_in = true;
this.$set(this.gz_solt_arr[0], "info", data.urls[0].req_url);
this.$set(
this.gz_solt_arr[1],
"info",
data.urls[0].encode_method
);
this.req_gz_solt_data = data.urls[0].req_fields;
this.res_gz_solt_data = data.urls[0].res_fields;
this.req_solt_code_arr = data.urls[0].req_fields_example;
this.res_solt_code_arr = data.urls[0].res_fields_example;
} else {
this.perception_in = false;
}
console.log(this.process_in_up, this.perception_in);
this.get_trans_data();
if (data.data_service_type1 == 36) {
this.$set(this.service_header_arr, "second", []);
}
console.log(this.process_in_up,this.perception_in);
this.get_trans_data()
if(this.process_in_up){
var temp_sj = this.service_header_arr.first.pop()
this.service_header_arr.second = []
this.service_header_arr.second.push(temp_sj)
if (this.process_in_up) {
var temp_sj = this.service_header_arr.first.pop();
this.service_header_arr.second = [];
this.service_header_arr.second.push(temp_sj);
}
this.$set(this.list_arr[0], "info", data.descript);
this.$set(this.list_arr[1], "info", data.sectors_name);
this.$set(this.list_arr[2], "info", data.organization_name);
this.$set(this.list_arr[3], "info", data.openness_name);
this.$set(this.list_arr[4], "info", "自动生成");
this.$set(
this.list_arr[5],
"info",
data.create_time.replace("T", " ").split("+")[0]
);
let str = data.create_time.replace("T", " ").split("+")[0];
str = str.replace("Z", " ").split("+")[0];
this.$set(this.list_arr[5], "info", str);
this.$set(this.cp_arr[0], "info", data.descript);
this.$set(this.cp_arr[1], "info", data.sectors_name);
let strtags = "";
if (data.tags && data.tags.length != 0) {
data.tags.forEach((item) => {
strtags += item + " ";
});
}
this.$set(this.cp_arr[2], "info", strtags);
this.$set(this.cp_arr[3], "info", data.organization_name);
this.$set(this.cp_arr[4], "info", data.openness_name);
this.$set(this.cp_arr[5], "info", str);
this.data_service_type1 = data.data_service_type1;
if (this.data_service_type1 == "36") {
this.service_arr[0][0] = "产品基本信息";
this.service_arr[0][1] = "";
this.service_arr[0][2] = "";
this.service_arr[1][0] = "产品基本信息";
this.service_arr[1][1] = "";
this.service_arr[1][2] = "";
this.service_arr[1][3] = "产品计费规则";
this.service_arr[1][4] = "产品交易记录";
this.service_arr[2][0] = "产品基本信息";
this.service_arr[2][1] = "";
this.service_arr[2][2] = "";
this.service_arr[2][3] = "产品规格";
this.service_arr[2][4] = "产品交易记录";
this.getMd(data.doc_file);
}
// console.log(this.service_arr)
// 接口详情信息
this.$set(
this.servicead_arr[0],
......@@ -1400,44 +1621,50 @@ export default {
this.$set(this.servicead_arr[1], "info", "无请求参数");
}
this.req_code_arr =
data.urls[0].req_fields_example || data.urls[0].req_query_example || ""; // 请求示例
data.urls[0].req_fields_example ||
data.urls[0].req_query_example ||
""; // 请求示例
if (!this.req_code_arr) {
this.$set(this.servicead_arr[2], "type", "");
this.$set(this.servicead_arr[2], "info", "无请求示例");
}
this.$set(this.servicead_arr[3], "info", data.urls[0].encode_method); // 编码格式
this.$set(
this.servicead_arr[3],
"info",
data.urls[0].encode_method
); // 编码格式
this.res_data = JSON.parse(data.urls[0].res_fields || "[]"); // 响应参数
if (this.res_data && this.res_data.length === 0) {
this.$set(this.servicead_arr[4], "type", "");
this.$set(this.servicead_arr[4], "info", "无响应参数");
}
console.log(data.urls[0].res_fields_example)
console.log(data.urls[0].res_fields_example);
this.res_code_arr = data.urls[0].res_fields_example || ""; // 响应示例
console.log(this.res_code_arr)
console.log(this.res_code_arr);
if (!this.res_code_arr) {
this.$set(this.servicead_arr[5], "type", "");
this.$set(this.servicead_arr[5], "info", "无响应示例");
}
// 接口详情信息 end
var temp = data.request_spcs_info||[]
temp.forEach((e,idx) => {
e.index = idx+1
if(e.spcs_type==1){
e.gg = e.money+'金币/'+e.spcs_count+''
e.time = '不限时长'
e.pv = e.spcs_count
e.d_price = e.money/e.spcs_count+'金币/次'
e.spcs_type_name = '计次收费'
}else if(e.spcs_type==2){
e.gg = e.money+'金币/月'
e.time = '1个月'
e.pv = '不限次数'
e.d_price = '-'
e.spcs_type_name = '计时收费'
var temp = data.request_spcs_info || [];
temp.forEach((e, idx) => {
e.index = idx + 1;
if (e.spcs_type == 1) {
e.gg = e.money + "金币/" + e.spcs_count + "";
e.time = "不限时长";
e.pv = e.spcs_count;
e.d_price = e.money / e.spcs_count + "金币/次";
e.spcs_type_name = "计次收费";
} else if (e.spcs_type == 2) {
e.gg = e.money + "金币/月";
e.time = "1个月";
e.pv = "不限次数";
e.d_price = "-";
e.spcs_type_name = "计时收费";
}
});
this.service_size_data =temp;
this.size_arr_down =temp;
this.service_size_data = temp;
this.size_arr_down = temp;
} else {
this.$message({
message: response.data.errMsg,
......@@ -1445,32 +1672,44 @@ export default {
});
}
})
.catch(function(response) {});
.catch(function (response) {});
},
getMd(url) {
if (url == "") {
this.cp_arr[6].item = "";
} else {
this.$http
.get(url)
.then((response) => {
this.cp_arr[6].item = response.data;
})
.catch(function (error) {
console.log(error);
});
}
},
now_size_data(val) {
console.log(val);
val.forEach(e => {
if(e.spcs_type==1){
if(e.pv=='不限次数'){
e.pv = ''
e.time = ''
e.descript = ''
e.money = ''
e.d_price = ''
val.forEach((e) => {
if (e.spcs_type == 1) {
if (e.pv == "不限次数") {
e.pv = "";
e.time = "";
e.descript = "";
e.money = "";
e.d_price = "";
}
e.time = '不限时长'
e.descript = '提供'+e.pv+'次服务,时长不限'
if(e.money&&e.pv){
e.d_price = parseInt(e.money/e.pv)+'金币/次'
}
}else if(e.spcs_type==2){
e.pv = '不限次数'
e.d_price = '-'
e.time = '按月'
e.descript = '每月不限调用次数'
e.time = "不限时长";
e.descript = "提供" + e.pv + "次服务,时长不限";
if (e.money && e.pv) {
e.d_price = parseInt(e.money / e.pv) + "金币/次";
}
} else if (e.spcs_type == 2) {
e.pv = "不限次数";
e.d_price = "-";
e.time = "按月";
e.descript = "每月不限调用次数";
}
});
this.size_arr_down = val;
},
......@@ -1483,51 +1722,51 @@ export default {
.then((response) => {
let data = response.data.data;
console.log(data);
var temp = data.data||[]
temp.forEach((e,idx) => {
e.index = idx+1
// if(e.spcs_type==1){
// e.gg = e.money+'/'+e.spcs_count
// e.time = '不限时长'
// e.pv = e.spcs_count
// e.d_price = ''
// }else if(e.spcs_type==1){
// e.gg = e.money+'/月'
// e.time = '1个月'
// e.pv = '不限次数'
// e.d_price = '-'
// }
var temp = data.data || [];
temp.forEach((e, idx) => {
e.index = idx + 1;
// if(e.spcs_type==1){
// e.gg = e.money+'/'+e.spcs_count
// e.time = '不限时长'
// e.pv = e.spcs_count
// e.d_price = ''
// }else if(e.spcs_type==1){
// e.gg = e.money+'/月'
// e.time = '1个月'
// e.pv = '不限次数'
// e.d_price = '-'
// }
if(e.spcs_type==1){
e.gg = e.money+'金币/'+e.spcs_count+''
e.time = '不限时长'
e.pv = e.spcs_count
e.d_price = e.money/e.spcs_count+'金币/次'
e.spcs_type_name = '计次收费'
}else if(e.spcs_type==2){
e.gg = e.money+'金币/月'
e.time = '1个月'
e.pv = '不限次数'
e.d_price = '-'
e.spcs_type_name = '计时收费'
}
});
if (e.spcs_type == 1) {
e.gg = e.money + "金币/" + e.spcs_count + "";
e.time = "不限时长";
e.pv = e.spcs_count;
e.d_price = e.money / e.spcs_count + "金币/次";
e.spcs_type_name = "计次收费";
} else if (e.spcs_type == 2) {
e.gg = e.money + "金币/月";
e.time = "1个月";
e.pv = "不限次数";
e.d_price = "-";
e.spcs_type_name = "计时收费";
}
});
this.service_size_data = temp;
})
.catch(function(response) {});
.catch(function (response) {});
},
change_service_size() {
let temp = [];
this.size_arr_down.forEach((e) => {
if (e.pv && e.money&&e.spcs_type) {
e.id = 0
if (e.pv && e.money && e.spcs_type) {
e.id = 0;
delete e.undefined;
delete e.flag;
e.spcs_count = e.spcs_type==1?parseInt(e.pv):0;
e.spcs_count = e.spcs_type == 1 ? parseInt(e.pv) : 0;
e.money = parseFloat(e.money);
e.duration=1
e.duration_unit=1
e.duration = 1;
e.duration_unit = 1;
temp.push(e);
}
});
......@@ -1544,7 +1783,7 @@ export default {
this.sizeset_flag = false;
this.getsize_arr();
} else {
this.$message.error("保存失败");
this.$message.error(response.data.errMsg);
}
});
},
......@@ -1596,7 +1835,7 @@ export default {
background-color: #c3caf8;
color: #0f2683;
}
.service_port .el-input__inner{
.service_port .el-input__inner {
width: 785px;
background-color: #f7f8f9;
}
......@@ -1713,7 +1952,7 @@ export default {
margin-top: 50px;
overflow: hidden;
}
.port_bg_box{
.port_bg_box {
width: 100%;
min-height: 100px;
background-color: #f8f9fd;
......@@ -1721,13 +1960,13 @@ export default {
margin-top: 10px;
padding: 20px 30px;
}
.trans_all{
.trans_all {
width: 100%;
height: 128px;
background-color: #fbfcfe;
border-radius: 12px;
background-color: #fbfcfe;
border-radius: 12px;
}
.trans_all .trans_box{
.trans_all .trans_box {
width: 33.3%;
float: left;
height: 65px;
......@@ -1735,10 +1974,10 @@ export default {
margin-top: 30px;
border-right: 2px solid #e6ebfe;
}
.trans_all .trans_box:nth-last-of-type(1){
.trans_all .trans_box:nth-last-of-type(1) {
border: 0;
}
.trans_middle{
.trans_middle {
width: 200px;
height: 65px;
line-height: 65px;
......@@ -1746,33 +1985,35 @@ export default {
position: relative;
text-align: right;
}
.trans_middle img{
.trans_middle img {
position: absolute;
left: 0;
top: 15px;
}
.trans_middle span{
.trans_middle span {
position: absolute;
right: -20px;
top: 18px;
font-size: 16px;
color: #242c43;
color: #242c43;
}
.trans_middle p{
.trans_middle p {
font-size: 16px;
line-height: 32px;
color: #58617a;
color: #58617a;
}
.trans_middle p:nth-of-type(2){
.trans_middle p:nth-of-type(2) {
font-size: 24px;
font-weight: bold;
color: #242c43;
font-weight: bold;
color: #242c43;
}
.trans_all .trans_box:nth-of-type(1) .trans_middle span{
.trans_all .trans_box:nth-of-type(1) .trans_middle span {
right: -40px;
}
.trans_log{
.trans_log {
width: 100%;
}
.topology {
height: 500px;
}
</style>
......@@ -67,7 +67,7 @@
{ required: true, message: '请输入接口编码', trigger: 'blur' },
]">
<p class="formname">接口编码:</p>
<el-input v-model="form.code"></el-input>
<el-input v-model="form.code" :disabled="true"></el-input>
</el-form-item>
<!-- <el-form-item v-if="now_user==2" prop="people" :rules="[
{ required: true, message: '请输入发布人', trigger: 'blur' },
......@@ -286,10 +286,10 @@ export default {
this.$set(this.form,'desc',data.descript)
this.$set(this.form,'area',data.sectors)
this.$set(this.form,'origin',data.organization)
this.$set(this.form,'code',data.encode_method)
this.$set(this.form,'code',"自动生成")
this.$set(this.form,'people',data.register_user_info?data.register_user_info.user_name:data.register_user_info)
this.$set(this.form,'phone',data.register_user_info?data.register_user_info.phone:data.register_user_info)
this.$set(this.form,'resource',data.openness)
this.$set(this.form,'resource',data.openness_name == "共享" ? 1 : data.openness_name == "受限" ? 2 : 3)
this.$set(this.form,'fileList',data.cover)
this.imgList = data.cover.split(';')
this.open = data.service_safe_config?data.service_safe_config.fusing:data.service_safe_config
......
......@@ -41,12 +41,12 @@
>
<img
v-if="activeBtn == index"
:src="require('../../assets/imgs/' + item.active + '.png')"
:src="require('@/assets/imgs/' + item.active + '.png')"
class="fwcs_btn_img"
/>
<img
v-else
:src="require('../../assets/imgs/' + item.default + '.png')"
:src="require('@/assets/imgs/' + item.default + '.png')"
class="fwcs_btn_img"
/>
{{ item.name }}
......@@ -112,10 +112,16 @@
<el-radio label="xml">XML</el-radio>
</el-radio-group>
</div>
<div v-if="!(activeBtn == 4 && zhyyVal == 24)" class="fwcs_fwdz">
<div
v-if="!(activeBtn == 4 && zhyyVal == 24) && activeBtn != 5"
class="fwcs_fwdz"
>
服务地址:
</div>
<div v-if="!(activeBtn == 4 && zhyyVal == 24)" class="fwcs_fwdz_inner">
<div
v-if="!(activeBtn == 4 && zhyyVal == 24) && activeBtn != 5"
class="fwcs_fwdz_inner"
>
<el-input
placeholder="请输入内容"
@input="getUrl"
......@@ -334,6 +340,124 @@
</el-tab-pane>
</el-tabs>
</div>
<div v-if="activeBtn == 5">
<div class="fwcs_add">
<el-form ref="form_cp" :model="form_cp" :rules="rules_cp">
<el-form-item prop="name">
<p class="formname">产品名称:</p>
<el-input
v-model="form_cp.name"
placeholder="请输入产品名称"
class="form_in"
></el-input>
</el-form-item>
<el-form-item prop="desc">
<p class="formname">产品简介:</p>
<el-input
type="textarea"
v-model="form_cp.desc"
placeholder="请输入产品简介"
class="form_in"
></el-input>
</el-form-item>
<el-form-item prop="area">
<p class="formname">产品领域:</p>
<el-select
v-model="form_cp.area"
placeholder="请选择"
class="form_in"
>
<el-option
v-for="item in optionsArea"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item prop="bb">
<p class="formname">产品版本:</p>
<el-input
v-model="form_cp.bb"
class="form_in"
placeholder="请输入产品版本,如V1.0"
></el-input>
</el-form-item>
<el-form-item>
<p class="formname">产品封面:</p>
<upload-file
:multiple="false"
:max="1"
type="cropper"
:readOnly="false"
:list="cover_cp"
@getNewList="getNewList_cp"
></upload-file>
</el-form-item>
<el-form-item prop="bq">
<p class="formname">产品标签:</p>
<div class="ip_block form_in">
<div
v-for="(item, index) in form_cp.bq"
:key="item"
class="ip_item"
>
{{ item }}
<i
class="el-icon-close ip_del"
@click="delIp(index, 'white')"
></i>
</div>
<el-input
v-if="whiteAddShow"
class="ip_input"
v-model="newIpWhite"
@keyup.enter.native="watchKeyboardWhite"
></el-input>
<el-button
class="add_ip"
@click="addIp('white')"
icon="el-icon-plus"
>增加</el-button
>
</div>
</el-form-item>
<el-form-item>
<p class="formname">产品介绍文档:</p>
<div class="cp_mb">
产品介绍文档模版.md
<a href="static/产品介绍文档模版.md" download="产品介绍文档模版.md" class="filebtn">下载文件</a>
</div>
<upload-file
:multiple="false"
:unique="false"
:max="1"
type="md"
:readOnly="false"
:drag="true"
@getNewList="getNewListwd"
class="up_f form_in"
:accepts="'.md'"
up_fz="仅支持.md格式"
:list="wd_cp"
></upload-file>
</el-form-item>
<el-form-item prop="resource">
<p class="formname">开放程度:</p>
<el-radio-group v-model="form_cp.resource">
<el-radio :label="1">共享</el-radio>
<el-radio :label="2">受限</el-radio>
<el-radio :label="3">敏感</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="btn_footer">
<el-button class="registe" @click="registeCp" :disabled="cpR"
>产品注册</el-button
>
</el-form-item>
</el-form>
</div>
</div>
</block-radius>
<block-radius v-show="resultShow">
<div
......@@ -634,7 +758,7 @@
>新增服务地址</el-button
>
<el-button
v-if="!(indexOne + 1 == liucheng_list.length)"
v-if="!(indexOne == liucheng_list.length)"
class="del_one"
@click="delOne(indexOne)"
>移除</el-button
......@@ -738,7 +862,7 @@
<el-button class="previous" @click="goBack('map')">
{{ is_map == 1 ? "返回智能制图" : "返回Web应用程序" }}
</el-button>
<el-button class="registe" @click="registeMap">
<el-button class="registe" :disabled="mapR" @click="registeMap">
服务发布
</el-button>
</el-form-item>
......@@ -746,13 +870,19 @@
<el-button class="previous" @click="goBack('process')">
返回流程管理
</el-button>
<el-button class="registe" @click="registeProcess">
<el-button
class="registe"
:disabled="proR"
@click="registeProcess"
>
服务发布
</el-button>
</el-form-item>
<el-form-item v-else class="btn_footer">
<el-button class="previous" @click="previous">上一步</el-button>
<el-button class="registe" @click="registe">服务注册</el-button>
<el-button class="registe" :disabled="fwR" @click="registe"
>服务注册</el-button
>
</el-form-item>
</el-form>
</div>
......@@ -1022,6 +1152,54 @@ export default {
code_1_index: 0,
code_2_index: 0,
user_id: "",
form_cp: {
name: "",
desc: "",
area: "",
origin: "",
bb: "",
bq: [],
resource: 1,
},
rules_cp: {
name: [
{ required: true, message: "请输入产品名称", trigger: "blur" },
{ min: 0, max: 15, message: "产品名称不超过15个字", trigger: "blur" },
],
desc: [
{ required: true, message: "请输入产品描述", trigger: "blur" },
{
min: 0,
max: 200,
message: "产品简介不超过200个字",
trigger: "blur",
},
],
area: [
{ required: true, message: "请选择产品领域", trigger: "change" },
],
bq: [{ required: true, message: "请添加产品标签", trigger: "blur" }],
bb: [
{ required: true, message: "请输入版本号", trigger: "change" },
{
pattern: /^(\w{1})(\w|\.|-|\s*)+$/,
message: "请输入正确版本号",
trigger: "blur",
},
],
resource: [
{ required: true, message: "请选择开放程度", trigger: "blur" },
],
},
cover_cp: [],
ip_arr: [],
whiteAddShow: false,
newIpWhite: "",
wd_cp: [],
cpR: false,
fwR: false,
mapR: false,
proR: false,
};
},
computed: {},
......@@ -1240,11 +1418,7 @@ export default {
this.activeBtn == 3 ||
(this.activeBtn == 4 && (this.zhyyVal == 22 || this.zhyyVal == 23))
) {
if (
this.activeBtn == 2 ||
this.activeBtn == 3 ||
(this.activeBtn == 4 && this.zhyyVal == 22)
) {
if (this.activeBtn == 2 || this.activeBtn == 3) {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
......@@ -1337,6 +1511,12 @@ export default {
getNewList(val) {
this.cover[0] = val[0].url;
},
getNewList_cp(val) {
this.cover_cp[0] = val[0].url;
},
getNewListwd(val) {
this.wd_cp[0] = val[0];
},
previous() {
this.datasQqcs = this.request_fields;
this.datasFhcs = this.response_fields;
......@@ -1353,6 +1533,7 @@ export default {
this.$api.user.getUserDetail(query).then((request) => {
if (request.data.success == 1) {
this.form.origin = request.data.data.department;
this.form_cp.origin = request.data.data.department;
this.oid = request.data.data.department_id;
} else {
console.log(response.data.errMsg);
......@@ -1384,6 +1565,7 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.cover.length != 0) {
this.mapR = true;
let query = {};
if (this.is_map == 1) {
query = {
......@@ -1442,6 +1624,7 @@ export default {
};
}
this.$api.workbench.serviceAdd(query).then((response) => {
this.mapR = false;
if (response.data.success == 1) {
this.$message.success("服务发布成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
......@@ -1462,6 +1645,7 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.cover.length != 0) {
this.proR = true;
let query = {
workflows_id: Number(this.process_id), // 服务流程id
service_name: this.form.name, // 服务名称
......@@ -1473,6 +1657,7 @@ export default {
openness: this.form.resource, // 开放程度,1共享/2受限/3敏感
};
this.$api.workbench.releaseProcess(query).then((response) => {
this.proR = false;
if (response.data.success == 1) {
this.$message.success("服务发布成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
......@@ -1496,6 +1681,43 @@ export default {
this.registePt();
}
},
registeCp() {
this.$refs.form_cp.validate((valid) => {
if (valid) {
if (this.form_cp.bq.length < 1 && this.form_cp.bq.length > 3) {
this.$message.error("产品标签至少1个,至多3个");
} else {
this.cpR = true;
let query = {
name: this.form_cp.name,
sectors: this.form_cp.area,
organization: this.form_cp.origin,
cover: this.cover_cp[0],
openness: this.form_cp.resource,
descript: this.form_cp.desc,
data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: 0,
portal_id: "",
encode_method: "自动生成",
doc_file: this.wd_cp.length != 0 ? this.wd_cp[0].url : "",
version: this.form_cp.bb,
tags: this.form_cp.bq,
urls: [],
};
this.$api.workbench.serviceAdd(query).then((response) => {
this.cpR = false;
if (response.data.success == 1) {
this.$message.success("产品注册成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
} else {
console.log(response.data.errMsg);
this.$message.error(response.data.errMsg);
}
});
}
}
});
},
registePt() {
this.$refs.form.validate((valid) => {
if (valid) {
......@@ -1510,6 +1732,7 @@ export default {
if (this.activeBtn == 1 && !this.is_portal) {
this.addPortalItem();
} else {
this.fwR = true;
if (
this.activeBtn == 0 ||
this.activeBtn == 2 ||
......@@ -1563,6 +1786,7 @@ export default {
],
};
this.$api.workbench.serviceAdd(query).then((response) => {
this.fwR = false;
if (response.data.success == 1) {
this.$message.success("服务注册成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
......@@ -1588,6 +1812,7 @@ export default {
if (this.jkwds.length == 0) {
this.$message.error("请上传接口文档");
} else {
this.fwR = true;
let urls = [];
this.liucheng_list.forEach((item) => {
urls.push({
......@@ -1624,6 +1849,7 @@ export default {
doc_file: this.jkwds.length != 0 ? this.jkwds[0] : "",
};
this.$api.workbench.serviceAdd(query).then((response) => {
this.fwR = false;
if (response.data.success == 1) {
this.$message.success("服务注册成功");
this.$router.push("/fwgl/" + this.$store.getters.level);
......@@ -1692,8 +1918,8 @@ export default {
getServiceType1() {
this.$api.workbench.getServiceTypeList().then((response) => {
if (response.data.success == 1) {
this.btnList = response.data.data;
this.btnList.forEach((item) => {
let arr = response.data.data;
arr.forEach((item) => {
switch (item.id) {
case 5:
item.default = "nav_ic_shujufw";
......@@ -1715,10 +1941,22 @@ export default {
item.default = "nav_ic_zonghefw";
item.active = "nav_ic_zonghefw_sel";
break;
case 36:
item.default = "nav_ic_chanpinzy";
item.active = "nav_ic_chanpinzy_sel";
break;
default:
break;
}
});
let cp_index = arr.findIndex((item) => {
return item.id == 36;
});
let cp = arr[cp_index];
arr.splice(cp_index, 1);
arr.push(cp);
console.log(arr);
this.btnList = arr;
let skfwRadios = this.btnList[1].childDomains;
skfwRadios.splice(2, 1);
this.skfwRadios = skfwRadios;
......@@ -1907,6 +2145,8 @@ export default {
body_fields: [],
param_fields: [],
});
} else {
this.$message.error(`请完善服务${indexOne + 1}中的信息`);
}
} else {
this.$message.error("请完善该服务测试");
......@@ -2092,12 +2332,48 @@ export default {
}
}
},
delIp(index, type) {
if (type == "white") {
this.form_cp.bq.splice(index, 1);
} else if (type == "black") {
this.form_cp.bq.splice(index, 1);
}
},
addIp(type) {
if (type == "white") {
this.whiteAddShow
? this.$message({
message: "请按回车完善本次标签填写",
type: "error",
})
: (this.whiteAddShow = true);
}
},
watchKeyboardWhite() {
let self = this;
if (self.newIpWhite == "") {
this.$message({
message: "无法添加空标签",
type: "error",
});
} else if (self.newIpWhite.length > 7) {
this.$message({
message: "添加的标签请小于七个字",
type: "error",
});
} else {
self.form_cp.bq.push(self.newIpWhite);
self.whiteAddShow = false;
self.newIpWhite = "";
}
},
},
mounted() {
let self = this;
window.addEventListener("message", self.listeners, false);
self.judgeMap();
self.getArea();
self.getOrganization();
},
created() {
let _self = this;
......@@ -2325,6 +2601,67 @@ export default {
.gz_fhsjgs_rad {
margin-left: 10px;
}
.ip_block {
border-radius: 8px;
border: solid 1px #e3e5ef;
padding: 10px 0 0 10px;
line-height: 24px;
}
.ip_item {
display: inline-block;
position: relative;
background-color: #e6ebfe;
border-radius: 4px;
color: #0f2683;
font-size: 12px;
line-height: 24px;
padding: 0 26px 0 8px;
margin-right: 10px;
margin-bottom: 10px;
}
.ip_del {
position: absolute;
right: 8px;
top: 6px;
font-size: 14px;
color: #6573ae;
cursor: pointer;
}
.ip_del:hover {
color: #e56600;
}
.add_ip {
background-color: #495feb;
border-radius: 4px;
color: #f8f9fd;
font-size: 12px;
line-height: 24px;
padding: 0 8px;
margin-right: 10px;
margin-bottom: 10px;
}
.ip_input {
width: 110px;
margin-right: 10px;
margin-bottom: 10px;
}
.filebtn {
width: 76px;
height: 32px;
line-height: 32px;
text-align: center;
color: #e6ebfe;
background-color: #515fe7;
border-radius: 6px;
display: inline-block;
font-size: 14px;
margin-left: 8px;
cursor: pointer;
text-decoration: none;
}
.cp_mb {
padding: 0 0 16px 8px;
}
</style>
<style>
.fwcs_fwdz_inner .el-select .el-input {
......@@ -2352,4 +2689,11 @@ export default {
.lc_upf .el-upload-dragger {
width: 100%;
}
.ip_input .el-input__inner {
border-radius: 4px;
padding: 0 8px;
font-size: 12px;
line-height: 24px;
height: 24px;
}
</style>
......@@ -319,6 +319,7 @@
:datas="app_data"
:stripe="true"
:detailsUrl="detailsUrl1[now_user][now_app]"
:ites="true"
height="285"
></table-um>
<list-pagination
......@@ -893,7 +894,7 @@ export default {
pic: require("@/assets/imgs/ic_gongzuoquyu.png"),
bg: "#e7fdfc",
color: "#25bdb1",
type: "earnings_money",
type: "workplace_count",
num: ""
}
],
......@@ -1040,7 +1041,7 @@ export default {
pic: require("@/assets/imgs/home_tool_ic_rongqiyun.png"),
text: "容器微服务管理",
role: 2,
url: "https://cloud.gzdata.ydeci.gz.cegn.cn/awecloud/login/#/"
url: "https://cloud4.wodcloud.com/awecloud/login/#/"
},
]
};
......@@ -1169,7 +1170,8 @@ export default {
let data = response.data.data;
if(this.now_type==2){
this.listTotal = data.total;
data.data.forEach(e => {
let arr = data.data || [];
arr.forEach(e => {
if(e.DiskList&&e.DiskList.length){
e['pan'] = e.DiskList.join(';')
}
......@@ -1182,9 +1184,10 @@ export default {
});
this.service_data = data.data
this.service_data = arr
}else{
this.service_data = data.data;
let arr = data.data || [];
this.service_data = arr;
this.service_data.forEach(e => {
if (e.create_time&&e.create_time!=='0001-01-01T00:00:00Z') {
e.create_time = helper.dateStringTransform(e.create_time)
......@@ -1225,6 +1228,10 @@ export default {
} else {
e.approval_status = "";
}
if (e.service_apply_info && e.service_apply_info.id != "") {
e.id = e.service_apply_info.id;
}
});
this.listTotal = data.total;
}
......
......@@ -24,7 +24,7 @@
<div class="search_list">
<div class="list_header">
<span></span>容器组
<el-input placeholder="请输入容器组名称" style="float:right;" @change="get_list_pod" v-model="pod_name" prefix-icon="el-icon-search"></el-input>
<el-input placeholder="请输入容器组名称" style="float:right;" @input="get_list_pod" v-model="pod_name" prefix-icon="el-icon-search"></el-input>
</div>
<div style="padding:20px;padding-top:0px;display: flex;flex-direction: column;height: calc(100% - 80px);align-items:stretch;">
<apass-table :header="header_arr" :data="tableData" :icon="false" style="flex-grow:1;" :paddingLeft="5"></apass-table>
......@@ -314,7 +314,8 @@ export default {
.get(`/apaas/rest/kubernetes/api/v1/_raw/pod/namespace/${val.namespace}/name/${val.name}`)
.then(response => {
console.log(response.data);
this.yaml_arr = yaml.stringify(response.data)
this.yaml_arr = yaml.stringify(response.data);
console.log(this.yaml_arr)
this.code_arr = JSON.stringify(json.load(this.yaml_arr), null, 2);
this.$refs.actiondialog.show();
......
......@@ -314,7 +314,7 @@ export default {
},
data() {
var checkname = (rule, value, callback) => {
var reg = /^[a-z|-|_]+$/
var reg = /^[a-z\-_]+$/
setTimeout(() => {
if (reg.test(value)) {
callback();
......@@ -533,10 +533,10 @@ export default {
name: "申请类型",
text: "",
},
{
name: "申请开发次数",
text: "",
},
// {
// name: "申请开发次数",
// text: "",
// },
{
name: "申请部署次数",
text: "",
......@@ -1013,10 +1013,10 @@ export default {
name: "申请类型",
text: data.apply_type_name,
},
{
name: "申请开发次数",
text: data.apply_times + "",
},
// {
// name: "申请开发次数",
// text: data.apply_times + "次",
// },
{
name: "申请部署次数",
text: data.deploy_times + "",
......
......@@ -35,7 +35,7 @@
</el-form-item>
<el-form-item prop="option">
<p class="formname">审批意见:</p>
<el-input v-model="form.option" placeholder="请输入审批意见,不少于10个字"></el-input>
<el-input v-model="form.option" placeholder="请输入审批意见"></el-input>
</el-form-item>
<el-form-item class="btnsty">
<el-button @click="onSubmit('form')" class="right">提交</el-button>
......@@ -80,7 +80,7 @@ export default {
option:[
{ required: true, message: '请输入意见', trigger: 'blur' },
{
min: 10,max:200, message: '长度应大于10个小于200个字符', trigger: 'blur'
min: 0,max:200, message: '长度应小于200个字符', trigger: 'blur'
}
]
},
......
......@@ -199,7 +199,7 @@
</div>
</div>
</div>
<apass-dialog ref="actiondialog" title="综合应用服务发布" width="520px">
<apass-dialog ref="actiondialog" title="融合服务发布" width="520px">
<template slot="content">
<div class="dialog-content">
<el-form :model="publicForm" :rules="public_rules" ref="publicForm" class="demo-ruleForm">
......
......@@ -85,7 +85,7 @@ const workbench = {
// get service running topology
getServiceRunningTopology(params) {
return axios.get(`/apaas/istio/service/apaas-proxy/overview/${params.namespace}`)
return axios.get(`/apaas/istio/v3/api/namespaces/graph?service=apaas-proxy-${params.service_id}&duration=600s`)
},
}
......
......@@ -73,18 +73,18 @@ export default new Router({
}, // 审批的服务 - 详情
{
path: "/fwgl/:level/:type/cloud_detail/:id",
name: "servicedetail",
name: "cloud_detail",
component: () => import("@/pages/workbench/fwgl/cloud-detail"),
}, // 云资源 - 详情
{
path: "/fwgl/:level/:type/approveWorkspace",
name: "servicedetail",
name: "approveWorkspace",
component: () =>
import("@/pages/workbench/fwgl/approveWorkspace"),
}, // 云资源 - 工作区域审批
{
path: "/fwgl/:level/:type/organizationCloudResource/:id",
name: "servicedetail",
name: "organizationCloudResource",
component: () =>
import("@/pages/workbench/fwgl/organizationCloudResource"),
}, // 云资源 - 组织云资源详情
......@@ -322,6 +322,11 @@ export default new Router({
name: "shopAppStoreList",
component: () => import("@/pages/service_shop/shop_list-new"),
},
{
path: "/shop/products_list/:id", // 应用商店列表页
name: "shopAppStoreList",
component: () => import("@/pages/service_shop/shop_list-new"),
},
{
path: "/shop/shopping_cart", // 购物车页
name: "shoppingCart",
......@@ -364,6 +369,11 @@ export default new Router({
name: "yysdDetail",
component: () => import("@/pages/service_shop/yysdDetail"),
}, // 服务超市 - 应用详情
{
path: "/shop/cpDetail/:id",
name: "cpDetail",
component: () => import("@/pages/service_shop/cpDetail"),
}, // 服务超市 - 产品资源详情
{
path: "/workplace",
name: "workPlace",
......
### 产品功能
请输入对产品核心功能的介绍说明,如:
本产品包含常见人工智能及机器学习相关算法:
1. 线性模型
2. 聚类算法
3. 特征选择算法
4. 降维/压缩
5. 树模型
### 产品亮点
请输入对产品核心亮点的介绍,如“模型算法使用多种类型的场景,支持灵活配置,算法高效。”
### 产品应用领域
请输入对产品常用的应用领域,如“算法适合机器学习、人工智能图像识别、视频处理等。”
### 产品文档获取
请输入对产品示例文档、说明文档、开发文档等的获取链接,如:
开发文档:http://www.dev-tech.com/docs
### 产品代码示例
如有示例代码,请输入产品的示例代码:
```
x = fluid.data(name='x', shape=[None, 13], dtype='float32') # 定义输入的形状和数据类型
y = fluid.data(name='y', shape=[None, 1], dtype='float32') # 定义输出的形状和数据类型
y_predict = fluid.layers.fc(input=x, size=1, act=None) # 连接输入和输出的全连接层
main_program = fluid.default_main_program() # 获取默认/全局主函数
startup_program = fluid.default_startup_program() # 获取默认/全局启动程序
cost = fluid.layers.square_error_cost(input=y_predict, label=y) # 利用标签数据和输出的预测数据估计方差
avg_loss = fluid.layers.mean(cost) # 对方差求均值,得到平均损失
```
如有其他信息,可依据产品需要进行补充
\ No newline at end of file
......@@ -4801,6 +4801,19 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"
markdown-loader@^6.0.0:
version "6.0.0"
resolved "https://registry.npm.taobao.org/markdown-loader/download/markdown-loader-6.0.0.tgz#7f8d40ee98b32d3bb8c5387d58e679600d3edeaa"
integrity sha1-f41A7pizLTu4xTh9WOZ5YA0+3qo=
dependencies:
loader-utils "^1.2.3"
marked "^0.7.0"
marked@^0.7.0:
version "0.7.0"
resolved "https://registry.npm.taobao.org/marked/download/marked-0.7.0.tgz?cache=0&sync_timestamp=1608062041411&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmarked%2Fdownload%2Fmarked-0.7.0.tgz#b64201f051d271b1edc10a04d1ae9b74bb8e5c0e"
integrity sha1-tkIB8FHScbHtwQoE0a6bdLuOXA4=
material-design-icons-iconfont@^4.0.5:
version "4.0.5"
resolved "https://registry.npm.taobao.org/material-design-icons-iconfont/download/material-design-icons-iconfont-4.0.5.tgz#4107ba3b8a9d688a3d9325fc7363af51b17d3aee"
......
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