Commit be2ab7ec authored by 张俊's avatar 张俊

Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev

parents eb14d451 48477eb1
<template> <template>
<div id="app"> <div id="app">
<bd-menu class="outmenu"></bd-menu> <bd-menu v-if="this.$route.path != '/login'" class="outmenu"></bd-menu>
<router-view /> <router-view />
</div> </div>
</template> </template>
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
user_arr: [ user_arr: [
{ name: "个人档案", path: "/user/user_info" }, { name: "个人档案", path: "/user/user_info" },
{ name: "消息通知", path: "/user/message" }, { name: "消息通知", path: "/user/message" },
{ name: "收银中心", path: "" }, { name: "收银中心", path: "/authority" },
{ name: "关于BD-aPaaS", path: "" }, { name: "关于BD-aPaaS", path: "" },
{ name: "退出登录", path: "" } { name: "退出登录", path: "" }
], ],
...@@ -194,6 +194,9 @@ export default { ...@@ -194,6 +194,9 @@ export default {
if (v.path) { if (v.path) {
if (v.path == "/fwgl/" || v.path == "/yygl/") { if (v.path == "/fwgl/" || v.path == "/yygl/") {
this.$router.push(v.path + this.$store.state.role); this.$router.push(v.path + this.$store.state.role);
} else if (parent == 2) {
this.$router.push(v.path);
this.$store.commit("serviceShopMenuAct", v.path);
} else { } else {
this.$router.push(v.path); this.$router.push(v.path);
} }
......
<template> <template>
<div class="order_cell"> <div class="order_cell">
<div class="order_cell_head"> <div class="order_cell_head">
<div class="application_time">申请时间:{{ cellItem.applicationTime }}</div> <div class="application_time">申请时间:{{ helper.dateFormat(cellItem.applytime) }}</div>
<div class="order_number">订单编号:{{ cellItem.orderNumber }}</div> <div class="order_number">订单编号:{{ cellItem.orderid }}</div>
<div class="cell_del_btn">删除</div> <div class="cell_del_btn" @click="delOrder(cellItem.orderid)">删除</div>
</div> </div>
<el-row class="cell_row"> <el-row class="cell_row">
<el-col :span="10" class="cell_msg"> <el-col :span="10" class="cell_msg">
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
<div class="cell_name"> <div class="cell_name">
<span>{{ cellItem.name }}</span> <span>{{ cellItem.name }}</span>
<span v-if="cellItem.mapService" class="tags map_service">mapService</span> <span v-if="cellItem.mapService" class="tags map_service">mapService</span>
<span v-if="cellItem.state == 1" class="tags shared">共享</span> <span v-if="cellItem.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellItem.state == 2" class="tags restricted">受限</span> <span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span>
<span v-else class="tags sensitive">敏感</span> <span v-else class="tags sensitive">敏感</span>
</div> </div>
<div class="cell_msg_other"> <div class="cell_msg_other">
<div class="cell_type">{{ cellItem.type }}</div> <div class="cell_type">{{ cellItem.sectors }}</div>
<div class="cell_creator">{{ cellItem.creator }}</div> <div class="cell_creator">{{ cellItem.organization }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="cell_specification"> <el-col :span="6" class="cell_specification">
<div> <div>
<div>规格:访问次数:200/日,访问量:10000/日</div> <div>规格:访问次数:{{ cellItem.pv }},访问量:{{ cellItem.count }}</div>
<div class="cell_specification_type">申请方式:按月</div> <div class="cell_specification_type">申请方式:{{ cellItem.durationunit == 1 ? $t('lang.byYear') : $t('lang.byMonth') }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="approval_status"> <el-col :span="4" class="approval_status">
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
</template> </template>
<script> <script>
import helper from "@/services/helper";
export default { export default {
props: { props: {
cellItem: { cellItem: {
...@@ -131,6 +132,9 @@ export default { ...@@ -131,6 +132,9 @@ export default {
}, },
viewDetail(val) { viewDetail(val) {
this.$router.push("/user/order_detail/" + val) this.$router.push("/user/order_detail/" + val)
},
delOrder() {
} }
} }
}; };
...@@ -163,6 +167,7 @@ export default { ...@@ -163,6 +167,7 @@ export default {
display: flex; display: flex;
float: right; float: right;
margin-right: 40px; margin-right: 40px;
cursor: pointer;
} }
.cell_row { .cell_row {
} }
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<el-tab-pane <el-tab-pane
v-for="(item, index) in stateList" v-for="(item, index) in stateList"
:key="'state' + index" :key="'state' + index"
:label="item" :label="item.label"
:name="item" :name="item.value"
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
<div class="list_options"> <div class="list_options">
...@@ -85,17 +85,24 @@ export default { ...@@ -85,17 +85,24 @@ export default {
OrderList OrderList
}, },
data: () => ({ data: () => ({
stateList: ["全部订单", "待审核", "审核中", "已获取", "未通过", "已取消"], stateList: [
activeName: "全部订单", { value: "0", label: "全部订单" },
{ value: "1", label: "待审核" },
{ value: "2", label: "审核中" },
{ value: "3", label: "已获取" },
{ value: "4", label: "未通过" },
{ value: "5", label: "已取消" }
],
activeName: "0",
buttonList: [ buttonList: [
{ label: "全部", state: false }, { value: 0, label: "全部", state: false },
{ label: "数据服务", state: false }, { value: 1, label: "数据服务", state: false },
{ label: "时空服务", state: false }, { value: 2, label: "时空服务", state: false },
{ label: "视频服务", state: false }, { value: 3, label: "视频服务", state: false },
{ label: "感知服务", state: false }, { value: 4, label: "感知服务", state: false },
{ label: "综合服务", state: false }, { value: 5, label: "综合服务", state: false },
{ label: "云资源", state: false }, { value: 6, label: "云资源", state: false },
{ label: "应用镜像", state: false } { value: 7, label: "应用镜像", state: false }
], ],
search: "", search: "",
pagination: { pagination: {
...@@ -117,64 +124,15 @@ export default { ...@@ -117,64 +124,15 @@ export default {
label: "50" label: "50"
} }
], ],
datas: [ datas: []
{
id: 0,
name: "水路货物周转量情况",
type: "基础数据服务",
creator: "贵州省交通运输厅0",
state: 1,
mapService: 1,
num: 2,
checkedSubscription: false,
specification: 1,
specificationApplication: 2,
evaluationText: "这条服条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用。这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用。",
evaluationRate: 4.7,
applicationTime: "2021-04-24 15:02:00",
orderNumber: "2020042422222222000001",
getStatus: 2
},
{
id: 1,
name: "水路货物周转量情况水路货物周水路货物周转量情况水路货物周",
type: "基础数据服务",
creator: "贵州省交通运输厅1",
state: 1,
num: 2,
checkedSubscription: false,
specification: 1,
specificationApplication: 2,
evaluationText: "这条服务非常好务非常好非常实用这非常实用这条服务非常好非常实用。",
evaluationRate: 3.7,
applicationTime: "2020-04-24 15:02:00",
orderNumber: "202004241502000001",
getStatus: 3
},
{
id: 2,
name: "水路货物周转量情况水路货物周转量情况路货物周转量情况",
type: "基础数据服务",
creator: "贵州省交通运输厅2",
state: 1,
mapService: 1,
num: 2,
checkedSubscription: true,
specification: 1,
specificationApplication: 2,
evaluationText: "这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用。这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用这条服务非常好非常实用。",
evaluationRate: 3.7,
applicationTime: "2020-04-24 15:02:00",
orderNumber: "202004241502000001",
getStatus: 1
}
]
}), }),
mounted() { mounted() {
this.getTotal(); this.getData();
}, },
methods: { methods: {
tabClick() {}, tabClick() {
this.getData();
},
btnClick(index) { btnClick(index) {
if (index != 0) { if (index != 0) {
this.buttonList[0].state = false; this.buttonList[0].state = false;
...@@ -185,24 +143,42 @@ export default { ...@@ -185,24 +143,42 @@ export default {
} }
this.buttonList[0].state = !this.buttonList[0].state; this.buttonList[0].state = !this.buttonList[0].state;
} }
this.getData();
}, },
// search debonce 500ms // search debonce 500ms
searchVal() { searchVal() {
if (this.times !== null) clearTimeout(this.times); if (this.times !== null) clearTimeout(this.times);
this.times = setTimeout(() => { this.times = setTimeout(() => {
this.getShopList(); this.getData();
}, 500); }, 500);
}, },
getTotal() { getData() {
this.pagination.total = this.datas.length; let arr = [];
this.buttonList.forEach(item => {
if (item.state == true) {
arr.push(item.value);
}
});
let params = {
select: this.search,
page: this.pagination.page,
limit: this.pagination.rowsPerPage,
status: this.activeName,
types: arr
};
this.$api.user.orderList(params).then(response => {
console.log(response);
this.datas = response.data.data;
this.pagination.total = response.data.total;
});
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pagination.rowsPerPage = val; this.pagination.rowsPerPage = val;
this.$emit("refresh", this.pagination); this.getData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pagination.page += val; this.pagination.page += val;
this.$emit("refresh", this.pagination); this.getData();
} }
} }
}; };
......
...@@ -8,33 +8,33 @@ ...@@ -8,33 +8,33 @@
</div> </div>
<div class="com_cell_message"> <div class="com_cell_message">
<div class="com_cell_msg_title"> <div class="com_cell_msg_title">
{{ cellData.title }} {{ cellData.name }}
<span v-if="cellData.mapService" class="tags map_service">mapService</span> <span v-if="cellData.mapService" class="tags map_service">mapService</span>
<span v-if="cellData.state == 1" class="tags shared">共享</span> <span v-if="cellData.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellData.state == 2" class="tags restricted">受限</span> <span v-else-if="cellData.openness == 2" class="tags restricted">受限</span>
<span v-else class="tags sensitive">敏感</span> <span v-else class="tags sensitive">敏感</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">资源摘要:</span> <span class="com_cell_item_title">资源摘要:</span>
<span <span class="com_cell_data">{{ cellData.descript }}</span>
class="com_cell_data"
>{{ cellData.resourceSummary }}</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">提供机构:</span> <span class="com_cell_item_title">提供机构:</span>
<span class="com_cell_data">{{ cellData.provider }}</span> <span class="com_cell_data">{{ cellData.organization_name }}</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">数据领域:</span> <span class="com_cell_item_title">数据领域:</span>
<span class="com_cell_data">{{ cellData.dataField }}</span> <span class="com_cell_data">{{ cellData.sectors_name }}</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">服务类型:</span> <span class="com_cell_item_title">服务类型:</span>
<span class="com_cell_data">{{ cellData.serviceType }}</span> <span
class="com_cell_data"
>{{ cellData.data_service_type1_str }}&nbsp;&nbsp;{{ cellData.data_service_type2_str }}&nbsp;&nbsp;{{ cellData.data_service_type3_str }}</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">更新时间:</span> <span class="com_cell_item_title">更新时间:</span>
<span class="com_cell_data">{{ cellData.updateTime }}</span> <span class="com_cell_data">{{ cellData.update_date }}</span>
</div> </div>
</div> </div>
<div class="com_cell_right"> <div class="com_cell_right">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
></el-rate> ></el-rate>
<div class="com_cell_right_text"> <div class="com_cell_right_text">
<span class="com_cell_right_time_tit">本月获取次数:</span> <span class="com_cell_right_time_tit">本月获取次数:</span>
<span class="com_cell_right_time">{{ cellData.numberOfMonth }}</span> <span class="com_cell_right_time">{{ cellData.apply_num }}</span>
</div> </div>
<el-button class="com_cell_right_btn" @click="goUrl(cellData.id)">查看详情</el-button> <el-button class="com_cell_right_btn" @click="goUrl(cellData.id)">查看详情</el-button>
</div> </div>
...@@ -155,8 +155,8 @@ export default { ...@@ -155,8 +155,8 @@ export default {
top: -2px; top: -2px;
} }
.map_service { .map_service {
background-color: #626DE9; background-color: #626de9;
border: solid 1px #626DE9; border: solid 1px #626de9;
color: #fff; color: #fff;
} }
.shared { .shared {
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
</template> </template>
<script> <script>
import CommodityCell from "@/components/commodity-cell.vue"; import CommodityCell from "@/components/service-list/commodity-cell.vue";
import CommodityCard from "@/components/commodity-card.vue"; import CommodityCard from "@/components/service-list/commodity-card.vue";
export default { export default {
components: { components: {
"commodity-cell": CommodityCell, "commodity-cell": CommodityCell,
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<!-- filter --> <!-- filter -->
<div v-if="urlFilter" class="classification"> <div v-if="urlFilter" class="classification">
<div v-for="(item, index) in filterLists" :key="'cd' + index" class="classification_line"> <div v-for="(item, index) in filterLists" :key="'cd' + index" class="classification_line">
<div class="classification_line_if" v-if="item.childDomains">
<div class="classification_line_title">{{ item.name }}</div> <div class="classification_line_title">{{ item.name }}</div>
<div <div
:class="index == filterLists.length - 1 ? 'classification_line_items':'classification_line_items classification_line_items_border'" :class="index == filterLists.length - 1 ? 'classification_line_items':'classification_line_items classification_line_items_border'"
...@@ -35,24 +36,42 @@ ...@@ -35,24 +36,42 @@
> >
<ul :id="item.id" class="classification_line_items_ul"> <ul :id="item.id" class="classification_line_items_ul">
<li <li
:class="items.children && openChildren[index].state == true && openChildren[index].index == indexs ? 'classification_line_items_li_act classification_line_items_li':'classification_line_items_li'" class="classification_line_items_li"
v-for="(items, indexs) in item.children" :key="'cda' + index"
>
<div class="classification_span">
<span
@click="clickAll(index)"
:class="activeOptions[index].length == 0 ? 'classification_act':''"
>全部</span>
</div>
</li>
<li
v-for="(items, indexs) in item.childDomains"
:class="items.childDomains && openChildren[index].state == true && openChildren[index].index == items.id ? 'classification_line_items_li_act classification_line_items_li':'classification_line_items_li'"
:key="'cds' + indexs" :key="'cds' + indexs"
> >
<div class="classification_span" @click="clickItem(index, indexs, items)"> <div class="classification_span">
<span <span
:class="activeOptions[index] == items.id ? 'classification_act':''" @click="clickItem(index, indexs, items)"
:class="activeOptions[index].indexOf(items.id) != -1 ? 'classification_act':''"
>{{ items.name }}</span> >{{ items.name }}</span>
<!-- if item have children, we will use an arrow to prompt --> <!-- if item have children, we will use an arrow to prompt -->
<i <i
v-if="items.children && openChildren[index].state == true && openChildren[index].index == indexs" v-if="items.childDomains && openChildren[index].state == true && openChildren[index].index == items.id"
@click="clickItemChild(index, indexs, items)"
class="el-icon-caret-top" class="el-icon-caret-top"
></i> ></i>
<i <i
v-else-if="items.children && openChildren[index].state == false && openChildren[index].index == indexs" v-else-if="items.childDomains && openChildren[index].state == false && openChildren[index].index == items.id"
@click="clickItemChild(index, indexs, items)"
class="el-icon-caret-bottom"
></i>
<i
v-else-if="items.childDomains"
@click="clickItemChild(index, indexs, items)"
class="el-icon-caret-bottom" class="el-icon-caret-bottom"
></i> ></i>
<i v-else-if="items.children" class="el-icon-caret-bottom"></i>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -76,9 +95,12 @@ ...@@ -76,9 +95,12 @@
v-for="itemChildren in openChildren[index].act" v-for="itemChildren in openChildren[index].act"
:key="itemChildren.id" :key="itemChildren.id"
> >
<div class="classification_span" @click="clickChildren(itemChildren.id, index)"> <div
class="classification_span"
@click="clickChildren(itemChildren.id, index, openChildren[index].index)"
>
<span <span
:class="activeOptions[index] == itemChildren.id ? 'classification_act':''" :class="activeChildOptions[index].indexOf(itemChildren.id) != -1 ? 'classification_act':''"
>{{ itemChildren.name }}</span> >{{ itemChildren.name }}</span>
</div> </div>
</li> </li>
...@@ -87,6 +109,7 @@ ...@@ -87,6 +109,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="gray_line"></div> <div class="gray_line"></div>
<!-- filter button --> <!-- filter button -->
<div class="btn_group"> <div class="btn_group">
...@@ -94,7 +117,7 @@ ...@@ -94,7 +117,7 @@
v-for="(item, index) in buttonFilter" v-for="(item, index) in buttonFilter"
:key="item.name" :key="item.name"
size="small" size="small"
:class="item.state == false ? 'button_filter':'button_filter_act'" :class="index == activeBtn ? 'button_filter_act':'button_filter'"
@click="clickButtonFilter(index)" @click="clickButtonFilter(index)"
>{{ item.name }}</el-button> >{{ item.name }}</el-button>
</div> </div>
...@@ -112,7 +135,7 @@ ...@@ -112,7 +135,7 @@
</template> </template>
<script> <script>
import CommodityList from "@/components/commodity-list.vue"; import CommodityList from "@/components/service-list/commodity-list.vue";
import BlockRadius from "@/components/block-radius"; import BlockRadius from "@/components/block-radius";
export default { export default {
components: { components: {
...@@ -140,233 +163,45 @@ export default { ...@@ -140,233 +163,45 @@ export default {
{ index: null, state: false, act: null }, { index: null, state: false, act: null },
{ index: null, state: false, act: null } { index: null, state: false, act: null }
], ],
activeOptions: [null, null, null, null], activeOptions: [[], [], [], []],
activeChildOptions: [[], [], [], []],
buttonFilter: [ buttonFilter: [
{ {
name: "综合排序", name: "综合排序"
state: false
}, },
{ {
name: "最新更新", name: "最新更新"
state: false
}, },
{ {
name: "最高人气", name: "最高人气"
state: false
}, },
{ {
name: "最好好评", name: "最好好评"
state: false
} }
], ],
activeBtn: 0,
lists: [ lists: [
{
id: 0,
title: "水路货物周转量情况水路货物周转量情况",
state: 0,
resourceSummary:
"提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务",
provider: "提供机构提供机构提供机构",
dataField: "经济建设",
serviceType: "数据服务 专题数据服务 企业专题数据服务",
updateTime: "2020-03-12 18:31:12",
numberOfMonth: "2698755",
rate: 3,
mapService: 1,
version: 2.888,
onlineTime: "2019-04-11 12:50:30",
num: 66666
},
{
id: 1,
title: "水路货物周转量情况",
state: 2,
resourceSummary:
"提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务",
provider: "提供机构提供机构提供机构",
dataField: "经济建设",
serviceType: "数据服务 专题数据服务 企业专题数据服务",
updateTime: "2020-03-12 18:31:12",
numberOfMonth: "2698745",
rate: 3.4,
version: 2.888,
onlineTime: "2019-04-11 12:50:30",
num: 66666
},
{
id: 2,
title: "水路货物周转量情况",
state: 1,
resourceSummary:
"提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务",
provider: "提供机构提供机构提供机构",
dataField: "经济建设",
serviceType: "数据服务 专题数据服务 企业专题数据服务",
updateTime: "2020-03-12 18:31:12",
numberOfMonth: "2698455",
rate: 2.5,
version: 2.888,
onlineTime: "2019-04-11 12:50:30",
num: 66666
},
{
id: 3,
title: "水路货物周转量情况",
state: 0,
resourceSummary:
"提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务提供水路货物周转量排名和同比增长的专题数据服务",
provider: "提供机构提供机构提供机构",
dataField: "经济建设",
serviceType: "数据服务 专题数据服务 企业专题数据服务",
updateTime: "2020-03-12 18:31:12",
numberOfMonth: "267455",
rate: 3.7,
version: 2.888,
onlineTime: "2019-04-11 12:50:30",
num: 66666
}
], ],
filterLists: [ filterLists: [
{ {
id: 1283, id: 10,
name: "数据服务类型",
children: [
{
id: 1233,
name: "诶哦尬舞",
children: [
{ id: 18273, name: "那我空间服务" },
{
id: 12378343,
name: "诶哦尬舞"
},
{
id: 123533,
name: "诶哦尬舞"
}
]
},
{
id: 121833,
name: "诶哦尬舞"
},
{
id: 1234573,
name: "诶哦尬舞"
},
{
id: 134534233,
name: "诶哦尬舞"
},
{
id: 1234533,
name: "诶哦尬舞"
},
{
id: 123533,
name: "诶哦尬舞",
children: [
{ id: 1824573, name: "那我空间服务" },
{
id: 123378343,
name: "诶哦尬舞"
},
{
id: 1235333,
name: "诶哦尬舞"
}
]
},
{
id: 12112833,
name: "诶哦尬舞"
},
{
id: 12341573,
name: "诶哦尬舞"
},
{
id: 1345434233,
name: "诶哦尬舞"
},
{
id: 12345533,
name: "诶哦尬舞"
}
]
},
{
id: 128133,
name: "数据服务类型", name: "数据服务类型",
children: [ prop: "serviceTypeInfo",
{ childDomains: []
id: 123313,
name: "诶哦尬舞",
children: [
{ id: 1821373, name: "那我个社工师空间服务" },
{
id: 123728343,
name: "诶哦甲方推荐尬舞"
},
{
id: 12312533,
name: "诶哦库空调尬舞"
}
]
},
{
id: 121123833,
name: "诶哦尬舞"
},
{
id: 1231234573,
name: "诶哦达瓦大尬舞"
},
{
id: 13453334233,
name: "诶哦达瓦大尬舞"
},
{
id: 1234123533,
name: "诶哦尬舞"
},
{
id: 123512333,
name: "诶哦尬舞",
children: [
{ id: 1824123573, name: "那我空间服务" },
{
id: 1233738343,
name: "诶哦尬舞"
},
{
id: 123125333,
name: "诶哦尬舞"
}
]
}, },
{ {
id: 1211312833, id: 11,
name: "诶哦挖到尬舞" name: "数据领域",
prop: "serviceDomain",
childDomains: []
}, },
{ {
id: 12341231573, id: 100,
name: "诶哦尬舞" name: "数据来源机构",
}, prop: "organizations",
{ childDomains: []
id: 13454314233,
name: "诶哦色粉尬舞"
},
{
id: 123452533,
name: "诶环境日哦尬舞"
}
]
} }
], ],
dataServiceType: "",
dataField: "",
dataSourceOrganization: "",
page: 1, page: 1,
limit: 10 limit: 10
}), }),
...@@ -376,42 +211,42 @@ export default { ...@@ -376,42 +211,42 @@ export default {
}, },
methods: { methods: {
getShopList() { getShopList() {
// dataServiceType: "", let query = {
// dataField: "", serviceName: this.search,
// dataSourceOrganization: "" serviceType1: this.urlFilter,
let url = `${this.urlList}`; serviceType2s: this.activeOptions[0].join(","),
this.$http serviceType3s: this.activeChildOptions[0].join(","),
.get(url) dataDomains: this.activeOptions[1].join(","),
.then(response => { organizeIds: this.activeOptions[2].join(","),
orderBy: this.activeBtn,
Page: this.page,
Size: this.limit
};
this.$api.serviceShop.getServiceShopList(query).then(response => {
if (response.data.message == "success") { if (response.data.message == "success") {
this.list = response.data.data; this.lists = response.data.data;
} else { } else {
console.log(response.data.message); console.log(response.data.message);
} }
})
.catch(function(response) {
this.error = true;
}); });
}, },
getShopFilter() { getShopFilter() {
let query = {
type: this.urlFilter
};
this.$api.serviceShop.getServiceShopFilter(query).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.filterLists[0].childDomains = data.serviceTypeInfo ? data.serviceTypeInfo : [];
this.filterLists[1].childDomains = data.serviceDomain ? data.serviceDomain : [];
this.filterLists[2].childDomains = data.organizations ? data.organizations : [];
setTimeout(() => { setTimeout(() => {
if (this.urlFilter) {
this.judgeHeight(); this.judgeHeight();
}
}, 0); }, 0);
// let url = `${this.urlFilter}`; } else {
// this.$http console.log(response.data.errMsg);
// .get(url) }
// .then(response => { });
// if (response.data.message == "success") {
// this.filterList = response.data.data;
// } else {
// console.log(response.data.message);
// }
// })
// .catch(function(response) {
// this.error = true;
// });
}, },
judgeHeight() { judgeHeight() {
let list = this.filterLists; let list = this.filterLists;
...@@ -436,19 +271,35 @@ export default { ...@@ -436,19 +271,35 @@ export default {
// 这里不能像上面那样整体更新,因为啥我也不知道,我太菜 // 这里不能像上面那样整体更新,因为啥我也不知道,我太菜
}, },
clickItem(index, indexs, items) { clickItem(index, indexs, items) {
this.activeOptions[index] = items.id; let i = this.activeOptions[index].indexOf(items.id);
if (items.children) { if (i == -1) {
if (this.openChildren[index].index == indexs) { this.activeOptions[index].push(items.id);
} else {
this.activeOptions[index].splice(i, 1);
if (items.childDomains) {
items.childDomains.forEach(e => {
let i = this.activeChildOptions[index].indexOf(e.id);
if (i != -1) {
this.activeChildOptions[index].splice(i, 1);
}
});
}
}
this.getFilterValue();
},
clickItemChild(index, indexs, items) {
if (items.childDomains) {
if (this.openChildren[index].index == items.id) {
this.$set(this.openChildren, index, { this.$set(this.openChildren, index, {
index: indexs, index: indexs,
state: !this.openChildren[index].state, state: !this.openChildren[index].state,
act: items.children act: items.childDomains
}); });
} else { } else {
this.$set(this.openChildren, index, { this.$set(this.openChildren, index, {
index: indexs, index: items.id,
state: true, state: true,
act: items.children act: items.childDomains
}); });
} }
} else { } else {
...@@ -458,30 +309,26 @@ export default { ...@@ -458,30 +309,26 @@ export default {
act: null act: null
}); });
} }
this.getFilterValue(items.id, index);
}, },
clickButtonFilter(index) { clickButtonFilter(index) {
this.buttonFilter[index].state = !this.buttonFilter[index].state; this.activeBtn = index;
this.getShopList(); this.getShopList();
}, },
clickChildren(id, index) { clickChildren(id, index, fatherId) {
this.$set(this.activeOptions, index, id); let i = this.activeChildOptions[index].indexOf(id);
this.getFilterValue(id, index); let j = this.activeOptions[index].indexOf(fatherId);
}, if (i == -1) {
getFilterValue(id, index) { this.activeChildOptions[index].push(id);
switch (index) { if (j == -1) {
case 0: this.activeOptions[index].push(fatherId);
this.dataServiceType = id;
break;
case 1:
this.dataField = id;
break;
case 2:
this.dataSourceOrganization = id;
break;
default:
break;
} }
} else {
this.activeChildOptions[index].splice(i, 1);
}
console.log(this.activeChildOptions, i, fatherId);
this.getFilterValue();
},
getFilterValue() {
this.getShopList(); this.getShopList();
}, },
// search debonce 500ms // search debonce 500ms
...@@ -495,6 +342,11 @@ export default { ...@@ -495,6 +342,11 @@ export default {
this.page = val.page; this.page = val.page;
this.limit = val.rowsPerPage; this.limit = val.rowsPerPage;
this.getShopList(); this.getShopList();
},
clickAll(item) {
console.log(item)
this.activeOptions[item] = [];
this.activeChildOptions[item] = [];
} }
} }
}; };
...@@ -520,6 +372,9 @@ export default { ...@@ -520,6 +372,9 @@ export default {
} }
.classification_line { .classification_line {
width: 100%; width: 100%;
}
.classification_line_if {
width: 100%;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
} }
...@@ -531,7 +386,7 @@ export default { ...@@ -531,7 +386,7 @@ export default {
color: #8890a7; color: #8890a7;
} }
.classification_line_items { .classification_line_items {
width: calc(100% - 100px); width: calc(100% - 130px);
} }
.classification_line_items_border { .classification_line_items_border {
border-bottom: 1px #e9ecf3 solid; border-bottom: 1px #e9ecf3 solid;
...@@ -615,6 +470,6 @@ export default { ...@@ -615,6 +470,6 @@ export default {
outline: none; outline: none;
} }
.input_right .el-input__inner:focus-within { .input_right .el-input__inner:focus-within {
border: 1px solid #626DE9; border: 1px solid #626de9;
} }
</style> </style>
\ No newline at end of file
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<el-input-number <el-input-number
v-model="formNew.containerGroup" v-model="formNew.containerGroup"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="取值范围[0,24]" placeholder="取值范围[0,24]"
></el-input-number> ></el-input-number>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<el-input-number <el-input-number
v-model="formNew.dataDisk" v-model="formNew.dataDisk"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请选择数量" placeholder="请选择数量"
></el-input-number> ></el-input-number>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<el-input-number <el-input-number
v-model="formNew.perDataDisk" v-model="formNew.perDataDisk"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请选择容量" placeholder="请选择容量"
></el-input-number> ></el-input-number>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<el-input-number <el-input-number
v-model="formNew.perCPUs" v-model="formNew.perCPUs"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请选择CPU最高使用量" placeholder="请选择CPU最高使用量"
></el-input-number> ></el-input-number>
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<el-input-number <el-input-number
v-model="formNew.perCPU" v-model="formNew.perCPU"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请选择CPU默认使用量" placeholder="请选择CPU默认使用量"
></el-input-number> ></el-input-number>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
<el-input-number <el-input-number
v-model="formNew.perRAMs" v-model="formNew.perRAMs"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请选择内存最高使用量" placeholder="请选择内存最高使用量"
></el-input-number> ></el-input-number>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<el-input-number <el-input-number
v-model="formNew.perRAM" v-model="formNew.perRAM"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请选择内存默认使用量" placeholder="请选择内存默认使用量"
></el-input-number> ></el-input-number>
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<el-input-number <el-input-number
v-model="formNew.appDuration" v-model="formNew.appDuration"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
></el-input-number> ></el-input-number>
<el-select <el-select
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
<el-input-number <el-input-number
v-model="formOld.containerGroup" v-model="formOld.containerGroup"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="取值范围[0,24]" placeholder="取值范围[0,24]"
></el-input-number> ></el-input-number>
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
<el-input-number <el-input-number
v-model="formOld.dataDisk" v-model="formOld.dataDisk"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
<el-input-number <el-input-number
v-model="formOld.perDataDisk" v-model="formOld.perDataDisk"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
<el-input-number <el-input-number
v-model="formOld.perCPUs" v-model="formOld.perCPUs"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请设置CPU最高使用量" placeholder="请设置CPU最高使用量"
></el-input-number> ></el-input-number>
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
<el-input-number <el-input-number
v-model="formOld.perCPU" v-model="formOld.perCPU"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请设置CPU默认使用量" placeholder="请设置CPU默认使用量"
></el-input-number> ></el-input-number>
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
<el-input-number <el-input-number
v-model="formOld.perRAMs" v-model="formOld.perRAMs"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请设置内存最高使用量" placeholder="请设置内存最高使用量"
></el-input-number> ></el-input-number>
...@@ -408,7 +408,7 @@ ...@@ -408,7 +408,7 @@
<el-input-number <el-input-number
v-model="formOld.perRAM" v-model="formOld.perRAM"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
placeholder="请设置内存默认使用量" placeholder="请设置内存默认使用量"
></el-input-number> ></el-input-number>
...@@ -437,7 +437,7 @@ ...@@ -437,7 +437,7 @@
<el-input-number <el-input-number
v-model="formOld.appDuration" v-model="formOld.appDuration"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="10" :max="10"
></el-input-number> ></el-input-number>
<el-select <el-select
...@@ -675,6 +675,9 @@ export default { ...@@ -675,6 +675,9 @@ export default {
getForm(val) { getForm(val) {
if (val != "") { if (val != "") {
this.formShow = true; this.formShow = true;
Object.keys(this.formOld).forEach(item => {
this.formOld[item] = "";
});
} else { } else {
this.formShow = false; this.formShow = false;
} }
...@@ -916,6 +919,7 @@ export default { ...@@ -916,6 +919,7 @@ export default {
<style> <style>
.form_block .el-input .el-input__inner { .form_block .el-input .el-input__inner {
background-color: #f7f8f9; background-color: #f7f8f9;
color: #242c43;
} }
.cloud_form .el-input { .cloud_form .el-input {
width: 100%; width: 100%;
...@@ -929,12 +933,14 @@ export default { ...@@ -929,12 +933,14 @@ export default {
} }
.cloud_form .input_has_left_right .el-input__inner { .cloud_form .input_has_left_right .el-input__inner {
border-radius: 0; border-radius: 0;
color: #242c43;
} }
.cloud_form .el-select { .cloud_form .el-select {
width: 100%; width: 100%;
} }
.cloud_form .el-input .el-input__inner { .cloud_form .el-input .el-input__inner {
background-color: #f7f8f9; background-color: #f7f8f9;
color: #242c43;
} }
.cloud_form .el-input-number { .cloud_form .el-input-number {
width: calc(100% - 60px); width: calc(100% - 60px);
...@@ -948,6 +954,7 @@ export default { ...@@ -948,6 +954,7 @@ export default {
} }
.cloud_form .el-input-number .el-input__inner { .cloud_form .el-input-number .el-input__inner {
text-align: left; text-align: left;
color: #242c43;
} }
.cloud_form .el-textarea { .cloud_form .el-textarea {
width: 100%; width: 100%;
...@@ -955,6 +962,7 @@ export default { ...@@ -955,6 +962,7 @@ export default {
.cloud_form .el-textarea .el-textarea__inner { .cloud_form .el-textarea .el-textarea__inner {
background-color: #f7f8f9; background-color: #f7f8f9;
border-radius: 8px; border-radius: 8px;
color: #242c43;
} }
.form_item .el-form-item__content { .form_item .el-form-item__content {
width: 100%; width: 100%;
...@@ -964,6 +972,7 @@ export default { ...@@ -964,6 +972,7 @@ export default {
} }
.input_has_right .el-input__inner { .input_has_right .el-input__inner {
border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px;
color: #242c43;
} }
.cloud_form .input_has_right_select .el-input-number { .cloud_form .input_has_right_select .el-input-number {
width: calc(100% - 100px); width: calc(100% - 100px);
...@@ -979,6 +988,7 @@ export default { ...@@ -979,6 +988,7 @@ export default {
} }
.input_has_right_select .el-input__inner { .input_has_right_select .el-input__inner {
border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px;
color: #242c43;
} }
.input_has_right_select .input_right_select.el-select .el-input { .input_has_right_select .input_right_select.el-select .el-input {
width: 100px; width: 100px;
...@@ -995,6 +1005,7 @@ export default { ...@@ -995,6 +1005,7 @@ export default {
} }
.input_right_select .el-input .el-input__inner { .input_right_select .el-input .el-input__inner {
background-color: #0f2683; background-color: #0f2683;
color: #242c43;
} }
.cloud_form .el-input-number .el-input-number__increase, .cloud_form .el-input-number .el-input-number__increase,
.cloud_form .el-input-number .el-input-number__decrease { .cloud_form .el-input-number .el-input-number__decrease {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
>规格:{{ specificationBtns[cellItems.specification] }}</div> >规格:{{ specificationBtns[cellItems.specification] }}</div>
<div <div
class="shopping_cell_specification_val_type" class="shopping_cell_specification_val_type"
>申请方式:{{ specificationApplicationBtns[cellItems.specificationApplication] }}</div> >申请方式:{{ specificationApplicationBtns[cellItems.specificationApplication - 1] }}</div>
<div class="shopping_cell_specification_edit"> <div class="shopping_cell_specification_edit">
<el-popover <el-popover
placement="right-start" placement="right-start"
......
...@@ -52,7 +52,11 @@ ...@@ -52,7 +52,11 @@
:disabled="true" :disabled="true"
class="shopping_cart_options_cell_btn" class="shopping_cart_options_cell_btn"
>一键申请</el-button> >一键申请</el-button>
<el-button v-else @click="oneClickApplication" class="shopping_cart_options_cell_btn_act">一键申请</el-button> <el-button
v-else
@click="oneClickApplication"
class="shopping_cart_options_cell_btn_act"
>一键申请</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -108,7 +112,9 @@ export default { ...@@ -108,7 +112,9 @@ export default {
} }
] ]
}), }),
mounted() {}, mounted() {
this.getList();
},
computed: { computed: {
getNum() { getNum() {
let num = this.checkList.reduce( let num = this.checkList.reduce(
...@@ -119,6 +125,16 @@ export default { ...@@ -119,6 +125,16 @@ export default {
} }
}, },
methods: { methods: {
getList() {
this.$api.serviceShop.getShoppingCart().then(response => {
if (response.data.success == "1") {
console.log(response.data.data)
this.list = response.data.data;
} else {
console.log(response.data.message);
}
});
},
checkAll(val) { checkAll(val) {
this.$refs.shoppingList.setAllState(val); this.$refs.shoppingList.setAllState(val);
}, },
......
...@@ -42,7 +42,6 @@ export default { ...@@ -42,7 +42,6 @@ export default {
checkList: { checkList: {
immediate: true, // 这句重要 immediate: true, // 这句重要
handler(val) { handler(val) {
console.log("ss")
this.checkLists = val; this.checkLists = val;
} }
} }
......
export const lang={
// bread crunbs
// .
// .
// .
// part personal center
personalCenter: "个人中心",
profile: "个人档案",
messageCenter: "消息中心",
// unit of purchase duration
byYear: "按年",
byMonth: "按月",
}
\ No newline at end of file
...@@ -19,9 +19,15 @@ import "@/icons" ...@@ -19,9 +19,15 @@ import "@/icons"
import "./assets/css/index.css"; import "./assets/css/index.css";
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
Vue.use(VueI18n) Vue.use(VueI18n)
const i18n = new VueI18n({
locale: 'zh',
messages: {
'zh': require('@/i18n/language-zh')
}
})
import api from './request/api' import api from './request/api'
Vue.prototype.$api = api; Vue.prototype.$api = api;
...@@ -29,6 +35,7 @@ new Vue({ ...@@ -29,6 +35,7 @@ new Vue({
el: "#app", el: "#app",
router, router,
store, store,
i18n,
components: { App }, components: { App },
template: "<App/>" template: "<App/>"
}); });
<template> <template>
<div></div> <div>
<el-breadcrumb separator="/" class="bread_crumb1">
<el-breadcrumb-item :to="{ path: '/authority' }">权限管理</el-breadcrumb-item>
<el-breadcrumb-item>菜单管理</el-breadcrumb-item>
</el-breadcrumb>
<el-container class="cont">
<el-row class="row_height">
<el-col :span="8" class="col_sty_r">
<div class="right_station">
<div class="right_station_head">菜单结构列表</div>
<div class="line"></div>
<div class="tree_station">
<el-tree
class="filter-tree"
node-key="id"
:expand-on-click-node="false"
@node-click="nodeClick"
:data="treeData"
:props="defaultProps"
default-expand-all
:filter-node-method="checkNode"
ref="tree"
></el-tree>
</div>
</div>
</el-col>
<el-col :span="16" class="col_sty_l">
<div class="left_station">
<div class="btn_club">
<button v-if="nodeId==''" class="btn btn_dis">
<i class="el-icon-plus"></i>&nbsp;新建
</button>
<button v-else class="btn btn_act1" @click="appendNode()">
<i class="el-icon-plus"></i>&nbsp;新建
</button>
<button v-if="!previousSibling" class="btn btn_dis">
<i class="el-icon-top"></i>&nbsp;上移
</button>
<button v-else class="btn btn_act2" @click="nodePosition(-1)">
<i class="el-icon-top"></i>&nbsp;上移
</button>
<button v-if="!nextSibling" class="btn btn_dis">
<i class="el-icon-bottom"></i>&nbsp;下移
</button>
<button v-else class="btn btn_act2" @click="nodePosition(1)">
<i class="el-icon-bottom"></i>&nbsp;下移
</button>
<button v-if="mcHold&&ymHold" class="btn btn_act1" @click="saveNode()">
<i class="el-icon-check"></i>&nbsp;保存
</button>
<button v-else class="btn btn_dis">
<i class="el-icon-check"></i>&nbsp;保存
</button>
<button v-if="!reset" class="btn btn_dis">
<i class="el-icon-refresh-left"></i>&nbsp;重置
</button>
<button v-else class="btn btn_act4" @click="resetForm()">
<i class="el-icon-refresh-left"></i>&nbsp;重置
</button>
<button v-if="nodeId==''" class="btn btn_dis">
<i class="el-icon-close"></i>&nbsp;删除
</button>
<button v-else class="btn btn_act3" @click="deleteNode()">
<i class="el-icon-close"></i>&nbsp;删除
</button>
</div>
<div class="line"></div>
<el-form class="form_station" :model="formDetail" :rules="rules">
<el-form-item prop="menuName">
<div class="form_item_title">菜单名称:</div>
<el-input v-model="formDetail.menu_name"></el-input>
</el-form-item>
<el-form-item prop="pageUrl">
<div class="form_item_title">菜单访问地址:</div>
<el-input v-model="formDetail.visit_url"></el-input>
</el-form-item>
<el-form-item prop="describe">
<div class="form_item_title">菜单组别:</div>
<el-input v-model="formDetail.team_name"></el-input>
</el-form-item>
<el-form-item prop="describe">
<div class="form_item_title">菜单描述:</div>
<el-input v-model="formDetail.detail"></el-input>
</el-form-item>
<el-form-item prop="describe">
<div class="form_item_title">菜单排序:</div>
<el-input v-model="formDetail.sort" disabled></el-input>
</el-form-item>
<el-form-item>
<div class="form_item_title">创建人:</div>
<el-input v-model="formDetail.founder" disabled></el-input>
</el-form-item>
<el-form-item>
<div class="form_item_title">创建时间:</div>
<el-input v-model="formDetail.createTime" disabled></el-input>
</el-form-item>
</el-form>
</div>
</el-col>
</el-row>
</el-container>
</div>
</template> </template>
<script> <script>
export default { export default {
methods: {} data() {
var validateMenuName = (rule, value, callback) => {
if (value != this.formContrast.mcHold) {
this.reset = true;
}
if (value == "") {
this.mcHold = false;
callback(new Error("请填写菜单名称"));
} else {
this.mcHold = true;
callback();
}
};
var validatePageUrl = (rule, value, callback) => {
if (value != this.formContrast.pageUrl) {
this.reset = true;
}
if (value == "") {
this.ymHold = false;
callback(new Error("请填写运行页面"));
} else {
this.ymHold = true;
callback();
}
};
var validateDescribe = (rule, value, callback) => {
if (value != this.formContrast.describe) {
this.reset = true;
}
callback();
};
return {
checkText: "",
treeData: [
{
id: 1,
label: "一级 2",
children: [
{
id: 3,
label: "二级 2-1",
children: [
{
id: 4,
label: "三级 3-1-1",
children: [
{
id: 5,
label: "三级 3-1-2",
disabled: true
}
]
},
{
id: 5,
label: "三级 3-1-2",
disabled: true
}
]
},
{
id: 2,
label: "二级 2-2",
disabled: true,
children: [
{
id: 6,
label: "三级 3-2-1"
},
{
id: 7,
label: "三级 3-2-2",
disabled: true
}
]
}
]
}
],
defaultProps: {
children: "children",
label: "label"
},
formDetail: {
menu_name: "",
visit_url: "",
team_name: "",
detail: "",
sort: "",
creatTime: ""
},
formYs: {
menu_name: "",
visit_url: "",
team_name: "",
detail: "",
sort: "",
creatTime: ""
},
formContrast: {
menu_name: "",
visit_url: "",
team_name: "",
detail: "",
sort: "",
creatTime: ""
},
rules: {
menuName: [
{ required: true, message: "请填写菜单名称", trigger: "blur" },
{ validator: validateMenuName, trigger: "blur" }
],
pageUrl: [
{ required: true, message: "请填写运行页面", trigger: "blur" },
{ validator: validatePageUrl, trigger: "blur" }
],
describe: [{ validator: validateDescribe, trigger: "blur" }]
},
nodeId: "",
previousSibling: false,
nextSibling: false,
mcHold: false,
ymHold: false,
reset: false,
newI: 0
};
},
watch: {
checkText(val) {
this.$refs.tree.filter(val);
}
},
mounted() {
// this.getTree();
},
methods: {
checkNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
nodeClick(data, node) {
this.nodeId = data.id;
if (node.previousSibling != undefined) {
this.previousSibling = true;
} else {
this.previousSibling = false;
}
if (node.nextSibling != undefined) {
this.nextSibling = true;
} else {
this.nextSibling = false;
}
let cid = String(data.id);
if (cid.indexOf("new") > -1) {
this.formDetail = this.formYs;
} else {
let query = {
id: this.nodeId
};
this.$api.authority.getMenu(query).then(response => {
if (response.data.success == 1) {
this.formDetail = response.data.data;
this.formContrast = response.data.data;
callback();
} else {
this.ruleFormIcon.username = false;
callback(new Error(response.data.errMsg));
}
});
}
},
appendNode() {
let newChild = { id: "new" + this.newI, label: "新菜单", children: [] };
this.newI++;
let data = this.nodeData;
this.$refs.tree.append(newChild, this.nodeId);
this.$refs.tree.setCurrentKey(newChild.id);
let node = this.$refs.tree.getNode(newChild.id);
this.nodeClick(newChild, node);
this.formDetail.sort = node.parent.childNodes.length;
},
resetForm() {
this.formDetail = this.formContrast;
},
getTree() {
this.$api.authority.getMenuList().then(response => {
console.log(response);
this.treeData = response.data.spec;
});
},
saveNode() {
console.log(this.formDetail);
let query = {
menu_id: this.nodeId,
menu_name: this.formDetail.menu_name,
detail: this.formDetail.detail,
visit_url: this.formDetail.visit_url,
team_name: this.formDetail.team_name
};
this.$api.authority.editMenu(query).then(response => {
if (response.data.success == 1) {
this.getTree();
} else {
console.log(response.data.errMsg);
}
});
},
deleteNode() {
let params = {
id: this.nodeId
};
this.$api.authority.delMenu(params).then(response => {
if (response.data.success == 1) {
this.getTree();
} else {
console.log(response.data.errMsg);
}
});
},
nodePosition(type) {
let node = this.$refs.tree.getNode(this.nodeId);
let nodesNum = node.parent.childNodes.indexOf(node);
let nodeNext = {};
if (nodesNum != -1) {
nodeNext = node.parent.childNodes[nodesNum + type];
}
let params = {
data: [
{
id: node.data.id,
sort: nodeNext.data.sort
},
{
id: nodeNext.data.id,
sort: node.data.sort
}
]
};
console.log(params);
this.$api.authority.positionMenu(params).then(response => {
if (response.data.success == 1) {
this.getTree();
} else {
console.log(response.data.errMsg);
}
});
}
}
}; };
</script> </script>
<style scoped> <style scoped>
.cont {
height: calc(100vh - 140px);
margin: 0 20px;
}
.row_height {
width: 100%;
height: 100%;
}
.col_sty_r {
height: 100%;
padding: 0 10px 20px 0;
}
.col_sty_l {
height: 100%;
padding: 0 0 20px 10px;
}
.right_station {
height: 100%;
background-color: #fff;
border-radius: 8px;
}
.left_station {
height: 100%;
background-color: #fff;
border-radius: 8px;
}
.right_station_head {
padding: 20px 20px 20px 40px;
position: relative;
line-height: 20px;
color: #58617a;
font-size: 16px;
font-weight: 700;
}
.right_station_head::after {
content: "";
position: absolute;
width: 4px;
height: 16px;
background-color: #515fe7;
border-radius: 2px;
top: 22px;
left: 24px;
}
.cont .line {
width: 100%;
height: 1px;
margin: 0;
background-color: #edf0ff;
}
.right_station .tree_station {
height: calc(100% - 90px);
margin: 15px 10px 0 20px;
overflow: auto;
}
.right_station1 .tree_station::-webkit-scrollbar {
/*滚动条整体样式*/
width: 16px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.right_station1 .tree_station::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 8px;
/* background: #dde4ff; */
box-shadow: 8px 0 0 #a5adb7 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
.right_station1 .tree_station::-webkit-scrollbar-track {
/*滚动条里面轨道*/
border-radius: 8px;
/* background: #f4f4f4; */
box-shadow: 8px 0 0 #f4f4f4 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
.btn_club {
height: 60px;
line-height: 40px;
padding: 10px 20px;
}
.left_station .btn {
height: 30px;
padding: 0 14px;
font-size: 12px;
border-radius: 4px;
outline: none;
border: 1px #eee solid;
margin-right: 4px;
}
.left_station .btn.btn_act1 {
background-color: #264dd9;
color: #f4f7fc;
cursor: pointer;
}
.left_station .btn.btn_act1:hover {
background-color: #4969db;
}
.left_station .btn.btn_act2 {
background-color: #e6ebfe;
color: #0f2683;
cursor: pointer;
}
.left_station .btn.btn_act2:hover {
background-color: #eaf1ff;
}
.left_station .btn.btn_act3 {
background-color: #e15260;
color: #f8f9fd;
cursor: pointer;
}
.left_station .btn.btn_act3:hover {
background-color: #f16270;
}
.left_station .btn.btn_act4 {
background-color: #41558c;
color: #f4f7fc;
cursor: pointer;
}
.left_station .btn.btn_act4:hover {
background-color: #5b6a91;
}
.left_station .btn.btn_dis {
background-color: #bcc1d0;
color: #f4f7fc;
cursor: not-allowed;
}
.left_station .form_station {
height: calc(100% - 90px);
margin: 15px 20px 0;
overflow: auto;
}
.form_item_title {
padding: 0 15px;
line-height: 40px;
}
</style>
<style>
.left_station .el-form-item {
margin-bottom: 10px;
}
.left_station .el-input__inner {
background-color: #f7f8f9;
border-radius: 8px;
border: solid 1px #e3e5ef;
padding: 0 15px;
color: #242c43;
}
.left_station .is-disabled .el-input__inner {
background-color: #e3e4e6;
border-radius: 8px;
border: solid 1px #e3e5ef;
padding: 0 15px;
color: #242c43;
}
.left_station .el-textarea__inner::-webkit-scrollbar {
/*滚动条整体样式*/
width: 16px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.left_station .el-textarea__inner::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 8px;
box-shadow: 8px 0 0 #a5adb7 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
.left_station .el-textarea__inner::-webkit-scrollbar-track {
/*滚动条里面轨道*/
border-radius: 8px;
box-shadow: 8px 0 0 #f4f4f4 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
.left_station .el-form-item__label {
font-weight: bold;
}
.tree_station .el-tree-node__content {
height: 30px;
}
.tree_station .el-tree-node__label {
font-size: 14px;
}
.tree_station .el-tree-node__expand-icon {
color: #264dd9;
padding: 2px;
}
.tree_station .el-tree-node__expand-icon.is-leaf {
color: transparent;
border: 0;
}
.tree_station .el-tree-node.is-current > .el-tree-node__content {
background-color: #e6ebfe;
color: #515fe7;
}
.tree_station .el-tree-node__expand-icon.expanded {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
.tree_station .el-icon-caret-right {
margin-right: 15px;
border: 1px #d0d6f4 solid;
border-radius: 4px;
}
.tree_station .el-icon-caret-right:before {
}
.tree_station .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
content: "\e6d8";
font-size: 12px;
}
.tree_station .el-tree-node__expand-icon.el-icon-caret-right:before {
content: "\e6d9";
font-size: 12px;
}
</style> </style>
...@@ -50,6 +50,12 @@ export default { ...@@ -50,6 +50,12 @@ export default {
showDialog() { showDialog() {
this.$refs.dialog.show(); this.$refs.dialog.show();
}, },
editItem(item) {
this.$router.push(`/authority/roles/edit/${item.id}`);
},
allotItem(item) {
this.$router.push(`/authority/roles/allot/${item.id}`);
},
deleteItem(item) { deleteItem(item) {
this.dialogInfo.title = ""; this.dialogInfo.title = "";
this.dialogInfo.msg = "确认删除当前角色"; this.dialogInfo.msg = "确认删除当前角色";
...@@ -67,9 +73,7 @@ export default { ...@@ -67,9 +73,7 @@ export default {
label: "角色类型", label: "角色类型",
prop: "name", prop: "name",
type: "button", type: "button",
callback(item) { callback: this.editItem,
console.log("查看详情 - " + item.name);
},
}, },
{ {
label: "创建人", label: "创建人",
...@@ -91,9 +95,7 @@ export default { ...@@ -91,9 +95,7 @@ export default {
actionList: [ actionList: [
{ {
label: "分配权限", label: "分配权限",
callback(item) { callback: this.allotItem,
console.log("分配权限 - " + item.name);
},
}, },
{ {
label: "删除", label: "删除",
......
<template> <template>
<div class="users_list"> <div class="users_list">
<apass-list <apass-list
@list-action="listAction"
search-placeholder="请输入关键字" search-placeholder="请输入关键字"
:list-total="listTotal" :list-total="listTotal"
@list-action="initDatas"
> >
<el-breadcrumb separator="/" slot="breadcrumb"> <el-breadcrumb separator="/" slot="breadcrumb">
<el-breadcrumb-item to="/authority">权限管理</el-breadcrumb-item> <el-breadcrumb-item to="/authority">权限管理</el-breadcrumb-item>
...@@ -185,8 +185,29 @@ export default { ...@@ -185,8 +185,29 @@ export default {
showDialog: false, showDialog: false,
}), }),
methods: { methods: {
listAction(value) { initDatas(filter) {
console.log(value); // console.log(filter);
this.$http
.get("/apaas/backmgt/user/list", {
params: {
keyword: filter.keyword,
limit: filter.page,
page: filter.size,
user_id: "ym",
user_name: "",
department_id: "",
state: 1,
},
})
.then(({ data }) => {
console.log(data);
// this.listTotal = data.data.total;
// this.listData = data.data.data;
})
.catch((error) => {
console.log(error);
});
}, },
setRole(item) { setRole(item) {
console.log("setRole " + item.name); console.log("setRole " + item.name);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<script> <script>
// @ is an alias to /src // @ is an alias to /src
import CommodityList from "@/components/commodity-list.vue"; import CommodityList from "@/components/service-list/commodity-list.vue";
import BlockRadius from "@/components/block-radius"; import BlockRadius from "@/components/block-radius";
export default { export default {
components: { components: {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<script> <script>
// @ is an alias to /src // @ is an alias to /src
import Commodity from "@/components/commodity.vue"; import Commodity from "@/components/service-list/commodity.vue";
import BlockRadius from "@/components/block-radius"; import BlockRadius from "@/components/block-radius";
export default { export default {
components: { components: {
......
<template>
<div class="login_backg">
<div class="login_all">
<div class="headercontainer">
<div class="center-logo" style="width:100%;">
<img class="logo" src="@/assets/imgs/ic_fuwuzs_navy.png" alt />
</div>
</div>
<el-card v-if="active == 'login'" class="box-card login">
<!-- <div slot="header" class="clearfix">
<span class="login_head">用户登录</span>
</div>-->
<div v-if="msgShow" :class="msgShow==true?'login_msg':''">{{msg}}</div>
<el-form :model="form" ref="form1" @submit.native.prevent class="login_forms">
<el-form-item>
<el-input v-model="form.username" autofocus="autofocus" placeholder="请输入用户名或邮箱"></el-input>
</el-form-item>
<el-form-item>
<el-input
v-if="visible"
:type="visible ? 'password':'text'"
v-model="form.password"
placeholder="请输入密码"
>
<i
slot="suffix"
title="显示密码"
@click="changePass()"
style="cursor:pointer;"
:class="visible ? 'el-icon-view':'el-icon-view icon_blue'"
></i>
</el-input>
</el-form-item>
</el-form>
<el-form>
<el-form-item class="rembme">
<el-checkbox v-model="checked">记住我</el-checkbox>
</el-form-item>
<el-form-item>
<el-button
class="btn_sub sub1"
type="primary"
@click.prevent="login_remember_info()"
>登 录</el-button>
</el-form-item>
<el-form-item>
<el-button class="btn_sub sub2" @click.prevent="register">
还没有账户?立即注册&nbsp;&nbsp;
<i class="el-icon-arrow-right"></i>
</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card v-else-if="active == 'register'" class="box-card login">
<div slot="header" class="clearfix">
<span class="login_head">用户注册</span>
</div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<el-form-item prop="username" :class="ruleFormIcon.username?'':'icon_show'">
<el-input v-model.trim="ruleForm.username" placeholder="账号为字母、数字、下划线或其组合"></el-input>
</el-form-item>
<el-form-item prop="email" :class="ruleFormIcon.email?'':'icon_show'">
<el-input v-model.trim="ruleForm.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
<el-form-item prop="cname" :class="ruleFormIcon.cname?'':'icon_show'">
<el-input v-model.trim="ruleForm.cname" placeholder="请输入中文名"></el-input>
</el-form-item>
<el-form-item prop="password" :class="ruleFormIcon.password?'':'icon_show'">
<el-input
auto-complete="new-password"
autocomplete="off"
v-model.trim="ruleForm.password"
:type="pwdCheck?'text':'password'"
placeholder="密码为大小写字母及数字组合,不少于6位"
>
<i
slot="suffix"
:title="truePwdCheck?'隐藏密码':'显示密码'"
:class="pwdCheck?'el-icon-view icon_blue':'el-icon-view'"
@click="pwdCheck=!pwdCheck"
></i>
</el-input>
</el-form-item>
<el-form-item prop="truePassword" :class="ruleFormIcon.truePassword?'':'icon_show'">
<el-input
auto-complete="new-password"
autocomplete="off"
v-model.trim="ruleForm.truePassword"
:type="truePwdCheck?'text':'password'"
placeholder="请确认密码"
>
<i
slot="suffix"
:title="truePwdCheck?'隐藏密码':'显示密码'"
:class="truePwdCheck?'el-icon-view icon_blue':'el-icon-view'"
@click="truePwdCheck=!truePwdCheck"
></i>
</el-input>
</el-form-item>
</el-form>
<el-form :model="yzms" :rules="yzmRules" ref="yzms" class="demo-ruleForm">
<el-form-item prop="yzm" class="yzm" :class="ruleFormIcon.yzm?'':'icon_show'">
<el-input v-model.trim="yzms.yzm" placeholder="请输入验证码"></el-input>
<img class="yzm_img" title="看不清?换一张" :src="imgSrc" @click="getImg()" />
</el-form-item>
</el-form>
<el-form class="demo-ruleForm">
<el-form-item>
<el-button class="btn_sub sub1" type="primary" @click.prevent="submitForm()">注 册</el-button>
</el-form-item>
<el-form-item>
<el-button class="btn_sub sub2" @click.prevent="login">
<i class="el-icon-arrow-left"></i>&nbsp;&nbsp;登录已有账号
</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</div>
</template>
<script>
import { getCookie, clearCookie, setCookie } from "@/services/cookie.js";
export default {
data() {
var validatePass = (rule, value, callback) => {
if (value !== this.ruleForm.password) {
this.ruleFormIcon.truePassword = false;
callback(new Error("密码和确认密码不一致"));
} else {
this.ruleFormIcon.truePassword = true;
callback();
}
};
var validateUser = (rule, value, callback) => {
let reg = new RegExp(/^[a-zA-Z0-9-_]{0,50}$/);
if (value == "") {
this.ruleFormIcon.username = false;
callback(new Error("请输入账号"));
} else if (!reg.test(value)) {
this.ruleFormIcon.username = false;
callback(new Error("支持大小写字母,数字,-_ ,长度不超过50个字符"));
} else {
let url = `/awecloud/dex/user/${value}`;
this.$http
.get(url)
.then(response => {
if (response.data.success == 1) {
this.ruleFormIcon.username = true;
callback();
} else {
this.ruleFormIcon.username = false;
callback(new Error(response.data.errMsg));
}
})
.catch(function(response) {});
}
};
var validateEmail = (rule, value, callback) => {
let reg = new RegExp(
/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
);
if (value == "") {
this.ruleFormIcon.email = false;
callback(new Error("请输入邮箱"));
} else if (!reg.test(value)) {
this.ruleFormIcon.email = false;
callback(new Error("请输入正确的邮箱格式"));
} else {
let url = `/awecloud/dex/email/${value}`;
this.$http
.get(url)
.then(response => {
if (response.data.success == 1) {
this.ruleFormIcon.email = true;
callback();
} else {
this.ruleFormIcon.email = false;
callback(new Error(response.data.errMsg));
}
})
.catch(function(response) {});
}
};
var validatePassword = (rule, value, callback) => {
let reg = new RegExp(
/^.*(?=.{6,50})(?=.*\d)(?=.*[A-Z]{1,})(?=.*[a-z]{1,}).*$/
);
if (value == "") {
this.ruleFormIcon.password = false;
callback(new Error("请输入密码"));
} else if (!reg.test(value)) {
this.ruleFormIcon.password = false;
callback(new Error("密码包含大小写字母、数字,长度不小于6位"));
} else {
this.ruleFormIcon.password = true;
callback();
}
};
var validateCname = (rule, value, callback) => {
if (value == "") {
this.ruleFormIcon.cname = false;
callback(new Error("请输入中文姓名"));
} else {
this.ruleFormIcon.cname = true;
callback();
}
};
var validateYzm = (rule, value, callback) => {
if (value == "") {
this.ruleFormIcon.yzm = false;
this.yzmState = false;
callback(new Error("请输入验证码"));
} else {
let url = `/awecloud/dex/verifyCaptcha?id=${this.imgId}&value=${value}`;
this.$http
.get(url)
.then(response => {
if (response.data.success == 1) {
this.ruleFormIcon.yzm = true;
this.yzmState = true;
callback();
} else {
this.ruleFormIcon.yzm = false;
this.yzmState = false;
callback(new Error(response.data.errMsg));
}
})
.catch(function(response) {});
}
};
return {
form: {
username: "",
password: ""
},
visible: true,
checked: false,
msg: "",
msgShow: false,
active: "login",
pwdCheck: false,
truePwdCheck: false,
ruleForm: {
username: "",
cname: "",
password: "",
truePassword: "",
email: ""
},
yzms: {
yzm: ""
},
yzmRules: {
yzm: [{ validator: validateYzm, trigger: "blur" }]
},
yzmState: false,
ruleFormIcon: {
username: true,
cname: true,
password: true,
truePassword: true,
email: true,
yzm: true
},
rules: {
username: [{ validator: validateUser, trigger: "blur" }],
cname: [{ validator: validateCname, trigger: "blur" }],
password: [{ validator: validatePassword, trigger: "blur" }],
truePassword: [{ validator: validatePass, trigger: "blur" }],
email: [{ validator: validateEmail, trigger: "blur" }]
},
imgSrc: "",
imgId: ""
};
},
mounted() {
this.init();
},
created() {
if (getCookie("username") && getCookie("password")) {
this.checked = true;
this.form.username = window.atob(getCookie("username"));
this.form.password = window.atob(getCookie("password"));
} else {
this.checked = false;
}
},
methods: {
init() {
if (this.$route.params.username != undefined) {
this.form.username = this.$route.params.username;
this.form.password = this.$route.params.password;
}
},
//登录请求
login_request() {
let url = `/awecloud/dex/login`;
let query = this.form;
this.$http
.post(url, JSON.stringify(query), {
headers: {
"Content-Type": "application/json;charset=UTF-8"
}
})
.then(response => {
if (response.data.success == 1) {
window.location.href = "/awecloud/ui/";
} else if (response.data.success == 0) {
this.msg = response.data.errMsg;
this.msgShow = true;
// if (errCode.indexOf("invalid_login") != -1) {
// this.hint = "帐号或密码错误";
// }
// if (errCode.indexOf("too_many_errors1") != -1) {
// this.hint = "该账号已被冻结";
// }
// if (errCode.indexOf("no_user") != -1) {
// this.hint = "未注册此用户";
// }
// if (errCode.indexOf("no_pass") != -1) {
// this.hint = "该账户未审批";
// }
// if (errCode.indexOf("too_many_errors2") != -1) {
// var num = errCode.split("|")[1].split("_")[0];
// var time = errCode.split("|")[1].split("_")[1];
// this.hint =
// "该账号密码连续错误次数达到" +
// num +
// "次,系统自动冻结" +
// time +
// "分钟";
// }
// if (errCode.indexOf("new_login") != -1) {
// this.hint =
// "您的账户已经在其他地方登陆,点击确定重新登录。如果不是您自己操作,您的密码可能已经丢失,请尽快修改密码。";
// }
}
})
.catch(function(response) {
console.log(response);
});
},
login_remember_info() {
// console.log(this.checked);
if (this.checked) {
setCookie("username", window.btoa(this.form.username));
setCookie("password", window.btoa(this.form.password));
} else {
clearCookie("username");
clearCookie("password");
}
this.login_request();
},
changePass() {
this.visible = !this.visible;
},
register() {
this.active = "register";
this.getImg();
},
getImg() {
let url = `/awecloud/dex/getCaptcha?width=240&height=60`;
this.$http
.get(url)
.then(response => {
if (response.data.success == 1) {
// console.log(response.data.data.captcha);
this.imgId = response.data.data.id;
this.imgSrc = response.data.data.captcha;
// this.$router.push({
// path: "/login",
// query: {
// username: this.ruleForm.username,
// password: this.ruleForm.password
// }
// });
}
})
.catch(function(response) {});
},
submitForm() {
let self = this;
let setI = setInterval(function() {
// console.log(self.yzmState);
if (self.yzmState) {
clearInterval(setI);
self.submitAll();
}
}, 50);
},
submitAll() {
this.$refs["ruleForm"].validate(valid => {
if (valid) {
let url = `/awecloud/dex/register`;
let query = {
name: this.ruleForm.username,
alias: this.ruleForm.cname,
password: this.ruleForm.password,
email: this.ruleForm.email,
phone: "",
avatar: ""
};
this.$http
.post(url, query)
.then(response => {
if (response.data.success == 1) {
// console.log(response.data.data);
this.$message({
message: "注册成功",
type: "success",
duration: 1000
});
let self = this;
self.$router.push({
name: "Login"
});
// self.$router.push({
// name: "Login",
// params: {
// username: self.ruleForm.username,
// password: self.ruleForm.password
// }
// });
}
})
.catch(function(response) {});
} else {
return false;
}
});
},
login() {
this.active = "login";
}
}
};
</script>
<style scoped>
.login_backg {
height: 100vh;
background: url("~@/assets/imgs/shop_img_banner_test.png") center center;
background-size: 100% 100%;
overflow: auto;
}
.login_all {
width: 500px;
height: 100%;
padding-top: 20vh;
margin: 0 auto;
}
.login {
min-width: 500px;
font-size: 16px;
}
.login .el-card__header {
padding: 10px;
}
.login_head {
display: block;
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: center;
color: #1a2236;
}
.login .el-form-item {
margin-bottom: 22px;
}
.warning_icon_div {
display: inline-block;
width: 9%;
}
.login .el-input {
width: 80%;
margin-left: 10%;
}
.login .el-input__inner {
height: 40px;
border-radius: 20px;
padding-left: 20px;
padding-right: 38px;
border: solid 1px #9cb5f8;
}
.login .el-input__suffix {
right: 15px;
font-size: 18px;
}
.login .rembme {
padding-left: 14%;
margin-bottom: 10px;
}
.login .el-button {
width: 80%;
margin-left: 10%;
height: 40px;
border-radius: 20px;
}
.sub1 {
background-color: #264dd9;
color: #fff;
}
.sub2 {
background-color: #dde4ff;
color: #264dd9;
}
.headercontainer {
max-width: 960px;
margin: 10px 0px 15px 0px;
margin-right: auto;
margin-left: auto;
}
.center-logo {
/* margin: 8px 0; */
text-align: center;
}
.el-form--label-top .el-form-item__label {
padding: 0px;
}
.logo {
width: 160px;
height: 36px;
}
.login_forms {
margin-top: 20px;
}
.login_msg {
width: 100%;
height: 30px;
margin-top: 10px;
color: #c62249;
text-align: center;
position: relative;
top: 0;
opacity: 1;
animation: login_in 1s;
}
@keyframes login_in {
0% {
top: 100%;
opacity: 0;
}
100% {
top: 0;
opacity: 1;
}
}
.icon_show {
position: relative;
}
.icon_show::before {
content: "";
width: 20px;
height: 20px;
position: absolute;
top: 10px;
left: 15px;
background: url("~@/assets/imgs/ic_warning.png") no-repeat center center;
}
.icon_blue {
color: #5c82ff;
}
.login .yzm .el-input {
width: 40%;
margin-left: 10%;
}
.yzm {
position: relative;
}
.yzm .yzm_img {
position: absolute;
width: 30%;
margin-left: 5%;
cursor: pointer;
}
</style>
<style>
.login .el-input__suffix {
font-size: 20px;
right: 10px;
}
.login .el-form-item__error {
left: 14%;
}
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list :name="name" :url="url" :urlList="urlList" :urlFilter="urlFilter"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service-list/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({
urlFilter: "",
url: "",
urlList: "2222",
name: ""
}),
mounted() {
this.getVal(this.$route.path);
},
methods: {
getVal(val) {
switch (val) {
case "/shop/data_service_list":
this.name = "数据服务";
this.urlFilter = "5";
break;
case "/shop/space_time_service_list":
this.name = "时空服务";
this.urlFilter = "6";
break;
case "/shop/video_service_list":
this.name = "视频服务";
this.urlFilter = "7";
break;
case "/shop/perception_service_list":
this.name = "感知服务";
this.urlFilter = "10";
break;
case "/shop/comprehensive_app_list":
this.name = "综合服务";
this.urlFilter = "";
break;
case "/shop/app_store_list":
this.name = "应用商店";
this.urlFilter = "";
break;
default:
this.name = "";
this.urlFilter = "";
break;
}
}
},
watch: {
"$route.path": {
handler(val) {
this.getVal(val);
}
}
}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list name="应用商店" url="yysdDetail" urlList="url1sss" urlFilter="urldwad2222"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list name="综合应用" url="zhfwDetail" urlList="url1sss" urlFilter="urldwad2222"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list name="数据服务" url="sjfwDetail" urlList="url1sss" urlFilter="urldwad2222"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list name="感知服务"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list name="时空服务" url="skfwDetail" urlList="url1sss" urlFilter="urldwad2222"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div>
<el-container>
<el-aside width="180px">
<service-shop-menu></service-shop-menu>
</el-aside>
<el-main>
<service-list name="视频服务"></service-list>
</el-main>
</el-container>
</div>
</template>
<script>
import ServiceShopMenu from "@/components/service_shop_menu";
import ServiceList from "@/components/service_list";
export default {
components: {
ServiceShopMenu,
ServiceList
},
data: () => ({}),
mounted() {},
methods: {}
};
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
margin: 0 auto; margin: 0 auto;
} }
.shopping_title { .shopping_title {
height: 40px; height: 45px;
line-height: 40px; line-height: 45px;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
<el-breadcrumb separator="/" class="bread_crumb1"> <el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item>个人中心</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/user' }">{{ $t("lang.personalCenter") }}</el-breadcrumb-item>
<el-breadcrumb-item>消息管理</el-breadcrumb-item> <el-breadcrumb-item>{{ $t("lang.messageCenter") }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<block-radius class="message_block"> <block-radius class="message_block">
<ces-table <ces-table
......
<template> <template>
<div> <div>
info <el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item :to="{ path: '/user' }">{{ $t("lang.personalCenter") }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ $t("lang.profile") }}</el-breadcrumb-item>
</el-breadcrumb>
<block-radius class="info_block">
<el-tabs v-model="activeName" @tab-click="changeTab">
<el-tab-pane label="个人信息详情" name="0"></el-tab-pane>
<el-tab-pane label="业务系统详情" name="1"></el-tab-pane>
</el-tabs>
</block-radius>
</div> </div>
</template> </template>
<script> <script>
import BlockRadius from "@/components/block-radius";
export default { export default {
components: {
BlockRadius
},
data: () => ({ data: () => ({
activeName: "0"
}), }),
mounted() {}, mounted() {},
methods: {} methods: {
changeTab() {
}
}
}; };
</script> </script>
<style scoped> <style scoped>
.info_block {
margin: 0 20px;
}
</style> </style>
\ No newline at end of file
...@@ -944,4 +944,13 @@ export default { ...@@ -944,4 +944,13 @@ export default {
.fwcs_tabs .el-tabs__header { .fwcs_tabs .el-tabs__header {
margin: 20px 0; margin: 20px 0;
} }
.zhyy_select .el-input__prefix, .el-input__suffix {
position: absolute;
top: 0;
right: 10px;
-webkit-transition: all .3s;
height: 100%;
color: #C0C4CC;
text-align: right;
}
</style> </style>
import workbench from '@/request/api/workbench'; import workbench from '@/request/api/workbench';
import serviceShop from '@/request/api/service_shop'; import serviceShop from '@/request/api/service_shop';
import user from '@/request/api/user'; import user from '@/request/api/user';
import authority from '@/request/api/authority';
export default { export default {
workbench, workbench,
serviceShop, serviceShop,
user user,
authority
} }
\ No newline at end of file
import axios from '@/request/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块
const authority = {
// Menu
getMenuList() {
return axios.get(`/apaas/backmgt/menu/list`);
},
addMenu(params) {
return axios.post(`/apaas/backmgt/menu`, params);
},
delMenu(params) {
return axios.delete(`/apaas/backmgt/menu/id/${params.id}`);
},
getMenu(params) {
return axios.get(`/apaas/backmgt/menu/id/${params.id}`);
},
positionMenu(params) {
return axios.post(`/apaas/backmgt/menu/menuOrder`, params);
},
editMenu(params) {
return axios.put(`/apaas/backmgt/menu`, params);
}
}
export default authority;
...@@ -3,6 +3,42 @@ import qs from 'qs'; // 根据需求是否导入qs模块 ...@@ -3,6 +3,42 @@ import qs from 'qs'; // 根据需求是否导入qs模块
const serviceShop = { const serviceShop = {
// service list
getServiceShopFilter(params) {
// 5:数据 6:时空 7:视频 10:感知
return axios.get(`/apaas/serviceapp/v3/servicemarket/profileInfo?serviceType=${params.type}`);
},
getServiceShopList(params) {
return axios.get(`/apaas/serviceapp/v3/servicemarket/list?
serviceName=${params.serviceName}&serviceType1=${params.serviceType1}&
serviceType2s=${params.serviceType2s}&dataDomains=${params.dataDomains}&
organizeIds=${params.organizeIds}&orderBy=${params.orderBy}&
Page=${params.Page}&Size=${params.Size}`);
},
getServiceShopDetail(params) {
return axios.get(`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`)
},
// shopping cart
addShoppingCart(params) {
return axios.post(`/apaas/serviceapp/v3/shopcart/add`, params);
},
delShoppingCart(params) {
// note: if parans is empty, it will delete all data.
return axios.post(`/apaas/serviceapp/v3/shopcart/del`, params);
},
getShoppingCart() {
return axios.get(`/apaas/serviceapp/v3/shopcart/list`);
},
updateShoppingCart(params) {
return axios.post(`/apaas/serviceapp/v3/shopcart/update`, params);
},
getSystemList() {
return axios.get(`/apaas/serviceapp/v3/shopcart/systems`);
},
submitShoppingCart() {
return axios.post(`/apaas/serviceapp/v3/shopcart/apply`, params);
},
} }
export default serviceShop; export default serviceShop;
...@@ -2,7 +2,9 @@ import axios from '@/request/http'; // 导入http中创建的axios实例 ...@@ -2,7 +2,9 @@ import axios from '@/request/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块 import qs from 'qs'; // 根据需求是否导入qs模块
const user = { const user = {
orderList(params) {
return axios.get(`/apaas/serviceapp/v3/order/list?serviceName=${params.select}&orderStatus=${params.status}&serviceTypes=${params.types.join(',')}&Page=${params.page}&Size=${params.limit}`);
},
} }
export default user; export default user;
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
import axios from 'axios'; import axios from 'axios';
import router from '../router'; import router from '../router';
import store from '../store/index'; import store from '../store/index';
import ElementUI from 'element-ui';
const tip = msg => { const tip = msg => {
console.log(msg) console.log(msg);
ElementUI.Message.error(msg);
} }
/** /**
...@@ -46,13 +48,13 @@ const errorHandle = (status, other) => { ...@@ -46,13 +48,13 @@ const errorHandle = (status, other) => {
}, 1000); }, 1000);
break; break;
case 404: tip('请求的资源不存在'); break; case 404: tip('请求的资源不存在'); break;
case 408: tip('请求超时(408)'); case 408: tip('请求超时(408)'); break;
case 500: tip('服务器错误(500)'); case 500: tip('服务器错误(500)'); break;
case 501: tip('服务未实现(501)'); case 501: tip('服务未实现(501)'); break;
case 502: tip('网络错误(502)'); case 502: tip('网络错误(502)'); break;
case 503: tip('服务不可用(503)'); case 503: tip('服务不可用(503)'); break;
case 504: tip('网络超时(504)'); case 504: tip('网络超时(504)'); break;
case 505: tip('HTTP版本不受支持(505)'); case 505: tip('HTTP版本不受支持(505)'); break;
default: tip(`连接出错,${other}`); default: tip(`连接出错,${other}`);
} }
} }
...@@ -67,8 +69,8 @@ instance.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlenco ...@@ -67,8 +69,8 @@ instance.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlenco
*/ */
instance.interceptors.request.use( instance.interceptors.request.use(
config => { config => {
const token = store.state.token; // const token = store.state.token;
token && (config.headers.Authorization = token); // token && (config.headers.Authorization = token);
return config; return config;
}, },
error => Promise.error(error)) error => Promise.error(error))
......
...@@ -16,6 +16,11 @@ export default new Router({ ...@@ -16,6 +16,11 @@ export default new Router({
path: "/", path: "/",
redirect: "/index", redirect: "/index",
}, },
{
path: "/login", // 登录注册
name: "login",
component: () => import("@/pages/login"),
},
{ {
path: "/index", path: "/index",
name: "index", name: "index",
...@@ -120,30 +125,27 @@ export default new Router({ ...@@ -120,30 +125,27 @@ export default new Router({
{ {
path: "/shop/data_service_list", // 数据服务列表页 path: "/shop/data_service_list", // 数据服务列表页
name: "shopDataList", name: "shopDataList",
component: () => import("@/pages/service_shop/shop_list_data"), component: () => import("@/pages/service_shop/shop_list"),
}, },
{ {
path: "/shop/space_time_service_list", // 时空服务列表页 path: "/shop/space_time_service_list", // 时空服务列表页
name: "shopSpaceTimeList", name: "shopSpaceTimeList",
component: () => component: () => import("@/pages/service_shop/shop_list"),
import("@/pages/service_shop/shop_list_space_time"),
}, },
{ {
path: "/shop/video_service_list", // 视频服务列表页 path: "/shop/video_service_list", // 视频服务列表页
name: "shopVideoList", name: "shopVideoList",
component: () => import("@/pages/service_shop/shop_list_video"), component: () => import("@/pages/service_shop/shop_list"),
}, },
{ {
path: "/shop/perception_service_list", // 感知服务列表页 path: "/shop/perception_service_list", // 感知服务列表页
name: "shopPerceptionList", name: "shopPerceptionList",
component: () => component: () => import("@/pages/service_shop/shop_list"),
import("@/pages/service_shop/shop_list_perception"),
}, },
{ {
path: "/shop/comprehensive_app_list", // 综合应用列表页 path: "/shop/comprehensive_app_list", // 综合应用列表页
name: "shopComAppList", name: "shopComAppList",
component: () => component: () => import("@/pages/service_shop/shop_list"),
import("@/pages/service_shop/shop_list_comprehensive_app"),
}, },
{ {
path: "/shop/cloud", // 云资源服务 path: "/shop/cloud", // 云资源服务
...@@ -159,8 +161,7 @@ export default new Router({ ...@@ -159,8 +161,7 @@ export default new Router({
{ {
path: "/shop/app_store_list", // 应用商店列表页 path: "/shop/app_store_list", // 应用商店列表页
name: "shopAppStoreList", name: "shopAppStoreList",
component: () => component: () => import("@/pages/service_shop/shop_list"),
import("@/pages/service_shop/shop_list_app_store"),
}, },
{ {
path: "/shop/shopping_cart", // 购物车页 path: "/shop/shopping_cart", // 购物车页
......
// 取得cookie
function getCookie(name) {
var nameEQ = name + '='
var ca = document.cookie.split(';') // 把cookie分割成组
for (var i = 0; i < ca.length; i++) {
var c = ca[i] // 取得字符串
while (c.charAt(0) == ' ') { // 判断一下字符串有没有前导空格
c = c.substring(1, c.length) // 有的话,从第二位开始取
}
if (c.indexOf(nameEQ) == 0) { // 如果含有我们要的name
return unescape(c.substring(nameEQ.length, c.length)) // 解码并截取我们要值
}
}
return false
}
// 清除cookie
function clearCookie(name) {
setCookie(name, "", -1);
}
// 设置cookie
function setCookie(name, value, seconds) {
seconds = seconds || 0; //seconds有值就直接赋值,没有为0,这个根php不一样。
var expires = "";
if (seconds != 0 ) { //设置cookie生存时间
var date = new Date();
date.setTime(date.getTime()+(seconds*1000));
expires = "; expires="+date.toGMTString();
}
document.cookie = name+"="+escape(value)+expires+"; path=/"; //转码并赋值
}
export {
getCookie,
clearCookie,
setCookie,
}
...@@ -14,28 +14,6 @@ module.exports.GetProperty = function (obj, prop) { ...@@ -14,28 +14,6 @@ module.exports.GetProperty = function (obj, prop) {
return res; return res;
} }
module.exports.ymhdateFormat = function (timestamp) {
let date = new Date(timestamp);
let ret;
const opt = {
"Y+": date.getFullYear().toString(), // 年
"m+": (date.getMonth() + 1).toString(), // 月
"d+": date.getDate().toString(), // 日
"H+": date.getHours().toString(), // 时
"M+": date.getMinutes().toString(), // 分
"S+": date.getSeconds().toString() // 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
var fmt="YYYY-mm-dd HH:MM:SS"
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
};
};
return fmt;
}
module.exports.dateFormat = function (fmt, timestamp) { module.exports.dateFormat = function (fmt, timestamp) {
let date = new Date(timestamp); let date = new Date(timestamp);
let ret; let ret;
......
...@@ -5,7 +5,7 @@ Vue.use(Vuex); ...@@ -5,7 +5,7 @@ Vue.use(Vuex);
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
role: 2, // 0:普通用户,1:组织管理员,2:超级管理员 role: 2, // 0:普通用户,1:组织管理员,2:超级管理员
serviceShopMenu: "shopDataList", // 服务超市侧边栏 serviceShopMenu: "/shop/data_service_list", // 服务超市侧边栏
fwglNav: [ 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