diff --git a/src/api/ManageApi/index.js b/src/api/ManageApi/index.js index 562f5d6..3bcd570 100644 --- a/src/api/ManageApi/index.js +++ b/src/api/ManageApi/index.js @@ -8,13 +8,14 @@ export function getBasicInformationPage(params) { params }) } -// 企业--基本信息==展示 +// 通过主键查询单条所有数据 export function getBasicInformationById(id) { return request({ - url: `/gysl/basicInformation/${id}`, + url: `/gysl/basicInformation/stagingInfo/${id}`, method: 'get' }); } + // 企业端提交填报 export function fillBasicInformation(data) { return request({ @@ -23,6 +24,14 @@ export function fillBasicInformation(data) { data: data }) } +//企业端暂存数据 +export function tempBasicInformation(data) { + return request({ + url: '/gysl/basicInformation/staging', + method: 'post', + data: data + }) +} // 政务端审核通过 export function auditBasicInformation(data) { return request({ @@ -483,7 +492,7 @@ export function deletexmqt(idList) { return request({ url:'/gysl/projectOtherInfo/delete', method:'delete', - params:{idList} + params: { idList: idList.join(',') } }) } //修改数据 @@ -728,7 +737,7 @@ export function getMessageCount() { } //智能提醒 -// 已读智能提醒 +//已读提醒 export function markSmartReminderAsRead(id) { return request({ url: `/gysl/jSmartReminders/isRead/${id}`, diff --git a/src/api/login.js b/src/api/login.js index 7b7388f..25f4219 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,12 +1,13 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid,loginRole) { const data = { username, password, code, - uuid + uuid, + loginRole } return request({ url: '/login', diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 7395f56..800b560 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -11,10 +11,10 @@
- {{ username }} + {{ name }}
- {{ username }} + {{ name }}
@@ -32,107 +32,64 @@ import { mapGetters } from 'vuex' import Breadcrumb from '@/components/Breadcrumb' import TopNav from '@/components/TopNav' -import Hamburger from '@/components/Hamburger' -import Screenfull from '@/components/Screenfull' -import SizeSelect from '@/components/SizeSelect' -import Search from '@/components/HeaderSearch' -import RuoYiGit from '@/components/RuoYi/Git' -import RuoYiDoc from '@/components/RuoYi/Doc' import bearicon from '@/components/bearicon' -import { checkPermi, checkRole } from "@/utils/permission"; -import { getMessageCount } from '@/api/ManageApi/index' +import { checkPermi, checkRole } from "@/utils/permission" +import { name } from 'mars2d' export default { - components: { - Breadcrumb, - TopNav, - Hamburger, - Screenfull, - SizeSelect, - Search, - RuoYiGit, - RuoYiDoc, - bearicon + components: { + Breadcrumb, + TopNav, + bearicon + }, + data() { + return { + username: "", + messages: [], + counts: 0 // 消息计数 + } + }, + computed: { + ...mapGetters(["avatar", "name", "sidebarRouters", "nickName"]), + //展示判断 + showCompanySection() { + const isCompany = this.checkRole(['company']) + const isCommon = this.checkRole(['common']) + return isCompany && !isCommon }, - data() { - return { - messages: [], - } + topNav: { + get() { + return this.$store.state.settings.topNav + } }, - computed: { - ...mapGetters([ - 'sidebar', - 'avatar', - 'device', - 'name' // Make sure this getter exists in your Vuex store - ]), - username() { - // Return the username from Vuex store or localStorage - return this.name || localStorage.getItem('username') || '账号名称'; - }, - showCompanySection() { - const isCompany = this.checkRole(['company']); - const isCommon = this.checkRole(['common']); - // 如果两个角色都存在,则隐藏企业端 - return isCompany && !isCommon; - }, - setting: { - get() { - return this.$store.state.settings.showSettings - }, - set(val) { - this.$store.dispatch('settings/changeSetting', { - key: 'showSettings', - value: val - }) - } - }, - topNav: { - get() { - return this.$store.state.settings.topNav - } - }, - unreadMessages() { - return this.messages.length - } + unreadMessages() { + return this.messages.length + } + }, + mounted() { + this.username = this.$store.state.user.nickName + }, + methods: { + checkPermi, + checkRole, + toggleSideBar() { + this.$store.dispatch('app/toggleSideBar') }, - mounted() { - this.getCounts(); + logout() { + this.$confirm('确定注销并退出系统吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.$store.dispatch('LogOut').then(() => { + this.$router.replace('/login') + }) + }).catch(() => {}) }, - methods: { - checkPermi, - checkRole, - // 获取数据 - async getCounts() { - try { - const response = await getMessageCount(); - if (response && response.code === 200) { - this.counts = response.data; // 将消息数量赋值给 counts - } else { - console.error('获取数据失败:', response); - } - } catch (error) { - console.error('获取数据失败:', error); - } - }, - toggleSideBar() { - this.$store.dispatch('app/toggleSideBar') - }, - async logout() { - this.$confirm('确定注销并退出系统吗?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - this.$store.dispatch('LogOut').then(() => { - this.$router.replace('/login') - }) - }).catch(() => { }); - }, - handleCommand(command) { - this.$message('点击了: ' + command) - } + handleCommand(command) { + this.$message('点击了: ' + command) } + } } diff --git a/src/store/getters.js b/src/store/getters.js index 98e3301..8491054 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -8,6 +8,7 @@ const getters = { token: state => state.user.token, avatar: state => state.user.avatar, name: state => state.user.name, + nickName: state => state.user.nickName, introduction: state => state.user.introduction, roles: state => state.user.roles, permissions: state => state.user.permissions, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 63e6ba2..ce6290d 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -41,8 +41,9 @@ const user = { const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid + const loginRole = userInfo.loginRole return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid,loginRole).then(res => { setToken(res.token) commit('SET_TOKEN', res.token) resolve() @@ -68,7 +69,9 @@ const user = { commit('SET_ROLES', ['ROLE_DEFAULT']) } commit('SET_ID', user.userId) - commit('SET_NAME', user.userName) + + commit('SET_NAME', user.nickName) + commit('SET_AVATAR', avatar) resolve(res) }).catch(error => { diff --git a/src/views/components/ProjectDetails/Basic.vue b/src/views/components/ProjectDetails/Basic.vue index 0c58e2d..b44a880 100644 --- a/src/views/components/ProjectDetails/Basic.vue +++ b/src/views/components/ProjectDetails/Basic.vue @@ -13,19 +13,19 @@ style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> 编辑 - +
- 项目代表性照片 + 项目代表性照片
@@ -232,6 +232,7 @@ export default { }, data() { return { + baseUrl: process.env.VUE_APP_BASE_API, descriptions: [], dialogImageUrl: '', dialogVisibletwo: false, diff --git a/src/views/components/ProjectDetails/Buildings.vue b/src/views/components/ProjectDetails/Buildings.vue index e2e6918..c5f6328 100644 --- a/src/views/components/ProjectDetails/Buildings.vue +++ b/src/views/components/ProjectDetails/Buildings.vue @@ -13,8 +13,8 @@ style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> 新增 - 编辑 + style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleImport"> 导入 + style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleExport"> 导出 导出 @@ -112,16 +108,16 @@
- - + + - + - + @@ -131,60 +127,60 @@ - + - + - + - + - + - + - + - + - + - + @@ -194,7 +190,7 @@ - + @@ -202,7 +198,7 @@ - + @@ -213,11 +209,31 @@ 确 定 + + + + + +
将文件拖到此处,或点击上传
+
+ 仅允许导入xls、xlsx格式文件。 + 下载模板 +
+
+ +
- \ No newline at end of file + } + }; + + + \ No newline at end of file diff --git a/src/views/components/analysis/messagecompany.vue b/src/views/components/analysis/messagecompany.vue index 7b70b5b..5caa99c 100644 --- a/src/views/components/analysis/messagecompany.vue +++ b/src/views/components/analysis/messagecompany.vue @@ -1,6 +1,6 @@