Commit f75599bb authored by 徐一鸣's avatar 徐一鸣

Merge branch 'dev' into xym

parents aa97492c 5169da0d
...@@ -24,10 +24,12 @@ ...@@ -24,10 +24,12 @@
</ul> </ul>
</div> </div>
<div class="state_detail"> <div class="state_detail">
<p <div class="state_message">
v-text="currentState.content" <p v-for="(text, index) in currentState.content" :key="index">
style="text-align: center;margin-top: 20px;" <span v-text="index + 1"></span>
></p> <span v-text="text"></span>
</p>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -84,7 +86,6 @@ export default { ...@@ -84,7 +86,6 @@ export default {
return; return;
} }
console.log(state);
this.selectedState = state; this.selectedState = state;
}, },
}, },
...@@ -134,10 +135,30 @@ export default { ...@@ -134,10 +135,30 @@ export default {
.state_detail { .state_detail {
height: 500px; height: 500px;
flex-grow: 1; flex-grow: 1;
padding: 25px 40px;
border-radius: 7px; border-radius: 7px;
background-color: #f8f9fd; background-color: #f8f9fd;
overflow: hidden; overflow: hidden;
} }
.state_message {
height: 100%;
overflow: auto;
}
.state_message > p {
white-space: nowrap;
padding: 10px 0;
}
.state_message > p > span {
display: inline-block;
vertical-align: middle;
font-size: 14px;
line-height: 22px;
color: #242c43;
}
.state_message > p > span:first-child {
width: 65px;
color: #8890a7;
}
.icon_and_text > * { .icon_and_text > * {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
......
...@@ -6,39 +6,42 @@ ...@@ -6,39 +6,42 @@
{{ item.title }} {{ item.title }}
</p> </p>
<p v-if="!(item.prop && item.prop == 'title')"> <p v-if="!(item.prop && item.prop == 'title')">
<span v-if="item.type == 'url'" style="white-space:pre-wrap;" <span v-if="item.type == 'url'" style="white-space:pre-wrap;">
>访问地址: <a :href="item.info" target="_blank">{{ item.info }}</a></span 访问地址:
> <a :href="item.info" target="_blank">{{ item.info }}</a>
</span>
<span v-else v-html="item.info" style="white-space:pre-wrap;"></span> <span v-else v-html="item.info" style="white-space:pre-wrap;"></span>
<span v-if="item.type && item.type == 'down'" class="filebtn" @click="download(item.url)" <span
>下载文件</span v-if="item.type && item.type == 'down'"
> class="filebtn"
@click="download(item.url)"
>下载文件</span>
</p> </p>
<slot <slot v-if="item.type && item.type == 'solt'" :name="item.solt_name"></slot>
v-if="item.type && item.type == 'solt'"
:name="item.solt_name"
></slot>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import helper from "@/services/helper";
export default { export default {
data() { data() {
return {}; return {
helper: helper
};
}, },
props: ["list_arr"], props: ["list_arr"],
mounted() { mounted() {
console.log(this.$slots); console.log(this.$slots);
}, },
methods:{ methods: {
download(val){ download(val) {
// this.$emit('download',val) // this.$emit('download',val)
console.log(val); console.log(val);
const a = document.createElement('a'); // 创建a标签 const a = document.createElement("a"); // 创建a标签
a.setAttribute('download', '');// download属性 a.setAttribute("download", ""); // download属性
a.setAttribute('href', val);// href链接 a.setAttribute("href", val); // href链接
a.click();// 自执行点击事件 a.click(); // 自执行点击事件
} }
} }
}; };
</script> </script>
......
This diff is collapsed.
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
return; return;
} }
console.log("menu permission init."); // console.log("menu permission init.");
let permissionsList = this.deepClone(this.list); let permissionsList = this.deepClone(this.list);
let permissions = this.permissions; let permissions = this.permissions;
...@@ -190,21 +190,38 @@ export default { ...@@ -190,21 +190,38 @@ export default {
this.uppermissions(); this.uppermissions();
}, },
initPermissionsList() { initPermissionsList() {
this.permissionsList.forEach((item) => { const getSelectedState = (item) => {
this.traverse(item, (item) => { let selected = item.selected;
let selected = item.selected; let child = item.Child || [];
if (item.selected !== 0) { if (child.length > 0 && selected !== 0) {
let allSelcted = true; let selectedLength1 = 0;
let selectedLength2 = 0;
item.Child && child.forEach((v) => {
item.Child.forEach((v) => { let v_selected = getSelectedState(v);
allSelcted = v.selected === 0 && allSelcted;
});
this.$set(item, "selected", allSelcted ? 1 : 2); if (v_selected === 1) {
selectedLength1++;
} else if (v_selected === 2) {
selectedLength2++;
}
});
if (selectedLength1 === child.length) {
selected = 1;
} else if (selectedLength1 + selectedLength2 > 0) {
selected = 2;
} }
});
item.selected = selected;
}
return selected;
};
this.permissionsList.forEach((item) => {
getSelectedState(item);
}); });
// this.$emit("change-list", this.permissionsList); // this.$emit("change-list", this.permissionsList);
......
...@@ -78,18 +78,18 @@ ...@@ -78,18 +78,18 @@
v-for="(item, index) in menu_arr" v-for="(item, index) in menu_arr"
:key="index + 200" :key="index + 200"
class="menu_box user_hover" class="menu_box user_hover"
@click="navAction(index, item.path)" @click="navAction(index, item.visit_url)"
:style="{ color: now_menu == index ? '#fff' : '' }" :style="{ color: now_menu == index ? '#fff' : '' }"
> >
{{ item.name }} {{ item.menu_name }}
<div class="user_menu" v-if="item.children && item.children.length" style="left: 30px;"> <div class="user_menu" v-if="item.Child && item.Child.length" style="left: 30px;">
<div <div
v-for="(v, indexs) in item.children" v-for="(v, indexs) in item.Child"
:key="indexs + 700" :key="indexs + 700"
@click.stop="gotoChildPage(v, index)" @click.stop="gotoChildPage(v, index)"
>{{ v.name }}</div> >{{ v.menu_name }}</div>
</div> </div>
<div class="sj" v-if="item.children && item.children.length" style="left: 60px;"></div> <div class="sj" v-if="item.Child && item.Child.length" style="left: 60px;"></div>
<div class="bottom_show" v-if="now_menu == index"></div> <div class="bottom_show" v-if="now_menu == index"></div>
</div> </div>
</div> </div>
...@@ -100,70 +100,13 @@ ...@@ -100,70 +100,13 @@
export default { export default {
data() { data() {
return { return {
menu_arr: [ menu_arr: [],
{
name: "工作台",
path: "/workplace",
children: [
{
name: "服务注册",
path: "/fwzc/fwcs"
},
{
name: "服务管理",
path: "/fwgl/"
},
{
name: "应用管理",
path: "/yygl/"
}
]
},
{
name: "技术支持",
path: "/xxx"
},
{
name: "服务超市",
path: "/services_shop",
children: [
{
name: "数据服务",
path: "/shop/data_service_list/5"
},
{
name: "时空服务",
path: "/shop/space_time_service_list/6"
},
{
name: "视频服务",
path: "/shop/video_service_list/7"
},
{
name: "感知服务",
path: "/shop/perception_service_list/10"
},
{
name: "综合应用",
path: "/shop/comprehensive_app_list/11"
},
{
name: "云资源服务",
path: "/shop/cloud"
},
{
name: "应用商店",
path: "/shop/app_store_list/12"
}
]
}
],
now_menu: 2, now_menu: 2,
user_arr: [ user_arr: [
{ name: "个人档案", path: "/user/user_info" }, { name: "个人档案", path: "/user/user_info" },
{ name: "消息通知", path: "/user/message" }, { name: "消息通知", path: "/user/message" },
{ name: "收银中心", path: "/authority" }, { name: "收银中心", path: "" },
{ name: "关于BD-aPaaS", path: "/data_analysis" }, { name: "关于BD-aPaaS", path: "" },
{ name: "退出登录", path: "logout" } { name: "退出登录", path: "logout" }
], ],
shopping_list: [], shopping_list: [],
...@@ -171,7 +114,7 @@ export default { ...@@ -171,7 +114,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getMenuIndex(); this.getNowMenu();
this.getList(); this.getList();
}, },
computed: { computed: {
...@@ -218,14 +161,14 @@ export default { ...@@ -218,14 +161,14 @@ export default {
window.sessionStorage.setItem("menuIndex", index); window.sessionStorage.setItem("menuIndex", index);
}, },
gotoChildPage(v, parent) { gotoChildPage(v, parent) {
if (v.path) { if (v.visit_url) {
if (v.path == "/fwgl/" || v.path == "/yygl/") { if (v.visit_url == "/fwgl/" || v.visit_url == "/yygl/") {
this.$router.push(v.path + this.$store.getters.level); this.$router.push(v.visit_url + this.$store.getters.level);
} else if (parent == 2) { } else if (parent == 2) {
this.$router.push(v.path); this.$router.push(v.visit_url);
this.$store.commit("serviceShopMenuAct", v.path); this.$store.commit("serviceShopMenuAct", v.visit_url);
} else { } else {
this.$router.push(v.path); this.$router.push(v.visit_url);
} }
this.now_menu = parent; this.now_menu = parent;
window.sessionStorage.setItem("menuIndex", parent); window.sessionStorage.setItem("menuIndex", parent);
...@@ -249,6 +192,14 @@ export default { ...@@ -249,6 +192,14 @@ export default {
let index = window.sessionStorage.getItem("menuIndex"); let index = window.sessionStorage.getItem("menuIndex");
console.log(index); console.log(index);
this.now_menu = index ? index : 2; this.now_menu = index ? index : 2;
},
getNowMenu() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => {
if (response.data.success == 1) {
this.menu_arr = response.data.data[0].Child;
this.getMenuIndex();
}
});
} }
} }
}; };
......
...@@ -23,18 +23,25 @@ ...@@ -23,18 +23,25 @@
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="cell_specification"> <el-col :span="6" class="cell_specification">
<div> <div v-if="cellItem.order_type == 1">
<div>规格:日访问次数:{{ cellItem.spec_svc_count }}次,日访问量:{{ cellItem.spec_svc_pv }}</div> <div>规格:日访问次数:{{ cellItem.spec_svc_count }}次,日访问量:{{ cellItem.spec_svc_pv }}</div>
<div <div
class="cell_specification_type" class="cell_specification_type"
>申请方式:{{ cellItem.duration_unit == 1 ? $t('lang.byMonth') : $t('lang.byYear') }}</div> >申请方式:{{ cellItem.duration_unit == 1 ? $t('lang.byMonth') : $t('lang.byYear') }}</div>
</div> </div>
<div v-else-if="cellItem.order_type == 2">
<div>规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}</div>
</div>
<div v-else-if="cellItem.order_type == 3">
<div>规格:CPU 2核,内存 4GB,容器组 8个;数据盘 3块,每块数据盘容量 2GB</div>
<div class="cell_specification_type">单个容器组:CPU最高 4核,默认 2核;内存最高 8 GB,默认 4GB</div>
</div>
</el-col> </el-col>
<el-col :span="4" class="approval_status"> <el-col :span="4" class="approval_status">
<div> <div>
<div v-if="cellItem.approval_first_level == 0 && cellItem.pay_status != -1">待审核</div> <div v-if="cellItem.approval_first_level == 0 && cellItem.pay_status != -1">待审核</div>
<div <div
v-if="cellItem.approval_first_level == 1&& cellItem.approval_second_level == 0 && cellItem.pay_status != -1" v-if="cellItem.approval_first_level == 1 && cellItem.approval_second_level == 0 && cellItem.pay_status != -1"
>审核中</div> >审核中</div>
<div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1">审核通过</div> <div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1">审核通过</div>
<div v-if="cellItem.approval_first_level == -1 && cellItem.pay_status != -1">审核未通过</div> <div v-if="cellItem.approval_first_level == -1 && cellItem.pay_status != -1">审核未通过</div>
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<h3 <h3
class="detail-title" class="detail-title"
v-text="item.name + ':'" v-text="item.name + ':'"
v-if="item.type != 'rich-text'"
></h3> ></h3>
<service-steps <service-steps
......
<template> <template>
<div class="service_shop_menu"> <div class="service_shop_menu">
<ul class="service_shop_menu_list"> <ul class="service_shop_menu_list">
<li v-for="(item, index) in menuList" :key="index" @click="active(item.router)"> <li v-for="(item, index) in menuList" :key="index" @click="active(item.visit_url)">
<img <img
v-if="item.router == actives" v-if="item.visit_url == actives"
:src="require('../assets/imgs/' + item.active + '.png')" :src="item.active != '' ? require('../assets/imgs/' + item.active + '.png') : ''"
class="menu_img" class="menu_img"
/> />
<img v-else :src="require('../assets/imgs/' + item.default + '.png')" class="menu_img" /> <img v-else :src="require('../assets/imgs/' + item.default + '.png')" class="menu_img" />
<span :class="item.router == actives ? 'menu_item_active':'menu_item'">{{ item.label }}</span> <span
:class="item.visit_url == actives ? 'menu_item_active':'menu_item'"
>{{ item.menu_name }}</span>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -20,57 +22,7 @@ export default { ...@@ -20,57 +22,7 @@ export default {
data() { data() {
return { return {
actives: "", actives: "",
menuList: [ menuList: []
{
id: 0,
label: "数据服务",
router: "/shop/data_service_list/5",
active: "tool_ic_shujufw_sel",
default: "tool_ic_shujufw"
},
{
id: 1,
label: "时空服务",
router: "/shop/space_time_service_list/6",
active: "tool_ic_shikongfw_sel",
default: "tool_ic_shikongfw"
},
{
id: 2,
label: "视频服务",
router: "/shop/video_service_list/7",
active: "tool_ic_shipinfw_sel",
default: "tool_ic_shipinfw"
},
{
id: 3,
label: "感知服务",
router: "/shop/perception_service_list/10",
active: "tool_ic_ganzhifw_sel",
default: "tool_ic_ganzhifw"
},
{
id: 4,
label: "综合服务",
router: "/shop/comprehensive_app_list/11",
active: "tool_ic_zongheyyfw_sel",
default: "tool_ic_zongheyyfw"
},
{
id: 5,
label: "云资源服务",
router: "/shop/cloud",
active: "tool_ic_yunziyuanfw_sel",
default: "tool_ic_yunziyuanfw"
},
{
id: 6,
label: "应用商店",
router: "/shop/app_store_list/12",
active: "tool_ic_yingyongsd_sel",
default: "tool_ic_yingyongsd"
}
]
}; };
}, },
computed: { computed: {
...@@ -84,6 +36,7 @@ export default { ...@@ -84,6 +36,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getShopMenu();
this.$store.commit("serviceShopMenuAct", this.$route.path); this.$store.commit("serviceShopMenuAct", this.$route.path);
this.actives = this.$store.state.serviceShopMenu; this.actives = this.$store.state.serviceShopMenu;
}, },
...@@ -94,6 +47,60 @@ export default { ...@@ -94,6 +47,60 @@ export default {
getActiveMenu(val) { getActiveMenu(val) {
this.actives = val; this.actives = val;
this.$router.push(val); this.$router.push(val);
},
getShopMenu() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => {
if (response.data.success == 1) {
let arr = response.data.data[0].Child;
let shopArr = [];
arr.forEach(item => {
if (item.visit_url == "/services_shop") {
shopArr = item.Child;
}
});
shopArr.forEach(item => {
let uri = item.visit_url.substring(6);
if (uri.indexOf("/") != -1) {
uri = uri.substring(0, uri.indexOf("/"));
}
switch (uri) {
case "data_service_list":
item.active = "tool_ic_shujufw_sel";
item.default = "tool_ic_shujufw";
break;
case "space_time_service_list":
item.active = "tool_ic_shikongfw_sel";
item.default = "tool_ic_shikongfw";
break;
case "video_service_list":
item.active = "tool_ic_shipinfw_sel";
item.default = "tool_ic_shipinfw";
break;
case "perception_service_list":
item.active = "tool_ic_ganzhifw_sel";
item.default = "tool_ic_ganzhifw";
break;
case "comprehensive_app_list":
item.active = "tool_ic_zongheyyfw_sel";
item.default = "tool_ic_zongheyyfw";
break;
case "cloud":
item.active = "tool_ic_yunziyuanfw_sel";
item.default = "tool_ic_yunziyuanfw";
break;
case "app_store_list":
item.active = "tool_ic_yingyongsd_sel";
item.default = "tool_ic_yingyongsd";
break;
default:
item.active = "1";
item.default = "1";
break;
}
});
this.menuList = shopArr;
}
});
} }
} }
}; };
......
...@@ -58,7 +58,7 @@ import helper from "@/services/helper"; ...@@ -58,7 +58,7 @@ import helper from "@/services/helper";
export default { export default {
props: { props: {
item: { item: {
type: [String,Number], type: [String, Number],
default: "" default: ""
}, },
header: { header: {
...@@ -95,7 +95,8 @@ export default { ...@@ -95,7 +95,8 @@ export default {
anotherData: { anotherData: {
directory: "file" directory: "file"
}, },
inputTextUp: "" inputTextUp: "",
helper: helper
}), }),
mounted() { mounted() {
this.inputText = this.item; this.inputText = this.item;
...@@ -118,7 +119,7 @@ export default { ...@@ -118,7 +119,7 @@ export default {
url: response.data, url: response.data,
name: response.data name: response.data
}); });
this.inputTextUp = file.name; this.inputTextUp = helper.downloadFileFormat(file.name);
this.$emit("changeUpFile", { this.$emit("changeUpFile", {
rowId: this.rowId, rowId: this.rowId,
header: this.header, header: this.header,
......
...@@ -44,7 +44,7 @@ Vue.use(VueI18n) ...@@ -44,7 +44,7 @@ Vue.use(VueI18n)
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: 'zh', locale: 'zh',
messages: { messages: {
'zh': require('@/i18n/language-zh') 'zh': require('@/assets/i18n/language-zh')
} }
}) })
......
...@@ -149,8 +149,8 @@ export default { ...@@ -149,8 +149,8 @@ export default {
{ required: true, message: "请填写菜单访问地址", trigger: "blur" }, { required: true, message: "请填写菜单访问地址", trigger: "blur" },
{ {
min: 0, min: 0,
max: 30, max: 50,
message: "访问地址长度不超过30个字", message: "访问地址长度不超过50个字",
trigger: "blur" trigger: "blur"
} }
], ],
......
...@@ -16,18 +16,20 @@ ...@@ -16,18 +16,20 @@
</el-button> </el-button>
</template> </template>
<div class="apass_table" slot="list"> <div class="apass_table" slot="list">
<el-table class="user_roles_table" :border="false" :data="roleData"> <el-table class="user_roles_table" :border="false" :data="roleList">
<el-table-column width="60" align="right"> <el-table-column width="50" align="right"></el-table-column>
<el-table-column width="300">
<template slot="header">
<span style="margin-left: 25px;">角色</span>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox <el-checkbox
class="apass_checkbox"
v-model="scope.row.selected" v-model="scope.row.selected"
@change="updateRoles" @change="updateRoles"
></el-checkbox> >
</template> {{ scope.row.role_name }}
</el-table-column> </el-checkbox>
<el-table-column label="角色">
<template slot-scope="scope">
<span v-text="scope.row.role_name"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="说明"> <el-table-column label="说明">
...@@ -48,13 +50,14 @@ export default { ...@@ -48,13 +50,14 @@ export default {
components: { apassList }, components: { apassList },
data: () => ({ data: () => ({
roleTotal: 0, roleTotal: 0,
roleData: [], roleList: [],
showDialog: false, showDialog: false,
userRoles: null,
roles: null, roles: null,
}), }),
computed: { computed: {
roleIds() { roleIds() {
return this.roleData.map((item) => item.role_id); return this.roleList.map((item) => item.role_id);
}, },
}, },
methods: { methods: {
...@@ -63,13 +66,13 @@ export default { ...@@ -63,13 +66,13 @@ export default {
if (this.roles === null) { if (this.roles === null) {
this.getUserRoles(() => { this.getUserRoles(() => {
this.getRoles(filters); this.getRoleList(filters);
}); });
} else { } else {
this.getRoles(filters); this.getRoleList(filters);
} }
}, },
getRoles(filters) { getRoleList(filters) {
this.$http this.$http
.get(`/apaas/backmgt/role/list`, { .get(`/apaas/backmgt/role/list`, {
params: { params: {
...@@ -84,20 +87,22 @@ export default { ...@@ -84,20 +87,22 @@ export default {
}); });
this.roleTotal = data.total; this.roleTotal = data.total;
this.roleData = data.data; this.roleList = data.data;
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
}); });
}, },
getUserRoles(callback) { getUserRoles(cb) {
this.$http this.$http
.get(`/apaas/backmgt/user/roles/${this.$route.params.id}`) .get(`/apaas/backmgt/user/roles/${this.$route.params.id}`)
.then(({ data }) => { .then(({ data }) => {
this.roles = data.data.map((item) => item.role_id); let userRoles = data.data.map((item) => item.role_id);
// console.log(this.roles);
typeof callback === "function" && callback(); this.userRoles = userRoles;
this.roles = userRoles;
typeof cb === "function" && cb();
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
...@@ -109,7 +114,7 @@ export default { ...@@ -109,7 +114,7 @@ export default {
return this.roleIds.indexOf(item) === -1; return this.roleIds.indexOf(item) === -1;
}) })
.concat( .concat(
this.roleData this.roleList
.filter((item) => { .filter((item) => {
return item.selected; return item.selected;
}) })
...@@ -121,18 +126,51 @@ export default { ...@@ -121,18 +126,51 @@ export default {
// console.log(this.roles); // console.log(this.roles);
}, },
setUserRoles() { setUserRoles() {
if (this.roles.length > 0) { let add = [];
this.$http let remove = [];
.post(`/apaas/backmgt/user/addRole`, { let requests = [];
this.roles.forEach((item) => {
if (this.userRoles.indexOf(item) === -1) {
add.push(item);
}
});
this.userRoles.forEach((item) => {
if (this.roles.indexOf(item) === -1) {
remove.push(item);
}
});
if (add.length > 0) {
requests.push(
this.$http.post(`/apaas/backmgt/user/addRole`, {
user_id: this.$route.params.id, user_id: this.$route.params.id,
role_id: this.roles, role_id: add,
}) })
);
}
if (remove.length > 0) {
requests.push(
this.$http.post(`/apaas/backmgt/role/userDel`, {
user_id: this.$route.params.id,
role_id: remove,
})
);
}
if (requests.length > 0) {
Promise.all(requests)
.then(({ data }) => { .then(({ data }) => {
this.$message({ this.$message({
message: `分配角色成功.`, message: `分配角色成功.`,
type: "success", type: "success",
}); });
this.$router.push("/authority/users");
setTimeout(() => {
this.$router.push("/authority/users");
}, 200);
}) })
.catch((error) => { .catch((error) => {
this.$message({ this.$message({
...@@ -142,7 +180,7 @@ export default { ...@@ -142,7 +180,7 @@ export default {
}); });
} else { } else {
this.$message({ this.$message({
message: "用户角色不能为空!", message: "您没有进行任何修改.",
type: "warning", type: "warning",
}); });
} }
......
...@@ -32,7 +32,6 @@ export default { ...@@ -32,7 +32,6 @@ export default {
getVal(val) { getVal(val) {
let uri = val.substring(6); let uri = val.substring(6);
uri = uri.substring(0, uri.indexOf("/")); uri = uri.substring(0, uri.indexOf("/"));
console.log(uri);
switch (uri) { switch (uri) {
case "data_service_list": case "data_service_list":
this.name = "数据服务"; this.name = "数据服务";
......
...@@ -58,21 +58,44 @@ export default { ...@@ -58,21 +58,44 @@ export default {
console.log(error); console.log(error);
}); });
this.$http let detailData = [
.get(`/apaas/hubApi/market/readme/${this.id}`) {
.then(({ data }) => { name: "获取流程",
this.detailData = [ type: "step",
value: ["应用申请", "信息填写", "审核确认", "应用获取"],
},
];
Promise.all([
this.$http.get(`/apaas/hubApi/market/app/detail/${this.id}`),
this.$http.get(`/apaas/hubApi/market/values/${this.id}`),
])
.then((response) => {
let data1 = response[0].data.data;
let data2 = response[1].data.data;
detailData.push(
{ {
name: "获取流程", name: "应用简介",
type: "step", type: "text",
value: ["应用申请", "信息填写", "审核确认", "应用获取"], value: data1.yyjj,
}, },
{ {
name: "富文本", name: "功能简介",
type: "rich-text", type: "text",
value: data.data, value: data1.gnjj,
}, },
]; {
name: "应用场景",
type: "text",
value: data1.cjsl,
},
{
name: "应用参数",
type: "rich-text",
value: data2,
}
);
this.detailData = detailData;
}) })
.catch(function(error) { .catch(function(error) {
console.log(error); console.log(error);
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<div class="detail_title">{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息</div> <div class="detail_title">{{ orderDetail.order_type == 1 ? "服务" : "应用"}}信息</div>
<div class="detail_service"> <div class="detail_service">
<el-row class="detail_service_row"> <el-row class="detail_service_row">
<el-col :span="10" class="detail_service_msg"> <el-col :span="10" v-if="orderDetail.order_type == 1" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" /> <img :src="orderDetail.cover" class="detail_service_msg_img" />
<div class="detail_service_msg_right"> <div class="detail_service_msg_right">
<div class="detail_service_name"> <div class="detail_service_name">
...@@ -105,8 +105,28 @@ ...@@ -105,8 +105,28 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="10" v-else-if="orderDetail.order_type == 2" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" />
<div class="detail_service_msg_right">
<div class="detail_service_name">
<span>{{ orderDetail.name }}</span>
</div>
<div class="detail_service_msg_other">
<div class="detail_service_type">{{ orderDetail.sector }}</div>
<div class="detail_service_creator">{{ orderDetail.src_organization }}</div>
</div>
</div>
</el-col>
<el-col :span="10" v-else-if="orderDetail.order_type == 3" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" />
<div class="detail_service_msg_right">
<div class="detail_service_name_cloud">
<span>{{ orderDetail.name }}</span>
</div>
</div>
</el-col>
<el-col :span="8" class="detail_service_specification"> <el-col :span="8" class="detail_service_specification">
<div> <div v-if="orderDetail.order_type == 1">
<div> <div>
<span class="detail_service_specification_gg">规格:</span> <span class="detail_service_specification_gg">规格:</span>
<span <span
...@@ -120,6 +140,18 @@ ...@@ -120,6 +140,18 @@
>{{orderDetail.duration_unit == 1 ? "按月" : "按年"}}</span> >{{orderDetail.duration_unit == 1 ? "按月" : "按年"}}</span>
</div> </div>
</div> </div>
<div v-else-if="orderDetail.order_type == 2">
<div>
<span class="detail_service_specification_gg">规格:</span>
<span class="detail_service_specification_val">申请获取应用镜像部署权限</span>
</div>
</div>
<div v-else-if="orderDetail.order_type == 3">
<div>
<span class="detail_service_specification_gg">类型:</span>
<span class="detail_service_specification_val">申请新的工作区域</span>
</div>
</div>
</el-col> </el-col>
<el-col :span="6" class="detail_service_time"> <el-col :span="6" class="detail_service_time">
<div> <div>
...@@ -131,10 +163,64 @@ ...@@ -131,10 +163,64 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="detail_s_title">应用场景:</div> <div v-if="orderDetail.order_type == 2">
<div class="detail_app_scence">{{ orderDetail.scene }}</div> <div class="detail_s_title">应用简介:</div>
<div class="detail_s_title">申请内容:</div> <div class="detail_app_scence">{{ orderDetail.scene }}</div>
<table-um :headers="header_arr" :datas="data"></table-um> </div>
<div v-if="orderDetail.order_type == 2">
<div class="detail_s_title">功能简介:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 1 || orderDetail.order_type == 2">
<div class="detail_s_title">应用场景:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 3">
<div class="detail_s_title">工作区域描述:</div>
<div class="detail_app_scence">{{ orderDetail.scene }}</div>
</div>
<div v-if="orderDetail.order_type == 3" class="params_block">
<span class="params_block_title">申请规格:</span>
<div class="params_block_item">
<div class="params_block_item_in">
<span class="params_block_item_title">CPU:</span>
<span class="params_block_item_val">2核</span>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">内存:</span>
<span class="params_block_item_val">4GB</span>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">容器组:</span>
<span class="params_block_item_val">2核</span>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">数据盘:</span>
<span class="params_block_item_val">2核</span>
</div>
</div>
<span class="params_block_title margin_top_20">单个容器组规格:</span>
<div class="params_block_item">
<div class="params_block_item_in">
<span class="params_block_item_title">CPU:</span>
<p class="params_block_item_val">
<span class="val_has_2">最高&nbsp;2核</span>
<span class="val_has_2">默认&nbsp;2核</span>
</p>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">CPU:</span>
<p class="params_block_item_val">
<span class="val_has_2">最高&nbsp;2核</span>
<span class="val_has_2">默认&nbsp;2核</span>
</p>
</div>
</div>
</div>
<div v-if="orderDetail.order_type == 1">
<div class="detail_s_title">申请内容:</div>
<table-um :headers="header_arr" :datas="data"></table-um>
</div>
<div class="detail_title">申请人信息</div> <div class="detail_title">申请人信息</div>
<info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list> <info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list>
<process-card :data="approval_arr1" class="detail_s_val"></process-card> <process-card :data="approval_arr1" class="detail_s_val"></process-card>
...@@ -512,6 +598,19 @@ export default { ...@@ -512,6 +598,19 @@ export default {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 16px; font-size: 16px;
} }
.detail_service_name_cloud {
width: 100%;
line-height: 24px;
margin-top: 50px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 16px;
}
.detail_service_msg_other { .detail_service_msg_other {
position: absolute; position: absolute;
bottom: 2px; bottom: 2px;
...@@ -598,6 +697,42 @@ export default { ...@@ -598,6 +697,42 @@ export default {
background-color: #e1e4fb; background-color: #e1e4fb;
color: #626de9; color: #626de9;
} }
.params_block {
background-color: #f8f9fd;
border-radius: 8px;
margin: 10px 0;
padding: 20px;
font-size: 14px;
line-height: 22px;
}
.params_block_title {
padding-left: 10px;
color: #242c43;
}
.params_block_item {
padding: 10px 0 0 0;
}
.params_block_item_in {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.params_block_item_title {
color: #8890a7;
width: 120px;
text-align: right;
}
.params_block_item_val {
color: #242c43;
width: calc(100% - 130px);
}
.val_has_2 {
margin-right: 20px;
}
.margin_top_20 {
display: block;
margin-top: 20px;
}
</style> </style>
<style> <style>
.pop_rate .el-rate__icon { .pop_rate .el-rate__icon {
......
...@@ -135,12 +135,12 @@ ...@@ -135,12 +135,12 @@
:modal-append-to-body="false" :modal-append-to-body="false"
> >
<div class="change_psw"> <div class="change_psw">
<el-form ref="form" :model="form"> <el-form ref="form" :model="form" :rules="passRules">
<el-form-item class="dia_item"> <el-form-item class="dia_item">
<p>旧密码:</p> <p>旧密码:</p>
<el-input v-model="form.passwordOld"></el-input> <el-input v-model="form.passwordOld"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="dia_item"> <el-form-item prop="passwordNew" class="dia_item">
<p>新密码:</p> <p>新密码:</p>
<el-input v-model="form.passwordNew" :type="visible1 ? 'password':'text'"> <el-input v-model="form.passwordNew" :type="visible1 ? 'password':'text'">
<span <span
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
></span> ></span>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item class="dia_item"> <el-form-item prop="nextname" class="dia_item">
<p>请再次输入密码:</p> <p>请再次输入密码:</p>
<el-input v-model="form.nextname" :type="visible2 ? 'password':'text'"> <el-input v-model="form.nextname" :type="visible2 ? 'password':'text'">
<span <span
...@@ -183,44 +183,77 @@ export default { ...@@ -183,44 +183,77 @@ export default {
BlockRadius, BlockRadius,
UploadFile UploadFile
}, },
data: () => ({ data() {
activeName: "0", var checkNewPass = (rule, value, callback) => {
userId: "", let reg = new RegExp(
is_admin: 0, /^.*(?=.{6,50})(?=.*\d)(?=.*[A-Z]{1,})(?=.*[a-z]{1,}).*$/
user_data: { );
accountNo: "", if (value == "") {
password: "12345678", callback(new Error("请输入新密码"));
nickname: "", } else if (value == this.form.passwordOld) {
contactPerson: "", callback(new Error("新密码不应与旧密码一致"));
phone: "", } else if (!reg.test(value)) {
email: "", callback(new Error("密码包含大小写字母、数字,长度不小于6位"));
organization: "", } else {
userType: "", callback();
userTypeName: "" }
}, };
visible1: true, var checkNextPass = (rule, value, callback) => {
visible2: true, if (value !== this.form.passwordNew) {
form: { callback(new Error("密码和确认密码不一致"));
passwordOld: "", } else {
passwordNew: "", callback();
nextname: "" }
}, };
imgList: [], return {
formBusiness: { activeName: "0",
businessSystemName: "", userId: "",
domainName: "", is_admin: 0,
ip_white: [], user_data: {
ip_black: [], accountNo: "",
private_token: "", password: "12345678",
description: "" nickname: "",
}, contactPerson: "",
whiteAddShow: false, phone: "",
blackAddShow: false, email: "",
newIpWhite: "", organization: "",
newIpBlack: "", userType: "",
diaPassWord: false, userTypeName: ""
couldUp: true },
}), visible1: true,
visible2: true,
form: {
passwordOld: "",
passwordNew: "",
nextname: ""
},
passRules: {
passwordNew: [
{ required: true, message: "请输入新密码", trigger: "blur" },
{ validator: checkNewPass, trigger: "blur" }
],
nextname: [
{ required: true, message: "请再次输入新密码", trigger: "blur" },
{ validator: checkNextPass, trigger: "blur" }
]
},
imgList: [],
formBusiness: {
businessSystemName: "",
domainName: "",
ip_white: [],
ip_black: [],
private_token: "",
description: ""
},
whiteAddShow: false,
blackAddShow: false,
newIpWhite: "",
newIpBlack: "",
diaPassWord: false,
couldUp: true
};
},
mounted() { mounted() {
this.getCurrentUser(); this.getCurrentUser();
}, },
......
...@@ -114,12 +114,18 @@ ...@@ -114,12 +114,18 @@
> >
<div class="description_info"> <div class="description_info">
<i class="el-icon-warning-outline"></i> <i class="el-icon-warning-outline"></i>
<p> <p
压缩包上传提示:<br /> v-html="
1.必须包含以下文件:Chart.yaml,README.md,step.yaml,values.yaml,logo.png;<br /> `1.必须包含以下文件:Chart.yaml,README.md,step.yaml,values.yaml,logo.png,templates/NOTES.txt;<br />
2.上述文件必须按照上述名称进行命名;<br /> 2.上述文件必须按照上述名称进行命名;<br />
3.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。 3.step.yaml文件为values.yaml中的可配置参数,templates/NOTES.txt文件为应用的部署信息;<br />
</p> 4.templates/NOTES.txt主要用于用户部署后的访问,可以按照如下示例进行编写:<br />
&ensp;&ensp;this is a postgresql.<br />
&ensp;&ensp;author : Tom<br />
&ensp;&ensp;内部地址: {{ .Release.Name }}.{{ .Release.Namespace }}:5432<br />
5.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。<br />`
"
></p>
</div> </div>
<el-upload <el-upload
ref="step2_upload" ref="step2_upload"
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
{ {
getLabel(item) { getLabel(item) {
return ( return (
["申请上架", "申请下架", "申请上架"][item.state] || "-" ["申请上架", "申请下架", "审核"][item.state] || "-"
); );
}, },
callback(item) { callback(item) {
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
prop: "state", prop: "state",
data: [ data: [
{ {
name: "上架", name: "审核",
value: 1, value: 1,
}, },
{ {
...@@ -430,7 +430,7 @@ export default { ...@@ -430,7 +430,7 @@ export default {
label: "服务状态", label: "服务状态",
prop: "state", prop: "state",
getText(item) { getText(item) {
return ["已下架", "已上架", "上架"][item.state]; return ["已下架", "已上架", "审核"][item.state];
}, },
align: "center", align: "center",
}, },
...@@ -459,7 +459,7 @@ export default { ...@@ -459,7 +459,7 @@ export default {
prop: "state", prop: "state",
data: [ data: [
{ {
name: "上架", name: "审核",
value: 1, value: 1,
}, },
{ {
......
...@@ -425,7 +425,7 @@ export default { ...@@ -425,7 +425,7 @@ export default {
"其他", "其他",
], ],
open_arr: ["共享", "受限", "敏感"], open_arr: ["共享", "受限", "敏感"],
service_state_arr: ["已下架","已上架", "上架"], service_state_arr: ["已下架","已上架", "审核"],
request_arr: ["GET", "POST", "PUT", "DELETE"], request_arr: ["GET", "POST", "PUT", "DELETE"],
list_arr: [ list_arr: [
{ {
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<p class="formname">接口编码:</p> <p class="formname">接口编码:</p>
<el-input v-model="form.code"></el-input> <el-input v-model="form.code"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="now_user==2" prop="people" :rules="[ <!-- <el-form-item v-if="now_user==2" prop="people" :rules="[
{ required: true, message: '请输入发布人', trigger: 'blur' }, { required: true, message: '请输入发布人', trigger: 'blur' },
]"> ]">
<p class="formname">发布人:</p> <p class="formname">发布人:</p>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
]"> ]">
<p class="formname">联系方式:</p> <p class="formname">联系方式:</p>
<el-input v-model="form.phone"></el-input> <el-input v-model="form.phone"></el-input>
</el-form-item> </el-form-item> -->
<el-form-item prop="resource"> <el-form-item prop="resource">
<p class="formname">开放程度:</p> <p class="formname">开放程度:</p>
<el-radio-group v-model="form.resource"> <el-radio-group v-model="form.resource">
...@@ -395,6 +395,7 @@ export default { ...@@ -395,6 +395,7 @@ export default {
if (valid) { if (valid) {
this.setService() this.setService()
} else { } else {
this.$message.error('请填写完整表单')
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
} }
......
...@@ -214,7 +214,9 @@ ...@@ -214,7 +214,9 @@
</div> </div>
</block-radius> </block-radius>
<block-radius v-show="resultShow"> <block-radius v-show="resultShow">
<div v-show="(activeBtn == 0 || activeBtn == 4 && zhyyVal == 0) && resSuccess"> <div
v-show="(activeBtn == 0 || activeBtn == 4 && (zhyyVal == 22 || zhyyVal == 23)) && resSuccess"
>
<div class="sjfw_qqcstx">请求参数信息填写:</div> <div class="sjfw_qqcstx">请求参数信息填写:</div>
<ces-table <ces-table
ref="fwcs_sjfw_qqcs" ref="fwcs_sjfw_qqcs"
...@@ -258,7 +260,7 @@ ...@@ -258,7 +260,7 @@
headerCellClassName="th_pink" headerCellClassName="th_pink"
></ces-table> ></ces-table>
</div> </div>
<div v-show="(activeBtn == 1 || activeBtn == 4 && zhyyVal != 0) && resSuccess"> <div v-show="(activeBtn == 1 || (activeBtn == 4 && zhyyVal == 34)) && resSuccess">
<div class="skfw_csfwxx">测试服务信息:</div> <div class="skfw_csfwxx">测试服务信息:</div>
<div class="test_succ"> <div class="test_succ">
<div class="skcs_jg"> <div class="skcs_jg">
...@@ -468,15 +470,15 @@ export default { ...@@ -468,15 +470,15 @@ export default {
tokenVal: "", tokenVal: "",
sjfwQqt: "JSON", sjfwQqt: "JSON",
zhfwQqt: "JSON", zhfwQqt: "JSON",
skfwQqt: "ArcGIS Server Web", skfwQqt: "",
skfwRadios: [], skfwRadios: [],
optionsZhyy: [ optionsZhyy: [
{ label: "模型算法类", value: 0 }, { label: "模型算法类", value: 22 },
{ label: "查询验证类", value: 1 }, { label: "查询验证类", value: 23 },
{ label: "流程类", value: 2 }, { label: "流程类", value: 24 },
{ label: "应用类", value: 3 } { label: "应用类", value: 34 }
], ],
zhyyVal: 0, zhyyVal: 22,
jcxxtx: false, jcxxtx: false,
form: { form: {
name: "", name: "",
...@@ -620,7 +622,9 @@ export default { ...@@ -620,7 +622,9 @@ export default {
if (this.activeZh == 1) { if (this.activeZh == 1) {
contentType = this.zhfwQqt; contentType = this.zhfwQqt;
if (this.zhfwQqt == "JSON") { if (this.zhfwQqt == "JSON") {
bodys = this.$refs.zhfwJsonCodes ? this.$refs.zhfwJsonCodes.getCodesVal() : ""; bodys = this.$refs.zhfwJsonCodes
? this.$refs.zhfwJsonCodes.getCodesVal()
: "";
} else if (this.zhfwQqt == "form-data") { } else if (this.zhfwQqt == "form-data") {
let request = this.$refs.fwcs_zhfw_qq_form.getTableData().concat(); let request = this.$refs.fwcs_zhfw_qq_form.getTableData().concat();
request.pop(); request.pop();
...@@ -641,7 +645,9 @@ export default { ...@@ -641,7 +645,9 @@ export default {
content_type: contentType, content_type: contentType,
data_service_type1: this.btnList[this.activeBtn].id, data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: data_service_type2:
this.activeBtn == 1 this.activeBtn == 0
? 12
: this.activeBtn == 1
? this.skfwQqt ? this.skfwQqt
: this.activeBtn == 4 : this.activeBtn == 4
? this.zhyyVal ? this.zhyyVal
...@@ -670,21 +676,31 @@ export default { ...@@ -670,21 +676,31 @@ export default {
this.clickFwcs(); this.clickFwcs();
}, },
nextJcxx() { nextJcxx() {
let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData(); if (
let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData(); this.activeBtn == 0 ||
this.requestRules = 0; (this.activeBtn == 4 && (this.zhyyVal == 22 || this.zhyyVal == 23))
this.responseRules = 0; ) {
this.checkTable(requestData, 0); let requestData = this.$refs.fwcs_sjfw_qqcs.getTableData();
this.checkTable(responseData, 1); let responseData = this.$refs.fwcs_sjfw_fhcs.getTableData();
if (this.requestRules == 0 && this.responseRules == 0) { this.requestRules = 0;
this.request_fields = requestData; this.responseRules = 0;
this.response_fields = responseData; this.checkTable(requestData, 0);
this.checkTable(responseData, 1);
if (this.requestRules == 0 && this.responseRules == 0) {
this.request_fields = requestData;
this.response_fields = responseData;
this.jcxxtx = true;
this.getOrganization();
} else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) {
this.$message.error("请完善返回参数信息中的字段名称");
}
} else {
this.request_fields = [];
this.response_fields = [];
this.jcxxtx = true; this.jcxxtx = true;
this.getOrganization(); this.getOrganization();
} else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) {
this.$message.error("请完善返回参数信息中的字段名称");
} }
}, },
checkTable(arr, rule) { checkTable(arr, rule) {
...@@ -736,7 +752,6 @@ export default { ...@@ -736,7 +752,6 @@ export default {
} else if (this.activeBtn == 4) { } else if (this.activeBtn == 4) {
if (this.activeZh == 1) { if (this.activeZh == 1) {
contentType = this.zhfwQqt; contentType = this.zhfwQqt;
} }
} }
let query = { let query = {
...@@ -748,7 +763,9 @@ export default { ...@@ -748,7 +763,9 @@ export default {
descript: this.form.desc, descript: this.form.desc,
data_service_type1: this.btnList[this.activeBtn].id, data_service_type1: this.btnList[this.activeBtn].id,
data_service_type2: data_service_type2:
this.activeBtn == 1 this.activeBtn == 0
? 12
: this.activeBtn == 1
? this.skfwQqt ? this.skfwQqt
: this.activeBtn == 4 : this.activeBtn == 4
? this.zhyyVal ? this.zhyyVal
...@@ -827,6 +844,7 @@ export default { ...@@ -827,6 +844,7 @@ export default {
if (response.data.success == 1) { if (response.data.success == 1) {
this.btnList = response.data.data; this.btnList = response.data.data;
this.skfwRadios = this.btnList[1].childDomains; this.skfwRadios = this.btnList[1].childDomains;
this.skfwQqt = this.skfwRadios[0].id;
this.activeBtn = 0; this.activeBtn = 0;
} else { } else {
console.log(response.data.errMsg); console.log(response.data.errMsg);
......
This diff is collapsed.
...@@ -24,8 +24,14 @@ ...@@ -24,8 +24,14 @@
</div> </div>
</div> </div>
<div class="type_box_select"> <div class="type_box_select">
<mavon-editor v-model="list_arr" :boxShadow="false" :toolbarsFlag="false" :subfield="subfield" :defaultOpen="preview" :editable="false" v-if="now_service == 0"/> <!-- <mavon-editor v-model="list_arr" :boxShadow="false" :toolbarsFlag="false" :subfield="subfield" :defaultOpen="preview" :editable="false" v-if="now_service == 0"/> -->
<info-list
:list_arr="list_arr"
v-if="now_service == 0"
>
<mavon-editor slot="app_code" v-model="appcode" :boxShadow="false" :toolbarsFlag="false" :subfield="subfield" :defaultOpen="preview" :editable="false"/>
</info-list>
<div v-if="now_service == 1&&now_user == 0"> <div v-if="now_service == 1&&now_user == 0">
<p style="color:#8890a7;">镜像列表:</p> <p style="color:#8890a7;">镜像列表:</p>
<!-- <table-um <!-- <table-um
...@@ -253,7 +259,25 @@ export default { ...@@ -253,7 +259,25 @@ export default {
now_service: 0, now_service: 0,
header_arr: [], header_arr: [],
list_arr: '', list_arr: [
{
title: "应用简介:",
info: "",
},
{
title: "功能简介:",
info: "",
},
{
title: "应用场景:",
info: "",
},
{
title: "应用参数:",
info: "",
type: "solt",
solt_name: "app_code",
}],
appcode: "", appcode: "",
addImageFlag:false addImageFlag:false
}; };
...@@ -280,6 +304,7 @@ export default { ...@@ -280,6 +304,7 @@ export default {
this.get_image_list() this.get_image_list()
this.get_options() this.get_options()
this.get_file_name() this.get_file_name()
this.get_app_code()
}, },
mounted() { mounted() {
this.header_arr = [ this.header_arr = [
...@@ -588,13 +613,24 @@ export default { ...@@ -588,13 +613,24 @@ export default {
getServiceBaseInfo() { getServiceBaseInfo() {
this.$http this.$http
.get("/apaas/hubApi/market/readme/"+this.$route.params.id) .get("/apaas/hubApi/market/app/detail/"+this.$route.params.id)
.then((response) => { .then((response) => {
let data = response.data.data; let data = response.data.data;
this.list_arr = data this.$set(this.list_arr[0], "info", data.yyjj);
this.$set(this.list_arr[1], "info", data.gnjj);
this.$set(this.list_arr[2], "info", data.cjsl);
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
get_app_code(){
this.$http
.get("/apaas/hubApi/market/values/"+this.$route.params.id)
.then((response) => {
let data = response.data.data;
this.appcode = data
})
.catch(function(response) {});
}
}, },
}; };
......
...@@ -463,6 +463,9 @@ export default { ...@@ -463,6 +463,9 @@ export default {
this.getServiceBaseInfo(); this.getServiceBaseInfo();
this.getServiceyxztInfo(); this.getServiceyxztInfo();
this.getImageInfo(); this.getImageInfo();
if(this.$route.query.showstate){
this.now_service = 1
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
......
This diff is collapsed.
...@@ -54,3 +54,27 @@ module.exports.dateStringTransform = function (date) { ...@@ -54,3 +54,27 @@ module.exports.dateStringTransform = function (date) {
return date; return date;
} }
} }
module.exports.downloadFileFormat = function (fileUrl) {
/*
input: /apaas/static/docs/image/images/1234.png
output: 1234.png
*/
if (fileUrl != "") {
return fileUrl.substring(fileUrl.lastIndexOf("/") + 1);
} else {
return "";
}
}
module.exports.numberFormat = function (num, decimals) {
/*
input: 10000 1000
output: 10 1000
*/
if (num > 10000) {
return Math.floor(num / 10000).toFixed(decimals);
} else {
return num;
}
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
}, },
{ {
"name": "服务状态", "name": "服务状态",
"text": "上架中" "text": "审核中"
} }
], ],
"second": [ "second": [
......
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