diff --git a/src/App.vue b/src/App.vue index 128a3ce..341e588 100755 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,8 @@ + + @@ -32,6 +34,7 @@ import Header from './components/Header.vue'; import Breadcrumb from './components/Breadcrumb.vue'; // import loadingAnimation from '@/assets/loadingAni.json' // 导入JSON文件 import GlobalLoading from '@/components/GlobalLoading1.vue' +import SliderScond from '@/components/SliderScond.vue' // import ContentWithLoading from '@/components/ContentWithLoading' export default { data() { @@ -41,6 +44,7 @@ export default { }, components: { GlobalLoading, + SliderScond, // ContentWithLoading, SliderMenu, // Footer, @@ -48,7 +52,7 @@ export default { Breadcrumb }, computed: { - ...mapState(['showSidebar','showHeader','slidermenu','customize']) // 从Vuex映射showSidebar状态到组件的计算属性中 + ...mapState(['showSidebar','showSecondSide','secondMenu','showHeader','slidermenu','customize']) // 从Vuex映射showSidebar状态到组件的计算属性中 }, mounted() { window.addEventListener('beforeunload', this.clearStorage); @@ -80,6 +84,7 @@ export default { color: #2c3e50; height: 100%; background: #F5F7FA; + min-width: 1200px; } .app-content { position: relative; @@ -91,6 +96,7 @@ export default { .main-right-content{ display: flex; flex-direction: column; + min-width: 1042px; } diff --git a/src/assets/input_ex_ic.png b/src/assets/input_ex_ic.png new file mode 100644 index 0000000..a5ec6f3 Binary files /dev/null and b/src/assets/input_ex_ic.png differ diff --git a/src/components/GuipSelect.vue b/src/components/GuipSelect.vue index 38c64c2..d0e5667 100644 --- a/src/components/GuipSelect.vue +++ b/src/components/GuipSelect.vue @@ -18,7 +18,7 @@ export default { props: { value: [String, Number, Array], options: { - type: Array, + type: [Array,Object], default: () => [] }, // 新增配置字段 @@ -58,9 +58,18 @@ export default { } }, computed: { - // 处理options为空的情况 processedOptions() { + // 处理options为空的情况 let options = this.options || []; + + // 如果是对象格式,转换为数组 + if (options && !Array.isArray(options)) { + options = Object.keys(options).map(key => ({ + [this.valueKey]: key, + [this.labelKey]: options[key] + })); + } + // 当extraItem存在且不是空对象时,添加到options数组开头 if (this.extraItem && Object.keys(this.extraItem).length > 0) { return [ diff --git a/src/components/SliderScond.vue b/src/components/SliderScond.vue new file mode 100644 index 0000000..073e4ac --- /dev/null +++ b/src/components/SliderScond.vue @@ -0,0 +1,311 @@ + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 2a33dc5..38104c4 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,13 +2,14 @@ import Vue from 'vue'; import VueRouter from 'vue-router'; import store from '../store'; import HomeView from '../views/HomeView.vue'; -// import UserPosts from '../views/UserPosts.vue'; -// import Franchise from '../views/Franchise.vue' Vue.use(VueRouter) -// 侧边导航黑名单 +// 第三种侧边栏展示白名单 +const whiteSecondSider = [ + '/agent/siteServiceAdd' +]; const blackSliderList = [ - '/register', '/agent/siteAdd', '/franchise','/agent/siteServiceList', '/agent/siteTemplate' + '/register', '/agent/siteAdd', '/franchise','/agent/siteServiceList', '/agent/siteTemplate','/agent/siteServiceAdd' ]; // 一级路由 let first_child_router = [] @@ -518,9 +519,19 @@ const router = new VueRouter({ }) router.beforeEach((to, from, next) => { // 有关路由跳转时,部分状态重置 - store.commit('SET_COMPONENTS_NAME', ''); - + store.commit('SET_SECOND_MENU', []); + if(store.state.componentsName){ + store.commit('SET_COMPONENTS_NAME', ''); + } + // 第三种可折叠版本 侧边栏 + if(whiteSecondSider.includes(to.path)){ + store.commit('SET_SHOWSECONDSIDE', true); // 白名单内页面显示侧边栏 + }else{ + store.commit('SET_SHOWSECONDSIDE', false); // 不显示侧边栏 + } + + // 首页侧边栏 + 内部 二级侧边栏 if (blackSliderList.includes(to.path)) { store.commit('SET_SIDEBAR', false); // 黑名单内页面不显示侧边栏 } else { diff --git a/src/store/index.js b/src/store/index.js index 0901a24..865b513 100755 --- a/src/store/index.js +++ b/src/store/index.js @@ -5,10 +5,12 @@ Vue.use(Vuex) export default new Vuex.Store({ state: { + showSecondSide:false, showSidebar: false, showFooter: false, showHeader: false, menuList: [], //目录菜单 + secondMenu:{}, showBreadcrumb: false, //是否展示面包屑 breadRightText: '', //是否展示面包屑 pageTitle: '一般新文献', //页面标题 @@ -496,6 +498,11 @@ export default new Vuex.Store({ }) { commit('SET_SIDEBAR'); }, + SET_SHOWSECONDSIDE({ + commit + }) { + commit('SET_SHOWSECONDSIDE'); + }, SET_FOOTER({ commit }) { @@ -541,6 +548,11 @@ export default new Vuex.Store({ }) { commit('SET_SLIDER_MENU') }, + SET_SECOND_MENU({ + commit + }) { + commit('SET_SECOND_MENU') + }, SET_COMPONENTS_NAME({ commit }) { @@ -554,6 +566,9 @@ export default new Vuex.Store({ SET_SLIDER_MENU(state,type){ state.slidermenu = state[type] }, + SET_SECOND_MENU(state,data){ + state.secondMenu = JSON.parse(JSON.stringify(data)) + }, SET_CUSTOMIZE(state,show) { state.customize = show }, @@ -567,6 +582,9 @@ export default new Vuex.Store({ SET_SIDEBAR(state, show) { state.showSidebar = show; }, + SET_SHOWSECONDSIDE(state, show) { + state.showSecondSide = show; + }, SET_FOOTER(state, show) { state.showFooter = show; }, diff --git a/src/views/agent/siteServiceAdd.vue b/src/views/agent/siteServiceAdd.vue index 068014a..8e8b769 100644 --- a/src/views/agent/siteServiceAdd.vue +++ b/src/views/agent/siteServiceAdd.vue @@ -6,7 +6,7 @@

