whx 7 月之前
父節點
當前提交
6d2234c20a
共有 32 個文件被更改,包括 130 次插入53 次删除
  1. 10 9
      virgo.wzfrontend/console/src/layout/components/selectProject.vue
  2. 7 0
      virgo.wzfrontend/console/src/router/modules/operation.js
  3. 5 2
      virgo.wzfrontend/console/src/views/message/list.vue
  4. 91 28
      virgo.wzfrontend/console/src/views/work/index.vue
  5. 1 1
      virgo.wzfrontend/src/main/resources/static/console/index.html
  6. 0 0
      virgo.wzfrontend/src/main/resources/static/console/static/css/4580.12d58e15.css
  7. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/css/3161.dd5b7583.css
  8. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/css/8082.de937fcd.css
  9. 0 0
      virgo.wzfrontend/src/main/resources/static/console/static/css/9479.de937fcd.css
  10. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/css/9818.b9bbdc53.css
  11. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/2598-legacy.6b4d60f9.js
  12. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/2598.4a5289f1.js
  13. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/2606-legacy.79963023.js
  14. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/3161-legacy.211c8e1a.js
  15. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/3161.231601c5.js
  16. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/324.b041ed5d.js
  17. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/4507.e974fd0b.js
  18. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/8747-legacy.0a68c879.js
  19. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/4610-legacy.3b09af3f.js
  20. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/4635.03a3f040.js
  21. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/4639-legacy.a72aaf7d.js
  22. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/4639.a3ae0261.js
  23. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/7072-legacy.7df8efd6.js
  24. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/7072.2d79d407.js
  25. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/7146-legacy.1c2a8e4f.js
  26. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/7437-legacy.3f25d8db.js
  27. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/8082-legacy.c4aa1ebc.js
  28. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/7437-legacy.967f7e95.js
  29. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.49211a80.js
  30. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.c4662896.js
  31. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/app.764b6f9a.js
  32. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/app.a607fdb3.js

+ 10 - 9
virgo.wzfrontend/console/src/layout/components/selectProject.vue

@@ -36,7 +36,7 @@
 		<el-dialog custom-class="identity" title="选择身份" :visible.sync="visible" width="300px" :append-to-body="true">
 			<div class="hui-flex hui-dialog">
 				<div class="hui-flex-box hui-dialog-content">
-					<el-radio-group v-model="indentity">
+					<el-radio-group v-model="indentityId">
 						<div class="select-identity-item" v-for="item in  project.projectListIdentity" :key="item.id">
 							<el-radio :label="item.id">{{item.name}}</el-radio>
 						</div>
