Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

# Conflicts:
#	front/src/views/home/infrastructurePage.vue
This commit is contained in:
a0049873 2022-07-01 18:24:43 +08:00
commit ae80f57dcc
26 changed files with 824 additions and 275 deletions

View File

@ -0,0 +1,450 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-ability__bsabilityai">
<el-form :inline="true" :model="dataForm">
<el-form-item>
<el-input
v-model="dataForm.name"
placeholder="名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList2(dataForm.name)">{{
$t("query")
}}</el-button>
</el-form-item>
<el-form-item>
<el-button type="info" @click="exportHandle()">{{
$t("export")
}}</el-button>
</el-form-item>
<el-form-item>
<el-button
v-if="$hasPermission('ability:bsabilityai:save')"
type="primary"
@click="addOrUpdateHandleServe()"
>挂接</el-button
>
</el-form-item>
<el-form-item>
<el-button
v-if="$hasPermission('ability:bsabilityai:delete')"
type="danger"
@click="deleteHandle2()"
>{{ $t("deleteBatch") }}</el-button
>
</el-form-item>
<el-form-item>
<el-button @click="reset">重置</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@selection-change="dataListSelectionChangeHandle"
style="width: 100%"
:height="qp ? '810px' : '650px'"
>
<el-table-column
type="selection"
header-align="center"
align="center"
width="50"
></el-table-column>
<el-table-column
prop="name"
label="应用名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
v-for="(item, index) in dataList[0].infoList"
:key="index"
:label="item.attrType"
header-align="center"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
{{ findValue(scope.row.infoList, item.attrType) }}
</template>
</el-table-column>
<el-table-column
:label="$t('handle')"
fixed="right"
header-align="center"
align="center"
width="94"
right="0"
>
<template slot-scope="scope">
<el-button
v-if="$hasPermission('ability:bsabilityai:update')"
type="text"
size="small"
@click="UpdateHandle(scope.row)"
>{{ $t("update") }}</el-button
>
<el-button
v-if="$hasPermission('ability:bsabilityai:delete')"
type="text"
size="small"
@click="deleteHandle2(scope.row.id)"
>{{ $t("delete") }}</el-button
>
<el-button type="text" size="small" @click="showDetail(scope.row)"
>展示</el-button
>
<el-button type="text" size="small" @click="showDocument(scope.row)"
>开发文档</el-button
>
<el-button
type="text"
size="small"
@click="applyAndAssembly(scope.row)"
>应用与组件</el-button
>
<el-button
type="text"
size="small"
@click="applyAndDataResource(scope.row)"
>应用与数据资源</el-button
>
<el-button
type="text"
size="small"
@click="applyAndProject(scope.row)"
>应用与项目</el-button
>
<el-button
type="text"
size="small"
@click="applyAndInfrastructure(scope.row)"
>应用与基础设施</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="Number(total)"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
>
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
:disabled="disabled"
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
<relate-application
v-if="relateApplicationResourceVisible"
ref="relateApplication"
:relateInfo="relationData"
:nameArray="topNameArray"
@isShowRelatePopup="handleIsShowRelatePopupApply"
></relate-application>
</div>
</el-card>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./bsabilityservice-add-or-update";
import dictionaries from "@/utils/dictionaries";
import RelateApplication from "./bsabilityai-relate-application.vue";
import qs from "qs";
import { type } from "os";
export default {
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: "/resource/page",
getDataListIsPage: true,
exportURL: "/ability/bsabilityai/export",
deleteURL: "/resource/delete",
deleteIsBatch: true,
},
disabled: false,
sceneArr: dictionaries.sceneArr,
fieldArr: dictionaries.fieldArr,
shareFormArr: dictionaries.shareFormArr,
dataForm: {
name: "",
creator: "",
selectType: 0,
delFlag: 0,
type: "应用资源",
},
qp: false,
relateApplicationResourceVisible: false,
relationData: {}, //穿
topNameArray: [], //
};
},
watch: {},
components: {
AddOrUpdate,
RelateApplication,
},
created() {
this.dataForm.name = "";
this.dataForm.type = "应用资源";
},
mounted() {
window.addEventListener("resize", this.a);
this.fullScreen();
},
methods: {
reset() {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
"?" +
qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '',
page: 1,
selectType: 0,
limit: 10,
delFlag: 0,
creator: "",
type: "应用资源",
name: "",
})
)
.then(({ data: res }) => {
this.dataForm.name = "";
if (res.code !== 0) {
this.dataList = [];
this.total = 0;
return this.$message.error(res.msg);
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
: res.data;
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data);
}
this.dataListLoading = false;
})
.catch(() => {
this.dataListLoading = false;
});
},
showDetail(val) {
this.addOrUpdateVisible = true;
this.disabled = false;
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false;
this.$refs.addOrUpdate.dataFormShowDetails = val;
this.$refs.addOrUpdate.init();
});
this.disabled = true;
},
showDocument(val) {
console.log(val);
window.open(
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
"_blank"
);
},
findValue(list, type) {
const found = list.find((item) => item.attrType === type);
if (found) {
return found.attrValue;
} else {
return "暂无数据";
}
},
getDataList2(names) {
if (names != null) {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
"?" +
qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '',
pageNum: 1,
pageSize: this.limit,
type: "应用资源",
creator: "",
selectType: 0,
delFlag: 0,
name: names,
})
)
.then(({ data: res }) => {
if (res.code !== 0) {
this.dataList = [];
this.total = 0;
return this.$message.error(res.msg);
}
if (res.data.list.length !== 0) {
this.dataList = res.data.list;
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data);
}
this.dataListLoading = false;
} else {
this.$message.error("未查询到相关信息");
this.reset();
}
})
.catch(() => {
this.dataListLoading = false;
});
} else {
this.$message.error("查询不能输入为空");
}
},
fullScreen() {
if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) {
console.log(
"全屏1",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = false;
} else {
console.log(
"不是全屏2",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
}
} else {
console.log(
"不是全屏3",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
}
},
//
applyAndAssembly(val) {
console.log("vvvv", val);
//idid,type
let type = "组件服务";
let id = val.id;
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
params: {
keyId: id,
type: type,
referenceName: "",
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
console.log("rrrrressssz", res.data);
this.relateApplicationResourceVisible = true;
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
this.topNameArray = ["未关联组件名称", "已关联组件名称"];
console.log(" this.relationData", this.relationData);
//
});
},
//
applyAndDataResource(val) {
console.log("数据资源");
},
//
applyAndProject(val) {
let type = "项目";
let id = val.id;
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
params: {
keyId: id,
type: type,
referenceName: "",
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
console.log("rrrrressssx", res.data);
this.relateApplicationResourceVisible = true;
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
this.topNameArray = ["未关联项目名称", "已关联项目名称"];
//
});
},
//
applyAndInfrastructure(val) {
let type = "基础设施";
let id = val.id;
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
params: {
keyId: id,
type: type,
referenceName: "",
},
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
console.log("rrrrressssj", res.data);
this.relateApplicationResourceVisible = true;
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
this.topNameArray = ["未关联基础设施名称", "已关联基础设施名称"];
//
});
},
//
handleIsShowRelatePopupApply(type) {
this.relateApplicationResourceVisible = type;
},
},
};
</script>
<style lang="scss" scoped>
.el-tooltip__popper {
max-width: 50%;
}
</style>