{{ver_row.name}}

-
+
@@ -78,6 +78,83 @@ export default { uid:0, serviceAddList:[], methodOptions: [], + obj:{ + '1': { + type: '1', + name: '万方数字哈哈哈哈', + is_select: true, + list: [ + { + type: '29', + name: '万方通用版44生生世世生生世世', + is_select: true, + //componentsName:'1-1' + }, + { + type: '30', + name: '通用说播版44', + is_select: false, + //componentsName:'1-2' + }, + { + type: '32', + name: '本科通用版44', + is_select: false, + //componentsName:'1-3' + }, + ] + }, + '3': { + type: '3', + name: '万方', + is_select: true, + list: [ + { + type: '6', + name: '万方通用版a salads asides33', + is_select: true, + //componentsName:'2-2' + }, + { + type: '27', + name: '通用说播版33', + is_select: true, + //componentsName:'2-3' + }, + { + type: '109', + name: '本科通用版33', + is_select: true, + //componentsName:'2-4' + }, + ] + }, + '6': { + type: '6', + name: '万方', + is_select: true, + list: [ + { + type: '10', + name: '万方通用版11', + is_select: false, + //componentsName:'3-4' + }, + { + type: '11', + name: '通用说播版11', + is_select: true, + //componentsName:'3-5' + }, + { + type: '105', + name: '本科通用版11', + is_select: false, + //componentsName:'3-4' + }, + ] + }, + } } }, computed: { @@ -90,8 +167,8 @@ export default { } this.uid = this.$route.query.uid; - store.commit('SET_CUSTOMIZE', true); - store.commit('SET_SLIDER_MENU', 'siteSettingData'); + // store.commit('SET_CUSTOMIZE', true); + // store.commit('SET_SLIDER_MENU', 'siteSettingData'); }, mounted() { store.commit('SET_PAGETITLE', '站点信息'); @@ -114,6 +191,8 @@ export default { this.$nextTick(() => { that.serviceAddList = response.data.service_add_list store.commit('SET_BREADRIGHTTEXT', response.data.site_short_name); + // 假装有数据啦 + store.commit('SET_SECOND_MENU', this.obj); that.methodOptions = Object.entries(response.data.freedom_set_method).map(([key, value]) => ({ label: value, value: Number(key) diff --git a/src/views/elementGroups.vue b/src/views/elementGroups.vue index 2ddf202..285e805 100644 --- a/src/views/elementGroups.vue +++ b/src/views/elementGroups.vue @@ -75,11 +75,16 @@ value-key="id" />
- + -
+
+ + +

表格:(表头自定义、自定义渲染、固定列)

全选按钮 @@ -677,6 +682,7 @@ export default { domainSuffix: '11', domainSuffix1: '.chachongz.com', card: '1', + card1: '20', input1: '跨年的烟火,绽放天空', input2: '', input3: '', @@ -901,7 +907,7 @@ export default { value: '选项1', label1: '黄金hhhhhh', id1: '1', - id2: '啊11哈哈', + id2: '1是打开快递吧', label: '黄金糕' }, { value: '选项2',