Commit 49a61809 authored by 赵伟庚's avatar 赵伟庚

Merge 产品线

parents 8f1d8994 de47e7c5
Pipeline #76392 passed with stage
......@@ -52,7 +52,7 @@ pipeline:
- /var/run/docker.sock:/var/run/docker.sock
base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5
repo: gzgajzapi/apaas-ui
version: v3.0.2
version: v3.0.3
channel: alpha
registry: hub.wodcloud.com
secrets:
......@@ -69,8 +69,8 @@ pipeline:
dns: 223.5.5.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock
source: hub.wodcloud.com/gzgajzapi/apaas-ui:v3.0.2-alpha
target: hub.wodcloud.com/gzgajzapi/apaas-ui:v3.0.2
source: hub.wodcloud.com/gzgajzapi/apaas-ui:v3.0.3-alpha
target: hub.wodcloud.com/gzgajzapi/apaas-ui:v3.0.3
registry: hub.wodcloud.com
secrets:
- source: REGISTRY_USER
......
......@@ -12,7 +12,7 @@ module.exports = {
proxyTable: {
"/apaas": {
//target: "https://apaas.cztest.local/apaas/",
target: "https://apaas-jzapi.test.wodcloud.com/apaas/",
target: "https://apaas-jzapi.ysgz.bd-apaas.com/apaas/",
changeOrigin: true,
secure: false,//https证书安全设置为false
pathRewrite: {
......@@ -27,7 +27,7 @@ module.exports = {
}
},
"/vmap": {
target: "https://apaas-jzapi.test.wodcloud.com/vmap/",
target: "https://apaas-jzapi.ysgz.bd-apaas.com/vmap/",
changeOrigin: true,
pathRewrite: {
"^/vmap": ""
......
......@@ -5,16 +5,30 @@
<span>{{ title || "-" }}</span>
<span>更新时间:{{ time || "-" }}</span>
</h3>
<div class="part_content doc_content w-e-text w-e-text-container apaas_scroll">
<div
class="part_content doc_content w-e-text w-e-text-container apaas_scroll"
v-html="content"
ref="docContent"
></div>
>
</div>
<div v-if="doc_type">
<h3 class="doc_title">附件(点击下载):
<span v-if="fileList && fileList.length !== 0">
<span v-for="(e,idx) in fileList" :key="idx" class="file" :class="'file'+idx">
<span @click="download(e)">{{helper.downloadFileFormatNew(e)}}</span>
<br>
</span>
</span>
<span class="noFile" v-else>暂无</span>
</h3>
</div>
</div>
</div>
<div class="part nav_part">
<h3 class="part_title">
<h5 class="part_title">
<span>导航</span>
</h3>
</h5>
<ul class="part_content nav_content apaas_scroll">
<li
v-for="(item, index) in navTree"
......@@ -33,6 +47,8 @@
</template>
<script>
import helper from "@/services/helper"
export default {
props: {
richText: {
......@@ -47,21 +63,35 @@ export default {
type: String,
defalut: "",
},
doc_type: {
type: Boolean,
default: false
},
doc_file: {
type: String,
defalut: "",
}
},
data() {
return {
helper: helper,
content: "",
navTree: [],
curNav: "",
fileList: [],
};
},
watch: {
richText() {
this.translate();
},
doc_file() {
this.getFile()
}
},
mounted() {
this.translate();
this.getFile()
},
methods: {
translate() {
......@@ -120,6 +150,17 @@ export default {
this.curNav = (newTitles[0] && newTitles[0].id) || "";
}
},
getFile() {
if (this.doc_file != "") {
this.fileList = this.doc_file.split(",")
}
},
download(e) {
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", e); // href链接
a.click(); // 自执行点击事件
}, // 下载附件
clickNav(item) {
let target = document.querySelector(`#${item.id}`);
......@@ -164,6 +205,25 @@ export default {
.doc_part {
flex-grow: 1;
}
.doc_title {
font-weight: 700;
padding-left: 32px;
margin-top: 60px;
}
.file {
font-weight: normal;
font-size: 14px;
margin-left: 152px;
cursor: pointer;
color: #515fe7;
}
.file0 {
margin-left: 0;
}
.noFile {
font-weight: normal;
font-size: 14px;
}
.nav_part {
width: 270px;
flex-shrink: 0;
......
......@@ -88,13 +88,8 @@
</el-tooltip>
</td>
<td>
服务领域:
<el-tooltip
class="item"
effect="dark"
:content="baseInfo.fwly"
placement="top-start"
>
业务领域:
<el-tooltip class="item" effect="dark" :content="baseInfo.fwly" placement="top-start">
<span>{{baseInfo.fwly}}</span>
</el-tooltip>
......
......@@ -77,9 +77,9 @@ export default {
watch: {},
methods: {
goUrl(parame) {
if (this.url != "") {
this.$router.push(this.url + "/" + parame);
}
// if (this.url != "") {
// }
this.$router.push('/shop/yysdDetail/' + parame);
},
},
mounted() {},
......
<template>
<div class="com_cell">
<div class="com_cell_up" @click="goUrl(cellData.id)">
<div class="com_cell_up" @click="goUrl(cellData)">
<div class="com_cell_up_img_init">
<img :src="cellData.cover" class="com_cell_up_img" />
</div>
......@@ -69,9 +69,9 @@
<el-col
:span="10"
class="com_other1"
:title="`${cellData.data_service_type1 != 36 ? '务领域:' : '产品领域:'}${cellData.sectors_name}`"
:title="`${cellData.data_service_type1 != 36 ? '务领域:' : '产品领域:'}${cellData.sectors_name}`"
>
<span class="name_title">{{ cellData.data_service_type1 != 36 ? '务领域:' : '产品领域:' }}</span>
<span class="name_title">{{ cellData.data_service_type1 != 36 ? '务领域:' : '产品领域:' }}</span>
{{ cellData.sectors_name }}
</el-col>
<el-col
......@@ -119,9 +119,10 @@ export default {
watch: {},
methods: {
goUrl(parame) {
if (this.url != "") {
this.$router.push(this.url + "/" + parame);
}
// if (this.url != "") {
// this.$router.push(this.url + "/" + parame);
// }
this.$router.push("/shop/sjfwDetail/" + parame.id)
},
getTags(arr) {
if (arr && arr.length != 0) {
......@@ -132,7 +133,6 @@ export default {
}
},
},
mounted() {},
};
</script>
......
......@@ -119,6 +119,7 @@ export default {
methods: {
handleSizeChange(val) {
this.pagination.rowsPerPage = val;
this.pagination.page = 1
this.refreshData();
},
handleCurrentChange(val) {
......
<template>
<div>
<div v-if="urlFilter == 'app'" ref="commodityList" class="commodity_card">
<commodity-card
v-for="item in datas"
:key="item.id"
:cellData="item"
:url="url"
></commodity-card>
</div>
<div v-else class="commodity_cell">
<commodity-cell
v-for="item in datas"
:cellData="item"
:url="url"
:key="item.id"
:urlFilter="urlFilter"
></commodity-cell>
</div>
</div>
</template>
<script>
import CommodityCell from "@/components/service-list/commodity-cell-new.vue";
import CommodityCard from "@/components/service-list/commodity-card-new.vue";
export default {
components: {
"commodity-cell": CommodityCell,
"commodity-card": CommodityCard,
},
props: {
datas: {
type: Array,
default: () => {
[];
},
},
total: {
type: Number,
default: 0,
},
url: { type: String, default: "" },
urlFilter: { type: String, default: "" },
},
data: () => ({
}),
computed: {},
methods: {
},
mounted() {},
watch: {
datas: {
handler(val) {},
},
url: {
handler() {
},
},
},
};
</script>
<style scoped>
.com-pagination {
margin-top: 20px;
font-size: 14px;
padding: 0 5%;
display: flex;
justify-content: space-between;
align-items: center;
}
.com_page_num {
width: 140px;
margin-right: 20px;
display: flex;
justify-content: space-around;
align-items: center;
}
.com_page_num_sel {
width: 50px;
font-size: 14px;
position: relative;
top: 1px;
}
.com_page_item {
display: flex;
justify-content: flex-end;
align-items: center;
}
.commodity_card {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.commodity_card_list {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.commodity_card_item {
margin: 10px 0;
}
.commodity_card_item_in {
margin: 0 auto;
}
.commodity_cell {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
</style>
<style>
.com_page_control .el-button {
border: 0;
}
.com_page_num .el-input__inner {
border: 0;
padding: 0;
}
</style>
\ No newline at end of file
......@@ -182,6 +182,7 @@
>
{{ item.name }}
</div>
<div class="list_total">{{total}}条数据</div>
<!-- <div v-if="urlFilter == 'app'" class="btn_right_check">
<el-checkbox v-model="couldTwice" @change="changeTwice">
支持二次开发
......@@ -197,16 +198,28 @@
"
></div> -->
<!-- the list -->
<div class="shop_list">
<commodity-list
ref="commodity_list"
:datas="lists && lists.length != 0 ? lists : []"
:total="total"
:url="url"
:urlFilter="urlFilter"
:paginationShow="false"
:pageSizeShow="true"
@refresh="getNewList"
></commodity-list>
</div>
<div class="pagination_box">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page"
:page-sizes="[10, 20, 50]"
:page-size="limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
......@@ -242,6 +255,20 @@ export default {
],
activeOptions: [[], [], [], []],
activeChildOptions: [[], [], [], []],
pageOptions: [
{
value: "10",
label: "10",
},
{
value: "20",
label: "20",
},
{
value: "50",
label: "50",
},
],
buttonFilter: [
{
name: "综合排序",
......@@ -286,7 +313,7 @@ export default {
},
],
page: 1,
limit: 20,
limit: 10,
couldTwice: false,
refresh_app_1: false,
refresh_app_2: false,
......@@ -297,11 +324,11 @@ export default {
}),
mounted() {
window.addEventListener("resize", this.judgeHeight);
window.addEventListener("scroll", this.menu, true);
// window.addEventListener("scroll", this.menu, true);
},
destroyed() {
window.removeEventListener("resize", this.judgeHeight);
window.removeEventListener("scroll", this.menu, true);
// window.removeEventListener("scroll", this.menu, true);
},
watch: {
urlFilter: {
......@@ -357,22 +384,31 @@ export default {
},
},
methods: {
menu() {
if (this.isKaiGuan) {
let scroll =
this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight();
if (scroll > -10) {
if (
(this.total != 0 && this.page * this.limit < this.total) ||
this.total == 0
) {
this.page++;
this.getShopList();
}
}
}
},
// menu() {
// if (this.isKaiGuan) {
// let scroll =
// this.getScrollTop() + this.getWindowHeight() - this.getScrollHeight();
// if (scroll > -10) {
// if (
// (this.total != 0 && this.page * this.limit < this.total) ||
// this.total == 0
// ) {
// this.page++;
// this.getShopList();
// }
// }
// }
// },
//滚动条在Y轴上的滚动距离
handleSizeChange(val) {
this.limit = val;
this.page = 1
this.getShopList()
},
handleCurrentChange(val) {
this.page = val;
this.getShopList()
},
getScrollTop() {
var documentScrollTop = 0;
documentScrollTop = document.documentElement.scrollTop;
......@@ -406,10 +442,11 @@ export default {
};
this.$api.serviceShop.getAppList(query).then((response) => {
if (response.data.success == "1") {
this.lists =
this.page == 1
? response.data.data
: this.lists.concat(response.data.data);
// this.lists =
// this.page == 1
// ? response.data.data
// : this.lists.concat(response.data.data);
this.lists = response.data.data
this.total = response.data.total;
this.isKaiGuan = true;
} else {
......@@ -430,10 +467,11 @@ export default {
};
this.$api.serviceShop.getServiceShopList(query).then((response) => {
if (response.data.success == "1") {
this.lists =
this.page == 1
? response.data.data
: this.lists.concat(response.data.data);
// this.lists =
// this.page == 1
// ? response.data.data
// : this.lists.concat(response.data.data);
this.lists = response.data.data
this.total = response.data.total;
this.isKaiGuan = true;
} else {
......@@ -582,7 +620,7 @@ export default {
getNewList(val) {
console.log(val);
this.page = 1;
this.limit = 20;
this.limit = 10;
this.getShopList();
},
clickAll(item) {
......@@ -771,6 +809,11 @@ export default {
margin-left: 15px;
position: relative;
}
.list_total {
position: absolute;
right: 16px;
top: 0;
}
.btn_right_check {
position: absolute;
right: 20px;
......@@ -785,8 +828,7 @@ export default {
.head_flex .input_right .el-input--prefix .el-input__inner {
padding-left: 40px;
}
.head_flex .input_right .el-input__prefix,
.el-input__suffix {
.head_flex .input_right .el-input__prefix{
left: 10px;
}
.head_flex .input_right .el-input--prefix .el-input__inner {
......@@ -810,3 +852,22 @@ export default {
border-color: #626de9;
}
</style>
<style scoped>
.shop_list {
margin-bottom: 40px;
}
.pagination_box {
width: 1008px;
height: 50px;
position: fixed;
bottom: 0;
background-color: #f6f7fb;
text-align: center;
line-height: 50px;
}
.pagination_box /deep/.el-pagination>.btn-prev,
.pagination_box /deep/.el-pagination>.btn-next,
.pagination_box /deep/.el-pagination>.el-pager>li {
background-color: transparent!important;
}
</style>
This diff is collapsed.
<template>
<div class="service_shop_menu">
<ul class="service_shop_menu_list">
<li v-for="(item, index) in menuList" :key="index" @click="active(item)">
<!-- <img
v-if="item.visit_url == actives"
:src="item.active != '' ? require('@/assets/imgs/' + item.active + '.png') : ''"
class="menu_img"
/>
<img v-else :src="require('@/assets/imgs/' + item.default + '.png')" class="menu_img" /> -->
<span
:class="item.id == currentId ? 'menu_item_active':'menu_item'"
>{{ item.name }}</span>
</li>
</ul>
</div>
</template>
<script>
export default {
props: {},
data() {
return {
};
},
computed: {
// getActive() {
// return this.$store.state.serviceShopMenu;
// },
},
watch: {
// getActive(newVal) {
// this.getActiveMenu(newVal);
// },
},
props: {
menuList: {
type: Array,
default: []
},
currentId: {
type: [Number,String],
default: null
}
},
mounted() {
// this.getShopMenu();
// this.$store.commit("serviceShopMenuAct", this.$route.path);
// this.actives = this.$store.state.serviceShopMenu;
},
methods: {
active(val) {
this.$store.commit("serviceShopMenuAct", val.id);
// this.$router.push(val);
if (val.id == 'cloud') {
// this.$router.push(val.url)
}else {
// this.$router.push(`/shop/data_service_list/${val.id}`)
}
this.$emit("changeActive",val)
},
// getActiveMenu(val) {
// this.actives = val;
// console.log(this.actives)
// },
getShopMenu() {
this.$api.workbench.getServiceTypeList().then(response => {
if (response.data.success == 1) {
let arr = response.data.data;
this.menuList = arr;
this.actives = arr[0].id
this.menuList.push(...this.otherlist)
} else {
console.log(response.data.errMsg);
}
});
},
},
};
</script>
<style scoped>
.service_shop_menu {
background-color: #0d1847;
position: fixed;
top: 76px;
left: calc(50% - 600px);
width: 176px;
padding: 8px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
rgba(15, 19, 65, 0.04);
border-radius: 8px;
}
.service_shop_menu_list > li {
box-sizing: border-box;
height: 40px;
padding: 8px 0 0 22px;
margin-bottom: 16px;
font-size: 15px;
line-height: 24px;
cursor: pointer;
}
.service_shop_menu_list > li:nth-last-child(1) {
margin-bottom: 0;
}
.service_shop_menu_list > li:hover,
.service_shop_menu_list > li.current {
background-color: rgba(242, 246, 253, 0.4);
color: #515fe7;
}
.menu_img {
/* width: 24px; */
margin-right: 6px;
}
.menu_item {
position: relative;
font-weight: bold;
font-size: 15px;
color: #96a0c5;
top: -6px;
}
.menu_item_active {
position: relative;
font-weight: bold;
font-size: 15px;
color: #515fe7;
top: -6px;
}
</style>
......@@ -23,6 +23,7 @@
<el-form-item prop="date">
<p class="formname">申请使用期限</p>
<el-date-picker
:disabled="disabledDate"
v-model="formInline.date"
type="daterange"
range-separator="至"
......@@ -48,6 +49,10 @@ export default {
return {};
},
},
disabledDate: {
type: Boolean,
default: false
}
},
components: {},
data() {
......
......@@ -132,17 +132,39 @@
@click="deleteLocal(scope)"
>{{ btn.label }}</em>
<em
class="cur_pointer"
v-else-if="btn.disflag && !btn.select"
:class="btn.disabledRule(scope.row) ? btn.type : 'disabled_btn ' + btn.type"
:style="{
color: btn.label == '删除' ? '#830f53' : '#0f2683',
}"
@click="handleClick(btn.type, scope.row)"
>{{ btn.label }}</em>
<em
class="cur_pointer"
v-else-if="btn.disflag && btn.select"
:class="btn.disabledRule(scope.row) ? btn.type : 'disabled_btn ' + btn.type"
:style="{
color: btn.label == '删除' ? '#830f53' : '#0f2683',
}"
v-show="btn.disabledRule(scope.row)"
@click="handleClick(btn.type, scope.row)"
>{{ btn.label }}</em>
<em
class="cur_pointer"
v-else
:class="btn.type"
:class="btn.disabledRule ? btn.type : 'disabled_btn ' + btn.type"
:style="{
color: btn.label == '删除' ? '#830f53' : '#0f2683',
}"
@click="handleClick(btn.type, scope.row)"
>{{ btn.label }}</em>
<em v-if="btn.line" style="padding:0 20px;color:#edf0ff">{{ btn.line }}</em>
<em v-if="btn.line && !btn.select" style="padding:0 20px;color:#edf0ff">{{ btn.line }}</em>
<em v-if="btn.line && btn.select && btn.disabledRule(scope.row)" style="padding:0 20px;color:#edf0ff">{{ btn.line }}</em>
</b>
</span>
<!--href 链接-->
......@@ -835,6 +857,10 @@ em {
.cur_pointer {
cursor: pointer;
}
.disabled_btn {
cursor: not-allowed;
color: #999!important;
}
.ces-table .el-table--mini td,
.ces-table .el-table--mini th {
padding: 11px 0 !important;
......
......@@ -4,7 +4,7 @@
<div class="legend">
<div class="legend_title">拓扑图图例</div>
<div class="legend_inner">
<div class="legend_in_tit">服务类型</div>
<div class="legend_in_tit">服务分类</div>
<div id="nodes" ref="legendNodes" class="legend_nodes"></div>
<div class="legend_in_tit">调用状态</div>
<div id="edges" ref="legendEdges" class="legend_edges"></div>
......
<template>
<section class="wangeditor_class">
<div ref="toolbar" class="toolbar"></div>
<div>
<el-upload
class="upload-file"
action="/apaas/static/image/upload"
:on-success="uploadSuccess"
:on-remove="handleRemove"
:data="{directory: 'file' }"
:limit="5"
:file-list="fileArray">
<el-button ref="upload_file" id="upload_file" size="small" type="primary" v-show="false">点击上传</el-button>
</el-upload>
</div>
</section>
</template>
<script>
import E from "wangeditor";
const { BtnMenu } = E
//编辑器自定义按钮
class uploadMenu extends BtnMenu {
constructor(editor) {
const $elem = E.$(
`<div class="w-e-menu" data-title="文档上传">
<i class="el-icon-upload2"></i>
</div>`
)
super($elem, editor)
}
clickHandler() {
wangEuploadFile();
}
tryChangeActive() {
this.active()
}
}
export default {
name: "editoritem",
data() {
return {
// uploadPath,
uploadMenu,
editor: null,
info_: null
info_: null,
};
},
model: {
......@@ -31,6 +64,10 @@ export default {
type: Boolean,
default: false
},
fileArray: {
type: Array,
default: () => []
}
},
watch: {
isClear(val) {
......@@ -59,6 +96,7 @@ export default {
mounted() {
this.seteditor();
this.editor.txt.html(this.value);
window.wangEuploadFile = this.wangEuploadFile
},
methods: {
seteditor() {
......@@ -109,9 +147,45 @@ export default {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
this.editor.menus.extend('uploadMenusKey',uploadMenu)
this.editor.config.menus.push('uploadMenusKey')
// 创建富文本编辑器
this.editor.create();
},
wangEuploadFile() {
// this.$refs.upload_file.handleClick();
document.getElementById('upload_file').click();
},
uploadSuccess(response, file, fileList) {
if (response.success == 1) {
this.fileArray.push({
url: response.data,
name: file.name,
});
this.$emit("getNewList", this.fileArray);
}
},
handleRemove(file, fileList) {
let url = file.url;
let detection = true;
if (url) detection = url.indexOf("blob") != -1;
if (detection) {
this.fileArray.forEach((item, i, arr) => {
if (item.url === file.url) {
this.fileArray.splice(i, 1);
}
});
} else {
this.fileArray.forEach((item, i, arr) => {
if (item.url === file.url) {
this.fileArray.splice(i, 1);
}
});
}
this.$emit("getNewList", this.fileArray);
},
}
};
</script>
......@@ -142,4 +216,7 @@ export default {
border: none!important;
height: calc(100% - 80px)!important;
}
.upload-file {
width: 50%;
}
</style>
......@@ -63,8 +63,8 @@ export default {
filtdata: [],
filter_name_arr: {
organizations: "数据来源机构",
serviceDomain: "数据领域",
serviceTypeInfo: "基础支撑服务类型",
serviceDomain: "业务领域",
serviceTypeInfo: "服务类型",
},
select_able_arr: [],
selected_arr: [],
......@@ -166,22 +166,22 @@ export default {
var temp = 21
this.filter_name_arr = {
organizations: "服务来源组织",
serviceDomain: "务领域",
serviceDomain: "务领域",
serviceTypeInfo: "服务类型",
}
}else if(this.$route.query.ad_type == 'hotdata'){
var temp = 5
this.filter_name_arr = {
organizations: "数据来源机构",
serviceDomain: "数据领域",
serviceTypeInfo: "基础支撑服务类型",
serviceDomain: "业务领域",
serviceTypeInfo: "服务类型",
}
}else{
var temp = 6
this.filter_name_arr = {
organizations: "服务来源组织",
serviceDomain: "务领域",
serviceTypeInfo: "基础地图服务类型",
serviceDomain: "务领域",
serviceTypeInfo: "服务类型",
}
}
this.$http
......
......@@ -3,6 +3,7 @@
<info-list :list_arr="module_arr">
<apply-form
:formInline="formInline"
:disabledDate="disabledDate"
ref="apply_info"
slot="apply_info"
></apply-form>
......@@ -125,7 +126,8 @@ export default {
val: "mg"
}
],
temp_sub_arr: []
temp_sub_arr: [],
disabledDate: false,
};
},
watch: {},
......@@ -197,6 +199,15 @@ export default {
let data = response.data.data;
if (response.data.success && data) {
//服务
if (data.interface_typ == 2 || data.interface_typ == 3) {
this.disabledDate = true
let yyyy = new Date().getFullYear()
let mm = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
let dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
let date_now = yyyy + '-' + mm + '-' + dd
this.formInline.date = ["","2099-12-31"]
this.formInline.date[0] = date_now
}
this.post_arr = [data];
this.post_arr[0].service_id = parseInt(service_data.service_id);
this.post_arr[0].spec_id = parseInt(service_data.spec_id);
......
......@@ -12,7 +12,7 @@
</template>
<script>
import ServiceShopMenu from "@/components/service-list/service_shop_menu-new";
import ServiceShopMenu from "@/components/service-list/service_shop_menu_new";
import ShopCloud from "@/components/shop-cloud/shop-cloud-new";
export default {
components: {
......
<template>
<div class="shop_list_cont">
<el-container>
<el-aside width="176px">
<service-shop-menu @changeActive="changeActive" :menuList="menuList" :currentId="currentId"></service-shop-menu>
</el-aside>
<el-main class="main_init">
<!-- <service-list
:filterNames="filterNames"
:name="name"
:url="url"
:urlFilter="urlFilter"
></service-list> -->
<service-list
:filterNames="filterNames"
:name="name"
:urlFilter="urlFilter"
v-show="showFlag"
></service-list>
<shop-cloud v-show="!showFlag" name="云资源服务"></shop-cloud>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service-list/service_shop_menu_new";
import ServiceList from "@/components/service-list/service_list_new";
import BlockRadius from "@/components/general/block-radius";
import ShopCloud from "@/components/shop-cloud/shop-cloud-new";
export default {
components: {
ServiceShopMenu,
ServiceList,
BlockRadius,
ShopCloud
},
data: () => ({
urlFilter: "",
url: "",
name: "",
filterNames: [],
currentId: null,
menuList: [],
otherlist: [
{
id: 'app',
name: "应用商店",
},
{
id: "cloud",
name: "云资源服务",
}
],
showFlag: true
}),
mounted() {
// this.getVal(this.$route.query);
this.getShopMenu()
},
methods: {
getVal(val) {
console.log(val,'========')
if (val.indexOf('app') > -1) {
let obj = {
id: 'app',
name: "应用商店",
}
this.changeActive(obj)
}else if (val.indexOf('cloud') > -1) {
let obj = {
id: "cloud",
name: "云资源服务",
}
this.changeActive(obj)
}else {
this.changeActive(this.menuList[0])
}
},
getShopMenu() {
let obj = {}
this.$api.workbench.getServiceTypeList().then(response => {
if (response.data.success == 1) {
let arr = response.data.data;
obj = arr[0] || {}
this.menuList = arr;
this.menuList.push(...this.otherlist)
if (this.$route.params.id) {
this.currentId = this.$route.params.id
if (this.$route.params.id == 'app') {
this.showFlag = true
this.name = '应用商店'
this.urlFilter = this.$route.params.id.toString()
this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
}else if(this.$route.params.id == 'cloud') {
this.showFlag = false
}
}else {
this.currentId = obj.id
this.name = obj.name
this.urlFilter = obj.id.toString()
if (obj.id != 'app' && obj.id != 'cloud') {
this.filterNames = ["服务类型", "业务领域", "服务来源组织"]
}else {
if (obj.id == 'app') {
this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
}
}
}
} else {
console.log(response.data.errMsg);
}
});
},
changeActive(item) {
this.currentId = item.id
if (item.id !='cloud') {
if (item.id != 'app') {
this.$router.push('/shop/data_service_list')
}
this.showFlag = true
this.name = item.name
this.urlFilter = item.id.toString()
if (item.id != 'app') {
this.filterNames = ["服务类型", "业务领域", "服务来源组织"]
}else {
this.filterNames = ["应用类型", "应用领域", "应用来源机构"];
}
}else {
this.showFlag = false
}
console.log(this.showFlag)
}
},
watch: {
"$route.path": {
handler(val) {
this.getVal(val);
},
},
},
};
</script>
<style lang="less" scoped>
.default {
height: calc(100vh - 180px);
display: flex;
align-items: center;
justify-content: center;
margin: 0;
.default_img {
width: 1282px;
height: 629px;
.default_title {
color: #264dd9;
font-size: 44px;
font-weight: bold;
margin-bottom: 30px;
}
.default_msg {
color: #58617a;
font-size: 24px;
line-height: 44px;
}
}
}
</style>
<style scoped>
.default_img {
background: url("~@/assets/imgs/img_default_quesheng.png") no-repeat center
center;
}
.shop_list_cont {
width: 1200px;
margin: 0 auto;
position: relative;
}
.main_init {
padding: 16px 0 16px 16px;
}
</style>
\ No newline at end of file
......@@ -3,8 +3,8 @@
<div class="apass_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item to="/shop">服务超市</el-breadcrumb-item>
<el-breadcrumb-item to="/shop/data_service_list/5">
基础支撑服务
<el-breadcrumb-item to="/shop/data_service_list">
{{ typeName }}
</el-breadcrumb-item>
<el-breadcrumb-item>服务详情信息</el-breadcrumb-item>
</el-breadcrumb>
......@@ -36,6 +36,7 @@ export default {
detailData: [],
providerData: null,
commentsData: null,
typeName: ""
}),
computed: {
id() {
......@@ -59,7 +60,8 @@ export default {
service_id: this.id,
app_id: 0,
name: datas.name,
// type: "",
type:datas.data_service_type2_name=="流程类"?"workflow":"",
workflows_id:datas.data_service_type2_name=="流程类"?datas.workflows_id:"",
openness: datas.openness,
view_count: datas.view_count,
apply_count: datas.apply_count,
......@@ -185,6 +187,11 @@ export default {
},
},
];
this.typeName = datas.data_service_type1_name
let template = [2,3,4,5,8,9,10,11]
if (template.indexOf(datas.serv_template) > -1 ) {
this.detailData = this.detailData.slice(0,1)
}
let arr1 = datas.serviceRequestSpcs.spcs_type_1 || [];
let arr2 = datas.serviceRequestSpcs.spcs_type_2 || [];
let arr = arr1.concat(arr2);
......
......@@ -14,8 +14,8 @@
</div>
<div class="editpage">
<wang-e v-model="content"></wang-e>
<div class="apaas_button">
<wang-e v-model="content" @getNewList="getNewList" :fileArray="fileArray"></wang-e>
<div class="apaas_button pt_max">
<el-button type="defalut" size="mini" @click="cancelAction">
取消
</el-button>
......@@ -29,6 +29,7 @@
<script>
import wangE from "@/components/wangE";
import helper from "@/services/helper.js";
export default {
components: {
wangE,
......@@ -37,6 +38,8 @@ export default {
return {
title: "",
content: "",
fileList: [],
fileArray: []
};
},
computed: {
......@@ -56,6 +59,16 @@ export default {
if (data.success === 1) {
this.title = data.data.title;
this.content = data.data.content;
let arr = [];
if (data.data.doc_file && data.data.doc_file != "") {
arr = data.data.doc_file.split(",")
arr.forEach(e => {
this.fileArray.push({
name: helper.downloadFileFormatNew(e),
url: e
})
})
}
}
});
}
......@@ -65,10 +78,18 @@ export default {
this.$router.push("/technical_support/doc_manage");
},
submitAction() {
let arr = [];
if (this.fileList && this.fileList.length > 0 ) {
this.fileList.forEach(e => {
arr.push(e.url)
})
}
let doc_file = arr.join(",") || ""
this.$http
.put("/apaas/support/document/put", {
id: this.id,
content: this.content,
doc_file: doc_file,
})
.then(({ data }) => {
if (data.success === 1) {
......@@ -83,6 +104,9 @@ export default {
this.$message.error("保存失败");
});
},
getNewList(fileList) {
this.fileList = fileList;
},
},
};
</script>
......@@ -119,4 +143,10 @@ export default {
.apaas_button .el-button + .el-button {
margin-right: 30px;
}
.editpage /deep/ .wangeditor_class {
height: calc(100% - 200px);
}
.pt_max {
padding-top: 130px;
}
</style>
......@@ -19,6 +19,8 @@
:title="title"
:time="update_time"
:rich-text="content"
:doc_type="true"
:doc_file="doc_file"
></doc-width-nav>
</div>
</template>
......@@ -42,6 +44,7 @@ export default {
title: "",
update_time: "",
content: "",
doc_file: ""
};
},
computed: {
......@@ -85,6 +88,7 @@ export default {
if (data.data.content) {
this.content = data.data.content;
}
this.doc_file = data.data.doc_file || ""
}
});
},
......
......@@ -57,7 +57,7 @@
></el-input>
</el-form-item>
<el-form-item prop="area">
<p class="formname">务领域:</p>
<p class="formname">务领域:</p>
<el-select
v-model="form.area"
placeholder="请选择"
......@@ -294,7 +294,7 @@ export default {
}
],
area: [
{ required: true, message: "请选择务领域", trigger: "change" }
{ required: true, message: "请选择务领域", trigger: "change" }
],
origin: [
{ required: true, message: "请选择所属组织", trigger: "blur" }
......@@ -322,7 +322,7 @@ export default {
trigger: "blur"
}
],
area: [{ required: true, message: "请选择务领域", trigger: "blur" }],
area: [{ required: true, message: "请选择务领域", trigger: "blur" }],
origin: [
{ required: true, message: "请选择所属组织", trigger: "blur" }
],
......
......@@ -104,6 +104,12 @@
:readOnly="true"
></v-apaas-code>
</info-list>
<!-- <info-list v-else-if="now_service == 2">
<process-card
:data="use_approval_arr"
slot="approval"
></process-card>
</info-list> -->
<info-list
v-else
:list_arr="
......@@ -113,9 +119,18 @@
: list_arr
: now_service == 1
? servicead_arr
: now_service == 2
? jkwd_arr
: apply_arr
"
>
<table-um
:stripe="true"
:headers="jkwd_headers"
:datas="jkwd_datas"
@download="download"
slot="wd_table"
></table-um>
<table-um
v-if="res_table_arr.length"
:headers="res_header_arr"
......@@ -159,6 +174,7 @@ import infoList from "@/components/infoList";
import tableUm from "@/components/table/table-um";
import processCard from "@/components/process-card";
import codes from "@/components/general/codes";
import helper from "@/services/helper";
export default {
props: {},
components: {
......@@ -527,7 +543,7 @@ export default {
],
},
],
service_arr: ["服务基本信息", "接口详细信息", "申请审批信息"],
service_arr: ["服务基本信息", "接口详细信息","接口文档", "申请审批信息"],
data_service_type1: "",
service_header_arr: {
id: "",
......@@ -536,7 +552,7 @@ export default {
name: "",
first: [
{
name: "服务类型",
name: "服务分类",
text: "",
},
{
......@@ -568,7 +584,7 @@ export default {
info: "",
},
{
title: "务领域:",
title: "务领域:",
info: "",
},
{
......@@ -662,6 +678,17 @@ export default {
solt_name: "res_code",
},
],
jkwd_arr: [
{
title: "",
info: "",
type: "solt",
solt_name: "wd_table",
},
],
jkwd_headers: [],
jkwd_datas: [],
clickFlag: false,
apply_arr: [
{
title: "申请信息",
......@@ -757,6 +784,14 @@ export default {
},
mounted() {},
methods: {
download(row) {
if (this.clickFlag) {
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", row.url); // href链接
a.click(); // 自执行点击事件
}
}, // 下载接口文档
change_port(val) {
this.port_options.forEach((e) => {
if (e.value == val) {
......@@ -781,6 +816,37 @@ export default {
return;
}
let data = response.data.data;
// 审批通过才可以下载接口文档,待审批、审批中、审批不通过不可以下载
if (data.service_apply_info.approval_status == 3) {
this.clickFlag = true
}else {
this.clickFlag = false
}
if (data.doc_file != '') {
this.jkwd_datas.push({
wd_name: helper.downloadFileFormat(data.doc_file),
url: data.doc_file
})
}
this.jkwd_headers = [
{
prop: "wd_name",
label: "文档名称",
align: "left",
},
{
label: "操作",
type: "Button",
align: "center",
btnList: [
{
type: "download",
label: "下载",
disabledRule: this.clickFlag == true
},
],
},
],
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(
......@@ -1134,7 +1200,7 @@ export default {
this.servicead_arr.unshift({
title: "Authorization:",
info: data.service_apply_info.apaas_token,
});
})
}
console.log(data.service_apply_info);
......
......@@ -206,11 +206,11 @@ export default {
name: "",
first: [
{
name: "服务类型",
name: "服务分类",
text: ""
},
{
name: "务领域",
name: "务领域",
text: ""
},
{
......
......@@ -227,7 +227,7 @@ export default {
callback: this.detailItem,
},
{
label: "所属领域",
label: "业务领域",
prop: "sectors_name",
align: "center",
},
......@@ -251,7 +251,7 @@ export default {
align: "center",
},
{
label: "所属类型",
label: "服务分类",
prop: "data_service_type1_name",
align: "center",
},
......@@ -351,7 +351,7 @@ export default {
callback: this.detailItem,
},
{
label: "所属领域",
label: "业务领域",
prop: "sectors_name",
align: "center",
},
......@@ -378,7 +378,7 @@ export default {
align: "center",
},
{
label: "所属类型",
label: "服务分类",
prop: "data_service_type1_name",
align: "center",
},
......@@ -611,7 +611,7 @@ export default {
callback: this.detailItem,
},
{
label: "所属领域",
label: "业务领域",
prop: "sectors_name",
align: "center",
},
......@@ -643,7 +643,7 @@ export default {
align: "center",
},
{
label: "所属类型",
label: "服务分类",
prop: "data_service_type1_name",
align: "center",
},
......@@ -711,7 +711,7 @@ export default {
prop: "name",
},
{
label: "所属领域",
label: "业务领域",
prop: "sectors_name",
align: "center",
},
......@@ -750,7 +750,7 @@ export default {
align: "center",
},
{
label: "所属类型",
label: "服务分类",
prop: "data_service_type1_name",
align: "center",
},
......@@ -1014,7 +1014,7 @@ export default {
callback: this.detailItem,
},
{
label: "所属领域",
label: "业务领域",
prop: "sectors_name",
align: "center",
},
......@@ -1046,7 +1046,7 @@ export default {
align: "center",
},
{
label: "所属类型",
label: "服务分类",
prop: "data_service_type1_name",
align: "center",
},
......@@ -1126,7 +1126,7 @@ export default {
prop: "name",
},
{
label: "所属领域",
label: "业务领域",
prop: "sectors_name",
align: "center",
},
......@@ -1165,7 +1165,7 @@ export default {
align: "center",
},
{
label: "所属类型",
label: "服务分类",
prop: "data_service_type1_name",
align: "center",
},
......
......@@ -24,7 +24,7 @@
:style="
now_service == index ? { borderBottom: '4px solid #f5ab4c' } : {}
"
v-if="index < 3 || in_origin_ser"
v-if="index < 4 || in_origin_ser"
>
{{ item }}
</div>
......@@ -288,13 +288,19 @@
></list-pagination>
</div>
<div v-show="now_service == 3">
<p style="color: #8890a7">服务规格:</p>
<table-um
:stripe="true"
:headers="jkwd_headers"
:datas="jkwd_datas"
@download="download"
></table-um>
<!-- <p style="color: #8890a7">服务规格:</p>
<table-um
:stripe="true"
:headers="service_size_arr"
:datas="service_size_data"
></table-um>
<!-- <p style="color: #8890a7;">购买方式:</p>
<p style="color: #8890a7;">购买方式:</p>
<p style="color: #242c43;margin:10px 0px;">
{{
buy_type == 1
......@@ -303,7 +309,7 @@
? "按年购买"
: "按月购买&按年购买"
}}
</p> -->
</p>
<div
class="editbtn"
v-if="now_user == 1"
......@@ -330,7 +336,7 @@
:datas="service_size_data"
@changeTable="now_size_data"
></table-um>
<!-- <p
<p
v-if="now_user == 1 && sizeset_flag"
style="color: #8890a7;margin:10px 0;"
>
......@@ -347,11 +353,11 @@
:type="buy_style.indexOf(2) !== -1 ? 'primary' : ''"
@click="change_buy(2)"
>按年购买</el-button
> -->
>
<div class="savebtn" v-if="now_user == 1 && sizeset_flag">
<el-button @click="change_service_size">保存</el-button>
<el-button @click="sizeset_flag = false">取消</el-button>
</div>
</div> -->
</div>
<div v-show="now_service == 4">
<info-list :list_arr="trans_log_arr">
......@@ -468,6 +474,26 @@ export default {
times: 0,
month: 0,
},
jkwd_headers: [
{
prop: "wd_name",
label: "文档名称",
align: "left",
},
{
label: "操作",
type: "Button",
align: "center",
btnList: [
{
type: "download",
label: "下载",
disabledRule: true
},
],
},
],
jkwd_datas: [],
trans_log_arr: [
{
title: "服务交易概览",
......@@ -739,18 +765,19 @@ export default {
workflows_id: "", //判断是否是流程服务
sizeset_flag: false, //规格设置是否显示
service_arr: [
["服务基本信息", "接口详细信息", "服务运行状态"],
["服务基本信息", "接口详细信息", "服务运行状态","接口文档"],
[
"服务基本信息",
"接口详细信息",
"服务运行状态",
// "服务计费规则",
// "服务交易记录",
"接口文档"
],
[
"服务基本信息",
"接口详细信息",
"服务运行状态",
"服务运行状态","接口文档"
// "服务规格",
// "服务交易记录",
],
......@@ -764,7 +791,7 @@ export default {
name: "",
first: [
{
name: "服务类型",
name: "服务分类",
text: "",
},
{
......@@ -1189,7 +1216,7 @@ export default {
info: "",
},
{
title: "务领域:",
title: "务领域:",
info: "",
},
{
......@@ -1272,6 +1299,14 @@ export default {
},
mounted() {},
methods: {
download(row) {
console.log(row.url)
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", row.url); // href链接
a.click(); // 自执行点击事件
}, // 下载接口文档
change_port(val) {
this.port_options.forEach((e) => {
if (e.value == val) {
......@@ -1665,6 +1700,12 @@ export default {
});
this.service_size_data = temp;
this.size_arr_down = temp;
if (data.doc_file != '') {
this.jkwd_datas.push({
wd_name: helper.downloadFileFormat(data.doc_file),
url: data.doc_file
})
}
} else {
this.$message({
message: response.data.errMsg,
......
......@@ -23,7 +23,7 @@
<el-input type="textarea" v-model="form.desc"></el-input>
</el-form-item>
<el-form-item prop="area">
<p class="formname">务领域:</p>
<p class="formname">务领域:</p>
<el-select v-model="form.area" placeholder="请选择">
<el-option
v-for="item in area_arr"
......@@ -209,7 +209,7 @@ export default {
{ max: 200, message: '长度小于200个字符', trigger: 'blur' }
],
area:[
{ required: true, message: '请选择务领域', trigger: 'change' },
{ required: true, message: '请选择务领域', trigger: 'change' },
],
resource:[
{ required: true, message: '请选择开放程度', trigger: 'change' },
......
This diff is collapsed.
<template>
<div class="edit_page">
<div class="apass_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item to="/productType">分类管理</el-breadcrumb-item>
<el-breadcrumb-item to="/productType/classList">产品分类管理</el-breadcrumb-item>
<el-breadcrumb-item>{{isAdd? '新增' : '编辑'}}</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container_box">
<el-form
ref="form"
class="detai_form"
:rules="rules"
:model="form"
>
<el-form-item label="" prop="typeCode">
<div>分类类别:</div>
<el-select
v-model="form.typeCode"
placeholder="请选择"
>
<el-option
v-for="(e, idx) in classTypes"
:key="idx"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="name">
<div>分类名称:</div>
<el-input
v-model="form.name"
placeholder="请输入分类名称"
></el-input>
</el-form-item>
<el-form-item label="" prop="servTemplate">
<div>服务模版:</div>
<el-select
v-model="form.servTemplate"
placeholder="请选择"
>
<el-option
v-for="(e, idx) in serviceTemplates"
:key="idx"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="pId" v-if="form.typeCode == 'service_type_2'">
<div>上级分类名称:</div>
<el-select
v-model="form.pId"
placeholder="请选择"
>
<el-option
v-for="(e, idx) in pClassNames"
:key="idx"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item prop="describe" label="">
<div>描述:</div>
<el-input
v-model="form.describe"
type="textarea"
placeholder="请输入分类描述"
rows="5"
/>
</el-form-item>
<el-form-item label="" prop="state">
<div>状态:</div>
<el-select
v-model="form.state"
placeholder="请选择"
>
<el-option
v-for="(e, idx) in stateTypes"
:key="idx"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div class="apaas_button">
<el-button type="primary" @click="onSubmit('form')" class="right"
>保存</el-button
>
<el-button class="right" @click="backPage()">取消</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
form: {
typeCode: "", // 分类类别 0-服务分类 1-服务类型
name: "", // 分类名称
servTemplate: "", // 服务模版
pId: "", // 上级分类名称
describe: "", // 描述
state: 1 // 状态 0-停用 1-启用
},
rules: {
typeCode: [
{ required: true, message: "请选择分类类别", trigger: "change" },
],
name: [
{ required: true, message: "请输入分类名称", trigger: "blur" },
],
servTemplate: [
{ required: true, message: "请选择服务模版", trigger: "change" },
],
pId: [
{ required: true, message: "请选择上级分类名称", trigger: "change" },
],
describe: [
],
state:[
{ required: true, message: "请选择状态", trigger: "change" },
]
}, // 表单校验
classTypes: [
{
label: "服务分类",
value: 'service_type_1'
},
{
label: "服务类型",
value: 'service_type_2'
},
], // 分类类别
serviceTemplates:[
{
label: "数据服务",
value: 1
},
{
label: "时空服务-地图服务",
value: 2
},
{
label: "时空服务-要素服务",
value: 3
},
{
label: "时空服务-WFS",
value: 4
},
{
label: "时空服务-WMS",
value: 5
},
{
label: "视频服务",
value: 6
},
{
label: "融合服务",
value: 7
},
{
label: "综合服务-模型算法类",
value: 8
},
{
label: "综合服务-查询验证类",
value: 9
},
{
label: "综合服务-流程类",
value: 10
},
{
label: "综合服务-应用类",
value: 11
},
], // 模版
pClassNames: [], // 上级分类
stateTypes: [
{
label: "启用",
value: 1
},
{
label: "禁用",
value: 0
},
] // 状态
}
},
computed: {
isAdd() {
return this.$route.path.indexOf('add') > -1
} // true为新增false为编辑
},
created() {
if (!this.isAdd) {
let id = this.$route.params.id
this.getDetail(id) // 获取详情
}
this.getClassTypes() // 获取全部服务分类
},
methods: {
getDetail(id) {
this.$api.productType.getClassDetail(id).then(res => {
if (res.data.success == 1) {
let data = res.data.data
this.form = {
id: data.id,
describe: data.describe,
name: data.name,
servTemplate: data.serv_template,
pId: data.type_code == 'service_type_1' ? '' : data.p_id,
state: data.state,
typeCode: data.type_code
}
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 获取详情
getClassTypes() {
this.$api.productType.getClassTypes().then(res => {
if (res.data.success == 1) {
let data = res.data.data || []
data.forEach(e => {
this.pClassNames.push({
label: e.className,
value: e.id
})
})
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 获取全部服务分类
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.isAdd) {
this.add_class();
}else {
this.edit_class()
}
} else {
console.log("error submit!!");
return false;
}
});
}, // 保存按钮
edit_class() {
if (this.form.typeCode == 'service_type_1') {
this.form.pId = 0
}
this.$api.productType.editClass(this.form).then(res => {
if (res.data.success == 1) {
this.$message.success("编辑成功")
this.backPage()
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 编辑
add_class() {
if (this.form.typeCode == 'service_type_1') {
this.form.pId = 0
}
this.$api.productType.addNewClass(this.form).then(res => {
if (res.data.success == 1) {
this.$message.success("新增成功")
this.backPage()
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 新增
backPage() {
this.$router.back(-1);
}, // 取消
}
}
</script>
<style lang="less" scoped>
.edit_page {
height: 100%;
padding: 0 20px;
.container_box {
height: calc(100% - 70px);
background-color: #fff;
border-radius: 10px;
padding: 15px 20px;
.detai_form {
width: 60%;
.el-select {
width: 100%;
}
}
.right {
float: right;
margin-left: 20px;
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<div class="edit_page">
<div class="apass_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item to="/productType">分类管理</el-breadcrumb-item>
<el-breadcrumb-item to="/productType/domainList">领域分类</el-breadcrumb-item>
<el-breadcrumb-item>{{isAdd? '新增' : '编辑'}}</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container_box">
<el-form
ref="form"
class="detai_form"
:rules="rules"
:model="form"
>
<el-form-item label="" prop="name">
<div>分类名称:</div>
<el-input
v-model="form.name"
placeholder="请输入分类名称"
></el-input>
</el-form-item>
<el-form-item prop="describe" label="">
<div>描述:</div>
<el-input
v-model="form.describe"
type="textarea"
placeholder="请输入分类描述"
rows="5"
/>
</el-form-item>
<el-form-item label="" prop="state">
<div>状态:</div>
<el-select
v-model="form.state"
placeholder="请选择"
>
<el-option
v-for="(e, idx) in stateTypes"
:key="idx"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div class="apaas_button">
<el-button type="primary" @click="onSubmit('form')" class="right"
>保存</el-button
>
<el-button class="right" @click="backPage()">取消</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
form: {
name: "", // 领域名称
describe: "", // 描述
state: 1 // 状态
},
rules: {
name: [
{ required: true, message: "请输入分类名称", trigger: "blur" },
],
describe: [
],
state:[
{ required: true, message: "请选择状态", trigger: "change" },
]
},
stateTypes: [
{
label: "启用",
value: 1
},
{
label: "停用",
value: 0
},
]
}
},
computed: {
isAdd() {
return this.$route.path.indexOf('add') > -1
}
},
created() {
if (!this.isAdd) {
let id = this.$route.params.id
this.getDetail(id)
}
},
methods: {
getDetail(id) {
this.$api.productType.getDomainDetail(id).then(res => {
if (res.data.success == 1) {
let data = res.data.data
this.form = {
id: data.id,
describe: data.describe,
name: data.name,
state: data.state,
}
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 获取详情
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.isAdd) {
this.add_domain();
}else {
this.edit_domain()
}
} else {
console.log("error submit!!");
return false;
}
});
}, // 保存按钮
edit_domain() {
this.$api.productType.editDomain(this.form).then(res => {
if (res.data.success == 1) {
this.$message.success("编辑成功")
this.backPage()
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 编辑
add_domain() {
this.$api.productType.addNewDomain(this.form).then(res => {
if (res.data.success == 1) {
this.$message.success("新增成功")
this.backPage()
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 新增
backPage() {
this.$router.back(-1);
}, // 取消
}
}
</script>
<style lang="less" scoped>
.edit_page {
height: 100%;
padding: 0 20px;
.container_box {
height: calc(100% - 70px);
background-color: #fff;
border-radius: 10px;
padding: 15px 20px;
.detai_form {
width: 60%;
.el-select {
width: 100%;
}
}
.right {
float: right;
margin-left: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="service_management_list">
<div class="apass_breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="`/message_new`">分类管理</el-breadcrumb-item>
<el-breadcrumb-item>领域分类</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container_box">
<div class="search_box">
<span>分类名称:</span>
<el-input
v-model="filter.search"
prefix-icon="el-icon-search"
placeholder="请输入关键字"
style="width:240px;"
></el-input>
<span style="margin-left: 24px">状态:</span>
<el-select
v-model="filter.state"
placeholder="请选择"
>
<el-option
v-for="(e, idx) in stateTypes"
:key="idx"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
<div class="searchBtn" @click="searchAction">查询</div>
<div class="searchBtn resBtn" @click="resChange">重置</div>
</div>
<div class="btn_box">
<div @click="addClass">
新建分类
</div>
</div>
<div class="list_box">
<table-um
:headers="listHeader"
:datas="listData"
:stripe="true"
@changeState="changeRowState"
@edit="editRow"
@del="delRow"
></table-um>
<list-pagination
class="pagination_box"
:total="listTotal"
:page-sizes="[10,20,50]"
:page-size="filter.size"
:current-page="filter.page"
@size-change="changePageSize"
@current-change="changeCurrentPage"
></list-pagination>
</div>
</div>
<el-dialog
title="提示"
:visible.sync="delDialogFlag"
width="400px"
>
<span class="form_box">
删除后无法恢复,请确认是否删除
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="delDialogFlag = false">取 消</el-button>
<el-button type="primary" @click="confirmDel">确 认</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import tableUm from "@/components/table/table-um";
import ListPagination from "@/components/comments-pagination";
import helper from "@/services/helper";
export default {
components: {
tableUm,
ListPagination,
},
data: () => ({
helper: helper,
stateTypes: [
{
label: "禁用",
value: 0
},
{
label: "启用",
value: 1
},
],
filter: {
search: "",
size: 10,
page: 1,
state: ""
},
listTotal: 0,
listHeader: [
{
label: "分类名称",
prop: "name",
align: "center",
width: 240,
},
{
label: "描述",
prop: "desc",
align: "center",
},
{
label: "状态",
prop: "stateName",
align: "center",
width: 120,
},
{
label: "更新时间",
prop: "updateTime",
width: 220,
align: "center"
},
{
label: "操作",
type: "Button",
align: "center",
width: 240,
btnList: [
{
label: "编辑",
type: 'edit',
disflag: true,
disabledRule(item) {
return item.state != 1;
},
line: '|'
},
{
label: "启用",
type: 'changeState',
select: true,
disflag: true,
disabledRule(item) {
return item.state != 1;
},
line: '|'
},
{
label: "禁用",
type: 'changeState',
select: true,
disflag: true,
disabledRule(item) {
return item.state == 1;
},
line: '|'
},
{
label: "删除",
type: 'del',
disflag: true,
disabledRule(item) {
return item.state != 1
},
},
],
},
],
listData: [],
delDialogFlag: false,
delRowId: null
}),
computed: {},
created() {
this.getList()
},
methods: {
changePageSize(val) {
this.filter.page = 1
this.filter.size = val
this.getList()
}, // 改变每页条数
changeCurrentPage(val) {
this.filter.page = val
this.getList()
}, // 换页
getList() {
console.log(this.filter)
this.$api.productType.getDomainTypeList(this.filter).then(res => {
if (res.data.success == 1) {
this.listData = res.data.data.list || []
this.listData.forEach(e => {
e.updateTime = helper.dateStringTransform(e.updateTime)
})
this.listTotal = res.data.data.total
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 获取列表
searchAction() {
this.filter.page = 1,
this.getList()
}, // 搜索
resChange() {
this.filter = {
page: 1,
size: 10,
search: "",
state: "",
}
this.getList()
}, // 重置搜索
addClass() {
this.$router.push('/productType/domainList/add')
}, // 新增分类
changeRowState(row) {
let params = {
id: row.id,
state: row.state == 1 ? 0 : 1
}
this.$api.productType.changeDomainState(params).then(res => {
if (res.data.success == 1) {
this.$message.success("状态更新成功")
this.resChange()
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 启用/禁用分类
editRow(row) {
if (row.state == 1) {
return
}
this.$router.push(`/productType/domainList/edit/${row.id}`)
}, // 编辑分类
delRow(row) {
if (row.state == 1) {
return
}
this.delDialogFlag = true
this.delRowId = row.id
}, // 删除分类
confirmDel() {
this.$api.productType.deleteDomain(this.delRowId).then(res => {
if (res.data.success == 1) {
this.$message.success("删除成功")
this.delDialogFlag = false
this.resChange()
}else {
this.$message.error(res.data.errMsg)
}
}).catch(err => {
console.log(err)
})
}, // 确认删除
},
};
</script>
<style scoped>
.apaas_button {
position: relative;
}
.apaas_button > .el-button {
position: absolute;
top: 0;
right: 0;
z-index: 9;
}
</style>
<style lang="less" scoped>
.service_management_list {
height: 100%;
min-width: 1200px;
padding: 0 20px;
.breadcrumb_box {
>.el-breadcrumb {
padding: 15px 0;
.el-breadcrumb__inner {
font-size: 14px;
font-weight: bold;
color: #898d9e;
line-height: 23px;
}
.el-breadcrumb__item:last-child .el-breadcrumb__inner {
color: #242c43;
font-weight: normal;
}
}
}
.container_box {
width: 100%;
height: calc(100% - 60px);
background-color: #fff;
border-radius: 6px;
padding: 16px 20px 16px;
.search_box {
// margin-top: 20px;
.searchBtn {
display: inline-block;
margin-left: 20px;
width: 80px;
background-color: #0f2683;
color: #fff;
height: 40px;
text-align: center;
line-height: 40px;
border-radius: 4px;
cursor: pointer;
}
.resBtn {
background-color: #fff;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #0f2683;
}
}
.btn_box {
margin: 16px 0;
display: flex;
div {
width: 100px;
height: 40px;
background-color: #0f2683;
border-radius: 4px;
text-align: center;
line-height: 40px;
color: #fff;
cursor: pointer;
margin-right: 16px;
}
}
.list_box {
width: 100%;
height: calc(100% - 111px);
position: relative;
.ces-table-page {
height: calc(100% - 44px);
overflow: hidden auto;
&::-webkit-scrollbar {
width: 16px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
border-radius: 8px;
/* background: #dde4ff; */
box-shadow: 8px 0 0 #a5adb7 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
&::-webkit-scrollbar-track {
border-radius: 8px;
/* background: #f4f4f4; */
box-shadow: 8px 0 0 #f4f4f4 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
}
.pagination_box {
width: 100%;
position: absolute;
bottom: 0;
}
}
}
.form_box {
display: block;
padding: 0px 30px;
.el-select {
width: 100%;
}
.radio {
text-align: left;
}
}
}
</style>
<template>
<div class="fwgl_container">
<side-nav-bar
title="分类管理"
imgSrc="tool_fuwu"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
></side-nav-bar>
<div class="main_container">
<router-view :key="'type_' + $route.params.type"></router-view>
</div>
</div>
</template>
<script>
import sideNavBar from "@/components/side-nav-bar";
export default {
components: {
sideNavBar
},
data: () => ({
navList: []
}),
watch: {
"$route.fullPath"(path) {
this.initNavList();
}
},
methods: {
initNavList() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => {
if (response.data.success == 1) {
let arr = response.data.data[0].Child;
let brr = []
arr.forEach(e => {
if (e.visit_url === '/workplace') {
brr = e.Child || []
}
})
let user_index = brr.findIndex(item => item.visit_url == "/productType");
if (user_index != -1) {
this.navList = brr[user_index].Child;
this.navList.forEach(item => {
item.name = item.menu_name;
item.path = item.visit_url;
});
}
}
});
}
},
mounted() {
this.initNavList();
}
};
</script>
<style scoped>
.fwgl_container {
height: calc(100vh - 58px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.side_nav_bar {
width: 180px;
flex-shrink: 0;
}
.main_container {
width: calc(100% - 180px);
flex-grow: 1;
flex-shrink: 1;
background-color: #f6f7fb;
overflow: auto;
}
</style>
......@@ -203,9 +203,9 @@
<template slot="content">
<div class="dialog-content">
<el-form :model="publicForm" :rules="public_rules" ref="publicForm" class="demo-ruleForm">
<p class="formname">务领域:</p>
<p class="formname">务领域:</p>
<el-form-item prop="area">
<el-select v-model="publicForm.area" placeholder="请选择务领域">
<el-select v-model="publicForm.area" placeholder="请选择务领域">
<el-option v-for="item in area_arr" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
......@@ -289,7 +289,7 @@ export default {
},
public_rules: {
area: [
{ required: true, message: "请选择务领域", trigger: "change" }
{ required: true, message: "请选择务领域", trigger: "change" }
],
open: [{ required: true, message: "请选择开放程度", trigger: "change" }]
},
......@@ -330,7 +330,7 @@ export default {
},
rules1: {
area: [
{ required: true, message: "请选择务领域", trigger: "change" }
{ required: true, message: "请选择务领域", trigger: "change" }
],
resource: [
{ required: true, message: "请选择开放程度", trigger: "change" }
......
......@@ -4,6 +4,7 @@ import user from '@/request/api/user';
import authority from '@/request/api/authority';
import general from '@/request/api/general';
import dataAnalysis from '@/request/api/data-analysis';
import productType from '@/request/api/product-type'
export default {
workbench,
......@@ -11,5 +12,6 @@ export default {
user,
authority,
general,
dataAnalysis
dataAnalysis,
productType
}
\ No newline at end of file
import axios from '@/request/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块
const productType = {
// 分类相关接口
getClassTypeList(params) {
return axios.get(`/apaas/service/v3/service/manager/servtypeList`,{params})
}, // 服务分类/服务类型列表
changeClassState(params) {
return axios.put(`/apaas/service/v3/service/manager/servtype/state`,params)
}, // 服务分类/服务类型状态改变
deleteClass(id) {
return axios.delete(`/apaas/service/v3/service/manager/servtype/${id}`)
}, // 删除服务分类/服务类型
addNewClass(params) {
return axios.post(`/apaas/service/v3/service/manager/servtype`,params)
}, // 新增服务分类/服务类型
editClass(params) {
return axios.put(`/apaas/service/v3/service/manager/servtype`,params)
}, // 编辑服务分类/服务类型
getClassDetail(id) {
return axios.get(`/apaas/service/v3/service/manager/servtype/${id}`)
}, // 获取服务分类/服务类型详情
getClassTypes() {
return axios.get(`/apaas/service/v3/service/manager/allServtypes?state=1`)
}, // 获取所有的产品分类
// 领域相关接口
getDomainTypeList(params) {
return axios.get(`/apaas/service/v3/service/manager/servareaList`,{params})
}, // 领域分类列表
changeDomainState(params) {
return axios.put(`/apaas/service/v3/service/manager/servarea/state`,params)
}, // 领域分类状态改变
deleteDomain(id) {
return axios.delete(`/apaas/service/v3/service/manager/servarea/${id}`)
}, // 删除领域分类
addNewDomain(params) {
return axios.post(`/apaas/service/v3/service/manager/servarea`,params)
}, // 新增领域分类
editDomain(params) {
return axios.put(`/apaas/service/v3/service/manager/servarea`,params)
}, // 编辑领域分类
getDomainDetail(id) {
return axios.get(`/apaas/service/v3/service/manager/servarea/${id}`)
}, // 获取领域分类详情
}
export default productType;
......@@ -32,12 +32,12 @@ var router = new Router({
path: "/fwzc", // 服务注册
name: "fwzc",
redirect: "/fwzc/fwcs",
component: () => import("@/pages/workbench/fwzc_fwcs"),
component: () => import("@/pages/workbench/fwzc_fwcs_new"),
children: [
{
path: "/fwzc/fwcs", // 服务注册/服务测试
name: "fwcs",
component: () => import("@/pages/workbench/fwzc_fwcs"),
component: () => import("@/pages/workbench/fwzc_fwcs_new"),
},
],
}, // 工作台 - 服务注册模块
......@@ -150,6 +150,44 @@ var router = new Router({
},
],
}, // 工作台 - 应用管理模块
{
path: "/productType",
name: "productType",
component: () => import("@/pages/workbench/product-type"),
redirect: "/productType/classList",
children: [
{
path: "/productType/classList",
name: "/productTypeClassList",
component: () => import("@/pages/workbench/product-type/class_list")
}, // 产品分类与产品类型
{
path: "/productType/classList/add",
name: "/productTypeClassListAdd",
component: () => import("@/pages/workbench/product-type/class_edit")
}, // 产品分类与产品类型新增
{
path: "/productType/classList/edit/:id",
name: "/productTypeClassListEdit",
component: () => import("@/pages/workbench/product-type/class_edit")
}, // 产品分类与产品类型编辑
{
path: "/productType/domainList",
name: "/productTypeDomainList",
component: () => import("@/pages/workbench/product-type/domain_list")
}, // 领域管理
{
path: "/productType/domainList/add",
name: "/productTypeDomainListAdd",
component: () => import("@/pages/workbench/product-type/domain_edit")
}, // 领域分类新增
{
path: "/productType/domainList/edit/:id",
name: "/productTypeDomainListEdit",
component: () => import("@/pages/workbench/product-type/domain_edit")
}, // 领域分类编辑
],
}, // 分类管理
{
path: "/technical_support",
name: "technicalSupport",
......@@ -281,55 +319,60 @@ var router = new Router({
{
path: "/shop", // 服务超市
name: "shop",
redirect: "/shop/data_service_list/5",
redirect: "/shop/data_service_list",
component: () => import("@/pages/service_shop/shop"),
children: [
{
path: "/shop/data_service_list/:id", // 数据服务列表页
path: "/shop/data_service_list/:id", // 应用商店列表页
name: "shopDataList",
component: () => import("@/pages/service_shop/shop_list-new"),
component: () => import("@/pages/service_shop/shop_list_new"),
},
{
path: "/shop/space_time_service_list/:id", // 时空服务列表页
name: "shopSpaceTimeList",
component: () => import("@/pages/service_shop/shop_list-new"),
},
{
path: "/shop/video_service_list/:id", // 视频服务列表页
name: "shopVideoList",
component: () => import("@/pages/service_shop/shop_list-new"),
},
{
path: "/shop/perception_service_list/:id", // 感知服务列表页
name: "shopPerceptionList",
component: () => import("@/pages/service_shop/shop_list-new"),
},
{
path: "/shop/comprehensive_app_list/:id", // 综合应用列表页
name: "shopComAppList",
component: () => import("@/pages/service_shop/shop_list-new"),
},
{
path: "/shop/cloud", // 云资源服务
name: "shopCloud",
component: () => import("@/pages/service_shop/shop_cloud-new"),
path: "/shop/data_service_list", // 服务商店列表页
name: "shopDataList",
component: () => import("@/pages/service_shop/shop_list_new"),
},
// {
// path: "/shop/space_time_service_list/:id", // 时空服务列表页
// name: "shopSpaceTimeList",
// component: () => import("@/pages/service_shop/shop_list-new"),
// },
// {
// path: "/shop/video_service_list/:id", // 视频服务列表页
// name: "shopVideoList",
// component: () => import("@/pages/service_shop/shop_list-new"),
// },
// {
// path: "/shop/perception_service_list/:id", // 感知服务列表页
// name: "shopPerceptionList",
// component: () => import("@/pages/service_shop/shop_list-new"),
// },
// {
// path: "/shop/comprehensive_app_list/:id", // 综合应用列表页
// name: "shopComAppList",
// component: () => import("@/pages/service_shop/shop_list-new"),
// },
// {
// path: "/shop/cloud", // 云资源服务
// name: "shopCloud",
// component: () => import("@/pages/service_shop/shop_cloud-new"),
// },
{
path: "/shop/service_application_successfully", // 申请服务成功
name: "shopSuccess",
component: () =>
import("@/pages/service_shop/service_application_successfully"),
},
{
path: "/shop/app_store_list/:id", // 应用商店列表页
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/app_store_list/:id", // 应用商店列表页
// 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",
......@@ -346,37 +389,37 @@ var router = new Router({
path: "/shop/sjfwDetail/:id",
name: "sjfwDetail",
component: () => import("@/pages/service_shop/sjfwDetail"),
}, // 服务超市 - 数据服务详情
{
path: "/shop/skfwDetail/:id",
name: "skfwDetail",
component: () => import("@/pages/service_shop/skfwDetail"),
}, // 服务超市 - 时空服务详情
{
path: "/shop/spfwDetail/:id",
name: "spfwDetail",
component: () => import("@/pages/service_shop/spfwDetail"),
}, // 服务超市 - 视频服务详情
{
path: "/shop/gzfwDetail/:id",
name: "sjfwDetail",
component: () => import("@/pages/service_shop/gzfwDetail"),
}, // 服务超市 - 感知服务详情
{
path: "/shop/zhfwDetail/:id",
name: "zhfwDetail",
component: () => import("@/pages/service_shop/zhfwDetail"),
}, // 服务超市 - 综合应用详情
{
path: "/shop/yysdDetail/:id",
name: "yysdDetail",
component: () => import("@/pages/service_shop/yysdDetail"),
}, // 服务超市 - 应用详情
{
path: "/shop/cpDetail/:id",
name: "cpDetail",
component: () => import("@/pages/service_shop/cpDetail"),
}, // 服务超市 - 产品资源详情
}, // 服务超市 - 服务详情
// {
// path: "/shop/skfwDetail/:id",
// name: "skfwDetail",
// component: () => import("@/pages/service_shop/skfwDetail"),
// }, // 服务超市 - 时空服务详情
// {
// path: "/shop/spfwDetail/:id",
// name: "spfwDetail",
// component: () => import("@/pages/service_shop/spfwDetail"),
// }, // 服务超市 - 视频服务详情
// {
// path: "/shop/gzfwDetail/:id",
// name: "sjfwDetail",
// component: () => import("@/pages/service_shop/gzfwDetail"),
// }, // 服务超市 - 感知服务详情
// {
// path: "/shop/zhfwDetail/:id",
// name: "zhfwDetail",
// component: () => import("@/pages/service_shop/zhfwDetail"),
// }, // 服务超市 - 综合应用详情
// {
// path: "/shop/yysdDetail/:id",
// name: "yysdDetail",
// component: () => import("@/pages/service_shop/yysdDetail"),
// }, // 服务超市 - 应用详情
// {
// path: "/shop/cpDetail/:id",
// name: "cpDetail",
// component: () => import("@/pages/service_shop/cpDetail"),
// }, // 服务超市 - 产品资源详情
{
path: "/workplace",
name: "workPlace",
......
......@@ -35,6 +35,25 @@ module.exports.dateFormat = function (fmt, timestamp) {
return fmt;
}
module.exports.downloadFileFormatNew = function (fileUrl) {
/*
input: /apaas/static/docs/image/images/1234_qq234ewr123.png
output: 1234.png
*/
if (fileUrl != "") {
var temp = fileUrl.split('/')[fileUrl.split('/').length - 1]
var name = temp.split('_')[0]
var type = temp.split('_')[temp.split('_').length - 1].split('.')[1]
if (temp.indexOf('_') == -1) {
return name
} else {
return name + '.' + type
}
} else {
return "";
}
}
module.exports.dateStringTransform = function (date) {
/*
input: 2020-06-12T16:38:11+08:00
......
......@@ -6,7 +6,8 @@ const store = new Vuex.Store({
state: {
role: 0, // 0:普通用户,1:组织管理员,2:超级管理员
userInfo: null, // 用户信息
serviceShopMenu: "/shop/data_service_list/5", // 服务超市侧边栏
// serviceShopMenu: "/shop/data_service_list/5", // 服务超市侧边栏
serviceShopMenu: null, // 服务超市侧边栏
fwglNav: [
["注册发布的服务", "申请的服务", "云资源服务"], // 普通用户
["组织服务管理", "服务审批管理", "云资源管理"], // 组织管理员
......
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