Browse Source

更新代码

master
song 3 years ago
parent
commit
4e49d38fe2
  1. 7
      src/components/Detail/addOrEdit.vue
  2. 65
      src/components/Detail/editor.vue
  3. 930
      src/router/menus/department.js
  4. 79
      src/router/menus/information.js
  5. 3
      src/styles/sidebar.scss
  6. 17
      src/views/layout/components/Sidebar/SidebarItem.vue
  7. 4
      src/views/otherPage/index.vue
  8. 8
      src/views/privilegeManagement/account/index.vue
  9. 19
      src/views/privilegeManagement/role/permissions.vue

7
src/components/Detail/addOrEdit.vue

@ -11,8 +11,7 @@
</el-cascader>
</el-form-item> -->
<el-form-item label="正文:" prop="content">
<editor v-model="formLabelAlign.content" :isClear="false" @change="change" />
<!-- <editor ref="editor" :content="formLabelAlign.content" /> -->
<editor ref="editor" :content="formLabelAlign.content" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit(formLabelAlign)" :loading="loading">确定</el-button>
@ -74,10 +73,6 @@
},
methods: {
change(val) {
console.log(val)
},
//
handleChange(value) {
this.formLabelAlign.showPage = value

65
src/components/Detail/editor.vue

@ -1,33 +1,52 @@
<template lang="html">
<div>
<!-- id="editor1"对应挂载方式EditorInit1 -->
<!-- <div style="color:black;" id="editor1"></div> -->
<!-- ref="editor2"对应挂载方式EditorInit2 -->
<div style="color:black;text-align: left;" ref="editor2"></div>
</div>
<div id="editor" name="productcontent"></div>
</template>
<script>
import {BASE_API} from '../../config';
import E from 'wangeditor'
export default {
methods:{
// WangEditoridEditorInit1refEditorInit2
EditorInit1(){
const editor1 = new E ('#editor1');
editor1.create();
},
EditorInit2(){
const temp = this.$refs.editor2;
const editor2 = new E (temp);
editor2.create();
},
mounted(){
//mountedEditorInit1EditorInit2
this.EditorInit2();
},
export default {
name: 'editoritem',
props:{
content:{
type: String,
default: ''
}
},
data() {
return {
// uploadPath,
editor: null,
}
},
watch: {
content(val){
if(val){
this.editor.txt.html(val)
}
}
},
mounted() {
this.seteditor()
this.editor.txt.html(this.content)
},
methods: {
seteditor() {
this.editor = new E( document.getElementById('editor') )
this.editor.config.height = 800
this.editor.config.uploadImgShowBase64 = false // base 64
this.editor.config.uploadImgServer = `${BASE_API}/file/upload`//
this.editor.config.uploadVideoServer = `${BASE_API}/file/upload`
this.editor.config.uploadVideoName = 'file'
this.editor.config.uploadFileName = 'file' //
this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024 // 2M
this.editor.config.uploadImgMaxLength = 1 // 1
this.editor.config.uploadImgTimeout = 3 * 60 * 1000 //
this.editor.create()
}
}
}
}
</script>
<style lang="css">

930
src/router/menus/department.js

File diff suppressed because it is too large

79
src/router/menus/information.js

@ -8,17 +8,42 @@ const commodityManagement = {
children: [
{
path: '/information1',
// component: () => import('@/views/richText/index'),
code: '0601',
component: () => import('@/views/richText/index'),
name: '基本信息',
meta: {title: '基本信息', noCache: false, affix: false}
// name: '基本信息',
meta: {title: '基本信息', noCache: true, affix: false},
children: [
{
path: '/information101',
code: '060101',
component: () => import('@/views/richText/index'),
name: '工商登记信息',
meta: {title: '工商登记信息', noCache: false, affix: false},
},
{
path: '/information102',
code: '060102',
component: () => import('@/views/richText/index'),
name: '重要人事变动',
meta: {title: '重要人事变动', noCache: false, affix: false},
}
]
},
{
path: '/information2',
code: '0602',
component: () => import('@/views/richText/index'),
name: '经营管理',
// name: '经营管理',
meta: {title: '经营管理', noCache: false, affix: false},
children: [
{
path: '/information201',
code: '060201',
component: () => import('@/views/richText/index'),
name: '重大改革重组',
meta: {title: '重大改革重组', noCache: false, affix: false},
},
]
},
{
path: '/information3',
@ -26,6 +51,29 @@ const commodityManagement = {
component: () => import('@/views/richText/index'),
name: '公司公告',
meta: {title: '公司公告', noCache: false, affix: false},
children: [
{
path: '/information301',
code: '060301',
component: () => import('@/views/richText/index'),
name: '工作通知',
meta: {title: '工作通知', noCache: false, affix: false},
},
{
path: '/information302',
code: '060302',
component: () => import('@/views/richText/index'),
name: '公示公告',
meta: {title: '公示公告', noCache: false, affix: false},
},
{
path: '/information303',
code: '060303',
component: () => import('@/views/richText/index'),
name: '人才招聘',
meta: {title: '人才招聘', noCache: false, affix: false},
},
]
},
{
path: '/information4',
@ -40,6 +88,29 @@ const commodityManagement = {
component: () => import('@/views/richText/index'),
name: '关于信息公开',
meta: {title: '关于信息公开', noCache: false, affix: false},
children: [
{
path: '/information301',
code: '060501',
component: () => import('@/views/richText/index'),
name: '信息公开实施细则',
meta: {title: '信息公开实施细则', noCache: false, affix: false},
},
{
path: '/information302',
code: '060502',
component: () => import('@/views/richText/index'),
name: '公司制度',
meta: {title: '公司制度', noCache: false, affix: false},
},
{
path: '/information303',
code: '060503',
component: () => import('@/views/richText/index'),
name: '联系我们',
meta: {title: '联系我们', noCache: false, affix: false},
},
]
}
]
};

3
src/styles/sidebar.scss

@ -68,11 +68,12 @@
.el-submenu__title {
&:hover {
background-color: $menuHover !important;
// color: $menuHoverText !important;
color: $menuHoverText !important;
}
}
& .nest-menu .el-submenu>.el-submenu__title,
// & .nest-menu .el-submenu>.el-submenu__title,
& .el-submenu .el-menu-item.is-active {
color: $subMenuBgActiveText !important;
background-color: $subMenuBgActiveBg !important;

17
src/views/layout/components/Sidebar/SidebarItem.vue

@ -82,7 +82,9 @@ export default {
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
return true
// this.onlyOneChild = showingChildren[0]
// console.log('this.onlyOneChild: ', this.onlyOneChild);
return false
}
// Show parent if there are no child router to display
@ -104,12 +106,13 @@ export default {
},
//
getShow(code) {
const arr = [...this.permissionList]
for(let i=0;i<arr.length;i++) {
if(arr[i] === code) {
return true
}
}
return true
// const arr = [...this.permissionList]
// for(let i=0;i<arr.length;i++) {
// if(arr[i] === code) {
// return true
// }
// }
}
// generateTitle
}

4
src/views/otherPage/index.vue

@ -40,7 +40,7 @@
v-if="statusCode === 'endTime' && statusIndex === lists.$index"
v-model="lists.row.endTime"
type="datetime"
placeholder="选择开始时间"
placeholder="选择结束时间"
@change="changeTime(lists.row,'endTime',$event)"
>
</el-date-picker>
@ -179,7 +179,7 @@
}
if(type === 'startTime') {
params.startTime = this.$moment(e).valueOf()
} else if (type === 'emdTime') {
} else if (type === 'endTime') {
params.endTime = this.$moment(e).valueOf()
} else if (type === 'description') {
params.description = e.target.value

8
src/views/privilegeManagement/account/index.vue

@ -81,9 +81,9 @@
:close-on-click-modal="false"
:visible.sync="showEidtDialog">
<el-form :model="editRow" ref="editRow" label-width="100px">
<el-form-item label="登录名" prop="userName" :rules="[{required: true, message: '不能为空', trigger: 'blur'}]">
<!-- <el-form-item label="登录名" prop="userName" :rules="[{required: true, message: '不能为空', trigger: 'blur'}]">
<el-input v-model="editRow.userName"></el-input>
</el-form-item>
</el-form-item> -->
<el-form-item label="手机号" prop="phone">
<el-input v-model="editRow.phone"></el-input>
</el-form-item>
@ -188,9 +188,9 @@
open(userId,type) {
let title = ''
if(type === 0) {
title = '是否删除当前账户'
title = '是否重置账户密码'
} else {
title = '是否删除重置账户密码'
title = '是否删除当前账户'
}
this.$alert(title, '请确认', {
confirmButtonText: '确定',

19
src/views/privilegeManagement/role/permissions.vue

@ -131,11 +131,16 @@
if(list && list.length) {
for(let i = 0; i < list.length; i++) {
if(list[i].own === 1) {
keyList.push(list[i].permissionId)
}
if(list[i].children && list[i].children.length) {
const itemList = this.getKeys(list[i].children)
keyList.push([...itemList])
if(!list[i].children.length) {
keyList.push(list[i].permissionId)
} else {
const itemList = this.getDefaultKeys(list[i].children)
if(itemList.length) {
for(let m=0;m<itemList.length;m++) {
keyList.push(itemList[m])
}
}
}
}
}
}
@ -166,7 +171,7 @@
return
}
let permissionIds = [];
let list = this.$refs.tree.getCheckedNodes();
let list = this.$refs.tree.getCheckedNodes(false,true);
if(list.length) {
for(let i=0;i< list.length;i++) {
permissionIds.push(list[i].permissionId)
@ -205,7 +210,7 @@
*/
establish() {
let permissionIds = [];
let list = this.$refs.treeAdd.getCheckedNodes();
let list = this.$refs.treeAdd.getCheckedNodes(false,true);
if(list.length) {
for(let i=0;i< list.length;i++) {
permissionIds.push(list[i].permissionId)

Loading…
Cancel
Save