Commit 37c03ce7 authored by 张俊's avatar 张俊

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

parents 92e28cc9 602241be
......@@ -609,10 +609,14 @@ width: 620px!important;
color: #999;
cursor: not-allowed;
}
.apass_table .row_action .disabled.hide {
opacity: 0;
cursor: auto;
}
.apass_table .row_action .interval_line {
font-size: 14px;
color: #dde4ff;
margin: 0 20px;
font-size: 14px;
color: #dde4ff;
margin: 0 20px;
}
.apass_table .border-active td {
padding: 10px 0;
......
......@@ -25,6 +25,7 @@
<span
v-if="v.disabledRule && v.disabledRule(scope.row)"
class="btn disabled"
:class="{ hide: v.disableHide }"
:key="'btn_' + index + '_' + i"
v-text="v.getLabel ? v.getLabel(scope.row) : v.label"
>
......@@ -42,8 +43,24 @@
v-if="i < item.actionList.length - 1"
class="interval_line"
:key="'line_' + index + '_' + i"
>|</span
>
|
</span>
</template>
<template v-if="item.moreActionList">
<span
class="interval_line"
v-if="item.actionList && item.actionList.length > 0"
>
|
</span>
<a
class="btn"
@mouseenter="mouseenter($event, item.moreActionList, scope.row)"
@mouseleave="mouseleave"
>
更多
</a>
</template>
</div>
<div v-else-if="item.type === 'button'" class="row_action">
......@@ -94,7 +111,7 @@
tag_flag_arr[scope.$index] == 0 &&
scope.row[item.prop].length > 2
"
@click.stop="change_tag(scope.$index, 1)"
@click.stop="changeTag(scope.$index, 1)"
></div>
<div
class="tagclo btn_up"
......@@ -102,7 +119,7 @@
tag_flag_arr[scope.$index] == 1 &&
scope.row[item.prop].length > 2
"
@click.stop="change_tag(scope.$index, 0)"
@click.stop="changeTag(scope.$index, 0)"
></div>
</div>
<div v-else-if="item.type === 'chart'" class="charts">
......@@ -115,16 +132,32 @@
:styles="item.prop == 'cpu' ? spCurveStyles2 : spCurveStyles3"
/>
</sparkline>
<span class="use" v-if="item.prop == 'cpu'&&scope.row.cpu_use"
<span class="use" v-if="item.prop == 'cpu' && scope.row.cpu_use"
>{{ scope.row["cpu_use"] }}.00mm</span
>
<span class="use" :style="scope.row[item.prop].length?{}:{right:'25px',bottom:'8px'}" v-if="item.prop == 'cpu'&&!scope.row.cpu_use"
<span
class="use"
:style="
scope.row[item.prop].length
? {}
: { right: '25px', bottom: '8px' }
"
v-if="item.prop == 'cpu' && !scope.row.cpu_use"
>0mm</span
>
<span class="use" v-if="item.prop == 'mermoy'&&scope.row.memory_use"
<span
class="use"
v-if="item.prop == 'mermoy' && scope.row.memory_use"
>{{ scope.row["memory_use"] }}Mi</span
>
<span class="use" :style="scope.row[item.prop].length?{}:{right:'25px',bottom:'8px'}" v-if="item.prop == 'mermoy'&&!scope.row.memory_use"
<span
class="use"
:style="
scope.row[item.prop].length
? {}
: { right: '25px', bottom: '8px' }
"
v-if="item.prop == 'mermoy' && !scope.row.memory_use"
>0Mi</span
>
</div>
......@@ -210,6 +243,22 @@
</template>
</el-table-column>
</el-table>
<ul
ref="moreActionList"
class="more_action_list"
:style="moreActionStyle"
@mouseenter="enterMoreActionList"
@mouseleave="leaveMoreActionList"
v-show="showMoreActionList"
>
<li
v-for="(item, index) in moreActionList"
:key="'more_' + index"
@click="item.callback"
v-text="item.label"
></li>
</ul>
</div>
</template>
......@@ -257,6 +306,12 @@ export default {
strokeOpacity: 0,
strokeDasharray: "2, 2",
},
moreActionList: [],
showMoreActionList: false,
moreActionStyle: {
top: 0,
left: 0,
},
};
},
mounted() {
......@@ -266,7 +321,7 @@ export default {
);
},
methods: {
change_tag(index, val) {
changeTag(index, val) {
this.$set(this.tag_flag_arr, index, val);
},
sortChange(value) {
......@@ -278,6 +333,42 @@ export default {
getPercent(num) {
return Math.round(num * 100) + "%";
},
mouseenter($event, moreActionList, row) {
let _self = this;
_self.moreActionList = [];
_self.showMoreActionList = true;
_self.moreActionList = moreActionList.map((item) => ({
id: row.id,
label: item.label,
callback() {
_self.showMoreActionList = false;
_self.moreActionList = [];
item.callback && item.callback(row);
},
}));
_self.$nextTick(() => {
let targetInfo = $event.target.getBoundingClientRect();
let containerInfo = _self.$refs.moreActionList.getBoundingClientRect();
_self.moreActionStyle = {
top: targetInfo.y + targetInfo.height + 15 + "px",
left:
targetInfo.x - (containerInfo.width - targetInfo.width) / 2 + "px",
};
});
},
mouseleave() {
this.showMoreActionList = false;
},
enterMoreActionList() {
this.showMoreActionList = true;
},
leaveMoreActionList() {
this.showMoreActionList = false;
},
},
};
</script>
......@@ -389,4 +480,48 @@ export default {
.selected_icon.selected > span {
display: block;
}
.more_action_list {
position: fixed;
}
.more_action_list > li {
padding: 5px 20px;
background-color: #0f2683;
font-size: 12px;
line-height: 20px;
color: #fff;
cursor: pointer;
position: relative;
}
.more_action_list > li:first-child {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.more_action_list > li:first-child::before {
content: "";
position: absolute;
top: -14px;
right: calc(50% - 14px);
width: 28px;
height: 14px;
}
.more_action_list > li:first-child::after {
content: "";
position: absolute;
top: -14px;
right: calc(50% - 7px);
border-top: 0 solid transparent;
border-right: 7px solid transparent;
border-bottom: 14px solid #0f2683;
border-left: 7px solid transparent;
}
.more_action_list > li:last-child {
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
.more_action_list > li:hover {
background-color: #3f4f9c;
}
.more_action_list > li:first-child:hover::after {
border-bottom: 14px solid #3f4f9c;
}
</style>
<!--
* User: CHT
* Date: 2020/6/28
* Time: 17:48
-->
<template>
<div>
<div>
<el-button @click="getData">获取参数</el-button>
</div>
<div class="super-flow-demo1">
<div class="node-container">
<p class="label_head">节点类型</p>
......
......@@ -28,6 +28,22 @@ export default {
{
name: "我的应用数据分析",
path: `/data_analysis/my_application`
},
{
name: "组织服务数据分析",
path: `/data_analysis/org_service`
},
{
name: "组织应用数据分析",
path: `/data_analysis/org_application`
},
{
name: "运行概况-组织",
path: `/data_analysis/operation_overview`
},
{
name: "服务管控-组织",
path: `/data_analysis/service_control`
}
],
navList: []
......
<template>
<div>
组织-运行概况
</div>
</template>
<script>
export default {
methods: {
getData() {}
}
};
</script>
<template>
<div>
组织-应用
</div>
</template>
<script>
export default {
methods: {
getData() {}
}
};
</script>
<template>
<div>
组织-服务
</div>
</template>
<script>
export default {
methods: {
getData() {}
}
};
</script>
<template>
<div>
组织-服务管控
</div>
</template>
<script>
export default {
methods: {
getData() {}
}
};
</script>
......@@ -103,6 +103,7 @@ export default {
pageSize: 10,
currentPage: 1,
initDisabled: false,
allMeassageCount: 0,
}),
computed: {
...mapState({
......@@ -145,6 +146,8 @@ export default {
if (data.success === 1) {
if (unread) {
this.setUnreadMessageCount(data.data.total || 0);
} else {
this.allMeassageCount = data.data.total;
}
typeof callback === "function" && callback(data.data);
}
......@@ -201,7 +204,6 @@ export default {
this.initList(); // 刷新列表
if (!this.unread) {
console.log("刷新未读消息数");
this.getMessage({
unread: true,
});
......@@ -246,14 +248,27 @@ export default {
this.removeAction([item.id]);
},
readAll() {
if (this.unreadMessageCount === 0) {
this.$message.warning("暂无未读消息");
return;
}
this.readAction([]);
},
removeAll() {
if (this.allMeassageCount === 0) {
this.$message.warning("暂无消息通知");
return;
}
this.removeAction([]);
},
},
created() {
this.initList();
this.getMessage({
unread: false, // 初始化消息总数
});
},
};
</script>
......
<template>
<div>
list
<div class="process-designer-container">
<apass-list
ref="list"
search-placeholder="请输入关键字"
:list-filter="filterList"
:list-header="listHeader"
:list-data="listData"
:list-total="listTotal"
@list-action="init"
:list-padding-left="40"
>
<el-button type="primary" slot="header-left" @click="addNewProcess">
新建流程
</el-button>
<el-breadcrumb separator="/" slot="breadcrumb">
<el-breadcrumb-item>
在线组件工具
</el-breadcrumb-item>
<el-breadcrumb-item>
流程设计
</el-breadcrumb-item>
<el-breadcrumb-item>
流程管理
</el-breadcrumb-item>
</el-breadcrumb>
</apass-list>
<apass-dialog
ref="dialog"
:title="dialogInfo.title"
:msg="dialogInfo.msg"
:submit="dialogInfo.submit"
></apass-dialog>
</div>
</template>
<script>
import helper from "@/services/helper.js";
import apassList from "@/components/apass-list";
import apassDialog from "@/components/apass-dialog";
export default {
components: {
apassList,
apassDialog,
},
data: () => ({
filterList: [
{
name: "服务领域",
},
{
name: "工作区域",
},
{
name: "流程状态",
},
],
listHeader: [],
listData: [],
listTotal: 0,
dialogInfo: {
msg: "",
submit: null,
},
tempFilter: null,
}),
methods: {
init(filter) {
console.log(filter);
this.tempFilter = filter;
this.listTotal = 3;
this.listData = [
{
id: "WF00000001",
name: "保安资格申请流程",
sectors_name: "经济建设",
create_time: "2021-01-01T00:00:00Z",
state: "0",
},
{
id: "WF00000002",
name: "保安考试流程",
sectors_name: "经济建设",
create_time: "2021-01-01T00:00:00Z",
state: "1",
},
{
id: "WF00000003",
name: "申请材料审核流程",
sectors_name: "经济建设",
create_time: "2021-01-01T00:00:00Z",
state: "2",
},
];
},
initFilter() {
Promise.all([
this.$http.get("/apaas/service/v3/service/manager/servtype"),
this.$http.get("/apaas/service/v3/service/manager/servarea"),
])
.then((response) => {
let filterList = response.map((item) => {
return {
name: item.body.data[0].type_name,
prop: item.body.data[0].type_code,
data: item.body.data.map((v) => ({
name: v.name,
value: v.id,
})),
};
});
this.filterList = [
...filterList,
{
name: "流程状态",
prop: "state",
data: [
{
name: "已发布",
value: 2,
},
{
name: "已部署",
value: 1,
},
{
name: "未部署",
value: 0,
},
],
},
];
})
.catch((error) => {
console.log(error);
});
},
refresh() {
this.init(this.tempFilter);
},
addNewProcess() {
console.log("addNewProcess");
},
detailItem(item) {
this.$router.push(`/progress/designer/detail/${item.id}`);
},
publishItem(item) {
console.log(item);
},
editItem(item) {
console.log(item);
},
canceldeployItem(item) {
console.log(item);
},
copyItem(item) {
console.log(item);
},
deleteItem(item) {
console.log(item);
},
},
created() {
this.initFilter();
this.listHeader = [
{
label: "流程编号",
prop: "id",
width: 180,
},
{
label: "流程名称",
prop: "name",
type: "button",
callback: this.detailItem,
},
{
label: "服务领域",
prop: "sectors_name",
align: "center",
width: 240,
},
{
label: "创建时间",
prop: "create_time",
getText(item) {
return helper.dateStringTransform(item.create_time || "");
},
align: "center",
width: 180,
},
{
label: "状态",
prop: "state",
getText(item) {
return ["未部署", "已部署", "已发布"][item.state || 0];
},
align: "center",
width: 180,
},
{
label: "操作",
type: "buttons",
align: "center",
width: 300,
actionList: [
{
label: "发布",
callback: this.publishItem,
disableHide: true,
disabledRule(item) {
return item.state == 2;
},
},
{
label: "编辑",
callback: this.editItem,
},
],
moreActionList: [
{
label: "取消部署",
callback: this.canceldeployItem,
},
{
label: "复制",
callback: this.copyItem,
},
{
label: "删除",
callback: this.deleteItem,
},
],
},
];
},
};
</script>
<style scoped>
.process-designer-container {
height: 100%;
}
</style>
......@@ -29,6 +29,10 @@ export default {
name: "流程监控",
path: `/progress/monitoring`,
},
{
name: "流程设计",
path: `/progress/designs`,
}
],
navList: [],
}),
......
<template>
<div>
流程设计
<div>
<el-button @click="getData">获取参数</el-button>
</div>
</div>
</template>
<script>
export default {
methods: {
getData() {}
}
};
</script>
......@@ -1059,21 +1059,22 @@ export default {
return "上架";
} else if (item.state == 1 || item.state == 3) {
return "下架";
} else {
return "-";
}
},
callback(item) {
if (item.state == 2) {
return _self.soldUpItem(item);
if (item.state == 0) {
return null; // 已下架,上架的操作需要普通用户申请
} else
if (item.state == 1) {
return _self.soldOutItem(item); // 已上架,超管用户可以直接下架
} else if (item.state == 2) {
return _self.soldUpItem(item); // 上架审核中,超管用户可以直接上架
} else if (item.state == 3) {
return _self.soldOutItem(item);
} else {
return null;
return _self.soldOutItem(item); // 下架审核中,超管用户可以直接下架
}
},
disabledRule(item) {
return item.state == 0 || item.state == 1;
return item.state == 0;
},
},
{
......@@ -1084,7 +1085,7 @@ export default {
// 只有非下架状态可以删除(已上架,下架审核中)
return item.state == 1 || item.state == 3;
},
},
}, // ["已下架", "已上架", "上架审核中", "下架审核中"]
],
},
];
......
......@@ -274,10 +274,10 @@ export default new Router({
component: () => import("@/pages/workbench/component-center/process-management/monitoring/index"),
}, // 流程监控
{
path: "/progress/design",
name: "process_design",
path: "/progress/designs",
name: "process_designs",
component: () => import("@/pages/workbench/component-center/process-management/process-design/index"),
}, // 流程监控
}, // 流程设计
],
}, // 流程设计
{
......@@ -410,15 +410,35 @@ export default new Router({
component: () => import("@/pages/data-analysis/data-analysis"),
children: [
{
path: "/data_analysis/my_service", // 数据分析中心
path: "/data_analysis/my_service", // 数据分析中心-普通
name: "myServiceDataAnalysis",
component: () => import("@/pages/data-analysis/my-service"),
},
{
path: "/data_analysis/my_application", // 数据分析中心
path: "/data_analysis/my_application", // 数据分析中心-普通
name: "myApplicationDataAnalysis",
component: () => import("@/pages/data-analysis/my-application"),
},
{
path: "/data_analysis/org_service", // 数据分析中心服务-组织
name: "orgServiceDataAnalysis",
component: () => import("@/pages/data-analysis/org-service"),
},
{
path: "/data_analysis/org_application", // 数据分析中心应用-组织
name: "orgApplicationDataAnalysis",
component: () => import("@/pages/data-analysis/org-application"),
},
{
path: "/data_analysis/operation_overview", // 运行概况-组织
name: "operationOverview",
component: () => import("@/pages/data-analysis/operation-overview"),
},
{
path: "/data_analysis/service_control", // 服务管控-组织
name: "serviceControl",
component: () => import("@/pages/data-analysis/service-control"),
},
],
},
{
......
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