diff --git a/src/assets/css/index.css b/src/assets/css/index.css index d7327f57cc1742cdd0f16f7bacea760da8b78e98..ffafb95f94ec1764903350cff844972f6be0e7ba 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -243,6 +243,7 @@ div { .el-dialog__header { border-bottom: 1px solid #edf0ff; padding: 16px; + margin-right: 0; } .el-dialog__title { @@ -1518,10 +1519,6 @@ border-radius:8px; color: #404a62; padding-left: 20px; } -.name_btn { - color: #3759be; - cursor: pointer; -} .fr { float: right; } @@ -1539,6 +1536,17 @@ border-radius:8px; vertical-align: baseline; cursor: pointer; } +/* 可点击文字颜色、指针样式 */ +.can_click_text { + cursor: pointer; + color: #3759be; +} +.can_click_text:hover { + color: #738bd2; +} +.can_click_text:active { + color: #2c4798; +} .warning_info { background-color: #f7f7f9; diff --git a/src/bg-ui/bg-info.vue b/src/bg-ui/bg-info.vue index 7c672cad0d6f09894fe342437516cfdf819ed554..962d99283eaac372afdc90c979df0cb31605710b 100644 --- a/src/bg-ui/bg-info.vue +++ b/src/bg-ui/bg-info.vue @@ -21,6 +21,7 @@ > {{item.value}} {{secret(item.value)}} + {{item.value}} {{ item.value }}
diff --git a/src/components/input-object-table.vue b/src/components/input-object-table.vue index 8768d1d86a941e4599ee9278d89c0c5fad151d61..8bac1e463c7c1e18e77d87ea6674c4d4834f99b6 100644 --- a/src/components/input-object-table.vue +++ b/src/components/input-object-table.vue @@ -94,8 +94,8 @@ diff --git a/src/page/main/config/dict/index.vue b/src/page/main/config/dict/index.vue index ecbea23f93b6cbd43b26bb8b35f032ea8cd82191..d02af739e714457fd489e3f3cfb2829dfb273420 100644 --- a/src/page/main/config/dict/index.vue +++ b/src/page/main/config/dict/index.vue @@ -9,7 +9,7 @@
- +
@@ -164,6 +164,7 @@ import { reactive, ref,onBeforeMount,toRefs,computed, watch, nextTick } from 'vu import { useRouter } from 'vue-router'; import { ElMessage } from 'element-plus' import axios from '../../../../request/http.js' +import { Search } from '@element-plus/icons-vue' const bgForm = ref(null) const state = reactive({ bgForm, diff --git a/src/page/main/develop/account/index.vue b/src/page/main/develop/account/index.vue index a46e3aa77e9220768212bf874ca1c6a9cb353bc3..89fabbe5b018dc8a64deaa0d6eb352e4e28a79ef 100644 --- a/src/page/main/develop/account/index.vue +++ b/src/page/main/develop/account/index.vue @@ -57,14 +57,14 @@ 重置密码 已选择{{selected.length}} - 清空 + 清空
@@ -72,13 +72,13 @@ diff --git a/src/page/main/develop/menu/index.vue b/src/page/main/develop/menu/index.vue index 1c254706eda777897b16c09062e8e2aa5efda3a0..2c3d232a54d06b33cc033c24b7ea2dce95b07caf 100644 --- a/src/page/main/develop/menu/index.vue +++ b/src/page/main/develop/menu/index.vue @@ -55,7 +55,7 @@
新建本级
-
+
新建下级
@@ -217,6 +217,15 @@ const handleNodeClick = (data) => { state.selectData = data menuFormRef.value.setForm(state.selectData) closeAction() + if (menuFormRef) { + nextTick().then(() => { + menuFormRef.value.menuRef.validate(valid => { + if (!valid) { + menuFormRef.value.menuRef.clearValidate() + } + }) + }) + } // 清除表单验证 } // 菜单树节点点击 const filterNode = (val,data) => { @@ -237,6 +246,7 @@ const fileAction = (val,data,parent,disabled=false) => { state: 1, menu_url: "", menu_logo: "", + level: data.level } state.menuTree.insertAfter(newChild,parent? parent.Child[parent.Child.length-1] : state.data[state.data.length -1]) state.menuTree && state.menuTree.setCurrentKey(newChild.menu_id); @@ -250,11 +260,12 @@ const fileAction = (val,data,parent,disabled=false) => { let newChild = { menu_name: "新菜单", menu_id: 'new' + state.newMenuId, - menu_type: 0, + menu_type: data.menu_type == 0 ? 0 : data.menu_type == 1 ? 1 : 2, dict_group_id: "", state: 1, menu_url: "", menu_logo: "", + p_menu_type: data.menu_type } state.menuTree.append(newChild,data) state.menuTree && state.menuTree.setCurrentKey(newChild.menu_id); diff --git a/src/page/main/develop/menu/menu-form.vue b/src/page/main/develop/menu/menu-form.vue index 8bf536f55843a70b8a689c00d4f4358dcdd63c9d..b05a821a103d643e1f4b481ff62b6062d71b9ba1 100644 --- a/src/page/main/develop/menu/menu-form.vue +++ b/src/page/main/develop/menu/menu-form.vue @@ -11,14 +11,14 @@ - + - 目录 - 菜单 + 目录 + 菜单 子页面 - + - + - +
@@ -129,7 +129,7 @@ const state = reactive({ { required: true, message: '请选择菜单分组', trigger: 'change' }, ], menu_url: [ - { required: true, message: '请输入菜单路径', trigger: 'blur' }, + { required: true, message: '请输入菜单路径', trigger: 'blur' }, ] }, groupList: [], @@ -139,6 +139,8 @@ const state = reactive({ showIconArr: [], // 展示的图标 timer: null, radioDisabled: false, + topLevel: false, + typeDisFlag: null, }) const getGroupList = () => { @@ -180,6 +182,13 @@ const searchIcon = () => { const setForm = (data) => { console.log(data) + if (data.level && data.level == 1) { + state.topLevel = true + }else { + state.topLevel = false + } + state.typeDisFlag = data.p_menu_type + console.log(state.topLevel) if (data.id) { // 编辑状态 state.radioDisabled = true }else { @@ -217,6 +226,8 @@ const { showIconArr, icon_search, radioDisabled, + topLevel, + typeDisFlag, } = toRefs(state) defineExpose({ setForm , menuForm, menuRef }) diff --git a/src/page/main/system/organization/index.vue b/src/page/main/system/organization/index.vue index 5600ca76f6722471e2e38e1e0433c53956eab9f0..bf07c2011413946ee24692ef3852853819c722c9 100644 --- a/src/page/main/system/organization/index.vue +++ b/src/page/main/system/organization/index.vue @@ -77,7 +77,7 @@
@@ -85,13 +85,13 @@ @@ -271,11 +271,21 @@ import tree from './tree.vue'; import directoryForm from './directory-form.vue'; import orgForm from './org-form.vue'; import CryptoJS from "crypto-js"; +import { downloadFileFormatNew } from '@/services/helper' const { proxy } = getCurrentInstance() const { $axios,$message } = proxy const dataTable = ref(null); + const toOrgDetail = () => { + router.push({ + path: "/system/organization/org-detail", + query: { + id: selectTreeData.value.organization_id + } + + }) + } const baseInfo = reactive( [ { @@ -291,6 +301,7 @@ import CryptoJS from "crypto-js"; { name: "机构名称", value: "", + callback: toOrgDetail, nameWidth: 130 }, { @@ -536,7 +547,7 @@ import CryptoJS from "crypto-js"; name: data.name, organization_code: data.organization_code, description: data.description, - attachment: data.attachment && data.attachment.length > 0 ? data.attachment[0].url : '', + attachment: data.attachment && data.attachment.length > 0 ? data.attachment.map(item => item.url).join(',') : '', data_type: 1 } $axios.post(`/apaas/system/v5/org/add`, params) @@ -555,7 +566,7 @@ import CryptoJS from "crypto-js"; name: data.name, organization_code: data.organization_code, description: data.description, - attachment: data.attachment && data.attachment.length > 0 ? data.attachment[0].url : '', + attachment: data.attachment && data.attachment.length > 0 ? data.attachment.map(item => item.url).join(',') : '', data_type: 1 } $axios.put(`/apaas/system/v5/org/${selectTreeData.value.id}`, params) @@ -618,7 +629,7 @@ import CryptoJS from "crypto-js"; level: data.data.value.p_organization_id ? false : true, organization_code: data.data.value.organization_code, description: data.data.value.description, - attachment: [{url: data.data.value.attachment}] + attachment: data.data.value.attachment.split(',').map(i => {return {name: downloadFileFormatNew(i),url: i}}) }); }else if(data.action === 'create') { orgFormRef.value.setForm({p_organization_id: data.data.value.organization_id}); @@ -867,6 +878,8 @@ import CryptoJS from "crypto-js"; dataTable.value.clearSelection(); } + + onBeforeMount(() => { }) @@ -896,7 +909,7 @@ import CryptoJS from "crypto-js"; .tree { overflow: auto; height: calc(100% - 65px); - padding: 5px; + /* padding: 5px; */ } .tree :deep() .el-tree-node>.el-tree-node__children { overflow: unset; diff --git a/src/page/main/system/organization/org-detail/index.vue b/src/page/main/system/organization/org-detail/index.vue index 565964c6a501f8f97155d4fdec9d0872d94b416d..8056620255f339f0aa2ffa4272926b78911689b4 100644 --- a/src/page/main/system/organization/org-detail/index.vue +++ b/src/page/main/system/organization/org-detail/index.vue @@ -21,25 +21,11 @@
组织附件
-
- - xxxxxxx协议.doc +
+ + {{downloadFileFormatNew(item)}} - 下载 - -
-
- - xxxxxxx协议.zip - - 下载 - -
-
- - xxxxxxx协议.jpg - - 下载 + 下载
@@ -58,9 +44,9 @@
@@ -76,33 +62,37 @@ import { reactive, toRefs, ref, } from '@vue/reactivity' import { getCurrentInstance } from 'vue' import { computed, onBeforeMount } from '@vue/runtime-core' -import { useRouter } from 'vue-router'; +import { useRoute } from 'vue-router'; +import { downloadFileFormatNew } from '@/services/helper' +const { proxy } = getCurrentInstance() +const { $axios,$message } = proxy +const route = useRoute(); const baseInfo = reactive( [ { name: "机构名称", - value: "大数据局", + value: "", nameWidth: 130 }, { name: "组织机构代码", - value: "00000001", + value: "", nameWidth: 130 }, { name: "组织管理员数量", - value: "15", + value: "", nameWidth: 130 }, { name: "业务系统数量", - value: "10", + value: "", nameWidth: 130 }, { name: "组织描述", - value: "组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述", + value: "", nameWidth: 130 }, ]) @@ -110,48 +100,100 @@ const baseInfo = reactive( const headers = reactive([ { label: "业务系统名称", - prop: "name", + prop: "business_name", }, { label: "是否启用", - prop: "is_use", + prop: "state", }, { label: "业务系统账号", - prop: "account", + prop: "system_account", }, ]) - const tableRows = reactive([ - {name: '大数据处理系统',is_use: "是",account: "admin"}, - {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - // {name: '大数据处理系统',is_use: "是",account: "admin"}, - - ]) + const tableRows = ref([]) + const fileList = ref([]) + const filter = reactive({ + page: 1, + limit: 10, + }); + const tableTotal = ref(0); const changeSize = (size) => { + filter.limit = size; + changePage(1) + } + const changePage = (page) => { + filter.page = page; + getSystemInfo(); } - const changePage = (size) => { + const downloadFile = (data) => { + const a = document.createElement("a"); // 创建a标签 + a.setAttribute("download", ""); // download属性 + a.setAttribute("href", data); // href链接 + a.click(); // 自执行点击事件 + } + const formatFile = (url) => { + const file = url.split('.')[1]; + let icon = '' + if(('docx').indexOf(file) !== -1) { + icon = 'c-file-doc' + }else if(('xlsx').indexOf(file) !== -1) { + icon = 'c-file-xlsx' + }else if(('pdf').indexOf(file) !== -1) { + icon = 'c-file-pdf' + }else if(('txt').indexOf(file) !== -1) { + icon = 'c-file-txt' + }else if(('zip').indexOf(file) !== -1) { + icon = 'c-file-zip' + }else if(('jpg,png').indexOf(file) !== -1) { + icon = 'c-file-image' + }else { + icon = 'txt' + } + return icon; } - const downloadFile = (data) => { + const getDetail = () => { + $axios.get(`/apaas/system/v5/org/detail?organization_id=${route.query.id}&key_word=&state=&limit=&page=&data_type=1`) + .then((res) => { + if (res.data.code == 200) { + const detail = res.data.data.org_info; + baseInfo[0].value = detail.name; + baseInfo[1].value = detail.organization_code; + baseInfo[2].value = detail.org_admin_number; + baseInfo[3].value = detail.business_system_number; + baseInfo[4].value = detail.description; + fileList.value = detail.attachment ? detail.attachment.split(',') : []; + }else { + $message.error(res.data.msg) + } + }) + } + const getSystemInfo = () => { + console.log(11111111) + const params = {...filter,organization_id: route.query.id} + $axios.get(`/apaas/system/v5/org/business/msg`,{params}) + .then((res) => { + if (res.data.code == 200) { + tableRows.value = res.data.data || []; + tableTotal.value = res.data.total; + }else { + $message.error(res.data.msg) + } + }) } onBeforeMount(() => { - + if(route.query.id) { + getDetail() + getSystemInfo() + } }) @@ -187,7 +229,7 @@ const baseInfo = reactive( margin-bottom: 40px; } .img_box { - width: 120px; + width: 120px\; } .info_box { width: 60%; @@ -228,5 +270,12 @@ const baseInfo = reactive( line-height: 40px; padding-top: 5px; } +.bg-pagination { + margin-top: 0px; +} +.info_content :deep() .bg-table .empty_container { + height: 160px; + padding-top: 25px; +} \ No newline at end of file diff --git a/src/page/main/system/organization/org-form.vue b/src/page/main/system/organization/org-form.vue index 2ef2fbcf4c76af17263bdba3894645b7907c481e..2f333642e7089c2533bf7ee33773eeb062fd3c0c 100644 --- a/src/page/main/system/organization/org-form.vue +++ b/src/page/main/system/organization/org-form.vue @@ -23,7 +23,9 @@ - + 将文件拖到此处,或 点击上传 diff --git a/src/page/main/system/organization/tree.vue b/src/page/main/system/organization/tree.vue index 3a6aed6fab396514221e2e34564e286d8f8ad5c2..55330a23fe9b60d7f218f1c5ecdd69a93d86c085 100644 --- a/src/page/main/system/organization/tree.vue +++ b/src/page/main/system/organization/tree.vue @@ -239,13 +239,14 @@ import { useRouter } from 'vue-router'; padding: 8px 0; background-color: var(--el-tree-node-hover-bg-color); } + .label-text:hover { padding: 8px 0; background-color: var(--el-tree-node-hover-bg-color); } .is_active { padding: 8px 0; - background-color: var(--el-tree-node-hover-bg-color); + background-color: var(--el-color-primary-light-9); } .custom_tree_node { @@ -296,4 +297,8 @@ import { useRouter } from 'vue-router'; z-index: 9; } +.file-tree :deep().el-tree-node__content{ + height: 36px!important; +} + \ No newline at end of file diff --git a/src/page/main/system/role/add/role_form.vue b/src/page/main/system/role/add/role_form.vue index c8121e1d32eddf533c96411cf450a8416fa92033..f355f43fad26d0fd6d5f31601668b6a24448f5d9 100644 --- a/src/page/main/system/role/add/role_form.vue +++ b/src/page/main/system/role/add/role_form.vue @@ -5,7 +5,7 @@ 系统管理 角色管理 - 新建 + {{route.query.id ? "编辑" : "新建"}}
@@ -95,7 +95,7 @@ const roleState = reactive({ data_purview: 3, state: 1, permission_arr: [], - }, + }, // 表单项 rules: { role_name: [ { required: true, message: "请输入角色名称", trigger: "blur" }, @@ -112,13 +112,13 @@ const roleState = reactive({ permission_arr: [ { required: true, type: "array", validator: checkMenuLength, trigger: "change" } ] - }, + }, // 表单校验规则 defaultProps: { name: 'menu_name', value: 'id', children: 'Child', - }, - permissionData: [], + }, // 菜单框默认配置 + permissionData: [], // 菜单数据 }) const getMenuTree = () => { axios @@ -130,22 +130,37 @@ const getMenuTree = () => { ElMessage.error(res.data.data) } }) -} +} // 获取菜单数据 const changeMenu = (val) => { roleState.formData.permission_arr = val -} +} // 修改选中的菜单 + const getRoleDetail = () => { axios .get(`/apaas/system/v5/role/detail/${route.query.id}`) .then((res) => { if (res.data.code == 200) { - console.log(res.data.data) + let { role_name, role_desc, data_purview, state, menus } = res.data.data + let permission_arr = [] + if (menus && menus.length > 0) { + menus.forEach(e => { + permission_arr.push(e.id) + }) + } + roleState.formData = { + role_name, + role_desc, + data_purview, + state, + permission_arr:[...permission_arr] + } + console.log(roleState.formData.permission_arr) }else { ElMessage.error(res.data.data) } }) -} +} // 获取角色详情 const saveRole = () => { roleState.form.validate(valid => { @@ -169,7 +184,7 @@ const saveRole = () => { } }) }else { // 编辑 - params.id = route.query.id + params.id = +route.query.id axios .post(`/apaas/system/v5/role/update`,params) .then((res) => { @@ -183,10 +198,12 @@ const saveRole = () => { } } }) -} +} // 新增或编辑角色的保存 + onBeforeMount(() => { getMenuTree() if (route.query.id) { + // 有id表示是编辑,请求详情,回显 getRoleDetail() } }) diff --git a/src/page/main/system/role/index.vue b/src/page/main/system/role/index.vue index 2b510b8d164b23442138526b06f8065df6480071..7b14e8b508418307b2b739824689d466ca515568 100644 --- a/src/page/main/system/role/index.vue +++ b/src/page/main/system/role/index.vue @@ -22,20 +22,26 @@ 批量删除 +
+ 已选择 + {{selection.length}} + + 清空 +
+ \ No newline at end of file