@@ -74,7 +74,7 @@
 			return {
 				tableData: [],
 				visible: false,
-				indentity: '',
+				indentityId: '',
 				project: {
 					projectListIdentity: []
 				}
@@ -95,11 +95,12 @@
 			},
 			changeProject(item) {
 				this.project = item;
-				this.indentity = item.projectListIdentity[0].id;
+				this.indentityId = item.projectListIdentity[0].id;
 				this.visible = true;
 			},
 			submit() {
-				if (this.indentity == 6 || this.indentity == 3) {
+				let indentity = this.project.projectListIdentity.find(node => node.id === this.indentityId);
+				if (this.indentityId == 6 || this.indentityId == 3) {
 					getOrganizationDetailById(this.project.organizationId).then(res => {
 						if (res.state) {
 							this.$store.dispatch('app/changeOrganization', res.data);
@@ -110,23 +111,23 @@
 				selectProject(this.project.id).then(res => {
 					if (res.state) {
 						let user = res.data;
-						this.$store.dispatch('app/changeIdentityId', this.indentity);
+						this.$store.dispatch('app/changeIdentity', indentity);
 						this.$store.dispatch('projectBase/changeProject', this.project);
 						localStorage.setItem('projectId', this.project.id);
 						this.$store.dispatch('app/changeUser', user);
-						if (this.indentity === 3 || user.userId === 1) {
+						if (this.indentityId === 3 || user.userId === 1) {
 							this.$store.dispatch('app/changeMenuData', user.resource ? JSON.parse(user.resource) :
 								[]);
 							setComment(user.menu ? user.menu : JSON.stringify([]));
 							this.$emit('callback');
 							this.$router.push({
-								path: '/',
+								path: '/work',
 								replace: true
 							})
 							this.$message.success('切换成功');
 						} else {
 							getIdentityResource({
-								identityId: this.indentity.identityId,
+								identityId: this.indentityId,
 								type: this.project.type
 							}).then(node => {
 								if (node.state) {
@@ -137,7 +138,7 @@
 										[]));
 									this.$emit('callback');
 									this.$router.push({
-										path: '/',
+										path: '/work',
 										replace: true
 									})
 									this.$message.success('切换成功');

+ 7 - 0
virgo.wzfrontend/console/src/router/modules/operation.js

@@ -54,5 +54,12 @@ const operation = [{
 	meta: {
 		title: '操作日志'
 	}
+}, {
+	path: 'operation/log/person',
+	component: () => import('@/views/work/operation/log/person'),
+	name: '个人日志',
+	meta: {
+		title: '个人日志'
+	}
 }]
 export default operation;

+ 5 - 2
virgo.wzfrontend/console/src/views/message/list.vue

@@ -1,5 +1,8 @@
 <template>
-	<div class="hui-flex hui-content">
+	<div class="hui-flex hui-content">
+		<div class="hui-content-title">
+			<div class="hui-title-item active">消息通知</div>
+		</div>
 		<div class="hui-flex-box hui-flex hui-table">
 			<div class="hui-flex-box">
 				<el-table :data="tableData" row-key="id" border height="100%">
@@ -68,7 +71,7 @@
 			return {
 				tableData: [],
 				pageIndex: 1,
-				pageSize: 10,
+				pageSize: 15,
 				totalCount: 0,
 				item: {},
 				drawer: false

+ 91 - 28
virgo.wzfrontend/console/src/views/work/index.vue

@@ -20,7 +20,7 @@
 						</div>
 						<div class="user-item">
 							<div class="user-key">联系方式</div>
-							<div class="user-value">17777777777</div>
+							<div class="user-value">{{user.phone}}</div>
 						</div>
 						<div class="user-item">
 							<div class="user-key">空间定位</div>
@@ -149,17 +149,15 @@
 					<div class="log-box box-background">
 						<div class="user-title">
 							<div class="user-title-name">个人日志</div>
-							<div class="user-title-right">
+							<div class="user-title-right" @click="$router.push('/work/operation/log/person')">
 								<span>更多</span>
 								<i class="iconfont huifont-xiala-right"></i>
 							</div>
 						</div>
 						<div class="log-list">
-							<div class="log-item">林志权在2024-11-04邀请您加入【魔方大厦】项目,请及时处理</div>
-							<div class="log-item">Lisa在2024-11-04时申请使用【公章】印章,请及时处理。</div>
-							<div class="log-item">林志权在2024-11-04邀请您加入【魔方大厦】项目,请及时处理</div>
-							<div class="log-item">Lisa在2024-11-04时申请使用【公章】印章,请及时处理。</div>
-							<div class="log-item">林志权在2024-11-04邀请您加入【魔方大厦】项目,请及时处理</div>
+							<div class="log-item" v-for="item in logList" :key="item.id" @click="detail(item)">
+								{{item.message}}
+							</div>
 						</div>
 					</div>
 				</div>
@@ -167,27 +165,44 @@
 					<div class="hui-flex hui-content">
 						<div class="user-title">
 							<div class="user-title-name">我的消息</div>
-							<div class="user-title-right">
+							<div class="user-title-right" @click="$router.push('/message')">
 								<span>更多</span>
 								<i class="iconfont huifont-xiala-right"></i>
 							</div>
 						</div>
 						<div class="hui-flex-box hui-table">
-							<el-table :data="tableData" row-key="id" stripe height="100%" @row-click="clickRow">
+							<el-table :data="tableData" row-key="id" stripe height="100%">
 								<el-table-column label="序号" width="50">
 									<template slot-scope="scope">
 										{{scope.$index + 1}}
 									</template>
 								</el-table-column>
-								<el-table-column label="消息内容" prop="message"></el-table-column>
-								<el-table-column label="消息类型" prop="messageType" width="80">
+								<el-table-column label="消息内容">
 									<template slot-scope="scope">
-										<span>{{messageType(scope.row.messageType).name}}</span>
+										<div class="hui-ellipsis">
+											{{scope.row.message}}
+										</div>
+									</template>
+								</el-table-column>
+								<el-table-column label="时间" prop="sentTime" width="180"></el-table-column>
+								<el-table-column label="消息类型" prop="messageType" width="150">
+									<template slot-scope="scope">
+										<div class="hui-table-tag">
+											<div class="hui-tag">
+												<div>{{messageType(scope.row.messageType).name}}</div>
+											</div>
+										</div>
+									</template>
+								</el-table-column>
+								<el-table-column width="150" label="操作">
+									<template slot-scope="scope">
+										<span class="table-operation" @click="detail(scope.row)">
+											详情
+										</span>
 									</template>
 								</el-table-column>
-								<el-table-column label="时间" prop="date" width="180"></el-table-column>
 								<template slot="empty">
-									<empty width="100" description="暂无消息"></empty>
+									<empty description="暂无数据"></empty>
 								</template>
 							</el-table>
 						</div>
@@ -195,16 +210,25 @@
 				</div>
 			</div>
 		</div>
+		<el-drawer title="消息详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :type="item.messageType" :detail="item" @close="drawer = false">
+			</detail>
+		</el-drawer>
 	</div>
 </template>
 <script>
+	import {
+		getMessagePageListByQuery
+	} from '@/httpApi/message'
+	import detail from '@/components/message/detail'
 	export default {
 		data() {
 			return {
-				user: {
-					name: '林'
-				},
+				user: {},
+				logList: [],
 				tableData: [],
+				item: {},
+				drawer: false,
 				industryList: [{
 					value: 21,
 					name: "建筑业",
@@ -236,11 +260,54 @@
 				}]
 			}
 		},
+		created() {
+			this.user = this.$store.getters.user;
+			this.initMessage();
+			this.initLog();
+		},
 		mounted() {
 			this.chart1();
 		},
+		components: {
+			detail
+		},
 		methods: {
-			clickRow() {},
+			initLog() {
+				let data = {
+					projectId: this.$store.getters.project.id,
+					organizationId: this.$store.getters.organization.id,
+					sender: this.$store.getters.user.userId
+				}
+				getMessagePageListByQuery(1, 5, data).then(res => {
+					if (res.state) {
+						this.logList = res.data.dataList.map(node => {
+							return Object.assign(node, JSON.parse(node.json));
+						});
+					}
+				})
+			},
+			initMessage() {
+				let data = {
+					projectId: this.$store.getters.project.id,
+					organizationId: this.$store.getters.organization.id,
+					userId: this.$store.getters.user.userId
+				}
+				getMessagePageListByQuery(1, 8, data).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList.map(node => {
+							return Object.assign(node, JSON.parse(node.json));
+						});
+					}
+				})
+			},
+			detail(item) {
+				if (!item.viewed) this.$msg.viewed(item.id, this.initMessage);
+				this.item = item;
+				this.drawer = true;
+			},
+			messageType(type) {
+				return this.$msg.messageType.filter(item => item.id === type)[0];
+			},
 			chart1() {
 				let chart = echarts.init(this.$refs.chart1);
 				let title = '建筑业',
@@ -382,6 +449,12 @@
 				flex: 1;
 				width: 0;
 			}
+
+			.user-title-right {
+				cursor: pointer;
+				display: flex;
+				align-items: center;
+			}
 		}
 
 		.staging-left {
@@ -690,11 +763,6 @@
 					border-color: transparent;
 				}
 
-				tr:hover>td.el-table__cell {
-					background: $--box-background;
-					color: $--color-primary;
-				}
-
 				.el-table__row--striped {
 
 					th.el-table__cell.is-leaf,
@@ -703,11 +771,6 @@
 					}
 				}
 
-				tr.el-table__row--striped:hover>td.el-table__cell {
-					background: #232A37;
-					color: $--color-primary;
-				}
-
 				.el-table__header th.el-table__cell {
 					border-color: transparent;
 				}

File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/index.html


virgo.wzfrontend/src/main/resources/static/console/static/css/8747.12d58e15.css → virgo.wzfrontend/src/main/resources/static/console/static/css/4580.12d58e15.css


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/css/3161.dd5b7583.css


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/css/8082.de937fcd.css


virgo.wzfrontend/src/main/resources/static/console/static/css/4507.de937fcd.css → virgo.wzfrontend/src/main/resources/static/console/static/css/9479.de937fcd.css


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/css/9818.b9bbdc53.css


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/2598-legacy.6b4d60f9.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/2598.4a5289f1.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/2606-legacy.79963023.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/3161-legacy.211c8e1a.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/3161.231601c5.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/324.b041ed5d.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/4507.e974fd0b.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/8747-legacy.0a68c879.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/4610-legacy.3b09af3f.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/4635.03a3f040.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/4639-legacy.a72aaf7d.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/4639.a3ae0261.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/7072-legacy.7df8efd6.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/7072.2d79d407.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/7146-legacy.1c2a8e4f.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/7437-legacy.3f25d8db.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/8082-legacy.c4aa1ebc.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/7437-legacy.967f7e95.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.49211a80.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.c4662896.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/app.764b6f9a.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/app.a607fdb3.js