whx hai 5 meses
pai
achega
9ee5d9ba08

+ 20 - 2
virgo.wzfrontend/console/public/index.html

@@ -4,7 +4,26 @@
 		<meta charset="utf-8">
 		<meta http-equiv="X-UA-Compatible" content="IE=edge">
 		<link rel="icon" href="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/2f7b4bfaf9e64817bc2cb46f3a632b01">
-		<link rel="stylesheet" type="text/css" href="<%= BASE_URL %>reset.css" />
+		<link rel="stylesheet" type="text/css" href="<%= BASE_URL %>reset.css" />
+		<link rel='stylesheet' href='<%= BASE_URL %>plugins/css/pluginsCss.css' />
+		<link rel='stylesheet' href='<%= BASE_URL %>plugins/plugins.css' />
+		<link rel='stylesheet' href='<%= BASE_URL %>css/luckysheet.css' />
+		<!-- 引入jQuery -->
+		<script src="<%= BASE_URL %>pptxjs/jquery-1.11.3.min.js"></script>
+		<script>
+			window.huiJquery = jQuery;
+		</script>
+		<!-- 其他必要库 -->
+		<script src="<%= BASE_URL %>pptxjs/jszip.min.js"></script>
+		<script src="<%= BASE_URL %>pptxjs/filereader.js"></script>
+		<script src="<%= BASE_URL %>pptxjs/d3.min.js"></script>
+		<!-- PPTXjs的核心脚本 -->
+		<script src="<%= BASE_URL %>pptxjs/pptxjs.js"></script>
+		<script src="<%= BASE_URL %>pptxjs/divs2slides.js"></script>
+		<link rel="stylesheet" href="<%= BASE_URL %>pptxjs/pptxjs.css">
+		<script src="<%= BASE_URL %>plugins/js/plugin.js"></script>
+		<script src="<%= BASE_URL %>luckysheet.umd.js"></script>
+		
 		<link rel="stylesheet" href="//at.alicdn.com/t/c/font_4358860_plro02z515r.css">
 		<script type="text/javascript" src="https://api.tianditu.gov.cn/api?v=4.0&tk=72632adad893994a0450b55949c8a8fc">
 		</script>
@@ -14,7 +33,6 @@
 		<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.4.3/echarts.min.js"></script>
 		<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts-gl/2.0.8/echarts-gl.min.js"></script>
 		<script src="https://static.bimface.com/api/BimfaceSDKLoader/BimfaceSDKLoader@latest-release.js"></script>
-
 	</head>
 	<body id="body">
 		<noscript>

+ 174 - 167
virgo.wzfrontend/console/src/layout/components/selectProject.vue

