Commit bef3646d by zhaopanyu

zpy

parent 8c09c6d0
import request from "@/utils/request";
// 首页查询
export function getListcx(id) {
export function getListcx(data) {
return request({
url: "/system/zyyq/" + id,
url: "/system/zb/list",
method: "get",
data,
});
}
//单条详情
export function getListdt() {
export function getListdt(id) {
return request({
url: "/system/zyyq/list",
url: "/system/zb/" + id,
method: "get",
});
}
......@@ -692,6 +692,7 @@ export default {
id: id,
fbzt: zt
}
updateCb(list).then(response => {
if (zt === '1') {
this.$modal.msgSuccess("已发布");
......@@ -801,7 +802,19 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCb(this.form).then(response => {
let list = this.form
list.tdjs = Base64.encode(this.form.tdjs)
list.cpjj = Base64.encode(this.form.cpjj)
list.gntd = Base64.encode(this.form.gntd)
list.yycx = Base64.encode(this.form.yycx)
list.yfjs = Base64.encode(this.form.yfjs)
list.fwts = Base64.encode(this.form.fwts)
list.fwal = Base64.encode(this.form.fwal)
updateCb(list).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
......@@ -820,10 +833,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).catch(error => {
console.error("添加失败:", error);
this.$modal.msgError("新增失败,请重试!");
});;
});
}
}
});
......
......@@ -19,32 +19,34 @@
<el-menu :default-active="activeNameInner" class="product-menu" :background-color="'transparent'"
:text-color="'#333'" :active-text-color="'#409EFF'">
<!-- 外层菜单 -->
<el-submenu v-for="outerItem in collapseDataOuter" :key="outerItem.name" :index="outerItem.name"
<template>
<el-submenu v-for="outerItem in collapseDataOuter" :key="outerItem.px" :index="outerItem.px"
@click.native="setActiveOuter(outerItem.name)">
<template #title>
<img src="../../assets/images/tag.png" alt="">
<span
style="font-family: 'PingFang SC'; font-weight: 800; font-size: 23px; color: #222222; line-height: 40px;">
{{ outerItem.title }}
{{ outerItem.mc }}
</span>
</template>
<!-- 第二级菜单 -->
<el-submenu v-for="innerItem in outerItem.collapseData" :key="innerItem.name" :index="innerItem.name"
<!-- 根据 cplx 字段判断使用哪个子菜单 -->
<template v-if="outerItem.cplx === '产品类'">
<el-submenu v-for="innerItem in outerItem.cpChildren" :key="innerItem.id" :index="innerItem.px"
:class="{ 'inner-submenu-active': isInnerActive(innerItem.name) }"
@click.native="setActiveInner(innerItem.name)">
@click.native="setActiveInner(innerItem.mc)">
<template #title>
<span
style="font-family: 'PingFang SC'; font-weight: 800; font-size: 17px; color: #222222; line-height: 26px;">
{{ innerItem.title }}
{{ innerItem.mc }}
</span>
</template>
<!-- 第三级菜单 -->
<el-menu-item v-for="content in innerItem.contents" :key="content" :index="innerItem.name + '-' + content"
@click.native="setActiveInner(innerItem.name, content)"
:class="{ 'menu-item-active': activeNameInner === innerItem.name + '-' + content }">
<el-menu-item v-for="content in innerItem.children2" :key="content.id"
:index="innerItem.name + '-' + content.mc"
@click.native="setActiveInner(innerItem.name, content.mc)"
:class="{ 'menu-item-active': activeNameInner === innerItem.name + '-' + content.mc }">
<!-- 蓝色圆点 -->
<span :style="{
......@@ -61,22 +63,63 @@
fontFamily: 'PingFang SC',
fontWeight: '500',
fontSize: '15px',
color: activeNameInner === innerItem.name + '-' + content ? '#165BFF' : '#222222',
textDecoration: activeNameInner === innerItem.name + '-' + content ? 'underline' : 'none',
textDecorationColor: activeNameInner === innerItem.name + '-' + content ? '#165BFF' : 'transparent',
textUnderlineOffset: activeNameInner === innerItem.name + '-' + content ? '8px' : '0'
color: activeNameInner === innerItem.name + '-' + content.mc ? '#165BFF' : '#222222',
textDecoration: activeNameInner === innerItem.name + '-' + content.mc ? 'underline' : 'none',
textDecorationColor: activeNameInner === innerItem.name + '-' + content.mc ? '#165BFF' : 'transparent',
textUnderlineOffset: activeNameInner === innerItem.name + '-' + content.mc ? '8px' : '0'
}">
{{ content }}
{{ content.mc }}
</span>
</el-menu-item>
</el-submenu>
</template>
<template v-else-if="outerItem.cplx === '服务类'">
<el-submenu v-for="innerItem in outerItem.fwlChildren" :key="innerItem.id" :index="innerItem.px"
:class="{ 'inner-submenu-active': isInnerActive(innerItem.name) }"
@click.native="setActiveInner(innerItem.mc)">
<template #title>
<span
style="font-family: 'PingFang SC'; font-weight: 800; font-size: 17px; color: #222222; line-height: 26px;">
{{ innerItem.mc }}
</span>
</template>
<!-- 第三级菜单 -->
<el-menu-item v-for="content in innerItem.children2" :key="content.id"
:index="innerItem.name + '-' + content.mc"
@click.native="setActiveInner(innerItem.name, content.mc)"
:class="{ 'menu-item-active': activeNameInner === innerItem.name + '-' + content.mc }">
<!-- 蓝色圆点 -->
<span :style="{
width: '6px',
height: '6px',
background: '#165BFF',
borderRadius: '50%',
display: 'inline-block',
marginRight: '10px'
}"></span>
<!-- 第三级菜单文本 -->
<span :style="{
fontFamily: 'PingFang SC',
fontWeight: '500',
fontSize: '15px',
color: activeNameInner === innerItem.name + '-' + content.mc ? '#165BFF' : '#222222',
textDecoration: activeNameInner === innerItem.name + '-' + content.mc ? 'underline' : 'none',
textDecorationColor: activeNameInner === innerItem.name + '-' + content.mc ? '#165BFF' : 'transparent',
textUnderlineOffset: activeNameInner === innerItem.name + '-' + content.mc ? '8px' : '0'
}">
{{ content.mc }}
</span>
</el-menu-item>
</el-submenu>
</template>
</el-submenu>
</template>
</el-menu>
</el-col>
<!-- 显示选项卡的内容 -->
<el-col v-if="activeNameOuter === 'outer1'" :span="18"
style="border-radius: 10px; min-height: 700px; background-color: #f5f8fe;">
......@@ -152,7 +195,7 @@
</template>
<script>
import { getListcx, getListdt, } from "@/api/sy.js";
export default {
name: "gasDigitization",
// components: { footerNav },
......@@ -168,40 +211,41 @@ export default {
activeNameOuter: "", // 默认选中的第一级选项
activeNameInner: "", // 默认选中的第二级选项
collapseDataOuter: [
{
name: "outer1",
title: "外层折叠项 1",
collapseData: [
{
name: "1",
title: "智能化办公",
contents: ["大模型", "会议系统", "数字员工"],
},
{
name: "2",
title: "生产化信息",
contents: ["大模型", "哈哈哈哈", "嘻嘻嘻嘻"],
},
],
},
{
name: "outer2",
title: "外层折叠项 2",
collapseData: [
{
name: "3",
title: "基础设施",
contents: ["999", "777", "666"],
},
{
name: "4",
title: "其他",
contents: ["内容1", "内容2", "内容3"],
},
],
},
],
collapseDataOuter: [],
// collapseDataOuter: [
// {
// name: "outer1",
// title: "外层折叠项 1",
// collapseData: [
// {
// name: "1",
// title: "智能化办公",
// contents: ["大模型", "会议系统", "数字员工"],
// },
// {
// name: "2",
// title: "生产化信息",
// contents: ["大模型", "哈哈哈哈", "嘻嘻嘻嘻"],
// },
// ],
// },
// {
// name: "outer2",
// title: "外层折叠项 2",
// collapseData: [
// {
// name: "3",
// title: "基础设施",
// contents: ["999", "777", "666"],
// },
// {
// name: "4",
// title: "其他",
// contents: ["内容1", "内容2", "内容3"],
// },
// ],
// },
// ],
// -------------
activeName: "first",
name: null,
......@@ -216,6 +260,7 @@ export default {
},
computed: {},
mounted() {
this.getList();
// 设置默认选中的第一级和第二级
if (this.collapseDataOuter.length > 0) {
this.activeNameOuter = this.collapseDataOuter[0].name; // 默认选中第一个外层选项
......@@ -250,13 +295,14 @@ export default {
console.log(this.activeName, ' this.activeName');
},
getList() {
// listOrganization().then(res => {
// console.log('组织领导', res)
getListcx().then(res => {
console.log('res', res)
this.collapseDataOuter = res.data;
// this.cpjj = res.data.bmjjwh
// this.gntd = res.data.zzld
// this.yycx = res.data.sjglry
// this.yfjs = res.data.sjglry
// })
})
},
......
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