View File

@ -116,7 +116,8 @@ export const getFrequence = (data, success, fail) => {
export const getResourceByDept = (data, success, fail) => { export const getResourceByDept = (data, success, fail) => {
Request({ Request({
methods: 'get', methods: 'get',
url: '/resource/getByDept', // url: '/resource/getByDept',
url: '/workdynamics/getDeptWork',
data data
}).then(res => { }).then(res => {
success && success(res) success && success(res)

View File

@ -1,53 +1,132 @@
<template> <template>
<div class="bottom-view"> <div class="bottom-view">
<!-- 部门发布动态 -->
<div class="left container"> <div class="left container">
<content-title :title="title.dynamic"></content-title> <content-title :title="title.dynamic"></content-title>
<dynamicView v-for="(item, index) in list" :key="index" :number="index + 1" :item="item"></dynamicView> <div class="dynamic-box" v-loading="loadingDynamic">
<div class="dynamicView" v-for="(item, index) in list" :key="index" :number="index + 1" :item="item">
<div class="wrapper">
<div class="content">
<div class="left">{{ item.createDate }}</div>
<el-tooltip effect="dark" :content="item.title" placement="top">
<div class="right ellipsis">{{ item.title || '--' }}</div>
</el-tooltip>
</div>
</div>
</div>
</div>
</div> </div>
<!-- 部门推荐能力 -->
<div class="right container"> <div class="right container">
<content-title :title="title.recommend"></content-title> <content-title :title="title.recommend"></content-title>
<recommendView></recommendView> <div class="recommendView">
<a-table :dataSource="tableData" :columns="columns" bordered :pagination="false" :scroll="maxSize"
:loading="loadingTable" size="small" />
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import dynamicView from "./dynamic-view";
import recommendView from "./recommend-view";
import contentTitle from "./content-title"; import contentTitle from "./content-title";
import * as Apis from '../api'; import * as Apis from '../api';
export default { export default {
components: { components: {
dynamicView,
recommendView,
contentTitle contentTitle
}, },
data() { data() {
return { return {
title: { dynamic: "部门发布动态", recommend: "部门推荐能力" }, title: { dynamic: "部门发布动态", recommend: "部门推荐能力" },
list: [ list: [],
columns: [
] {
title: "名称",
key: "name",
dataIndex: "name",
width: 250
},
{
title: "类型",
key: "type",
dataIndex: "type",
width: 76
},
{
title: "单位",
key: "deptContacts",
dataIndex: "deptContacts",
width: 144
},
{
title: "时间",
key: "createDate",
dataIndex: "createDate",
width: 153
},
{
title: "当前申请数",
key: "applyCount",
dataIndex: "applyCount",
width: 145
},
],
tableData: [],
maxSize: { y: 195 },
loadingDynamic: false,
loadingTable: false,
}; };
}, },
mounted() { mounted() {
this.getResourceByDept(); this.getResourceByDept();
this.getApplyByDept()
}, },
methods: { methods: {
// //
getResourceByDept() { getResourceByDept() {
let data = { let data = {
limit: 5, limit: 5,
page: 1 page: 1
}; };
this.loadingDynamic = true;
Apis.getResourceByDept( Apis.getResourceByDept(
data, data,
res => { res => {
this.loadingDynamic = false;
if (res.data.code !== 0) { if (res.data.code !== 0) {
return; return this.$message.error(res.data.msg)
} }
this.list = res.data.data.records || [] console.log('res.data----发布动态-------->', res.data);
this.list = res.data.data.list || []
this.list.push(this.list[0])
this.list.push(this.list[0])
}, },
err => { err => {
this.loadingDynamic = false;
this.$message.error(err)
console.log('err-----发布动态------->', err);
}
);
},
//
getApplyByDept() {
let data = {
limit: 5,
page: 1
};
this.loadingTable = true;
Apis.getApplyByDept(
data,
res => {
this.loadingTable = false;
if (res.data.code !== 0) {
return this.$message.error(res.data.msg)
}
console.log('res.data------部门推荐能力------>', res.data);
this.tableData = res.data.data.list || [];
},
err => {
this.loadingTable = false;
this.$message.error(err)
console.log("err", err); console.log("err", err);
} }
); );
@ -56,14 +135,21 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ellipsis {
//
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.bottom-view { .bottom-view {
width: 100%; width: 100%;
height: 335px; height: 335px;
// background: green;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
// color: #fff;
.container { .container {
background: #fff; background: #fff;
width: 800px; width: 800px;
@ -71,4 +157,67 @@ export default {
padding: 0px 0 20px 10px; padding: 0px 0 20px 10px;
} }
} }
.dynamic-box {
width: 770px;
height: 335px;
}
.dynamicView {
cursor: pointer;
width: 770px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 7px;
.wrapper {
height: 50px;
width: 770px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
background-image: url("../images/bgIndex.png");
background-repeat: no-repeat;
background-color: #f4f5f8;
border-radius: 1px;
.content {
width: 760px;
padding-right: 20px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
margin-left: 12px;
font-size: 16px;
.left {
width: 159px;
color: #2b2b2b;
font-size: 14px;
}
.right {
font-size: 18px;
color: #464645;
width: 600px;
}
}
}
}
.recommendView {
cursor: pointer;
width: 770px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 7px;
}
::v-deep .ant-table-thead {
background-color: #f4f5f8;
}
</style> </style>

View File

@ -22,7 +22,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div class="more"> <div class="more" @click="goPage(dataInfo.url)">
查看更多 > 查看更多 >
</div> </div>
</div> </div>
@ -51,7 +51,12 @@ export default {
methods: { methods: {
formatNum(num) { formatNum(num) {
return num || num === 0 ? num : '--' return num || num === 0 ? num : '--'
} },
goPage(url) {
this.$router.push({
path: url
});
},
} }
} }
</script> </script>

View File

@ -1,69 +0,0 @@
<template>
<div class="dynamicView">
<div class="wrapper">
<div class="content">
<div class="left">{{ item.createDate }}</div>
<div class="right">{{ item.name }}</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "dynamicView",
props: {
item: {
type: Object,
default: () => {
return {};
}
}
},
methods: {}
};
</script>
<style lang="scss" scoped>
.dynamicView {
cursor: pointer;
width: 770px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 7px;
.wrapper {
height: 50px;
width: 770px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
background-image: url("../images/bgIndex.png");
background-repeat: no-repeat;
background-color:#f4f5f8;
border-radius:1px;
.content {
width: 760px;
padding-right: 20px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
margin-left: 12px;
font-size: 16px;
.left{
width:159px;
color:#2b2b2b;
font-size:14px;
}
.right {
font-size: 18px;
color:#464645
}
}
}
}
</style>

View File

@ -4,15 +4,22 @@
<div v-if="!noData" v-loading="loading"> <div v-if="!noData" v-loading="loading">
<div class="no-box"> <div class="no-box">
<div class="no no2"> <div class="no no2">
<div class="name" :style="{ color: colorObj[2] }">{{ no2Obj.name || '--' }}</div> <el-tooltip effect="dark" :content="no2Obj.name" placement="top">
<div class="name ellipsis" :style="{ color: colorObj[2] }">{{ no2Obj.name || '--' }}</div>
</el-tooltip>
<div class="count">{{ formatCount(no2Obj.count) }}</div> <div class="count">{{ formatCount(no2Obj.count) }}</div>
</div> </div>
<div class="no no1"> <div class="no no1">
<div class="name" :style="{ color: colorObj[1] }">{{ no1Obj.name || '--' }}</div> <el-tooltip effect="dark" :content="no1Obj.name" placement="top">
<div class="name ellipsis" :style="{ color: colorObj[1] }">{{ no1Obj.name || '--' }}</div>
</el-tooltip>
<div class="count">{{ formatCount(no1Obj.count) }}</div> <div class="count">{{ formatCount(no1Obj.count) }}</div>
</div> </div>
<div class="no no3"> <div class="no no3">
<div class="name" :style="{ color: colorObj[3] }">{{ no3Obj.name || '--' }}</div> <el-tooltip effect="dark" :content="no3Obj.name" placement="top">
<div class="name ellipsis" :style="{ color: colorObj[3] }">{{ no3Obj.name || '--' }}</div>
</el-tooltip>
<div class="count">{{ formatCount(no3Obj.count) }}</div> <div class="count">{{ formatCount(no3Obj.count) }}</div>
</div> </div>
</div> </div>
@ -174,6 +181,7 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 70px; margin-top: 70px;
width: 150px; width: 150px;
text-align: center;
} }
.count { .count {

View File

@ -1,98 +0,0 @@
<template>
<div class="recommendView">
<a-table :dataSource="data" :columns="columns" bordered :pagination="false" :scroll="maxSize" size="small" />
</div>
</template>
<script>
import * as Apis from "../api";
export default {
name: "recommendView",
props: {
item: {
type: Object,
default: () => {
return {};
}
}
},
data() {
return {
columns: [
{
title: "名称",
key: "name",
dataIndex: "name",
width: 250
},
{
title: "类型",
key: "type",
dataIndex: "type",
width: 76
},
{
title: "单位",
key: "deptContacts",
dataIndex: "deptContacts",
width: 144
},
{
title: "时间",
key: "createDate",
dataIndex: "createDate",
width: 153
},
{
title: "当前申请数",
key: "applyCount",
dataIndex: "applyCount",
width: 145
},
],
data: [
],
maxSize: { y: 195 }
};
},
mounted() {
this.getApplyByDept();
},
methods: {
//
getApplyByDept() {
let data = {
limit: 5,
page: 1
};
Apis.getApplyByDept(
data,
res => {
if (res.data.code !== 0) {
return;
}
this.data = res.data.data.list || [];
},
err => {
console.log("err", err);
}
);
}
}
};
</script>
<style lang="scss" scoped>
.recommendView {
cursor: pointer;
width: 770px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 7px;
}
::v-deep .ant-table-thead{
background-color:#f4f5f8;
}
</style>

View File

@ -54,7 +54,8 @@ export default {
textColor: '#f86f01', textColor: '#f86f01',
num: 0, num: 0,
list: [], list: [],
nameStr: 'taskName' nameStr: 'taskName',
url: 'activiti-my-todo-task'
}, },
// //
hasToDodoData: { hasToDodoData: {
@ -66,7 +67,8 @@ export default {
textColor: '#21b107', textColor: '#21b107',
num: 0, num: 0,
list: [], list: [],
nameStr: 'processDefinitionName' nameStr: 'processDefinitionName',
url: 'activiti-my-join-task'
}, },
// //
resourceData: [], resourceData: [],
@ -212,6 +214,7 @@ export default {
} }
.work-brnch-box { .work-brnch-box {
.top { .top {
height: 284px; height: 284px;
margin-bottom: 16px; margin-bottom: 16px;

View File

@ -180,7 +180,11 @@
callTheTrendPort(start, end, 86400).then((res) => { callTheTrendPort(start, end, 86400).then((res) => {
if (res.data.data.result) { if (res.data.data.result) {
// res.data.data.result.splice(0, 1) // res.data.data.result.splice(0, 1)
callTheTrendData.value.snum = []
res.data.data.result[0].values.map((item) => { res.data.data.result[0].values.map((item) => {
callTheTrendData.value.snum.push(
moment(item[0] * 1000).format('MM-DD')
)
callTheTrendData.value.snum.push(parseInt(item[1])) callTheTrendData.value.snum.push(parseInt(item[1]))
}) })
callTheTrend(callTheTrendData.value) callTheTrend(callTheTrendData.value)

View File

@ -144,7 +144,11 @@
const object = res.data.data.filter((item) => item.type === val.name)[0] const object = res.data.data.filter((item) => item.type === val.name)[0]
console.log('object', object) console.log('object', object)
if (object) { if (object) {
val.num = object.amount if (object.type == '满足率') {
val.num = object.amount * 100 + '%'
} else {
val.num = object.amount
}
} }
}) })
const arr = res.data.data.filter((item) => item.resourceTop5)[0] const arr = res.data.data.filter((item) => item.resourceTop5)[0]

View File

@ -109,6 +109,12 @@
v-model:value="item.note1" v-model:value="item.note1"
:options="item.options" :options="item.options"
/> />
<p v-else-if="item.type == 'text'">
{{ abilityToType }}
</p>
<p v-else-if="item.type == 'text2'">
{{ componentTypeValue }}
</p>
<a-textarea <a-textarea
v-else-if="item.type == 'textArea'" v-else-if="item.type == 'textArea'"
v-model:value="item.note1" v-model:value="item.note1"
@ -153,6 +159,9 @@
:list="props.videoList" :list="props.videoList"
tip="支持视频类型大小不超过100M" tip="支持视频类型大小不超过100M"
></upload> ></upload>
<a-button v-else-if="item.type == 'dialog'" @click="sourceClick">
请选择来源应用
</a-button>
<a-select <a-select
v-else-if="item.type == 'select'" v-else-if="item.type == 'select'"
style="width: 240px" style="width: 240px"
@ -194,11 +203,15 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch, onMounted } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import upload from '@/views/components/upload' import upload from '@/views/components/upload'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getCategoryTreePage } from '@/api/personalCenter' import { getCategoryTreePage } from '@/api/personalCenter'
import { useRouter } from 'vue-router'
const router = useRouter()
const abilityToType = router.currentRoute.value.query.abilityToType
const componentTypeValue = router.currentRoute.value.query.componentTypeValue
const props = defineProps({ const props = defineProps({
// //
refData: { type: Object, default: null }, refData: { type: Object, default: null },
@ -387,6 +400,7 @@
delFlag: 0, delFlag: 0,
}) })
} }
const sourceClick = () => {}
watch(data.value.list, (newProps, oldProps) => { watch(data.value.list, (newProps, oldProps) => {
console.log(newProps, oldProps) console.log(newProps, oldProps)
newProps.forEach((val) => { newProps.forEach((val) => {
@ -512,12 +526,12 @@
width: 570px; width: 570px;
} }
.ant-btn { .ant-btn {
width: 100px; width: 160px;
height: 32px; height: 32px;
text-align: center; text-align: center;
background: #d9ebff; background: #edf4fc;
color: #0087ff; color: #0087ff;
border: 1px solid #0087ff; border: 1px solid #bbd3ef;
border-radius: 6px; border-radius: 6px;
} }
} }

View File

@ -12,21 +12,22 @@
<!-- 导航 --> <!-- 导航 -->
<business-navigation <business-navigation
:dataList="dataList.data" :dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow" :selectNow="selectNow"
></business-navigation> ></business-navigation>
<!-- 组件展示 -->
<business-presentation
:dataList="dataList.data"
id="business-presentation"
class="scrollBox"
></business-presentation>
<!-- 关联能力 --> <!-- 关联能力 -->
<business-associated-ability <business-associated-ability
:associatedComponents="associatedComponents" :associatedComponents="associatedComponents"
id="business-associated-ability" id="business-associated-ability"
class="scrollBox" class="scrollBox"
></business-associated-ability> ></business-associated-ability>
<!-- 组件展示 -->
<business-presentation
:dataList="dataList.data"
id="business-presentation"
class="scrollBox"
></business-presentation>
<!-- 功能介绍--> <!-- 功能介绍-->
<business-function-intorduction <business-function-intorduction
:dataList="dataList.data" :dataList="dataList.data"

View File

@ -12,6 +12,7 @@
<!-- 导航 --> <!-- 导航 -->
<developer-navigation <developer-navigation
:dataList="dataList.data" :dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow" :selectNow="selectNow"
></developer-navigation> ></developer-navigation>

View File

@ -14,9 +14,16 @@
<!-- 导航 --> <!-- 导航 -->
<layer-service-navigation <layer-service-navigation
:dataList="dataList.data" :dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow" :selectNow="selectNow"
></layer-service-navigation> ></layer-service-navigation>
<!-- 关联能力 -->
<layer-service-associated-ability
:associatedComponents="associatedComponents"
id="layer-service-associated-ability"
class="scrollBox"
></layer-service-associated-ability>
<!-- 图层展示 视频 --> <!-- 图层展示 视频 -->
<layer-service-presentation <layer-service-presentation
:dataList="dataList.data" :dataList="dataList.data"
@ -29,12 +36,6 @@
id="service-information" id="service-information"
class="scrollBox" class="scrollBox"
></layer-service-information> ></layer-service-information>
<!-- 关联能力 -->
<layer-service-associated-ability
:associatedComponents="associatedComponents"
id="layer-service-associated-ability"
class="scrollBox"
></layer-service-associated-ability>
<!-- 应用场景 --> <!-- 应用场景 -->
<layer-service-application-scenarios <layer-service-application-scenarios
:dataList="dataList.data" :dataList="dataList.data"

View File

@ -46,7 +46,7 @@
title: item.type, title: item.type,
content: item.desc, content: item.desc,
value: item.price, value: item.price,
time: '', time: '',
unit: '¥', unit: '¥',
} }
break break
@ -103,7 +103,7 @@
title: item.type, title: item.type,
content: item.desc, content: item.desc,
value: item.price, value: item.price,
time: '', time: '',
unit: '¥', unit: '¥',
} }
break break

View File

@ -26,8 +26,8 @@
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { queryPartAppByKeyId2 } from '@/api/home' import { queryPartAppByKeyId2 } from '@/api/home'
// //
const router = useRouter(); const router = useRouter()
const keyId = router.currentRoute.value.query.id; const keyId = router.currentRoute.value.query.id
console.log('123', keyId) console.log('123', keyId)
const navList = ref([ const navList = ref([
{ {
@ -64,16 +64,15 @@
}, },
]) ])
const list = ref([]) const list = ref([])
// id // id
queryPartAppByKeyId2({keyId: keyId}).then( queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
res=>{
console.log('ressssssss', res) console.log('ressssssss', res)
if (res.data.data.length > 0) { if (res.data.data.length > 0) {
// //
navList.value.unshift({ navList.value.unshift({
name: '关联应用', name: '关联应用',
key: 'algorithm-associated-ability', key: 'algorithm-associated-ability',
show: true show: true,
}) })
// list.value.push('') // list.value.push('')
console.log('navList', navList) console.log('navList', navList)
@ -82,8 +81,7 @@
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
} })
)
const select = ref('algorithm-display') const select = ref('algorithm-display')
@ -121,9 +119,12 @@
'props.dataList.infoList==============>', 'props.dataList.infoList==============>',
navList.value.filter((item) => item.name === list.value[0]) navList.value.filter((item) => item.name === list.value[0])
) )
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => item.name === list.value[0] debugger
)[0].key select.value = navList.value.filter(
(item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value) console.log('11111111111111111111111111', list.value, navList.value)
} }
watch( watch(
@ -163,9 +164,11 @@
} }
}) })
if (list.value.length > 0) { if (list.value.length > 0) {
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => item.name === list.value[0] select.value = navList.value.filter(
)[0].key (item) => item.name === list.value[0]
)[0].key
}
} }
console.log('11111111111111111111111111', list.value, navList.value) console.log('11111111111111111111111111', list.value, navList.value)
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="application-associated-ability" v-if="flag"> <div class="application-associated-ability" v-if="flag">
<detals-title title="关联能力" type="RELEVANCE"></detals-title> <detals-title title="关联组件" type="RELEVANCE"></detals-title>
<div class="application-associated-ability-main"> <div class="application-associated-ability-main">
<div <div
class="associated-ability-card" class="associated-ability-card"

View File

@ -37,7 +37,7 @@
key: 'application-associated-components', key: 'application-associated-components',
}, },
{ {
name: '关联能力', name: '关联组件',
key: 'application-associated-ability', key: 'application-associated-ability',
}, },
{ {
@ -81,7 +81,7 @@
list.value.push('应用展示') list.value.push('应用展示')
} }
}) })
list.value.push('关联能力') list.value.push('关联组件')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
@ -116,7 +116,7 @@
list.value.push('应用展示') list.value.push('应用展示')
} }
}) })
list.value.push('关联能力') list.value.push('关联组件')
list.value.push('部署与安全') list.value.push('部署与安全')
list.value.push('归属部门与服务商') list.value.push('归属部门与服务商')
navList.value.forEach((item) => { navList.value.forEach((item) => {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="application-associated-ability" v-if="flag"> <div class="application-associated-ability" v-if="flag">
<detals-title title="关联能力" type="RELEVANCE"></detals-title> <detals-title title="关联应用" type="RELEVANCE"></detals-title>
<div class="application-associated-ability-main"> <div class="application-associated-ability-main">
<div <div
class="associated-ability-card" class="associated-ability-card"
@ -41,9 +41,10 @@
}, },
}) })
} }
if (props.associatedComponents) { if (props.associatedComponents[0].dataList.length != 0) {
flag.value = true flag.value = true
dataFrom.value = props.associatedComponents dataFrom.value = props.associatedComponents
debugger
console.log('dataFrom.value', dataFrom.value) console.log('dataFrom.value', dataFrom.value)
} else { } else {
flag.value = false flag.value = false

View File

@ -29,7 +29,7 @@
key: 'business-presentation', key: 'business-presentation',
}, },
{ {
name: '关联能力', name: '关联应用',
key: 'business-associated-ability', key: 'business-associated-ability',
}, },
{ {
@ -55,6 +55,7 @@
}, },
]) ])
const props = defineProps({ const props = defineProps({
associatedComponents: { type: Array, default: null },
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
@ -69,7 +70,7 @@
list.value = [] list.value = []
let arr = [ let arr = [
'组件视频介绍', '组件视频介绍',
'关联能力', '关联应用',
'功能介绍', '功能介绍',
'应用场景', '应用场景',
'应用案例', '应用案例',
@ -93,12 +94,18 @@
list.value.push('组件展示') list.value.push('组件展示')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
list.value.push('使用方式') list.value.push('使用方式')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
select.value = navList.value.filter( select.value = navList.value.filter(
@ -119,7 +126,7 @@
list.value = [] list.value = []
let arr = [ let arr = [
'组件视频介绍', '组件视频介绍',
'关联能力', '关联应用',
'功能介绍', '功能介绍',
'应用场景', '应用场景',
'应用案例', '应用案例',
@ -144,12 +151,18 @@
list.value.push('组件展示') list.value.push('组件展示')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
list.value.push('使用方式') list.value.push('使用方式')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
if (list.value.length > 0) { if (list.value.length > 0) {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="application-associated-ability" v-if="flag"> <div class="application-associated-ability" v-if="flag">
<detals-title title="关联能力" type="RELEVANCE"></detals-title> <detals-title title="关联应用" type="RELEVANCE"></detals-title>
<div class="application-associated-ability-main"> <div class="application-associated-ability-main">
<div <div
class="associated-ability-card" class="associated-ability-card"
@ -41,9 +41,10 @@
}, },
}) })
} }
if (props.associatedComponents) { if (props.associatedComponents[0].dataList.length != 0) {
flag.value = true flag.value = true
dataFrom.value = props.associatedComponents dataFrom.value = props.associatedComponents
debugger
console.log('dataFrom.value', dataFrom.value) console.log('dataFrom.value', dataFrom.value)
} else { } else {
flag.value = false flag.value = false

View File

@ -29,7 +29,7 @@
key: 'eveloper-presentation', key: 'eveloper-presentation',
}, },
{ {
name: '关联能力', name: '关联应用',
key: 'developer-associated-ability', key: 'developer-associated-ability',
}, },
{ {
@ -60,6 +60,7 @@
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
associatedComponents: { type: Array, default: null },
}) })
const select = ref('algorithm-display') const select = ref('algorithm-display')
const list = ref([]) const list = ref([])
@ -80,11 +81,17 @@
list.value.push('组件展示') list.value.push('组件展示')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
select.value = navList.value.filter( select.value = navList.value.filter(
@ -115,13 +122,19 @@
list.value.push('组件展示') list.value.push('组件展示')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
list.value.push('组件试用') list.value.push('组件试用')
list.value.push('使用方式') list.value.push('使用方式')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
if (list.value.length > 0) { if (list.value.length > 0) {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="application-associated-ability" v-if="flag"> <div class="application-associated-ability" v-if="flag">
<detals-title title="关联能力" type="RELEVANCE"></detals-title> <detals-title title="关联应用" type="RELEVANCE"></detals-title>
<div class="application-associated-ability-main"> <div class="application-associated-ability-main">
<div <div
class="associated-ability-card" class="associated-ability-card"
@ -41,9 +41,10 @@
}, },
}) })
} }
if (props.associatedComponents) { if (props.associatedComponents[0].dataList.length != 0) {
flag.value = true flag.value = true
dataFrom.value = props.associatedComponents dataFrom.value = props.associatedComponents
debugger
console.log('dataFrom.value', dataFrom.value) console.log('dataFrom.value', dataFrom.value)
} else { } else {
flag.value = false flag.value = false

View File

@ -24,6 +24,10 @@
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const navList = ref([ const navList = ref([
{
name: '关联应用',
key: 'layer-service-associated-ability',
},
{ {
name: '图层展示', name: '图层展示',
key: 'service-presentation', key: 'service-presentation',
@ -32,10 +36,6 @@
name: '图层信息', name: '图层信息',
key: 'service-information', key: 'service-information',
}, },
{
name: '关联能力',
key: 'layer-service-associated-ability',
},
{ {
name: '应用场景', name: '应用场景',
key: 'service-application-scenarios', key: 'service-application-scenarios',
@ -60,6 +60,7 @@
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
associatedComponents: { type: Array, default: null },
}) })
const select = ref('service-presentation') const select = ref('service-presentation')
const list = ref([]) const list = ref([])
@ -121,11 +122,17 @@
list.value.push('使用方式') list.value.push('使用方式')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
select.value = navList.value.filter( select.value = navList.value.filter(
@ -196,11 +203,17 @@
list.value.push('使用方式') list.value.push('使用方式')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
if (list.value.length > 0) { if (list.value.length > 0) {

View File

@ -5,7 +5,7 @@
<div class="infrastructrue-tab"> <div class="infrastructrue-tab">
<div v-for="(item, index) in tabList" :key="index" class="tabBox"> <div v-for="(item, index) in tabList" :key="index" class="tabBox">
<b class="leftType">{{ item.title }}</b> <b class="leftType">{{ item.title }}</b>
<button @click="nullClick" v-if="item.title == '视频细分'">清空</button> <button @click="nullClick" v-if="item.title == '视频标签'">清空</button>
<span <span
v-for="itemContent in item.content" v-for="itemContent in item.content"
:key="itemContent" :key="itemContent"
@ -118,6 +118,7 @@
import { getCategoryTreePage } from '@/api/personalCenter' import { getCategoryTreePage } from '@/api/personalCenter'
import { dataType } from 'element-plus/es/components/table-v2/src/common' import { dataType } from 'element-plus/es/components/table-v2/src/common'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue'
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'
import { import {
getCameraByParentId, getCameraByParentId,
@ -125,7 +126,6 @@
getCameraAllLabel, getCameraAllLabel,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
const options = reactive({ const options = reactive({
@ -209,7 +209,7 @@
content: ['视频资源', '云资源', '感知资源'], content: ['视频资源', '云资源', '感知资源'],
}, },
{ {
title: '视频细分', title: '视频标签',
content: [], content: [],
}, },
]) ])
@ -257,12 +257,18 @@
if (name == '视频资源') { if (name == '视频资源') {
tableHeight.value = 330 tableHeight.value = 330
showMap.value = true showMap.value = true
tabList.value[1].title = '视频标签'
} else if (name == '云资源') { } else if (name == '云资源') {
tableHeight.value = 600 tableHeight.value = 600
showMap.value = false showMap.value = false
dataSource.value = []
pagination.value.total = 0
tabList.value[1].title = '云资源分类'
} else if (name == '感知资源') { } else if (name == '感知资源') {
tableHeight.value = 330 tableHeight.value = 330
showMap.value = true showMap.value = true
dataSource.value = []
pagination.value.total = 0
} }
clickList.value[indexFather].content.splice( clickList.value[indexFather].content.splice(
clickList.value[indexFather].content.indexOf(name), clickList.value[indexFather].content.indexOf(name),
@ -274,6 +280,7 @@
showMap.value = true showMap.value = true
tabList.value[1].content = [] tabList.value[1].content = []
clickList.value[1].content = [] clickList.value[1].content = []
tabList.value[1].title = '视频标签'
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
getCameraAllLabel().then((res) => { getCameraAllLabel().then((res) => {
res.data.data.forEach((val) => { res.data.data.forEach((val) => {
@ -283,10 +290,21 @@
}) })
}) })
}) })
// labelCode
mapSearchParam.value.labelCodes = []
clickList.value[1].content.map((item) => {
mapSearchParam.value.labelCodes.push(item.labelCode)
})
console.log('选中的标签code', mapSearchParam.value)
mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
getCamera()
} else if (name == '云资源') { } else if (name == '云资源') {
tableHeight.value = 600 tableHeight.value = 600
showMap.value = false showMap.value = false
dataSource.value = []
pagination.value.total = 0
clickList.value[1].content = [] clickList.value[1].content = []
tabList.value[1].title = '云资源分类'
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
tabList.value[1].content = [ tabList.value[1].content = [
'云主机', '云主机',
@ -302,8 +320,11 @@
tableHeight.value = 330 tableHeight.value = 330
showMap.value = true showMap.value = true
clickList.value[1].content = [] clickList.value[1].content = []
pagination.value.total = 0
tabList.value[1].title = '感知资源分类'
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
tabList.value[1].content = [] tabList.value[1].content = []
dataSource.value = []
} else { } else {
clickList.value[indexFather].content.push(name) clickList.value[indexFather].content.push(name)
} }
@ -344,26 +365,30 @@
dept.deptName = infrastructure.deptName dept.deptName = infrastructure.deptName
} }
const apply = () => { const apply = () => {
console.log('一键申请', selectedList.value) if (selectedRowKeys.value.length != 0) {
let arr = [ console.log('一键申请', selectedList.value)
{ let arr = [
arr: [ {
{ arr: [
description: '', {
note1: JSON.stringify(selectedList.value), description: '',
resourceId: '1522550195055828996', note1: JSON.stringify(selectedList.value),
resourceName: '摄像头列表', resourceId: '1522550195055828996',
type: '基础设施', resourceName: '摄像头列表',
}, type: '基础设施',
], },
deptId: dept.deptId, ],
deptName: dept.deptName, deptId: dept.deptId,
}, deptName: dept.deptName,
] },
localStorage.setItem('applyList', JSON.stringify(arr)) ]
router.push({ localStorage.setItem('applyList', JSON.stringify(arr))
path: '/apply', router.push({
}) path: '/apply',
})
} else {
message.error('请选择需要申请的数据')
}
} }
// //
const addShopCar = () => { const addShopCar = () => {

View File

@ -293,6 +293,11 @@
color: #212121; color: #212121;
text-align: center; text-align: center;
margin-top: 0.05rem; margin-top: 0.05rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
} }
.text { .text {
width: 100%; width: 100%;