@@ -1,168 +1,175 @@
-<template>
-	<div class="hui-flex hui-dialog select-project-index">
-		<div class="hui-flex-box hui-dialog-content">
-			<el-table :data="tableData" row-key="id" border height="100%">
-				<el-table-column label="序号" width="50">
-					<template slot-scope="scope">
-						<div style="text-align: center;">{{scope.$index + 1}}</div>
-					</template>
-				</el-table-column>
-				<el-table-column label="项目名称" prop="name"></el-table-column>
-				<el-table-column label="所属企业" prop="organizationName"></el-table-column>
-				<el-table-column label="项目身份">
-					<template slot-scope="scope">
-						<div class="hui-table-tag" style="display: flex;align-items: center;">
-							<div class="hui-tag hui-tag-success" style="margin:0 5px;"
-								v-for="(node,index) in scope.row.projectListIdentity" :key="index">
-								{{node.name}}
-							</div>
-						</div>
-					</template>
-				</el-table-column>
-				<el-table-column label="操作" width="100">
-					<template slot-scope="scope">
-						<div class="hui-table-operation">
-							<span class="table-operation" @click="changeProject(scope.row)">
-								切换项目
-							</span>
-						</div>
-					</template>
-				</el-table-column>
-				<template slot="empty">
-					<empty description="暂无数据"></empty>
-				</template>
-			</el-table>
-		</div>
-		<el-dialog :close-on-click-modal="false" 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="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>
-					</el-radio-group>
-				</div>
-				<div class="hui-dialog-submit">
-					<el-button size="medium" @click="visible = false">取 消</el-button>
-					<el-button size="medium" type="primary" @click="submit">确定</el-button>
-				</div>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-	import {
-		selectProject,
-		selectOrangaized,
-		refresh
-	} from '@/httpApi/loginRegister'
-	import {
-		getOrganizationDetailById
-	} from '@/httpApi/organization'
-	import {
-		getProjectListByIdentity
-	} from '@/httpApi/space'
-	import {
-		getIdentityResource
-	} from '@/httpApi/system'
-	import {
-		setComment
-	} from '@/uitls/auth';
-	export default {
-		data() {
-			return {
-				tableData: [],
-				visible: false,
-				indentityId: '',
-				project: {
-					projectListIdentity: []
-				}
-			}
-		},
-		created() {
-			this.init();
-		},
-		methods: {
-			init() {
-				refresh().then(res => {
-					getProjectListByIdentity().then(res => {
-						if (res.state) {
-							this.tableData = res.data;
-						}
-					})
-				})
-			},
-			changeProject(item) {
-				this.project = item;
-				this.indentityId = item.projectListIdentity[0].id;
-				this.visible = true;
-			},
-			submit() {
-				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);
-							selectOrangaized(res.data)
-						}
-					})
-				}
-				selectProject(this.project.id).then(res => {
-					if (res.state) {
-						let user = res.data;
-						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.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: '/work',
-								replace: true
-							})
-							this.$message.success('切换成功');
-						} else {
-							getIdentityResource({
-								identityId: this.indentityId,
-								type: this.project.type
-							}).then(node => {
-								if (node.state) {
-									let role = node.data[0] || {};
-									this.$store.dispatch('app/changeMenuData', role
-										.resource ? JSON.parse(role.resource) : []);
-									setComment(role.menus ? role.menus : JSON.stringify(
-										[]));
-									this.$emit('callback');
-									this.$router.push({
-										path: '/work',
-										replace: true
-									})
-									this.$message.success('切换成功');
-								} else {
-									this.$message.error('切换失败');
-								}
-							})
-						}
-					} else {
-						this.$message.error('切换失败');
-					}
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.identity.el-dialog {
-		height: 40vh;
-		margin-top: 30vh !important;
-
-		.select-identity-item {
-			margin-bottom: 10px;
-		}
-	}
+<template>
+	<div class="hui-flex hui-dialog select-project-index">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-table :data="tableData" row-key="id" border height="100%">
+				<el-table-column label="序号" width="50">
+					<template slot-scope="scope">
+						<div style="text-align: center;">{{scope.$index + 1}}</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="项目名称" prop="name" width="150"></el-table-column>
+				<el-table-column label="所属企业" prop="organizationName"></el-table-column>
+				<el-table-column label="项目身份" width="290">
+					<template slot-scope="scope">
+						<div class="hui-table-tag" style="display: flex;align-items: center;">
+							<div class="hui-tag hui-tag-success" style="margin:0 5px;"
+								v-for="(node,index) in scope.row.projectListIdentity" :key="index">
+								{{node.name}}
+							</div>
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="操作" width="100">
+					<template slot-scope="scope">
+						<div class="hui-table-operation">
+							<span class="table-operation" @click="changeProject(scope.row)">
+								切换项目
+							</span>
+						</div>
+					</template>
+				</el-table-column>
+				<template slot="empty">
+					<empty description="暂无数据"></empty>
+				</template>
+			</el-table>
+		</div>
+		<el-dialog :close-on-click-modal="false" 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="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>
+					</el-radio-group>
+				</div>
+				<div class="hui-dialog-submit">
+					<el-button size="medium" @click="visible = false">取 消</el-button>
+					<el-button size="medium" type="primary" @click="submit">确定</el-button>
+				</div>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import {
+		selectProject,
+		selectOrangaized,
+		refresh
+	} from '@/httpApi/loginRegister'
+	import {
+		getOrganizationDetailById
+	} from '@/httpApi/organization'
+	import {
+		getProjectListByIdentity
+	} from '@/httpApi/space'
+	import {
+		getIdentityResource
+	} from '@/httpApi/system'
+	import {
+		setComment
+	} from '@/uitls/auth';
+	export default {
+		data() {
+			return {
+				tableData: [],
+				visible: false,
+				indentityId: '',
+				project: {
+					projectListIdentity: []
+				}
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				refresh().then(res => {
+					getProjectListByIdentity().then(res => {
+						if (res.state) {
+							this.tableData = res.data;
+						}
+					})
+				})
+			},
+			changeProject(item) {
+				this.project = item;
+				this.indentityId = item.projectListIdentity[0].id;
+				this.visible = true;
+			},
+			submit() {
+				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);
+							selectOrangaized(res.data).then(res => {
+								if (res.state) this.chageProject(indentity);
+							})
+						}
+					})
+				} else {
+					this.chageProject(indentity);
+				}
+			},
+			chageProject(indentity) {
+				selectProject(this.project.id).then(res => {
+					if (res.state) {
+						let user = res.data;
+						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.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: '/work',
+								replace: true
+							})
+							this.$message.success('切换成功');
+						} else {
+							getIdentityResource({
+								identityId: this.indentityId,
+								type: this.project.type
+							}).then(node => {
+								if (node.state) {
+									let role = node.data[0] || {};
+									this.$store.dispatch('app/changeMenuData', role
+										.resource ? JSON.parse(role.resource) : []);
+									setComment(role.menus ? role.menus : JSON.stringify(
+										[]));
+									this.$emit('callback');
+									this.$router.push({
+										path: '/work',
+										replace: true
+									})
+									this.$message.success('切换成功');
+								} else {
+									this.$message.error('切换失败');
+								}
+							})
+						}
+					} else {
+						this.$message.error('切换失败');
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.identity.el-dialog {
+		height: 40vh;
+		margin-top: 30vh !important;
+
+		.select-identity-item {
+			margin-bottom: 10px;
+		}
+	}
 </style>

+ 210 - 210
virgo.wzfrontend/console/src/uitls/datacenter.js

@@ -1,211 +1,211 @@
-import {
-	getProjectPermission,
-	getUserProjectPermissions,
-	getUserOrganizationPermissions,
-	validationProjectPermission,
-	validationOrganizationPermission,
-	getSetApprove
-} from '@/httpApi/datacenter'
-import store from '../store';
-import {
-	MessageBox,
-	Message
-} from 'element-ui';
-import message from './message.js';
-let organization, project, user;
-let checker = []; //审核人
-const initData = () => {
-	organization = store.getters.organization;
-	project = store.getters.project;
-	user = store.getters.user;
-}
-//permission:1-公开 2-私密 3-密码
-const permission = (option, callback) => {
-	switch (option.permissions) {
-		case '1':
-			callback();
-			break;
-		case '2':
-			privacy(option, callback);
-			break;
-		case '3':
-			password(option, callback);
-			break;
-		default:
-			break;
-	}
-}
-//私密操作
-const privacy = (option, callback) => {
-	if (option.approveType === 1) {
-		getUserProjectPermissions(option.id, user.userId).then(res => {
-			privacySuccessFunc(res, option, callback)
-		})
-	} else if (option.approveType === 2) {
-		getUserOrganizationPermissions(option.id, user.userId).then(res => {
-			privacySuccessFunc(res, option, callback)
-		})
-	}
-}
-
-const privacySuccessFunc = (res, option, callback) => {
-	if (res.state) {
-		let data = res.data || {};
-		//权限通过
-		if (data[option.type]) return callback();
-		//权限不通过,是否申请权限
-		approveUser(option, callback);
-	}
-}
-
-const approveUser = (option, callback) => {
-	getSetApprove({
-		project: project.id,
-		operationOrganizationId: option.operationOrganizationId,
-		type: option.approveType
-	}).then(res => {
-		if (res.state) {
-			let obj = res.data[0] || {};
-			if (obj.checker) checker = JSON.parse(obj.checker).map(node => -node[node.length - 1]);
-			if (checker.filter(id => id === user.userId).length > 0) return callback();
-			//仅申请文件夹访问和文件下载
-			approveTip(option)
-		}
-	})
-}
-
-const approveTip = (option) => {
-	let title = option.type === 'access' ? '该文件是私密文件夹,是否申请访问?' : '该文件是私密文件,是否申请下载?';
-	MessageBox.confirm(title, '系统提示', {
-		confirmButtonText: '确定',
-		cancelButtonText: '取消',
-		cancelButtonClass: 'cancel',
-		confirmButtonClass: 'confirm',
-		type: 'warning'
-	}).then(() => {
-		if (checker.length === 0) return Message.warning('暂未设置审核人');
-		let folder = '';
-		for (let i = 0; i < option.folderList.length; i++) {
-			folder += ('-' + option.folderList[i].name);
-		}
-		let folderName = `【${option.typeName}${folder}-${option.name}】`;
-		let title = option.type === 'access' ? `申请访问${folderName}` : `申请下载${folderName}`;
-		message.sendFlowMessage({}, {
-			operation: title,
-			receiver: checker.join(','),
-			messageType: 5,
-			dataType: returnType(option)[option.type],
-			dataId: option.id
-		}).then(res => {
-			if (res.state) Message.success('申请成功,请等待审核');
-		})
-	}).catch(() => {});
-}
-
-const returnType = (option) => {
-	let obj = {};
-	switch (option.approveType) {
-		case 1:
-			obj = {
-				access: 1,
-				fileDownload: 2
-			}
-			break;
-		case 2:
-			obj = {
-				access: 3,
-				fileDownload: 4
-			}
-			break;
-		default:
-			break;
-	}
-	return obj;
-}
-//密码验证
-const password = (option, callback) => {
-	let title = option.type === 'access' ? '该文件是加密文件夹,请输入密码访问' : '该文件是加密文件,请输入密码下载?';
-	MessageBox.prompt(title, '系统提示', {
-		confirmButtonText: '确定',
-		cancelButtonText: '取消',
-		cancelButtonClass: 'cancel',
-		confirmButtonClass: 'confirm',
-		type: 'warning',
-		inputType: 'password',
-		customClass:'input-message'
-	}).then(({
-		value
-	}) => {
-		if (option.approveType === 1) {
-			validationProjectPermission(option.permissionsId, value).then(res => {
-				passwordSuccessFunc(res, callback)
-			})
-		} else if (option.approveType === 2) {
-			validationOrganizationPermission(option.id, value).then(res => {
-				passwordSuccessFunc(res, callback)
-			})
-		}
-	}).catch(() => {});
-}
-const passwordSuccessFunc = (res, callback) => {
-	if (res.state) {
-		if (res.data) return callback();
-		Message.warning('密码错误');
-	}
-}
-/* 
- * 项目中心文件夹以及文件权限
- * option['type'] = access-访问/create创建/delete-删除/edit-修改/fileDelete-文件删除/fileDownload-文件下载/fileUpload-文件上传/fileView-文件预览
- */
-export function projectPermission(option, callback) {
-	if (!user) initData();
-	//获取最新权限
-	option['dataType'] = 'project';
-	option['typeName'] = '项目中心';
-	option['approveType'] = 1;
-	option['operationOrganizationId'] = -1;
-	getProjectPermission(option.id, -1).then(res => {
-		if (res.state) {
-			option['permissions'] = res.data == null ? option.oldPermission : res.data.permissions;
-			if (res.data) option['permissionsId'] = res.data.id;
-			permission(option, callback);
-		}
-	})
-}
-/* 
- * 企业中心文件夹以及文件权限
- * 
- */
-export function organizationPermission(option, callback) {
-	if (!user) initData();
-	option['dataType'] = 'organization';
-	option['typeName'] = '企业中心';
-	option['approveType'] = 2;
-	option['operationOrganizationId'] = organization.id;
-	permission(option, callback);
-}
-/* 
- * 下载文件
- * 
- */
-export function downloadFileDom(data, fileName) {
-	let blob = new Blob([data], {
-		type: 'application/octet-stream'
-	}); // 转化为blob对象
-	if (typeof window.navigator.msSaveBlob !== 'undefined') {
-		window.navigator.msSaveBlob(blob, fileName);
-	} else {
-		var blobURL = window.URL.createObjectURL(blob); // 将blob对象转为一个URL
-		var tempLink = document.createElement('a'); // 创建一个a标签
-		tempLink.style.display = 'none';
-		tempLink.href = blobURL;
-		tempLink.setAttribute('download', fileName); // 给a标签添加下载属性
-		if (typeof tempLink.download === 'undefined') {
-			tempLink.setAttribute('target', '_blank');
-		}
-		document.body.appendChild(tempLink); // 将a标签添加到body当中
-		tempLink.click(); // 启动下载
-		document.body.removeChild(tempLink); // 下载完毕删除a标签
-		window.URL.revokeObjectURL(blobURL);
-	}
+import {
+	getProjectPermission,
+	getUserProjectPermissions,
+	getUserOrganizationPermissions,
+	validationProjectPermission,
+	validationOrganizationPermission,
+	getSetApprove
+} from '@/httpApi/datacenter'
+import store from '../store';
+import {
+	MessageBox,
+	Message
+} from 'element-ui';
+import message from './message.js';
+let organization, project, user;
+let checker = []; //审核人
+const initData = () => {
+	organization = store.getters.organization;
+	project = store.getters.project;
+	user = store.getters.user;
+}
+//permission:1-公开 2-私密 3-密码
+const permission = (option, callback) => {
+	switch (option.permissions) {
+		case '1':
+			callback();
+			break;
+		case '2':
+			privacy(option, callback);
+			break;
+		case '3':
+			password(option, callback);
+			break;
+		default:
+			break;
+	}
+}
+//私密操作
+const privacy = (option, callback) => {
+	if (option.approveType === 1) {
+		getUserProjectPermissions(option.id, user.userId).then(res => {
+			privacySuccessFunc(res, option, callback)
+		})
+	} else if (option.approveType === 2) {
+		getUserOrganizationPermissions(option.id, user.userId).then(res => {
+			privacySuccessFunc(res, option, callback)
+		})
+	}
+}
+
+const privacySuccessFunc = (res, option, callback) => {
+	if (res.state) {
+		let data = res.data || {};
+		//权限通过
+		if (data[option.type]) return callback();
+		//权限不通过,是否申请权限
+		approveUser(option, callback);
+	}
+}
+
+const approveUser = (option, callback) => {
+	getSetApprove({
+		projectId: project.id,
+		operationOrganizationId: option.operationOrganizationId,
+		type: option.approveType
+	}).then(res => {
+		if (res.state) {
+			let obj = res.data[0] || {};
+			if (obj.checker) checker = JSON.parse(obj.checker).map(node => -node[node.length - 1]);
+			if (checker.filter(id => id === user.userId).length > 0) return callback();
+			//仅申请文件夹访问和文件下载
+			approveTip(option)
+		}
+	})
+}
+
+const approveTip = (option) => {
+	let title = option.type === 'access' ? '该文件是私密文件夹,是否申请访问?' : '该文件是私密文件,是否申请下载?';
+	MessageBox.confirm(title, '系统提示', {
+		confirmButtonText: '确定',
+		cancelButtonText: '取消',
+		cancelButtonClass: 'cancel',
+		confirmButtonClass: 'confirm',
+		type: 'warning'
+	}).then(() => {
+		if (checker.length === 0) return Message.warning('暂未设置审核人');
+		let folder = '';
+		for (let i = 0; i < option.folderList.length; i++) {
+			folder += ('-' + option.folderList[i].name);
+		}
+		let folderName = `【${option.typeName}${folder}-${option.name}】`;
+		let title = option.type === 'access' ? `申请访问${folderName}` : `申请下载${folderName}`;
+		message.sendFlowMessage({}, {
+			operation: title,
+			receiver: checker.join(','),
+			messageType: 5,
+			dataType: returnType(option)[option.type],
+			dataId: option.id
+		}).then(res => {
+			if (res.state) Message.success('申请成功,请等待审核');
+		})
+	}).catch(() => {});
+}
+
+const returnType = (option) => {
+	let obj = {};
+	switch (option.approveType) {
+		case 1:
+			obj = {
+				access: 1,
+				fileDownload: 2
+			}
+			break;
+		case 2:
+			obj = {
+				access: 3,
+				fileDownload: 4
+			}
+			break;
+		default:
+			break;
+	}
+	return obj;
+}
+//密码验证
+const password = (option, callback) => {
+	let title = option.type === 'access' ? '该文件是加密文件夹,请输入密码访问' : '该文件是加密文件,请输入密码下载?';
+	MessageBox.prompt(title, '系统提示', {
+		confirmButtonText: '确定',
+		cancelButtonText: '取消',
+		cancelButtonClass: 'cancel',
+		confirmButtonClass: 'confirm',
+		type: 'warning',
+		inputType: 'password',
+		customClass: 'input-message'
+	}).then(({
+		value
+	}) => {
+		if (option.approveType === 1) {
+			validationProjectPermission(option.permissionsId, value).then(res => {
+				passwordSuccessFunc(res, callback)
+			})
+		} else if (option.approveType === 2) {
+			validationOrganizationPermission(option.id, value).then(res => {
+				passwordSuccessFunc(res, callback)
+			})
+		}
+	}).catch(() => {});
+}
+const passwordSuccessFunc = (res, callback) => {
+	if (res.state) {
+		if (res.data) return callback();
+		Message.warning('密码错误');
+	}
+}
+/* 
+ * 项目中心文件夹以及文件权限
+ * option['type'] = access-访问/create创建/delete-删除/edit-修改/fileDelete-文件删除/fileDownload-文件下载/fileUpload-文件上传/fileView-文件预览
+ */
+export function projectPermission(option, callback) {
+	if (!user) initData();
+	//获取最新权限
+	option['dataType'] = 'project';
+	option['typeName'] = '项目中心';
+	option['approveType'] = 1;
+	option['operationOrganizationId'] = -1;
+	getProjectPermission(option.id, -1).then(res => {
+		if (res.state) {
+			option['permissions'] = res.data == null ? option.oldPermission : res.data.permissions;
+			if (res.data) option['permissionsId'] = res.data.id;
+			permission(option, callback);
+		}
+	})
+}
+/* 
+ * 企业中心文件夹以及文件权限
+ * 
+ */
+export function organizationPermission(option, callback) {
+	if (!user) initData();
+	option['dataType'] = 'organization';
+	option['typeName'] = '企业中心';
+	option['approveType'] = 2;
+	option['operationOrganizationId'] = organization.id;
+	permission(option, callback);
+}
+/* 
+ * 下载文件
+ * 
+ */
+export function downloadFileDom(data, fileName) {
+	let blob = new Blob([data], {
+		type: 'application/octet-stream'
+	}); // 转化为blob对象
+	if (typeof window.navigator.msSaveBlob !== 'undefined') {
+		window.navigator.msSaveBlob(blob, fileName);
+	} else {
+		var blobURL = window.URL.createObjectURL(blob); // 将blob对象转为一个URL
+		var tempLink = document.createElement('a'); // 创建一个a标签
+		tempLink.style.display = 'none';
+		tempLink.href = blobURL;
+		tempLink.setAttribute('download', fileName); // 给a标签添加下载属性
+		if (typeof tempLink.download === 'undefined') {
+			tempLink.setAttribute('target', '_blank');
+		}
+		document.body.appendChild(tempLink); // 将a标签添加到body当中
+		tempLink.click(); // 启动下载
+		document.body.removeChild(tempLink); // 下载完毕删除a标签
+		window.URL.revokeObjectURL(blobURL);
+	}
 }

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

@@ -31,7 +31,7 @@
 						<template slot-scope="scope">
 							<div class="hui-table-tag">
 								<div class="hui-tag">
-									<div>{{messageType(scope.row.messageType).name}}</div>
+									<!-- <div>{{messageType(scope.row.messageType).name}}</div> -->
 								</div>
 							</div>
 						</template>
@@ -101,7 +101,8 @@
 				this.item = item;
 				this.drawer = true;
 			},
-			messageType(type) {
+			messageType(type) {
+				console.log(this.$msg);
 				return this.$msg.messageType.filter(item => item.id === type)[0];
 			},
 			currentChange(pageIndex) {