whx 1 år sedan
förälder
incheckning
cc3fc335e9
34 ändrade filer med 3824 tillägg och 2670 borttagningar
  1. 102 0
      virgo.wzfrontend/console/src/components/common/cc.vue
  2. 120 0
      virgo.wzfrontend/console/src/components/common/projectItem.vue
  3. 359 0
      virgo.wzfrontend/console/src/components/common/selectUser.vue
  4. 201 201
      virgo.wzfrontend/console/src/components/common/tag.vue
  5. 0 1
      virgo.wzfrontend/console/src/components/common/upload.vue
  6. 54 0
      virgo.wzfrontend/console/src/components/work/organization/depart/detail.vue
  7. 90 0
      virgo.wzfrontend/console/src/components/work/organization/depart/edit.vue
  8. 116 0
      virgo.wzfrontend/console/src/components/work/organization/manager/edit.vue
  9. 88 0
      virgo.wzfrontend/console/src/components/work/organization/user/detail.vue
  10. 126 0
      virgo.wzfrontend/console/src/components/work/organization/user/edit.vue
  11. 107 0
      virgo.wzfrontend/console/src/components/work/organization/user/infoForm.vue
  12. 123 0
      virgo.wzfrontend/console/src/components/work/organization/user/role.vue
  13. 80 0
      virgo.wzfrontend/console/src/components/work/space/house/detail.vue
  14. 139 0
      virgo.wzfrontend/console/src/components/work/space/house/edit.vue
  15. 79 79
      virgo.wzfrontend/console/src/components/work/space/project/detail.vue
  16. 113 113
      virgo.wzfrontend/console/src/components/work/space/project/edit.vue
  17. 74 74
      virgo.wzfrontend/console/src/components/work/space/set/projectItemDetail.vue
  18. 106 106
      virgo.wzfrontend/console/src/components/work/space/set/projectItemForm.vue
  19. 72 72
      virgo.wzfrontend/console/src/components/work/space/set/projectItemTargetForm.vue
  20. 72 0
      virgo.wzfrontend/console/src/httpApi/organization.js
  21. 266 0
      virgo.wzfrontend/console/src/httpApi/space.js
  22. 0 1407
      virgo.wzfrontend/console/src/httpApi/work.js
  23. 2 12
      virgo.wzfrontend/console/src/layout/components/topNav.vue
  24. 1 0
      virgo.wzfrontend/console/src/layout/components/userDetail.vue
  25. 10 2
      virgo.wzfrontend/console/src/layout/work.vue
  26. 23 0
      virgo.wzfrontend/console/src/router/modules/organization.js
  27. 9 2
      virgo.wzfrontend/console/src/router/modules/space.js
  28. 9 2
      virgo.wzfrontend/console/src/views/system/main/list.vue
  29. 129 0
      virgo.wzfrontend/console/src/views/work/organization/depart.vue
  30. 177 0
      virgo.wzfrontend/console/src/views/work/organization/manager.vue
  31. 254 0
      virgo.wzfrontend/console/src/views/work/organization/user.vue
  32. 124 0
      virgo.wzfrontend/console/src/views/work/space/housing.vue
  33. 148 148
      virgo.wzfrontend/console/src/views/work/space/project/list.vue
  34. 451 451
      virgo.wzfrontend/console/src/views/work/space/set/list.vue

+ 102 - 0
virgo.wzfrontend/console/src/components/common/cc.vue

@@ -0,0 +1,102 @@
+<template>
+	<div class="cc-user-list">
+		<el-button size="medium" @click="visible = true" v-if="type === 'insert'">
+			<i class="iconfont huifont-xinzeng"></i>{{'添加'+(!!label ? label:'抄送人')}}
+		</el-button>
+		<div class="cc-user-ivewer">
+			<div class="cc-user-item" v-for="(item,index) in list" :key="index">
+				<div class="cc-user-avatar">
+					<avatar :user="item" :size="10"></avatar>
+				</div>
+				<div class="cc-user-name">{{item.name}}</div>
+			</div>
+		</div>
+		<el-dialog :title="(!!label ? label:'抄送人')+'选择'" :visible.sync="visible" width="880px" :append-to-body="true">
+			<select-user @callback="callBack" v-if="visible" :list="list"></select-user>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import selectUser from '@/components/common/selectUser'
+	import avatar from '@/components/common/avatar'
+	export default {
+		props: ['type', 'ccList', 'label'],
+		data() {
+			return {
+				list: [],
+				visible: false
+			}
+		},
+		created() {},
+		methods: {
+			callBack(data) {
+				this.visible = false;
+				if (data) this.list = data;
+			}
+		},
+		watch: {
+			ccList() {
+				if (!!this.ccList) this.list = this.ccList;
+			}
+		},
+		components: {
+			selectUser,
+			avatar,
+		},
+	}
+</script>
+
+<style lang="scss">
+	.cc-user-list {
+		width: 100%;
+
+		.el-button {
+			padding-left: 12px;
+			margin-bottom: 10px;
+
+			span {
+				display: flex;
+				align-items: center;
+			}
+
+			.huifont-xinzeng {
+				padding-right: 10px;
+			}
+		}
+
+		.cc-user-ivewer {
+			display: flex;
+			flex-wrap: wrap;
+		}
+
+		.cc-user-item {
+			display: flex;
+			min-width: 76px;
+			height: 28px;
+			align-items: center;
+			margin-right: 15px;
+			background: #1E2430;
+			border-radius: 15px;
+			padding: 0 4px;
+
+			.cc-user-avatar {
+				width: 20px;
+				height: 20px;
+				border-radius: 50%;
+				overflow: hidden;
+				margin-right: 4px;
+			}
+
+			.cc-user-name {
+				overflow: hidden;
+				color: $--color-common;
+			}
+		}
+
+		.cc-user-item:first-child {
+			margin-top: 0;
+		}
+
+	}
+</style>

+ 120 - 0
virgo.wzfrontend/console/src/components/common/projectItem.vue

@@ -0,0 +1,120 @@
+<template>
+	<el-form :model="formBox" label-position="top">
+		<el-form-item label="单位工程">
+			<el-select v-model="formBox.projectItemId" placeholder="请选择单位工程" @change="changeProjectItem">
+				<el-option v-for="item in projectItemList" :key="item.id" :label="item.name" :value="item.id">
+				</el-option>
+			</el-select>
+		</el-form-item>
+		<el-form-item label="具体位置">
+			<el-select v-model="formBox.projectItemTargetId" placeholder="请选择具体位置" @change="changeRoom">
+				<el-option v-for="item in projectItemTargetList" :key="item.id" :label="item.name" :value="item.id">
+				</el-option>
+			</el-select>
+		</el-form-item>
+	</el-form>
+</template>
+
+<script>
+	import {
+		getProjectDetailById,
+		getProjectItemTargetList,
+		getRoomList
+	} from '@/httpApi/space'
+	export default {
+		props: ['form', 'room'],
+		data() {
+			return {
+				formBox: {
+					projectItemId: '',
+					projectItemTargetId: '',
+					projectItemTargetRoomId: ''
+				},
+				projectItemList: [],
+				projectItemTargetList: [],
+				roomList: []
+			}
+		},
+		created() {
+			if (this.form.projectItemId) this.initData(this.form)
+			this.init();
+		},
+		methods: {
+			init() {
+				this.projectItemList = [];
+				this.projectItemTargetList = [];
+				getProjectDetailById(this.$store.getters.organization.id, this.$store.getters.project.id).then(res => {
+					if (res.state) {
+						this.projectItemList = res.data.projectItemList
+					}
+				})
+			},
+			changeProjectItem() {
+				this.formBox.projectItemTargetId = '';
+				this.projectItemTargetList = [];
+				this.formBox.projectItemTargetRoomId = '';
+				this.roomList = [];
+				getProjectItemTargetList(this.formBox.projectItemId).then(res => {
+					if (res.state) {
+						this.projectItemTargetList = res.data;
+					}
+				})
+			},
+			changeRoom() {
+				if (this.room) return;
+				this.formBox.projectItemTargetRoomId = '';
+				this.roomList = [];
+				getRoomList(this.formBox.projectItemTargetId).then(res => {
+					if (res.state) {
+						this.roomList = res.data;
+					}
+				})
+			},
+			returnItem() {
+				return {
+					projectItem: this.projectItemList.filter(node => node.id === this.formBox.projectItemId)[0] || {},
+					projectItemTarget: this.projectItemTargetList.filter(node => node.id === this.formBox
+						.projectItemTargetId)[0] || {},
+					projectItemTargetRoom: this.roomList.filter(node => node.id === this.formBox.projectItemTargetRoomId)[
+						0] || {}
+				}
+			},
+			initData(val) {
+				if (val.projectItemId) {
+					this.formBox.projectItemId = val.projectItemId;
+					if (val.projectItemId) {
+						getProjectItemTargetList(this.formBox.projectItemId).then(res => {
+							if (res.state) {
+								this.formBox.projectItemTargetId = val.projectItemTargetId;
+								this.projectItemTargetList = res.data;
+								if (res.data.length === 0) this.formBox.projectItemTargetId = '';
+								if (val.projectItemTargetId) {
+									getRoomList(this.formBox.projectItemTargetId).then(res => {
+										if (res.state) {
+											this.formBox.projectItemTargetRoomId = val
+												.projectItemTargetRoomId;
+											this.roomList = res.data;
+											if (res.data.length === 0) this.formBox
+												.projectItemTargetRoomId = '';
+										}
+									})
+								}
+							}
+						})
+					}
+				}
+			}
+		},
+		watch: {
+			form(val) {
+				this.initData(val);
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.project-item-change {
+		width: 100%;
+	}
+</style>

+ 359 - 0
virgo.wzfrontend/console/src/components/common/selectUser.vue

@@ -0,0 +1,359 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<div class="change-user-box">
+				<div class="change-part">
+					<div class="part-breadcrumb">
+						<div class="part-breadcrumb-item" v-for="(item,index) in breadcrumb" :key="index"
+							@click="breadcrumbClick(item,index)">
+							{{item.name}}
+							<i class="iconfont huifont-xiala-right" v-if="index < breadcrumb.length-1"></i>
+						</div>
+					</div>
+					<el-checkbox class="check-all" v-model="checkAll" @change="checkChange">
+						全选
+					</el-checkbox>
+					<div class="part-user">
+						<el-checkbox-group v-model="checkedBox" @change="testCheckedAll">
+							<el-checkbox v-for="(item,index) in partList" :label="item.id" :key="-item.id" disabled>
+								<div class="user-box">
+									<div class="user-avatar">
+										<i class="iconfont huifont-bumen"></i>
+									</div>
+									<div class="user-name">{{item.name}}</div>
+									<div class="part-button" @click="openPart(item)">展开</div>
+								</div>
+							</el-checkbox>
+							<el-checkbox v-for="(item,index) in userList" :label="item.id" :key="item.id"
+								@change="selectUser">
+								<div class="user-box">
+									<div class="user-avatar">
+										<avatar :user="item" :size="12"></avatar>
+									</div>
+									<div class="user-name">{{item.name}}</div>
+								</div>
+							</el-checkbox>
+						</el-checkbox-group>
+					</div>
+				</div>
+				<div class="change-user">
+					<div class="change-user-operation">
+						<div class="change-user-count">
+							已选择:{{checkedUserList.length}}名用户
+						</div>
+						<div class="change-user-clear" @click="clearAll">清空</div>
+					</div>
+					<div class="change-user-list">
+						<div class="change-user-item user-box" v-for="(item,index) in checkedUserList" :label="item.id"
+							:key="item.id">
+							<div class="user-avatar">
+								<avatar :user="item" :size="12"></avatar>
+							</div>
+							<div class="user-name">
+								<div>{{item.name}}</div>
+								<p>{{item.partName}}</p>
+							</div>
+							<div class="user-delete" @click="deleteUser(item)">
+								<i class="iconfont huifont-guanbi"></i>
+							</div>
+							<div class="user-line" v-if="index < checkedUserList.length-1"></div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getPartList
+	} from '@/httpApi/organization'
+	import avatar from '@/components/common/avatar'
+	export default {
+		props: ['list', 'type'],
+		data() {
+			return {
+				checkAll: false,
+				partList: [],
+				allUserList: [],
+				userList: [],
+				checkedBox: [],
+				breadcrumb: [{
+					id: 0,
+					name: '部门'
+				}],
+				checkedUserList: [],
+				partId: ''
+			}
+		},
+		created() {
+			this.init();
+		},
+		components: {
+			avatar
+		},
+		methods: {
+			init() {
+				getPartList(this.$store.getters.organization.id, this.$store.getters.project.id).then(res => {
+					if (res.state) {
+						this.returnChildren(res.data); //获取总员工数列表
+						this.partList = res.data;
+						this.breadcrumb[0]['node'] = this.partList;
+						if (this.list && this.list.length > 0) {
+							this.checkedBox = this.list.map(node => node.id);
+							this.checkedUserList = this.list;
+						}
+					}
+				})
+			},
+			returnChildren(data) {
+				data.forEach(item => {
+					if (item.children && item.users) {
+						let obj = item.users.map(res => {
+							return {
+								id: res.id,
+								name: res.name,
+								partName: item.name,
+								partId: item.id,
+								portrait: res.portrait
+							};
+						})
+						this.allUserList = this.allUserList.concat(obj);
+					}
+					if (item.children && item.children.length > 0) this.returnChildren(item.children);
+				});
+			},
+			checkChange(val) {
+				if (this.userList.length === 0) return;
+				if (val) {
+					let data = this.checkedBox;
+					this.checkedBox = Array.from(new Set(data.concat(this.userList.map(node => node.id))));
+				} else {
+					let ids = this.userList.map(node => node.id);
+					for (var i = 0; i < ids.length; i++) {
+						let boxIndex = this.checkedBox.findIndex(node => node === ids[i]);
+						this.checkedBox.splice(boxIndex, 1);
+					}
+				}
+				this.selectUser();
+			},
+			selectUser() {
+				this.checkedUserList = this.checkedBox.map(node => {
+					return this.allUserList.filter(user => user.id === node)[0];
+				})
+			},
+			deleteUser(item) {
+				let boxIndex = this.checkedBox.findIndex(node => node === item.id);
+				this.checkedBox.splice(boxIndex, 1);
+				this.selectUser();
+				this.testCheckedAll();
+			},
+			clearAll() {
+				this.checkedBox = [];
+				this.selectUser();
+				this.testCheckedAll();
+			},
+			openPart(data) {
+				this.breadcrumb.push({
+					id: data.id,
+					name: data.name,
+					node: data
+				});
+				this.filterList(data);
+			},
+			filterList(data) {
+				this.partList = data.children;
+				this.partId = data.id;
+				this.userList = this.allUserList.filter(node => node.partId === data.id);
+				this.testCheckedAll();
+			},
+			testCheckedAll() {
+				if (this.userList.length === 0) return this.checkAll = false;
+				let checkedCount = this.checkedBox.filter(node => this.userList.filter(res => res.id === node).length > 0)
+					.length;
+				this.checkAll = checkedCount === this.userList.length;
+			},
+			breadcrumbClick(item, index) {
+				if (index === this.breadcrumb.length - 1) return;
+				this.breadcrumb = this.breadcrumb.slice(0, index + 1);
+				if (item.id === 0) return this.partList = item.node;
+				this.filterList(this.breadcrumb[this.breadcrumb.length - 1].node);
+			},
+			submit() {
+				this.$emit('callback', this.checkedUserList);
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.change-user-box {
+		width: 100%;
+		height: 100%;
+		border: 1px solid $--color-border;
+		border-radius: 4px;
+		display: flex;
+
+		.change-part {
+			flex: 1;
+			border-right: 1px solid $--color-border;
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+
+			.part-breadcrumb {
+				display: flex;
+				flex-wrap: wrap;
+				padding: 20px;
+
+				.part-breadcrumb-item {
+					display: flex;
+					align-items: center;
+					opacity: 0.5;
+					cursor: pointer;
+
+					i {
+						font-size: 14px;
+						padding: 0 5px;
+					}
+				}
+
+				.part-breadcrumb-item:last-child {
+					opacity: 1;
+				}
+			}
+
+			.check-all {
+				padding: 0px 20px 10px 20px;
+			}
+
+			.part-user {
+				flex: 1;
+				overflow-y: auto;
+				padding: 0 20px 10px 20px;
+
+				.el-checkbox-group {
+					.el-checkbox {
+						display: flex;
+						align-items: center;
+						height: 48px;
+
+					}
+
+					.el-checkbox__input.is-disabled+span.el-checkbox__label {
+						cursor: pointer;
+					}
+
+					.el-checkbox {
+						margin-right: 0;
+					}
+
+					.el-checkbox__label {
+						flex: 1;
+					}
+				}
+			}
+		}
+
+		.user-box {
+			display: flex;
+			align-items: center;
+
+			.user-avatar {
+				width: 32px;
+				height: 32px;
+				background: #4958de;
+				border-radius: 50%;
+				margin-right: 10px;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				overflow: hidden;
+
+				i {
+					font-size: 20px;
+				}
+			}
+
+
+			.user-name {
+				flex: 1;
+				width: 0;
+
+				p {
+					font-size: 12px;
+					opacity: 0.6;
+				}
+			}
+
+			.part-button {
+				color: $--color-primary;
+			}
+
+			.user-delete {
+
+				width: 24px;
+				height: 24px;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				cursor: pointer;
+				border-radius: 2px;
+
+				i {
+					margin-top: 2px;
+					opacity: 0.5;
+					font-size: 14px;
+				}
+			}
+
+			.user-delete:hover {
+				background: #31353f;
+			}
+		}
+
+		.change-user {
+			flex: 1;
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+
+			.change-user-operation {
+				padding: 20px 20px 14px 20px;
+				display: flex;
+				justify-content: space-between;
+
+				.change-user-clear {
+					color: $--color-primary;
+					cursor: pointer;
+				}
+			}
+
+			.change-user-list {
+				flex: 1;
+				height: 0;
+				overflow-y: auto;
+				padding: 0 20px 14px 20px;
+
+				.change-user-item {
+					height: 48px;
+					position: relative;
+
+					.user-line {
+						width: 2px;
+						background-color: rgba(255, 255, 255, 0.2);
+						position: absolute;
+						top: 40px;
+						bottom: -8px;
+						left: 15px;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 201 - 201
virgo.wzfrontend/console/src/components/common/tag.vue

@@ -1,202 +1,202 @@
-<template>
-	<div class="tag">
-		<div :class="className(item)" v-for="item in list" :key="item.id" @click="selectTag(item)">
-			<span class="label">{{item.name}}</span>
-			<i class="iconfont huifont-bianji" v-if="type === 'insert'" @click.stop="updateTag(item)"></i>
-			<i class="iconfont huifont-guanbi" v-if="type === 'insert'" @click.stop="deleteTag(item)"></i>
-		</div>
-		<div class="target-item target-item-insert" v-if="type === 'insert'" @click="insertTag">
-			<i class="iconfont huifont-xinzeng"></i>
-			<span class="label">新增标签</span>
-		</div>
-	</div>
-</template>
-
-<script>
-	import {
-		getTagList,
-		insertTag,
-		updateTag,
-		deleteTag
-	} from '@/httpApi/work'
-	export default {
-		name: 'tag',
-		props: {
-			type: {
-				type: String,
-				default: ''
-			},
-			tagType: {
-				type: Number,
-				default: 1
-			},
-			tagActive: {
-				type: Array,
-				default: () => {
-					return []
-				}
-			}
-		},
-		data() {
-			return {
-				list: [],
-				tagList: [],
-				dataBox: []
-			}
-		},
-		created() {
-			this.init();
-		},
-		methods: {
-			init() {
-				getTagList(this.tagType).then(res => {
-					if (res.state) {
-						this.dataBox = res.data;
-						this.initTagList();
-					}
-				})
-			},
-			initTagList() {
-				this.tagList = this.dataBox.filter(node => this.tagActive.filter(item => item == node.id)
-					.length > 0);
-				if (this.type === 'insert') {
-					this.list = this.dataBox;
-				} else {
-					this.list = this.tagList;
-				}
-			},
-			insertTag() {
-				this.$prompt('请输入标签名称', '有极', {
-					confirmButtonText: '确 定',
-					cancelButtonClass: 'cancel',
-					confirmButtonClass: 'confirm',
-					cancelButtonText: '取 消',
-					inputPattern: /\S/,
-					inputErrorMessage: '请输入标签名称'
-				}).then(({
-					value
-				}) => {
-					insertTag({
-						type: this.tagType,
-						name: value
-					}).then(res => {
-						if (res.state) {
-							this.init();
-							this.$message.success('操作成功')
-						}
-					})
-				}).catch(() => {});
-			},
-			updateTag(item) {
-				this.$prompt('请输入标签名称', '有极', {
-					confirmButtonText: '确 定',
-					cancelButtonClass: 'cancel',
-					confirmButtonClass: 'confirm',
-					cancelButtonText: '取 消',
-					inputPattern: /\S/,
-					inputErrorMessage: '请输入标签名称',
-					inputValue: item.name
-				}).then(({
-					value
-				}) => {
-					updateTag({
-						type: this.tagType,
-						name: value,
-						id: item.id
-					}).then(res => {
-						if (res.state) {
-							this.init();
-							this.$message.success('操作成功')
-						}
-					})
-				}).catch(() => {});
-			},
-			selectTag(item) {
-				if (this.type === 'look') return;
-				if (this.tagList.filter(node => node.id === item.id).length > 0) {
-					let index = this.tagList.findIndex(node => node.id === item.id);
-					this.tagList.splice(index, 1);
-				} else {
-					this.tagList.push(item);
-				}
-			},
-			className(item) {
-				let str = this.tagList.filter(node => node.id === item.id).length > 0 ? 'target-item active' :
-					'target-item';
-				if (this.type === 'insert') str += ' add'
-				return str;
-			},
-			deleteTag(item) {
-				this.$confirm('确定要删除该标签?', () => {
-					deleteTag(item.id).then(res => {
-						if (res.state) {
-							this.init();
-							this.$message.success('操作成功');
-						}
-					})
-				});
-			},
-			tagIds() {
-				return this.tagList.sort((a, b) => a.id - b.id).map(node => node.id).join(',');
-			}
-		},
-		watch: {
-			tagActive() {
-				this.initTagList();
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	.tag {
-		display: flex;
-		flex-wrap: wrap;
-
-		.target-item {
-			display: flex;
-			height: 32px;
-			align-items: center;
-			margin: 5px 0;
-			margin-right: 15px;
-			background: #46577a;
-			border-radius: 15px;
-			padding: 0 15px;
-
-			.iconfont {
-				margin-left: 10px;
-				font-size: 12px;
-			}
-
-			.huifont-bianji {
-				font-size: 18px;
-			}
-
-			&.active {
-				background: $--color-primary;
-				color: #fff;
-			}
-
-			&.add {
-				cursor: pointer;
-			}
-		}
-
-		.target-item-insert {
-			cursor: pointer;
-			background: transparent;
-			border: 1px solid #7383ad;
-			color: #7383ad;
-
-			.iconfont {
-				margin-left: 0;
-				margin-right: 10px;
-			}
-		}
-
-		.target-item-insert:hover {
-			border-color: $--color-primary;
-			color: $--color-primary;
-		}
-	}
+<template>
+	<div class="tag">
+		<div :class="className(item)" v-for="item in list" :key="item.id" @click="selectTag(item)">
+			<span class="label">{{item.name}}</span>
+			<i class="iconfont huifont-bianji" v-if="type === 'insert'" @click.stop="updateTag(item)"></i>
+			<i class="iconfont huifont-guanbi" v-if="type === 'insert'" @click.stop="deleteTag(item)"></i>
+		</div>
+		<div class="target-item target-item-insert" v-if="type === 'insert'" @click="insertTag">
+			<i class="iconfont huifont-xinzeng"></i>
+			<span class="label">新增标签</span>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getTagList,
+		insertTag,
+		updateTag,
+		deleteTag
+	} from '@/httpApi/space'
+	export default {
+		name: 'tag',
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			tagType: {
+				type: Number,
+				default: 1
+			},
+			tagActive: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			}
+		},
+		data() {
+			return {
+				list: [],
+				tagList: [],
+				dataBox: []
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				getTagList(this.tagType).then(res => {
+					if (res.state) {
+						this.dataBox = res.data;
+						this.initTagList();
+					}
+				})
+			},
+			initTagList() {
+				this.tagList = this.dataBox.filter(node => this.tagActive.filter(item => item == node.id)
+					.length > 0);
+				if (this.type === 'insert') {
+					this.list = this.dataBox;
+				} else {
+					this.list = this.tagList;
+				}
+			},
+			insertTag() {
+				this.$prompt('请输入标签名称', '有极', {
+					confirmButtonText: '确 定',
+					cancelButtonClass: 'cancel',
+					confirmButtonClass: 'confirm',
+					cancelButtonText: '取 消',
+					inputPattern: /\S/,
+					inputErrorMessage: '请输入标签名称'
+				}).then(({
+					value
+				}) => {
+					insertTag({
+						type: this.tagType,
+						name: value
+					}).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功')
+						}
+					})
+				}).catch(() => {});
+			},
+			updateTag(item) {
+				this.$prompt('请输入标签名称', '有极', {
+					confirmButtonText: '确 定',
+					cancelButtonClass: 'cancel',
+					confirmButtonClass: 'confirm',
+					cancelButtonText: '取 消',
+					inputPattern: /\S/,
+					inputErrorMessage: '请输入标签名称',
+					inputValue: item.name
+				}).then(({
+					value
+				}) => {
+					updateTag({
+						type: this.tagType,
+						name: value,
+						id: item.id
+					}).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功')
+						}
+					})
+				}).catch(() => {});
+			},
+			selectTag(item) {
+				if (this.type === 'look') return;
+				if (this.tagList.filter(node => node.id === item.id).length > 0) {
+					let index = this.tagList.findIndex(node => node.id === item.id);
+					this.tagList.splice(index, 1);
+				} else {
+					this.tagList.push(item);
+				}
+			},
+			className(item) {
+				let str = this.tagList.filter(node => node.id === item.id).length > 0 ? 'target-item active' :
+					'target-item';
+				if (this.type === 'insert') str += ' add'
+				return str;
+			},
+			deleteTag(item) {
+				this.$confirm('确定要删除该标签?', () => {
+					deleteTag(item.id).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功');
+						}
+					})
+				});
+			},
+			tagIds() {
+				return this.tagList.sort((a, b) => a.id - b.id).map(node => node.id).join(',');
+			}
+		},
+		watch: {
+			tagActive() {
+				this.initTagList();
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.tag {
+		display: flex;
+		flex-wrap: wrap;
+
+		.target-item {
+			display: flex;
+			height: 32px;
+			align-items: center;
+			margin: 5px 0;
+			margin-right: 15px;
+			background: #46577a;
+			border-radius: 15px;
+			padding: 0 15px;
+
+			.iconfont {
+				margin-left: 10px;
+				font-size: 12px;
+			}
+
+			.huifont-bianji {
+				font-size: 18px;
+			}
+
+			&.active {
+				background: $--color-primary;
+				color: #fff;
+			}
+
+			&.add {
+				cursor: pointer;
+			}
+		}
+
+		.target-item-insert {
+			cursor: pointer;
+			background: transparent;
+			border: 1px solid #7383ad;
+			color: #7383ad;
+
+			.iconfont {
+				margin-left: 0;
+				margin-right: 10px;
+			}
+		}
+
+		.target-item-insert:hover {
+			border-color: $--color-primary;
+			color: $--color-primary;
+		}
+	}
 </style>

+ 0 - 1
virgo.wzfrontend/console/src/components/common/upload.vue

@@ -95,7 +95,6 @@
 				this.$message.success('上传成功');
 				let data = response.data;
 				let typeList = data.name.split('.');
-				console.log(this.fileList);
 				this.fileList.push({
 					id: data.id,
 					name: data.name,

+ 54 - 0
virgo.wzfrontend/console/src/components/work/organization/depart/detail.vue

@@ -0,0 +1,54 @@
+<template>
+	<div class="hui-detail">
+		<div class="hui-detail-title">基础信息</div>
+		<div class="hui-detail-content">
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">部门名称</div>
+				<div class="hui-detail-value">{{detail.name}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">部门人数</div>
+				<div class="hui-detail-value">{{detail.userCount}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目描述</div>
+				<div class="hui-detail-value"> {{detail.remark}}</div>
+			</div>
+		</div>
+		<div class="hui-detail-title">负责人</div>
+		<div class="hui-detail-content hui-detail-cc">
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">负责人</div>
+				<div class="hui-detail-value">
+					<cc :ccList="detail.responsible ? JSON.parse(detail.responsible) : []"></cc>
+				</div>
+			</div>
+		</div>
+		<div class="hui-detail-title">项目职责</div>
+		<div class="hui-detail-content hui-detail-image">
+			<upload ref="upload" :list="detail.responsibility ? JSON.parse(detail.responsibility) : []" type="preview">
+			</upload>
+		</div>
+	</div>
+</template>
+
+<script>
+	import cc from '@/components/common/cc'
+	import upload from '@/components/common/upload'
+	export default {
+		props: ['detail'],
+		data() {
+			return {}
+		},
+		created() {
+			console.log(this.detail);
+		},
+		components: {
+			cc,
+			upload
+		},
+	}
+</script>
+<style lang="scss">
+
+</style>

+ 90 - 0
virgo.wzfrontend/console/src/components/work/organization/depart/edit.vue

@@ -0,0 +1,90 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="departmentForm" :model="departmentForm" label-position="top">
+				<el-form-item label="部门名称">
+					<el-input type="text" v-model="departmentForm.name" placeholder="请输入部门名称"></el-input>
+				</el-form-item>
+				<el-form-item label="部门描述" class="hui-textarea">
+					<el-input type="textarea" v-model="departmentForm.remark" placeholder="请输入部门描述" resize="none">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="部门负责人" class="hui-textarea">
+					<cc ref="cc" type="insert" :ccList="ccList" label="负责人"></cc>
+				</el-form-item>
+				<el-form-item label="部门职责" class="hui-textarea">
+					<upload ref="upload" :list="responsibility" type="insert"></upload>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertDepartment,
+		updateDepartment
+	} from '@/httpApi/organization'
+	import upload from '@/components/common/upload'
+	import cc from '@/components/common/cc'
+	export default {
+		props: ['isUpdate', 'part', 'projectId'],
+		data() {
+			return {
+				departmentForm: {
+					name: '',
+					remark: '',
+					organizationId: '',
+					projectId: '',
+					parentId: -1,
+					isp: 0
+				},
+				departmentRuler: {},
+				responsibility: [],
+				ccList: []
+			}
+		},
+		created() {
+			if (this.isUpdate) {
+				this.departmentForm = this.part;
+				this.responsibility = this.part.responsibility ? JSON.parse(this.part.responsibility) : [];
+				this.ccList = this.part.responsible ? JSON.parse(this.part.responsible) : [];
+			} else {
+				this.departmentForm['organizationId'] = this.$store.getters.organization.id;
+				this.departmentForm['parentId'] = this.part.id || -1;
+				this.departmentForm['projectId'] = this.$store.getters.project.id;
+			}
+		},
+		methods: {
+			submit() {
+				this.departmentForm['responsibility'] = JSON.stringify(this.$refs.upload.fileList);
+				this.departmentForm['responsible'] = JSON.stringify(this.$refs.cc.list);
+				if (this.isUpdate) {
+					updateDepartment(this.departmentForm).then(this.successFunc)
+				} else {
+					insertDepartment(this.departmentForm).then(this.successFunc)
+				}
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			}
+		},
+		components: {
+			upload,
+			cc
+		},
+	}
+</script>
+
+<style lang="scss">
+	.department-form {
+		padding: 10px;
+	}
+</style>

+ 116 - 0
virgo.wzfrontend/console/src/components/work/organization/manager/edit.vue

@@ -0,0 +1,116 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="informationForm" label-position="top" :model="informationForm">
+				<el-form-item label="组织代码">
+					<el-input type="text" :value="informationForm.organizationCode" disabled></el-input>
+				</el-form-item>
+				<el-form-item label="组织名称" prop="name">
+					<el-input type="text" v-model="informationForm.name"></el-input>
+				</el-form-item>
+				<el-form-item label="联系人" prop="contact">
+					<el-input type="text" v-model="informationForm.contact"></el-input>
+				</el-form-item>
+				<el-form-item label="联系方式" prop="contactTel">
+					<el-input type="text" v-model="informationForm.contactTel"></el-input>
+				</el-form-item>
+				<el-form-item label="组织地址" prop="address">
+					<city v-model="informationForm.address"></city>
+				</el-form-item>
+				<el-form-item label="详细地址">
+					<el-input type="text" v-model="informationForm.detailAddress"></el-input>
+				</el-form-item>
+				<el-form-item label="LOGO" class="hui-textarea">
+					<upload ref="uploadLogo" :list="informationForm.logo" :maxLen="1" type="insert" text="上传LOGO">
+					</upload>
+				</el-form-item>
+				<el-form-item label="附件" class="hui-textarea">
+					<upload ref="upload" :list="informationForm.businessLicense" type="insert">
+					</upload>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import upload from '@/components/common/upload'
+	import city from '@/components/common/city'
+	import {
+		updateOrganization,
+	} from '@/httpApi/organization'
+	export default {
+		data() {
+			return {
+				informationForm: {
+					organizationCode: '',
+					name: '',
+					contact: '',
+					contactTel: '',
+					address: [],
+					businessLicense: [],
+					logo: [],
+					detailAddress: ''
+				},
+				isUpdate: true
+			}
+		},
+		created() {
+			let obj = JSON.parse(JSON.stringify(this.$store.getters.organization));
+			obj.address = obj['address'] ? JSON.parse(obj.address) : [];
+			obj.businessLicense = obj['businessLicense'] ? JSON.parse(obj.businessLicense) : [];
+			obj.logo = obj['logo'] ? [JSON.parse(obj.logo)] : [];
+			this.informationForm = Object.assign(this.informationForm, obj);
+		},
+		methods: {
+			submit() {
+				let postData = JSON.parse(JSON.stringify(this.informationForm));
+				postData['businessLicense'] = JSON.stringify(this.$refs.upload.fileList);
+				postData['address'] = JSON.stringify(postData.address);
+				postData['logo'] = this.$refs.uploadLogo.fileList.length === 0 ? '{}' : JSON.stringify(this.$refs
+					.uploadLogo.fileList[0]);
+				updateOrganization(postData).then(res => {
+					if (res.state) {
+						this.$message.success('操作成功');
+						this.$store.dispatch('app/changeOrganization', postData);
+						this.$emit('callback', 'init');
+					}
+				})
+			}
+		},
+		components: {
+			upload,
+			city
+		},
+	}
+</script>
+
+<style lang="scss">
+	.organization-information {
+		width: 100%;
+		height: 100%;
+
+		.hui-title {
+			.el-icon-edit-outline {
+				font-size: 18px;
+				cursor: pointer;
+				color: $--color-primary;
+				padding: 0 8px;
+			}
+		}
+
+		.el-form {
+			padding-top: 10px;
+			padding-right: 10px;
+		}
+
+		.work-people-user-information-submit {
+			padding: 10px;
+			text-align: right;
+		}
+	}
+</style>

+ 88 - 0
virgo.wzfrontend/console/src/components/work/organization/user/detail.vue

@@ -0,0 +1,88 @@
+<template>
+	<div class="hui-detail">
+		<div class="hui-detail-title">基础信息</div>
+		<div class="hui-detail-content">
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">头像</div>
+				<div class="hui-detail-value">
+					<div style="width: 40px;height: 40px;border-radius: 4px;overflow: hidden;">
+						<avatar :user="user" :size="18"></avatar>
+					</div>
+				</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">名称</div>
+				<div class="hui-detail-value">{{user.name}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">性别</div>
+				<div class="hui-detail-value">{{user.sex == 'M'?'男':'女'}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">电话</div>
+				<div class="hui-detail-value">{{user.phone}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">部门</div>
+				<div class="hui-detail-value">{{user.partName}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">入职时间</div>
+				<div class="hui-detail-value">{{operateUserInfo.entryDate || '-'}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">工作状态</div>
+				<div class="hui-detail-value">
+					<div class="hui-tag" v-if="operateUserInfo.state === 1">在职</div>
+					<div class="hui-tag hui-tag-warning" v-else-if="operateUserInfo.state === 2">请假</div>
+					<div class="hui-tag hui-tag-error" v-else-if="operateUserInfo.state === 3">离职</div>
+					<span v-else>-</span>
+				</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">空间位置</div>
+				<div class="hui-detail-value">
+					{{operateUserInfo.projectItemTargetRoomName || operateUserInfo.projectItemTargetName || operateUserInfo.projectItemName || '-'}}
+				</div>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getOperationUserInfo
+	} from '@/httpApi/loginRegister'
+	import avatar from '@/components/common/avatar'
+	export default {
+		props: ['user'],
+		data() {
+			return {
+				type: 1,
+				operateUserInfo: {}
+			}
+		},
+		created() {
+			if (this.user.id) this.init();
+		},
+		methods: {
+			init() {
+				getOperationUserInfo({
+					projectId: this.$store.getters.project.id,
+					operateOrganizationId: this.$store.getters.organization.id,
+					userId: this.user.id
+				}).then(res => {
+					if (res.state) {
+						this.operateUserInfo = res.data || {}
+					}
+				})
+			}
+		},
+		components: {
+			avatar
+		},
+	}
+</script>
+
+<style>
+</style>

+ 126 - 0
virgo.wzfrontend/console/src/components/work/organization/user/edit.vue

@@ -0,0 +1,126 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form :model="userForm" :rules="userRulers" ref="userForm" label-position="top">
+				<el-alert title="该账号已存在,请直接保存" show-icon type="success" :closable="false" v-if="alertShow"
+					style="margin-bottom: 10px;"></el-alert>
+				<el-form-item label="手机号" prop="phone">
+					<el-input v-model="userForm.phone"></el-input>
+				</el-form-item>
+				<el-form-item label="密码" prop="pwd" v-if="show">
+					<el-input type="password" v-model="userForm.pwd"></el-input>
+				</el-form-item>
+				<el-form-item label="确认密码" prop="checkPwd" v-if="show">
+					<el-input type="password" v-model="userForm.checkPwd"></el-input>
+				</el-form-item>
+				<el-form-item label="姓名" prop="name" v-if="show">
+					<el-input v-model="userForm.name"></el-input>
+				</el-form-item>
+				<el-form-item label="性别" v-if="show">
+					<el-radio-group v-model="userForm.sex">
+						<el-radio label="M">男</el-radio>
+						<el-radio label="W">女</el-radio>
+					</el-radio-group>
+				</el-form-item>
+				<el-form-item label="邮箱" v-if="show">
+					<el-input v-model="userForm.email"></el-input>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertUser
+	} from '@/httpApi/space'
+	import {
+		testPhone
+	} from '@/httpApi/loginRegister'
+	export default {
+		props: ['part'],
+		data() {
+			return {
+				userForm: {
+					pwd: '',
+					checkPwd: '',
+					name: '',
+					sex: 'M',
+					phone: '',
+					email: ''
+				},
+				userRulers: {
+					name: [{
+						required: true,
+						message: '请输入姓名',
+						trigger: 'blur'
+					}],
+					pwd: [{
+						required: true,
+						message: '请输入密码',
+						trigger: 'blur'
+					}, {
+						min: 6,
+						max: 18,
+						message: '密码长度在6-18位之间',
+					}],
+					checkPwd: [{
+						validator: (rule, value, callback) => {
+							//再次输入密码验证规则
+							if (value !== this.userForm.pwd) {
+								callback(new Error('两次输入密码不一致!'));
+							} else {
+								callback();
+							}
+						},
+						trigger: 'change'
+					}],
+					phone: [{
+						required: true,
+						message: '请输入手机号',
+						trigger: 'blur'
+					}, {
+						validator: (rule, value, callback) => {
+							if (!/^1[123456789]\d{9}$/.test(value)) {
+								callback(new Error("请输入正确的手机号"));
+							} else {
+								testPhone(value).then(data => {
+									this.show = data.state;
+									this.alertShow = !data.state;
+									callback()
+								})
+							}
+						},
+						trigger: 'blur'
+					}],
+				},
+				show: false,
+				alertShow: false
+			}
+		},
+		methods: {
+			submit() {
+				this.$nextTick(() => {
+					this.$refs.userForm.validate(valid => {
+						if (valid) {
+							insertUser(this.$store.getters.organization.id, this.$store.getters.project.id,
+								this.part.id, this.userForm).then(res => {
+								if (res.state) {
+									this.$emit('callback', 'init');
+									this.$message.success('操作成功');
+								}
+							})
+						} else {
+							return false;
+						}
+					});
+				});
+
+			}
+		}
+	}
+</script>

+ 107 - 0
virgo.wzfrontend/console/src/components/work/organization/user/infoForm.vue

@@ -0,0 +1,107 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<project-item ref="projectItem" :form="userForm">
+				<el-form-item label="入职时间">
+					<el-date-picker v-model="userForm.entryDate" value-format="yyyy-MM-dd" type="date"
+						placeholder="选择入职时间">
+					</el-date-picker>
+				</el-form-item>
+			</project-item>
+			<el-form :model="userForm" ref="userForm" label-position="top">
+				<el-form-item label="工作状态">
+					<el-select v-model="userForm.state" placeholder="请选择工作状态">
+						<el-option :value="1" label="在职"></el-option>
+						<el-option :value="2" label="请假"></el-option>
+						<el-option :value="3" label="离职"></el-option>
+					</el-select>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertOperationUserInfo,
+		updateOperationUserInfo,
+		getOperationUserInfo
+	} from '@/httpApi/loginRegister'
+	import projectItem from '@/components/common/projectItem'
+	export default {
+		props: ['user'],
+		data() {
+			return {
+				operateUserInfo: {},
+				userForm: {
+					userId: '',
+					projectId: '',
+					projectName: '',
+					projectItemId: '',
+					projectItemName: '',
+					projectItemTargetId: '',
+					projectItemTargetName: '',
+					projectItemTargetRoomId: '',
+					projectItemTargetRoomName: '',
+					operateOrganizationId: '',
+					operateOrganizationName: '',
+					entryDate: '',
+					state: 1
+				}
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				getOperationUserInfo({
+					projectId: this.$store.getters.project.id,
+					operateOrganizationId: this.$store.getters.organization.id,
+					userId: this.user.id
+				}).then(res => {
+					if (res.state) {
+						this.operateUserInfo = res.data || {};
+						if (this.operateUserInfo.id) {
+							this.userForm = JSON.parse(JSON.stringify(this.operateUserInfo));
+						} else {
+							this.userForm['userId'] = this.user.id;
+							this.userForm['projectId'] = this.$store.getters.project.id;
+							this.userForm['projectName'] = this.$store.getters.project.projectName;
+							this.userForm['operateOrganizationId'] = this.$store.getters.organization.id;
+							this.userForm['operateOrganizationName'] = this.$store.getters.organization.name;
+						}
+					}
+				})
+
+			},
+			submit() {
+				let data = this.$refs.projectItem.returnItem();
+				this.userForm['projectItemId'] = data.projectItem.id;
+				this.userForm['projectItemName'] = data.projectItem.name;
+				this.userForm['projectItemTargetId'] = data.projectItemTarget.id;
+				this.userForm['projectItemTargetName'] = data.projectItemTarget.name;
+				this.userForm['projectItemTargetRoomId'] = data.projectItemTargetRoom.id;
+				this.userForm['projectItemTargetRoomName'] = data.projectItemTargetRoom.name;
+				this.userForm.id ? updateOperationUserInfo(this.userForm).then(this.successFunc) : insertOperationUserInfo(
+					this.userForm).then(this.successFunc);
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			},
+			close() {
+				this.$emit('callback', 'cancel')
+			}
+		},
+		components: {
+			projectItem
+		},
+	}
+</script>

+ 123 - 0
virgo.wzfrontend/console/src/components/work/organization/user/role.vue

@@ -0,0 +1,123 @@
+<template>
+	<div class="hui-flex hui-dialog role-box">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-tree :data="roleData" :props="defaultProps" show-checkbox node-key="id"
+				:default-checked-keys="checkedKeys" ref="tree" :render-after-expand="false">
+				<div :class="(node.childNodes.length == 0 && node.level == 4)? 'tree-node especially' : 'tree-node'"
+					slot-scope="{ node, data }">
+					<div class="tree-node-label">
+						<span>{{ node.label }}</span>
+					</div>
+				</div>
+			</el-tree>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="updateMenu">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		updateOperateUserRole
+	} from '@/httpApi/space'
+	export default {
+		props: ['projectId', 'user'],
+		data() {
+			return {
+				roleData: [],
+				defaultProps: {
+					label: 'title'
+				},
+				checkedKeys: []
+			}
+		},
+		created() {
+			this.roleData = JSON.parse(JSON.stringify(this.$store.getters.menuData));
+			this.$nextTick(() => {
+				this.cssTree();
+			})
+			if (this.user.id) {
+				this.checkedKeys = [];
+				this.testCheck(this.user.resources ? JSON.parse(this.user.resources) : []);
+			}
+		},
+		methods: {
+			cssTree() {
+				let classDomList = document.getElementsByClassName('especially')
+				// 改变这几个样式
+				if (classDomList.length == 0) return;
+				let paddingleft = parseInt(classDomList[0].parentNode.style.paddingLeft);
+				for (let i = 0; i < classDomList.length; i++) {
+					let node = classDomList[i].parentNode.parentNode;
+					node.parentNode.style.paddingLeft = (paddingleft + 24) + 'px';
+					node.parentNode.classList.add('tree-children-list')
+				}
+			},
+			filterArr(opArr, partId) {
+				function circle(opArr) {
+					for (let i = 0; i < opArr.length; i++) {
+						const isAccord = partId.find(r => r === opArr[i].id)
+						if (!isAccord) {
+							opArr.splice(i, 1)
+							i--
+						} else if (opArr[i].children && opArr[i].children.length) {
+							circle(opArr[i].children)
+						}
+					}
+				}
+				circle(opArr)
+				return opArr
+			},
+			testCheck(data) {
+				for (var i = 0; i < data.length; i++) {
+					if (data[i].children && data[i].children.length > 0) {
+						this.testCheck(data[i].children);
+					} else {
+						this.checkedKeys.push(data[i].id);
+					}
+				}
+			},
+			updateMenu() {
+				let resultData = JSON.parse(JSON.stringify(this.$store.getters.menuData));
+				let data = this.$refs.tree.getCheckedNodes(false, true);
+				let partId = data.map(node => node.id);
+				let obj = {
+					resource: JSON.stringify(this.filterArr(resultData, partId)),
+					comment: JSON.stringify(data.filter(item => !!item.index).map(item => item.index))
+				}
+				updateOperateUserRole({
+					menus: obj.comment,
+					operateOrganizationId: this.$store.getters.organization.id,
+					resources: obj.resource,
+					userId: this.user.id,
+					projectId: this.$store.getters.project.id
+				}).then(res => {
+					if (res.state) {
+						this.$emit('callback', 'init');
+						this.$message.success('操作成功')
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.role-box {
+		width: 100%;
+		height: 100%;
+
+		.el-tree {
+			.tree-node {
+				left: 0;
+			}
+
+			.el-tree-node__content>.el-tree-node__expand-icon {
+				padding: 6px;
+			}
+		}
+
+	}
+</style>

+ 80 - 0
virgo.wzfrontend/console/src/components/work/space/house/detail.vue

@@ -0,0 +1,80 @@
+<template>
+	<div class="hui-detail">
+		<div class="hui-detail-title">基础信息</div>
+		<div class="hui-detail-content">
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目名称</div>
+				<div class="hui-detail-value">{{detail.name}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目区域</div>
+				<div class="hui-detail-value">{{detail.address.join('-')}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">具体地点</div>
+				<div class="hui-detail-value">{{detail.specific}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目描述</div>
+				<div class="hui-detail-value">{{detail.comment}}</div>
+			</div>
+		</div>
+		<div class="hui-detail-title">项目标签</div>
+		<div class="hui-detail-content hui-detail-image">
+			<tag ref="tag" type="look" :tagType="1" :tagActive="detail.tagIds ? detail.tagIds.split(',') : []">
+			</tag>
+		</div>
+		<div class="hui-detail-title">项目图片</div>
+		<div class="hui-detail-content hui-detail-image">
+			<upload ref="upload" :list="detail.picture ? JSON.parse(detail.picture) : []" type="preview">
+			</upload>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getProjectDetailById
+	} from '@/httpApi/space'
+	import upload from '@/components/common/upload'
+	import tag from '@/components/common/tag'
+	export default {
+		props: ['detailId'],
+		data() {
+			return {
+				detail: {
+					name: '', //项目名称
+					address: [],
+					comment: '',
+					data: '',
+					organizationId: '',
+					picture: '',
+					tagIds: ''
+				}
+			}
+		},
+		created() {
+			if (this.detailId) this.init();
+		},
+		components: {
+			upload,
+			tag
+		},
+		methods: {
+			init() {
+				getProjectDetailById(this.detailId).then(res => {
+					if (res.state) {
+						let obj = res.data;
+						let data = {};
+						if (obj.data) data = JSON.parse(obj.data);
+						obj.address = JSON.parse(obj.address);
+						this.detail = Object.assign(obj, data);
+					}
+				})
+			}
+		},
+	}
+</script>
+<style lang="scss">
+
+</style>

+ 139 - 0
virgo.wzfrontend/console/src/components/work/space/house/edit.vue

@@ -0,0 +1,139 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<project-item ref="projectItem"></project-item>
+			<el-form ref="houseForm" label-position="top" :model="houseForm">
+				<el-form-item label="房源名称" prop="name" :rules="[{required: true, message: '请输入房源名称'}]">
+					<el-input type="text" v-model="houseForm.name" placeholder="请输入房源名称"></el-input>
+				</el-form-item>
+				<el-form-item label="房间号" prop="roomNumber" :rules="[{required: true, message: '请输入房间号'}]">
+					<el-input type="text" v-model="houseForm.roomNumber" placeholder="请输入房间号"></el-input>
+				</el-form-item>
+				<el-form-item label="房源面积(m²)" prop="area" :rules="[{required: true, message: '请输入房源面积(m²)'}]">
+					<el-input type="number" v-model="houseForm.area" placeholder="请输入房源面积(m²)"></el-input>
+				</el-form-item>
+				<el-form-item label="是否装修">
+					<el-radio v-model="houseForm.decoration" :label="0">未装修</el-radio>
+					<el-radio v-model="houseForm.decoration" :label="1">已装修</el-radio>
+				</el-form-item>
+				<el-form-item label="启用日期">
+					<el-date-picker v-model="houseForm.invocationDate" type="date" placeholder="其选择启用日期">
+					</el-date-picker>
+				</el-form-item>
+				<el-form-item label="是否公开房源">
+					<el-radio v-model="houseForm.openState" :label="0">不公开</el-radio>
+					<el-radio v-model="houseForm.openState" :label="1">公开</el-radio>
+				</el-form-item>
+				<el-form-item label="产权证书/不动产权证号">
+					<el-input type="text" v-model="houseForm.propertyCertificateNumber" placeholder="请输入产权证书/不动产权证号">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="招商状态">
+					<el-radio v-model="houseForm.investmentState" :label="0">未招商</el-radio>
+					<el-radio v-model="houseForm.investmentState" :label="1">已招商</el-radio>
+				</el-form-item>
+				<el-form-item label="房源配图" class="hui-textarea">
+					<upload ref="upload" :list="responsibility" type="insert"></upload>
+				</el-form-item>
+				<el-form-item label="房源标签" class="hui-textarea">
+					<tag ref="tag" type="insert" :tagType="3"
+						:tagActive="houseForm.tagIds ? houseForm.tagIds.split(',') : []">
+					</tag>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertHouse,
+		getHouseDetailById,
+		updateHouse
+	} from '@/httpApi/space'
+	import upload from '@/components/common/upload'
+	import city from '@/components/common/city'
+	import tag from '@/components/common/tag'
+	import projectItem from '@/components/common/projectItem'
+	export default {
+		props: ['isUpdate', 'detailId'],
+		data() {
+			return {
+				houseForm: {
+					name: '', //房源名称
+					roomNumber: '',
+					roomState: '', //房源状态
+					roomType: '', //房源类型
+					area: '',
+					decoration: 0,
+					investmentState: 0,
+					invocationDate: '',
+					openState: 0,
+					propertyCertificateNumber: '',
+					picture: '',
+					tagIds: '',
+					data: '',
+					projectId: '',
+					projectItemId: '',
+					projectItemTargetId: ''
+				},
+				specific: '',
+				responsibility: []
+			}
+		},
+		created() {
+			this.houseForm['projectId'] = this.$store.getters.project.id;
+			if (this.isUpdate) {
+				getHouseDetailById(this.detailId).then(res => {
+					if (res.state) {
+						this.houseForm = res.data;
+						if (this.houseForm.picture) this.responsibility = JSON.parse(this.houseForm.picture);
+						if (this.houseForm.data) {
+							let data = JSON.parse(this.houseForm.data);
+							this.specific = data.specific;
+						}
+					}
+				})
+			}
+		},
+		methods: {
+			submit() {
+				this.$refs.houseForm.validate((valid) => {
+					if (valid) {
+						let postData = JSON.parse(JSON.stringify(this.houseForm));
+						postData.data = JSON.stringify({
+							specific: this.specific
+						});
+						postData['picture'] = JSON.stringify(this.$refs.upload.fileList);
+						postData['tagIds'] = this.$refs.tag.tagIds();
+						if (this.isUpdate) {
+							updateHouse(postData).then(this.successFunc);
+						} else {
+							insertHouse(postData).then(this.successFunc);
+						}
+					} else {
+						return false;
+					}
+				});
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			}
+		},
+		components: {
+			city,
+			upload,
+			tag,
+			projectItem
+		},
+	}
+</script>
+
+<style lang="scss"></style>

+ 79 - 79
virgo.wzfrontend/console/src/components/work/space/project/detail.vue

@@ -1,80 +1,80 @@
-<template>
-	<div class="hui-detail">
-		<div class="hui-detail-title">基础信息</div>
-		<div class="hui-detail-content">
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">项目名称</div>
-				<div class="hui-detail-value">{{detail.name}}</div>
-			</div>
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">项目区域</div>
-				<div class="hui-detail-value">{{detail.address.join('-')}}</div>
-			</div>
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">具体地点</div>
-				<div class="hui-detail-value">{{detail.specific}}</div>
-			</div>
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">项目描述</div>
-				<div class="hui-detail-value">{{detail.comment}}</div>
-			</div>
-		</div>
-		<div class="hui-detail-title">项目标签</div>
-		<div class="hui-detail-content hui-detail-image">
-			<tag ref="tag" type="look" :tagType="1" :tagActive="detail.tagIds ? detail.tagIds.split(',') : []">
-			</tag>
-		</div>
-		<div class="hui-detail-title">项目图片</div>
-		<div class="hui-detail-content hui-detail-image">
-			<upload ref="upload" :list="detail.picture ? JSON.parse(detail.picture) : []" type="preview">
-			</upload>
-		</div>
-	</div>
-</template>
-
-<script>
-	import {
-		getProjectDetailById
-	} from '@/httpApi/work'
-	import upload from '@/components/common/upload'
-	import tag from '@/components/common/tag'
-	export default {
-		props: ['detailId'],
-		data() {
-			return {
-				detail: {
-					name: '', //项目名称
-					address: [],
-					comment: '',
-					data: '',
-					organizationId: '',
-					picture: '',
-					tagIds: ''
-				}
-			}
-		},
-		created() {
-			if (this.detailId) this.init();
-		},
-		components: {
-			upload,
-			tag
-		},
-		methods: {
-			init() {
-				getProjectDetailById(this.detailId).then(res => {
-					if (res.state) {
-						let obj = res.data;
-						let data = {};
-						if (obj.data) data = JSON.parse(obj.data);
-						obj.address = JSON.parse(obj.address);
-						this.detail = Object.assign(obj, data);
-					}
-				})
-			}
-		},
-	}
-</script>
-<style lang="scss">
-
+<template>
+	<div class="hui-detail">
+		<div class="hui-detail-title">基础信息</div>
+		<div class="hui-detail-content">
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目名称</div>
+				<div class="hui-detail-value">{{detail.name}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目区域</div>
+				<div class="hui-detail-value">{{detail.address.join('-')}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">具体地点</div>
+				<div class="hui-detail-value">{{detail.specific}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">项目描述</div>
+				<div class="hui-detail-value">{{detail.comment}}</div>
+			</div>
+		</div>
+		<div class="hui-detail-title">项目标签</div>
+		<div class="hui-detail-content hui-detail-image">
+			<tag ref="tag" type="look" :tagType="1" :tagActive="detail.tagIds ? detail.tagIds.split(',') : []">
+			</tag>
+		</div>
+		<div class="hui-detail-title">项目图片</div>
+		<div class="hui-detail-content hui-detail-image">
+			<upload ref="upload" :list="detail.picture ? JSON.parse(detail.picture) : []" type="preview">
+			</upload>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getProjectDetailById
+	} from '@/httpApi/space'
+	import upload from '@/components/common/upload'
+	import tag from '@/components/common/tag'
+	export default {
+		props: ['detailId'],
+		data() {
+			return {
+				detail: {
+					name: '', //项目名称
+					address: [],
+					comment: '',
+					data: '',
+					organizationId: '',
+					picture: '',
+					tagIds: ''
+				}
+			}
+		},
+		created() {
+			if (this.detailId) this.init();
+		},
+		components: {
+			upload,
+			tag
+		},
+		methods: {
+			init() {
+				getProjectDetailById(this.detailId).then(res => {
+					if (res.state) {
+						let obj = res.data;
+						let data = {};
+						if (obj.data) data = JSON.parse(obj.data);
+						obj.address = JSON.parse(obj.address);
+						this.detail = Object.assign(obj, data);
+					}
+				})
+			}
+		},
+	}
+</script>
+<style lang="scss">
+
 </style>

+ 113 - 113
virgo.wzfrontend/console/src/components/work/space/project/edit.vue

@@ -1,114 +1,114 @@
-<template>
-	<div class="hui-flex hui-dialog">
-		<div class="hui-flex-box hui-dialog-content">
-			<el-form ref="projectForm" label-position="top" :model="projectForm">
-				<el-form-item label="项目名称" prop="name" :rules="[{required: true, message: '请输入项目名称'}]">
-					<el-input type="text" v-model="projectForm.name" placeholder="请输入项目名称"></el-input>
-				</el-form-item>
-				<el-form-item label="项目区域" prop="address" :rules="[{required: true, message: '请选择项目区域'}]">
-					<city v-model="projectForm.address"></city>
-				</el-form-item>
-				<el-form-item label="具体地点">
-					<el-input type="text" v-model="specific" placeholder="请输入具体地点">
-					</el-input>
-				</el-form-item>
-				<el-form-item label="项目描述" class="hui-textarea">
-					<el-input type="textarea" v-model="projectForm.comment" placeholder="请输入项目描述" resize="none">
-					</el-input>
-				</el-form-item>
-				<el-form-item label="项目配图" class="hui-textarea">
-					<upload ref="upload" :list="responsibility" type="insert"></upload>
-				</el-form-item>
-				<el-form-item label="项目标签" class="hui-textarea">
-					<tag ref="tag" type="insert" :tagType="1"
-						:tagActive="projectForm.tagIds ? projectForm.tagIds.split(',') : []">
-					</tag>
-				</el-form-item>
-			</el-form>
-		</div>
-		<div class="hui-dialog-submit">
-			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
-			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
-		</div>
-	</div>
-</template>
-
-<script>
-	import {
-		insertProject,
-		getProjectDetailById,
-		updateProject
-	} from '@/httpApi/work'
-	import upload from '@/components/common/upload'
-	import city from '@/components/common/city'
-	import tag from '@/components/common/tag'
-	export default {
-		props: ['isUpdate', 'detailId'],
-		data() {
-			return {
-				projectForm: {
-					name: '', //项目名称
-					address: [],
-					comment: '',
-					data: '',
-					organizationId: '',
-					picture: '',
-					tagIds: ''
-				},
-				specific: '',
-				responsibility: []
-			}
-		},
-		created() {
-			this.projectForm['organizationId'] = this.$store.getters.user.organization.id;
-			if (this.isUpdate) {
-				getProjectDetailById(this.detailId).then(res => {
-					if (res.state) {
-						this.projectForm = res.data;
-						this.projectForm.address = JSON.parse(this.projectForm.address);
-						if (this.projectForm.picture) this.responsibility = JSON.parse(this.projectForm.picture);
-						if (this.projectForm.data) {
-							let data = JSON.parse(this.projectForm.data);
-							this.specific = data.specific;
-						}
-					}
-				})
-			}
-		},
-		methods: {
-			submit() {
-				this.$refs.projectForm.validate((valid) => {
-					if (valid) {
-						let postData = JSON.parse(JSON.stringify(this.projectForm));
-						postData.data = JSON.stringify({
-							specific: this.specific
-						});
-						postData['picture'] = JSON.stringify(this.$refs.upload.fileList);
-						postData['address'] = JSON.stringify(this.projectForm.address);
-						postData['tagIds'] = this.$refs.tag.tagIds();
-						if (this.isUpdate) {
-							updateProject(postData).then(this.successFunc);
-						} else {
-							insertProject(postData).then(this.successFunc);
-						}
-					} else {
-						return false;
-					}
-				});
-			},
-			successFunc(res) {
-				if (res.state) {
-					this.$message.success('操作成功');
-					this.$emit('callback', 'init');
-				}
-			}
-		},
-		components: {
-			city,
-			upload,
-			tag
-		},
-	}
-</script>
-
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="projectForm" label-position="top" :model="projectForm">
+				<el-form-item label="项目名称" prop="name" :rules="[{required: true, message: '请输入项目名称'}]">
+					<el-input type="text" v-model="projectForm.name" placeholder="请输入项目名称"></el-input>
+				</el-form-item>
+				<el-form-item label="项目区域" prop="address" :rules="[{required: true, message: '请选择项目区域'}]">
+					<city v-model="projectForm.address"></city>
+				</el-form-item>
+				<el-form-item label="具体地点">
+					<el-input type="text" v-model="specific" placeholder="请输入具体地点">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="项目描述" class="hui-textarea">
+					<el-input type="textarea" v-model="projectForm.comment" placeholder="请输入项目描述" resize="none">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="项目配图" class="hui-textarea">
+					<upload ref="upload" :list="responsibility" type="insert"></upload>
+				</el-form-item>
+				<el-form-item label="项目标签" class="hui-textarea">
+					<tag ref="tag" type="insert" :tagType="1"
+						:tagActive="projectForm.tagIds ? projectForm.tagIds.split(',') : []">
+					</tag>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertProject,
+		getProjectDetailById,
+		updateProject
+	} from '@/httpApi/space'
+	import upload from '@/components/common/upload'
+	import city from '@/components/common/city'
+	import tag from '@/components/common/tag'
+	export default {
+		props: ['isUpdate', 'detailId'],
+		data() {
+			return {
+				projectForm: {
+					name: '', //项目名称
+					address: [],
+					comment: '',
+					data: '',
+					organizationId: '',
+					picture: '',
+					tagIds: ''
+				},
+				specific: '',
+				responsibility: []
+			}
+		},
+		created() {
+			this.projectForm['organizationId'] = this.$store.getters.user.organization.id;
+			if (this.isUpdate) {
+				getProjectDetailById(this.detailId).then(res => {
+					if (res.state) {
+						this.projectForm = res.data;
+						this.projectForm.address = JSON.parse(this.projectForm.address);
+						if (this.projectForm.picture) this.responsibility = JSON.parse(this.projectForm.picture);
+						if (this.projectForm.data) {
+							let data = JSON.parse(this.projectForm.data);
+							this.specific = data.specific;
+						}
+					}
+				})
+			}
+		},
+		methods: {
+			submit() {
+				this.$refs.projectForm.validate((valid) => {
+					if (valid) {
+						let postData = JSON.parse(JSON.stringify(this.projectForm));
+						postData.data = JSON.stringify({
+							specific: this.specific
+						});
+						postData['picture'] = JSON.stringify(this.$refs.upload.fileList);
+						postData['address'] = JSON.stringify(this.projectForm.address);
+						postData['tagIds'] = this.$refs.tag.tagIds();
+						if (this.isUpdate) {
+							updateProject(postData).then(this.successFunc);
+						} else {
+							insertProject(postData).then(this.successFunc);
+						}
+					} else {
+						return false;
+					}
+				});
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			}
+		},
+		components: {
+			city,
+			upload,
+			tag
+		},
+	}
+</script>
+
 <style lang="scss"></style>

+ 74 - 74
virgo.wzfrontend/console/src/components/work/space/set/projectItemDetail.vue

@@ -1,75 +1,75 @@
-<template>
-	<div class="hui-detail">
-		<div class="hui-detail-title">基础信息</div>
-		<div class="hui-detail-content">
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">楼宇名称</div>
-				<div class="hui-detail-value">{{detail.name}}</div>
-			</div>
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">建筑面积</div>
-				<div class="hui-detail-value">{{detail.area}}</div>
-			</div>
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">具体位置</div>
-				<div class="hui-detail-value">{{detail.address}}</div>
-			</div>
-			<div class="hui-detail-item">
-				<div class="hui-detail-label">产权证书</div>
-				<div class="hui-detail-value">{{detail.propertyCertificateNumber}}</div>
-			</div>
-		</div>
-		<div class="hui-detail-title">项目标签</div>
-		<div class="hui-detail-content hui-detail-image">
-			<tag ref="tag" type="look" :tagType="2" :tagActive="detail.tagIds ? detail.tagIds.split(',') : []">
-			</tag>
-		</div>
-		<div class="hui-detail-title">项目图片</div>
-		<div class="hui-detail-content hui-detail-image">
-			<upload ref="upload" :list="detail.picture ? JSON.parse(detail.picture) : []" type="preview">
-			</upload>
-		</div>
-	</div>
-</template>
-
-<script>
-	import {
-		getProjectItemDetailById
-	} from '@/httpApi/work'
-	import upload from '@/components/common/upload'
-	import tag from '@/components/common/tag'
-	export default {
-		props: ['detailId'],
-		data() {
-			return {
-				detail: {
-					name: '', //楼宇名称
-					area: '',
-					address: '',
-					propertyCertificateNumber: '',
-					picture: '',
-					tagId: ''
-				}
-			}
-		},
-		created() {
-			if (this.detailId) this.init();
-		},
-		components: {
-			upload,
-			tag
-		},
-		methods: {
-			init() {
-				getProjectItemDetailById(this.detailId).then(res => {
-					if (res.state) {
-						this.detail = res.data;
-					}
-				})
-			}
-		},
-	}
-</script>
-<style lang="scss">
-
+<template>
+	<div class="hui-detail">
+		<div class="hui-detail-title">基础信息</div>
+		<div class="hui-detail-content">
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">楼宇名称</div>
+				<div class="hui-detail-value">{{detail.name}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">建筑面积</div>
+				<div class="hui-detail-value">{{detail.area}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">具体位置</div>
+				<div class="hui-detail-value">{{detail.address}}</div>
+			</div>
+			<div class="hui-detail-item">
+				<div class="hui-detail-label">产权证书</div>
+				<div class="hui-detail-value">{{detail.propertyCertificateNumber}}</div>
+			</div>
+		</div>
+		<div class="hui-detail-title">项目标签</div>
+		<div class="hui-detail-content hui-detail-image">
+			<tag ref="tag" type="look" :tagType="2" :tagActive="detail.tagIds ? detail.tagIds.split(',') : []">
+			</tag>
+		</div>
+		<div class="hui-detail-title">项目图片</div>
+		<div class="hui-detail-content hui-detail-image">
+			<upload ref="upload" :list="detail.picture ? JSON.parse(detail.picture) : []" type="preview">
+			</upload>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		getProjectItemDetailById
+	} from '@/httpApi/space'
+	import upload from '@/components/common/upload'
+	import tag from '@/components/common/tag'
+	export default {
+		props: ['detailId'],
+		data() {
+			return {
+				detail: {
+					name: '', //楼宇名称
+					area: '',
+					address: '',
+					propertyCertificateNumber: '',
+					picture: '',
+					tagId: ''
+				}
+			}
+		},
+		created() {
+			if (this.detailId) this.init();
+		},
+		components: {
+			upload,
+			tag
+		},
+		methods: {
+			init() {
+				getProjectItemDetailById(this.detailId).then(res => {
+					if (res.state) {
+						this.detail = res.data;
+					}
+				})
+			}
+		},
+	}
+</script>
+<style lang="scss">
+
 </style>

+ 106 - 106
virgo.wzfrontend/console/src/components/work/space/set/projectItemForm.vue

@@ -1,107 +1,107 @@
-<template>
-	<div class="hui-flex hui-dialog">
-		<div class="hui-flex-box hui-dialog-content">
-			<el-form ref="projectItemForm" label-position="top" :model="projectItemForm">
-				<el-form-item label="楼宇名称" prop="name" :rules="[{required: true, message: '请输入楼宇名称'}]">
-					<el-input type="text" v-model="projectItemForm.name" placeholder="请输入楼宇名称"></el-input>
-				</el-form-item>
-				<el-form-item label="建筑总面积(m²)" prop="area" :rules="[{required: true, message: '请输入建筑总面积'}]">
-					<el-input type="number" v-model="projectItemForm.area" placeholder="请输入建筑总面积m²"></el-input>
-				</el-form-item>
-				<el-form-item label="具体位置">
-					<el-input type="text" v-model="projectItemForm.address" placeholder="请输入具体位置">
-					</el-input>
-				</el-form-item>
-				<el-form-item label="产权证书/不动产权证号">
-					<el-input type="text" v-model="projectItemForm.propertyCertificateNumber"
-						placeholder="请输入产权证书/不动产权证号">
-					</el-input>
-				</el-form-item>
-				<el-form-item label="楼宇图片" class="hui-textarea">
-					<upload ref="upload" :list="responsibility" type="insert"></upload>
-				</el-form-item>
-				<el-form-item label="楼宇标签" class="hui-textarea">
-					<tag ref="tag" type="insert" :tagType="2"
-						:tagActive="projectItemForm.tagIds ? projectItemForm.tagIds.split(',') : []">
-					</tag>
-				</el-form-item>
-			</el-form>
-		</div>
-		<div class="hui-dialog-submit">
-			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
-			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
-		</div>
-	</div>
-</template>
-
-<script>
-	import {
-		insertProjectItem,
-		getProjectItemDetailById,
-		updateProjectItem
-	} from '@/httpApi/work'
-	import upload from '@/components/common/upload'
-	import tag from '@/components/common/tag'
-	export default {
-		props: ['isUpdate', 'detailId'],
-		data() {
-			return {
-				projectItemForm: {
-					name: '', //楼宇名称
-					area: '',
-					address: '',
-					propertyCertificateNumber: '',
-					picture: '',
-					tagIds: ''
-				},
-				specific: '',
-				responsibility: []
-			}
-		},
-		created() {
-			this.projectItemForm['projectId'] = this.$store.getters.project.id;
-			if (this.isUpdate) {
-				getProjectItemDetailById(this.detailId).then(res => {
-					if (res.state) {
-						this.projectItemForm = res.data;
-						if (this.projectItemForm.picture) this.responsibility = JSON.parse(this.projectItemForm
-							.picture);
-					}
-				})
-			}
-		},
-		methods: {
-			submit() {
-				this.$refs.projectItemForm.validate((valid) => {
-					if (valid) {
-						let postData = JSON.parse(JSON.stringify(this.projectItemForm));
-						postData.data = JSON.stringify({
-							specific: this.specific
-						});
-						postData['picture'] = JSON.stringify(this.$refs.upload.fileList);
-						postData['tagIds'] = this.$refs.tag.tagIds();
-						if (this.isUpdate) {
-							updateProjectItem(postData).then(this.successFunc);
-						} else {
-							insertProjectItem(postData).then(this.successFunc);
-						}
-					} else {
-						return false;
-					}
-				});
-			},
-			successFunc(res) {
-				if (res.state) {
-					this.$message.success('操作成功');
-					this.$emit('callback', 'init');
-				}
-			}
-		},
-		components: {
-			upload,
-			tag
-		},
-	}
-</script>
-
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="projectItemForm" label-position="top" :model="projectItemForm">
+				<el-form-item label="楼宇名称" prop="name" :rules="[{required: true, message: '请输入楼宇名称'}]">
+					<el-input type="text" v-model="projectItemForm.name" placeholder="请输入楼宇名称"></el-input>
+				</el-form-item>
+				<el-form-item label="建筑总面积(m²)" prop="area" :rules="[{required: true, message: '请输入建筑总面积'}]">
+					<el-input type="number" v-model="projectItemForm.area" placeholder="请输入建筑总面积m²"></el-input>
+				</el-form-item>
+				<el-form-item label="具体位置">
+					<el-input type="text" v-model="projectItemForm.address" placeholder="请输入具体位置">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="产权证书/不动产权证号">
+					<el-input type="text" v-model="projectItemForm.propertyCertificateNumber"
+						placeholder="请输入产权证书/不动产权证号">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="楼宇图片" class="hui-textarea">
+					<upload ref="upload" :list="responsibility" type="insert"></upload>
+				</el-form-item>
+				<el-form-item label="楼宇标签" class="hui-textarea">
+					<tag ref="tag" type="insert" :tagType="2"
+						:tagActive="projectItemForm.tagIds ? projectItemForm.tagIds.split(',') : []">
+					</tag>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertProjectItem,
+		getProjectItemDetailById,
+		updateProjectItem
+	} from '@/httpApi/space'
+	import upload from '@/components/common/upload'
+	import tag from '@/components/common/tag'
+	export default {
+		props: ['isUpdate', 'detailId'],
+		data() {
+			return {
+				projectItemForm: {
+					name: '', //楼宇名称
+					area: '',
+					address: '',
+					propertyCertificateNumber: '',
+					picture: '',
+					tagIds: ''
+				},
+				specific: '',
+				responsibility: []
+			}
+		},
+		created() {
+			this.projectItemForm['projectId'] = this.$store.getters.project.id;
+			if (this.isUpdate) {
+				getProjectItemDetailById(this.detailId).then(res => {
+					if (res.state) {
+						this.projectItemForm = res.data;
+						if (this.projectItemForm.picture) this.responsibility = JSON.parse(this.projectItemForm
+							.picture);
+					}
+				})
+			}
+		},
+		methods: {
+			submit() {
+				this.$refs.projectItemForm.validate((valid) => {
+					if (valid) {
+						let postData = JSON.parse(JSON.stringify(this.projectItemForm));
+						postData.data = JSON.stringify({
+							specific: this.specific
+						});
+						postData['picture'] = JSON.stringify(this.$refs.upload.fileList);
+						postData['tagIds'] = this.$refs.tag.tagIds();
+						if (this.isUpdate) {
+							updateProjectItem(postData).then(this.successFunc);
+						} else {
+							insertProjectItem(postData).then(this.successFunc);
+						}
+					} else {
+						return false;
+					}
+				});
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			}
+		},
+		components: {
+			upload,
+			tag
+		},
+	}
+</script>
+
 <style lang="scss"></style>

+ 72 - 72
virgo.wzfrontend/console/src/components/work/space/set/projectItemTargetForm.vue

@@ -1,73 +1,73 @@
-<template>
-	<div class="hui-flex hui-dialog">
-		<div class="hui-flex-box hui-dialog-content">
-			<el-form ref="form" :model="form" label-position="top">
-				<el-form-item label="楼层名称">
-					<el-input type="text" v-model="form.name" placeholder="请输入楼层名称"></el-input>
-				</el-form-item>
-				<el-form-item label="房源数量">
-					<el-input type="number" v-model="form.roomNumber" placeholder="请输入房源数量"></el-input>
-				</el-form-item>
-				<el-form-item label="产权证书/不动产权证号">
-					<el-input type="text" v-model="form.propertyCertificateNumber" placeholder="请输入产权证书/不动产权证号">
-					</el-input>
-				</el-form-item>
-				<el-form-item label="排序">
-					<el-input type="number" v-model="form.sequence" placeholder="请输入排序"></el-input>
-				</el-form-item>
-			</el-form>
-		</div>
-		<div class="hui-dialog-submit">
-			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
-			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
-		</div>
-	</div>
-</template>
-
-<script>
-	import {
-		insertProjectItemTarget,
-		getProjectItemTargetDetailById,
-		updateProjectItemTarget
-	} from '@/httpApi/work'
-	export default {
-		props: ['isUpdate', 'projectItemId', 'detailId'],
-		data() {
-			return {
-				form: {
-					name: '',
-					sequence: '',
-					roomNumber: '',
-					propertyCertificateNumber: ''
-				}
-			}
-		},
-		created() {
-			this.form['projectId'] = this.$store.getters.project.id;
-			this.form['projectItemId'] = this.projectItemId;
-			if (this.isUpdate) {
-				getProjectItemTargetDetailById(this.detailId).then(res => {
-					if (res.state) this.form = res.data;
-				})
-			}
-		},
-		methods: {
-			submit() {
-				if (this.isUpdate) {
-					updateProjectItemTarget(this.form).then(this.successFunc);
-				} else {
-
-					insertProjectItemTarget(this.form).then(this.successFunc);
-				}
-			},
-			successFunc(res) {
-				if (res.state) {
-					this.$message.success('操作成功');
-					this.$emit('callback', 'init');
-				}
-			}
-		}
-	}
-</script>
-
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="form" :model="form" label-position="top">
+				<el-form-item label="楼层名称">
+					<el-input type="text" v-model="form.name" placeholder="请输入楼层名称"></el-input>
+				</el-form-item>
+				<el-form-item label="房源数量">
+					<el-input type="number" v-model="form.roomNumber" placeholder="请输入房源数量"></el-input>
+				</el-form-item>
+				<el-form-item label="产权证书/不动产权证号">
+					<el-input type="text" v-model="form.propertyCertificateNumber" placeholder="请输入产权证书/不动产权证号">
+					</el-input>
+				</el-form-item>
+				<el-form-item label="排序">
+					<el-input type="number" v-model="form.sequence" placeholder="请输入排序"></el-input>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="medium" @click="$emit('callback')">取 消</el-button>
+			<el-button size="medium" type="primary" @click="submit">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		insertProjectItemTarget,
+		getProjectItemTargetDetailById,
+		updateProjectItemTarget
+	} from '@/httpApi/space'
+	export default {
+		props: ['isUpdate', 'projectItemId', 'detailId'],
+		data() {
+			return {
+				form: {
+					name: '',
+					sequence: '',
+					roomNumber: '',
+					propertyCertificateNumber: ''
+				}
+			}
+		},
+		created() {
+			this.form['projectId'] = this.$store.getters.project.id;
+			this.form['projectItemId'] = this.projectItemId;
+			if (this.isUpdate) {
+				getProjectItemTargetDetailById(this.detailId).then(res => {
+					if (res.state) this.form = res.data;
+				})
+			}
+		},
+		methods: {
+			submit() {
+				if (this.isUpdate) {
+					updateProjectItemTarget(this.form).then(this.successFunc);
+				} else {
+
+					insertProjectItemTarget(this.form).then(this.successFunc);
+				}
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			}
+		}
+	}
+</script>
+
 <style lang="scss"></style>

+ 72 - 0
virgo.wzfrontend/console/src/httpApi/organization.js

@@ -0,0 +1,72 @@
+import request from '@/axios'
+
+/* 
+ * 更新组织信息
+ * 
+ * 
+ */
+export function updateOrganization(data) {
+	return request({
+		url: `/manager/base/organization/update`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 获取组织项目部门列表
+ * 
+ * 
+ */
+export function getPartList(organizationId, projectId) {
+	return request({
+		url: `/manager/role/${organizationId}/${projectId}`,
+		method: 'get'
+	})
+}
+/* 
+ * 新增部门
+ * 
+ * 
+ */
+export function insertDepartment(data) {
+	return request({
+		url: `/manager/role`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 编辑部门
+ * 
+ * 
+ */
+export function updateDepartment(data) {
+	return request({
+		url: `/manager/role`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 删除部门
+ * 
+ * 
+ */
+export function deleteDepartment(id) {
+	return request({
+		url: `/manager/role/${id}`,
+		method: 'delete'
+	})
+}
+/* 
+ * 获取组织项目部门用户列表
+ * 
+ * 
+ */
+export function getUserListByPart(data) {
+	return request({
+		url: `/manager/admin/list`,
+		method: 'post',
+		data: data
+	})
+}

+ 266 - 0
virgo.wzfrontend/console/src/httpApi/space.js

@@ -0,0 +1,266 @@
+import request from '@/axios'
+/* 
+ * 获取项目列表
+ * 
+ */
+export function getProjectListByPage(data) {
+	return request({
+		url: `/api/project/${data.currPage}/${data.pageSize}`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 新增项目
+ * 
+ * 
+ */
+export function insertProject(data) {
+	return request({
+		url: `/api/project`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 编辑项目
+ * 
+ * 
+ */
+export function updateProject(data) {
+	return request({
+		url: `/api/project/update`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 获取项目详情
+ * 
+ * 
+ */
+export function getProjectDetailById(id) {
+	return request({
+		url: `/api/project/getProject/${id}`,
+		method: 'get'
+	})
+}
+/* 
+ * 删除项目
+ * 
+ * 
+ */
+export function deleteProjectById(id) {
+	return request({
+		url: `/api/project/delete/${id}`,
+		method: 'delete'
+	})
+}
+/* 
+ * 获取楼宇列表
+ * 
+ * 
+ */
+export function getProjectItemList(data) {
+	return request({
+		url: `/api/projectItem/${data.currPage}/${data.pageSize}`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 新增楼宇
+ * 
+ * 
+ */
+export function insertProjectItem(data) {
+	return request({
+		url: `/api/projectItem`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 获取楼宇详情
+ * 
+ * 
+ */
+export function getProjectItemDetailById(projectItemId) {
+	return request({
+		url: `/api/projectItem/${projectItemId}`,
+		method: 'get'
+	})
+}
+/* 
+ * 编辑楼宇
+ * 
+ * 
+ */
+export function updateProjectItem(data) {
+	return request({
+		url: `/api/projectItem/update`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 删除楼宇
+ * 
+ * 
+ */
+export function deleteProjectItemById(id) {
+	return request({
+		url: `/api/projectItem/delete/${id}`,
+		method: 'delete'
+	})
+}
+/* 
+ * 新增楼层
+ * 
+ * 
+ */
+export function insertProjectItemTarget(data) {
+	return request({
+		url: `/api/projectItemTarget`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 获取楼宇详情
+ * 
+ * 
+ */
+export function getProjectItemTargetDetailById(id) {
+	return request({
+		url: `/api/projectItemTarget/${id}`,
+		method: 'get'
+	})
+}
+/* 
+ * 编辑楼层
+ * 
+ * 
+ */
+export function updateProjectItemTarget(data) {
+	return request({
+		url: `/api/projectItemTarget`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 删除楼层
+ * 
+ * 
+ */
+export function deleteProjectItemTarget(projectItemTargetId) {
+	return request({
+		url: `/api/projectItemTarget/${projectItemTargetId}`,
+		method: 'delete'
+	})
+}
+/* 
+ * 获取标签列表
+ * 
+ * 
+ */
+export function getTagList(type) {
+	return request({
+		url: `/api/tag/${type}`,
+		method: 'post'
+	})
+}
+/* 
+ * 新增标签
+ * 
+ * 
+ */
+export function insertTag(data) {
+	return request({
+		url: `/api/tag`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 编辑标签
+ * 
+ * 
+ */
+export function updateTag(data) {
+	return request({
+		url: `/api/tag/update`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 删除标签
+ * 
+ * 
+ */
+export function deleteTag(id) {
+	return request({
+		url: `/api/tag/delete/${id}`,
+		method: 'delete'
+	})
+}
+/* 
+ * 获取房源列表
+ * 
+ * 
+ */
+export function getHouseListByPage(data) {
+	return request({
+		url: `/api/projectItemTargetRoom/${data.currPage}/${data.pageSize}`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 新增房源
+ * 
+ * 
+ */
+export function insertHouse(data) {
+	return request({
+		url: `/api/projectItemTargetRoom`,
+		method: 'post',
+		data: data
+	})
+}
+/* 
+ * 获取房源详情
+ * 
+ * 
+ */
+export function getHouseDetailById(id) {
+	return request({
+		url: `/api/projectItemTargetRoom/${id}`,
+		method: 'get'
+	})
+}
+/* 
+ * 编辑房源
+ * 
+ * 
+ */
+export function updateHouse(data) {
+	return request({
+		url: `/api/projectItemTargetRoom`,
+		method: 'put',
+		data: data
+	})
+}
+/* 
+ * 删除房源
+ * 
+ * 
+ */
+export function deleteHouseById(id) {
+	return request({
+		url: `/api/projectItemTargetRoom/${id}`,
+		method: 'delete'
+	})
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 1407
virgo.wzfrontend/console/src/httpApi/work.js


+ 2 - 12
virgo.wzfrontend/console/src/layout/components/topNav.vue

@@ -2,7 +2,7 @@
 	<div class="work-layout-title">
 		<div class="work-layout-left">
 			<div class="work-layout-image">
-				<img src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/e34dd8b13d414da3ba3c9695d7404898"
+				<img src="https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3156449b8a1a4874981b2a76d5947721"
 					alt="" />
 			</div>
 			<div class="work-layout-label">智慧运营平台</div>
@@ -34,14 +34,10 @@
 				<el-dropdown-menu class="user-dropdown" slot="dropdown">
 					<el-dropdown-item command="user">{{users.name}}</el-dropdown-item>
 					<el-dropdown-item command="detail">个人信息</el-dropdown-item>
-					<el-dropdown-item command="password">修改密码</el-dropdown-item>
 					<el-dropdown-item command="loginout">退出登录</el-dropdown-item>
 				</el-dropdown-menu>
 			</el-dropdown>
 		</div>
-		<el-dialog title="修改密码" :visible.sync="visible" width="900px" :append-to-body="true">
-			<change-password v-if="visible" @callback="visible=false"></change-password>
-		</el-dialog>
 		<el-drawer title="个人信息" class="user-drawer" :modal="false" :visible.sync="drawer" :size="400"
 			:append-to-body="true">
 			<user-detail v-if="drawer"></user-detail>
@@ -50,7 +46,6 @@
 </template>
 
 <script>
-	import changePassword from './changePassword'
 	import userDetail from './userDetail'
 	import {
 		removeToken,
@@ -72,7 +67,6 @@
 				userDropdown: false,
 				projectDropdown: false,
 				projectList: [],
-				visible: false,
 				drawer: false
 			}
 		},
@@ -97,7 +91,7 @@
 				getOrganizedProjectList(this.$store.getters.organization.id).then(res => {
 					if (res.state) {
 						this.projectList = res.data || [];
-						if (this.project.id) return;
+						if (this.projects.id) return;
 						if (this.projectList.length === 1) this.changeProject(this.projectList[0]);
 					}
 				})
@@ -140,9 +134,6 @@
 					case 'detail':
 						this.drawer = true;
 						break;
-					case 'password':
-						this.visible = true;
-						break;
 					case 'loginout':
 						this.loginout();
 						break;
@@ -152,7 +143,6 @@
 			}
 		},
 		components: {
-			changePassword,
 			userDetail
 		},
 		watch: {

+ 1 - 0
virgo.wzfrontend/console/src/layout/components/userDetail.vue

@@ -89,6 +89,7 @@
 				getUserInfo().then(res => {
 					if (res.state) {
 						this.user = res.data;
+						console.log(this.user);
 						if (!this.user.operateUserInfo) this.user['operateUserInfo'] = {};
 						this.$store.dispatch('app/changeUser', this.user);
 					}

+ 10 - 2
virgo.wzfrontend/console/src/layout/work.vue

@@ -28,6 +28,9 @@
 	import subMenu from './components/subMenu'
 	import topNav from './components/topNav'
 	import breadCrumb from './components/breadCrumb'
+	import {
+		mapGetters
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -45,8 +48,7 @@
 			set() {
 				let list = this.$store.getters.menuData.filter(node => node.title === '系统设置');
 				if (list.length === 0) return this.$message.warning('您暂无系统设置权限');
-				if (list[0].children.length === 0) return this.$message.warning('您暂无系统设置权限');
-				console.log(list[0].children[0].index);
+				if (list[0].children.length === 0) return this.$message.warning('您暂无系统设置权限');
 				this.$router.push(list[0].children[0].index);
 			}
 		},
@@ -60,6 +62,12 @@
 				let list = this.$store.getters.menuData.filter(node => node.title === '系统设置');
 				if (this.$route.path.indexOf('/work/system') > -1) return list[0].children[0].index;
 				return this.$route.path;
+			},
+			...mapGetters(['menuData'])
+		},
+		watch: {
+			menuData() {
+				this.menuList = this.$store.getters.menuData.filter(node => node.title !== '系统设置');
 			}
 		},
 	}

+ 23 - 0
virgo.wzfrontend/console/src/router/modules/organization.js

@@ -0,0 +1,23 @@
+const organization = [{
+	path: 'organization/depart',
+	component: () => import('@/views/work/organization/depart'),
+	name: '部门管理',
+	meta: {
+		title: '部门管理'
+	}
+}, {
+	path: 'organization/manager',
+	component: () => import('@/views/work/organization/manager'),
+	name: '公司管理',
+	meta: {
+		title: '公司管理'
+	}
+}, {
+	path: 'organization/user',
+	component: () => import('@/views/work/organization/user'),
+	name: '人员管理',
+	meta: {
+		title: '人员管理'
+	}
+}]
+export default organization;

+ 9 - 2
virgo.wzfrontend/console/src/router/modules/space.js

@@ -1,16 +1,23 @@
 const space = [{
 	path: 'space/project',
-	component: () => import('@/views/work/space/project/list'),
+	component: () => import('@/views/work/space/project'),
 	name: '项目列表',
 	meta: {
 		title: '项目列表'
 	}
 }, {
 	path: 'space/set',
-	component: () => import('@/views/work/space/set/list'),
+	component: () => import('@/views/work/space/set'),
 	name: '空间设置',
 	meta: {
 		title: '空间设置'
 	}
+}, {
+	path: 'space/housing',
+	component: () => import('@/views/work/space/housing'),
+	name: '房源列表',
+	meta: {
+		title: '房源列表'
+	}
 }]
 export default space;

+ 9 - 2
virgo.wzfrontend/console/src/views/system/main/list.vue

@@ -42,6 +42,9 @@
 		updateMenu
 	} from '@/httpApi/system'
 	import edit from '@/components/system/main/edit'
+	import {
+		setComment
+	} from '@/uitls/auth';
 	export default {
 		data() {
 			return {
@@ -59,7 +62,7 @@
 			this.init()
 		},
 		methods: {
-			init() {
+			init(type) {
 				getMenuList().then(res => {
 					if (res.state) {
 						if (!res.data || res.data.length === 0) return;
@@ -68,6 +71,10 @@
 						this.comment = [];
 						this.testIndex(this.tableData);
 						this.testComment(this.tableData);
+						if (type === 'reload') {
+							this.$store.dispatch('app/changeMenuData', this.tableData);
+							setComment(JSON.stringify(this.comment));
+						}
 					}
 				})
 			},
@@ -140,7 +147,7 @@
 						type: 'success',
 						message: '操作成功'
 					})
-					this.init();
+					this.init('reload');
 					this.dialogVisible = false;
 				}
 			}

+ 129 - 0
virgo.wzfrontend/console/src/views/work/organization/depart.vue

@@ -0,0 +1,129 @@
+<template>
+	<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-content-insert">
+				<el-button type="primary" size="medium" @click="insertDepartment({})">新建部门</el-button>
+			</div>
+			<div class="hui-flex-box">
+				<el-table :data="treeData" row-key="id" border height="100%">
+					<el-table-column label="部门名称" prop="name"></el-table-column>
+					<el-table-column label="部门人数" prop="userCount"></el-table-column>
+					<el-table-column label="部门责任人">
+						<template slot-scope="scope">
+							<div class="hui-table-user" v-if="scope.row.responsible && scope.row.responsible!='[]'">
+								<div class="hui-table-avatar">
+									<avatar :user="JSON.parse(scope.row.responsible)[0]"></avatar>
+								</div>
+								<div>{{JSON.parse(scope.row.responsible)[0].name}}</div>
+							</div>
+						</template>
+					</el-table-column>
+					<el-table-column label="操作" width="240">
+						<template slot-scope="scope">
+							<div class="hui-table-operation">
+								<span class="table-operation" @click="lookFlow(scope.row)">
+									详情
+								</span>
+								<span class="table-operation" @click="insertDepartment(scope.row)">
+									添加子部门
+								</span>
+								<span class="table-operation" @click="updateDepartment(scope.row)">
+									编辑
+								</span>
+								<span class="table-operation" @click="deleteDepartment(scope.row)">
+									删除
+								</span>
+							</div>
+						</template>
+					</el-table-column>
+					<template slot="empty">
+						<empty description="暂无数据"></empty>
+					</template>
+				</el-table>
+			</div>
+		</div>
+		<el-dialog :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
+			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :part="part">
+			</edit>
+		</el-dialog>
+		<el-drawer title="部门详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detail="part"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import {
+		getPartList,
+		deleteDepartment
+	} from '@/httpApi/organization'
+	import edit from '@/components/work/organization/depart/edit'
+	import detail from '@/components/work/organization/depart/detail'
+	import avatar from '@/components/common/avatar'
+	export default {
+		data() {
+			return {
+				treeData: [],
+				visible: false,
+				isUpdate: false,
+				part: {},
+				drawer: false
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				getPartList(this.$store.getters.organization.id, this.$store.getters.project.id).then(res => {
+					if (res.state) {
+						this.treeData = res.data;
+					}
+				})
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			insertDepartment(val) {
+				this.part = JSON.parse(JSON.stringify(val));
+				this.visible = true;
+				this.isUpdate = false;
+			},
+			lookFlow(val) {
+				this.part = JSON.parse(JSON.stringify(val));
+				this.drawer = true;
+			},
+			updateDepartment(val) {
+				this.part = JSON.parse(JSON.stringify(val));
+				this.isUpdate = true;
+				this.visible = true;
+			},
+			deleteDepartment(val) {
+				this.$confirm('确定要删除该部门?', () => {
+					deleteDepartment(val.id).then(res => {
+						if (res.state) {
+							this.$message.success('操作成功');
+							this.init();
+						}
+					})
+				});
+			},
+			callback(type) {
+				this.visible = false;
+				if (type === 'init') this.init();
+			}
+		},
+		components: {
+			edit,
+			avatar,
+			detail
+		},
+	}
+</script>
+
+<style lang="scss">
+</style>

+ 177 - 0
virgo.wzfrontend/console/src/views/work/organization/manager.vue

@@ -0,0 +1,177 @@
+<template>
+	<div class="hui-flex hui-content">
+		<div class="hui-content-title">
+			<div class="hui-title-item active">公司管理</div>
+		</div>
+		<div class="hui-flex-box">
+			<div class="manager-index hui-flex hui-table">
+				<div class="hui-content-insert" style="text-align: right;">
+					<el-button type="primary" size="medium" @click="visible = true">修改</el-button>
+				</div>
+				<div class="hui-flex-box">
+					<div class="manager-content">
+						<div class="manager-title">
+							<div class="manager-logo">
+								<el-image v-if="logoUrl" :src="logoUrl" fit="cover"></el-image>
+								<div class="el-image" v-else>
+									<div class="image-slot"><i class="el-icon-picture-outline"></i></div>
+								</div>
+							</div>
+							<div class="manager-name">{{organization.name}}</div>
+						</div>
+						<div class="manager-box">
+							<div class="manager-item">
+								<div class="manager-label">公司代码</div>
+								<div class="manager-value">{{organization.organizationCode}}</div>
+							</div>
+							<div class="manager-item">
+								<div class="manager-label">联系人</div>
+								<div class="manager-value">{{organization.contact}}</div>
+							</div>
+							<div class="manager-item">
+								<div class="manager-label">公司地址</div>
+								<div class="manager-value">{{address}}</div>
+							</div>
+							<div class="manager-item">
+								<div class="manager-label">联系方式</div>
+								<div class="manager-value">{{organization.contactTel}}</div>
+							</div>
+							<div class="manager-item" style="width: 100%;">
+								<div class="manager-label">附件</div>
+								<div class="manager-value">
+									<upload
+										:list="organization.businessLicense ? JSON.parse(organization.businessLicense):[]">
+									</upload>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+		<el-dialog title="编辑" :visible.sync="visible" width="900px" :append-to-body="true">
+			<edit v-if="visible" @callback="callback"></edit>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import upload from '@/components/common/upload'
+	import edit from '@/components/work/organization/manager/edit'
+	export default {
+		data() {
+			return {
+				organization: {},
+				logoUrl: '',
+				address: '',
+				visible: false
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				this.organization = this.$store.getters.organization;
+				if (this.organization.address) {
+					let address = JSON.parse(this.organization.address);
+					this.address = address.join('-') + '-' + this.organization.detailAddress;
+				}
+				let logo = !this.organization.logo ? {} : JSON.parse(this.organization.logo);
+				this.logoUrl = logo.url;
+
+			},
+			callback(type) {
+				this.visible = false;
+				if (type === 'init') this.init();
+			}
+		},
+		components: {
+			upload,
+			edit
+		},
+	}
+</script>
+
+<style lang="scss">
+	.manager-index {
+		width: 70%;
+		max-width: 1200px;
+		margin: 0 auto;
+
+		.manager-update {
+			padding: 12px 0;
+			text-align: right;
+		}
+
+		.manager-content {
+			background: #232A37;
+			border-radius: 2px;
+			height: auto;
+		}
+
+		.manager-title {
+			display: flex;
+			align-items: center;
+			padding: 32px;
+			position: relative;
+		}
+
+		.manager-title::before {
+			content: '';
+			position: absolute;
+			left: 32px;
+			right: 32px;
+			bottom: 0;
+			height: 1px;
+			background-color: $--color-border;
+		}
+
+		.manager-logo {
+			width: 48px;
+			height: 48px;
+			border-radius: 4px;
+			overflow: hidden;
+			margin-right: 18px;
+			border: 1px solid $--color-border;
+
+			.el-image {
+				width: 100%;
+				height: 100%;
+
+				.image-slot {
+					background: $--color-background;
+					width: 100%;
+					height: 100%;
+					text-align: center;
+					line-height: 48px;
+				}
+			}
+		}
+
+		.manager-name {
+			font-size: 18px;
+		}
+
+		.manager-box {
+			padding: 32px 32px 16px 32px;
+			display: flex;
+			flex-wrap: wrap;
+
+			.manager-item {
+				width: 50%;
+				margin-bottom: 32px;
+
+				.manager-label {
+					opacity: 0.6;
+					line-height: 20px;
+					margin-bottom: 8px;
+				}
+
+				.manager-value {
+					line-height: 20px;
+				}
+			}
+		}
+	}
+</style>

+ 254 - 0
virgo.wzfrontend/console/src/views/work/organization/user.vue

@@ -0,0 +1,254 @@
+<template>
+	<div class="hui-flex hui-content work-user">
+		<div class="hui-content-title">
+			<div class="hui-title-item active">成员管理</div>
+		</div>
+		<div class="hui-flex-box yui-tree-box">
+			<div class="hui-left-tree">
+				<div class="hui-left-tree-title">
+					<div class="tree-logo">
+						<el-image v-if="organization.logoUrl" :src="organization.logoUrl" fit="cover"></el-image>
+						<div class="el-image" v-else>
+							<div class="image-slot"><i class="el-icon-picture-outline"></i></div>
+						</div>
+					</div>
+					<span class="hui-left-tree-sub hui-ellipsis">{{organization.name}}</span>
+				</div>
+				<div class="hui-left-tree-content">
+					<el-collapse>
+						<el-collapse-item v-for="item in treeData" :key="item.id" :name="item.id">
+							<template slot="title">
+								<div class="collapse-title" @click="changeCollapse(item)">
+									<i class="iconfont huifont-bumen"></i>
+									<span class="el-collapse-name">{{item.name}}</span>
+								</div>
+							</template>
+							<div>
+								<el-tree :data="item.children" :props="defaultProps" :expand-on-click-node="false"
+									@node-click="selectPart">
+								</el-tree>
+							</div>
+						</el-collapse-item>
+					</el-collapse>
+				</div>
+			</div>
+			<div class="hui-tree-content">
+				<div class="hui-flex hui-table">
+					<div class="hui-content-insert">
+						<el-button type="primary" size="medium" @click="insertUser" :disabled="!part.id">
+							新增成员
+						</el-button>
+					</div>
+					<div class="hui-flex-box">
+						<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="姓名">
+								<template slot-scope="scope">
+									<div class="hui-table-user">
+										<div class="hui-table-avatar">
+											<avatar :user="scope.row"></avatar>
+										</div>
+										<div>{{scope.row.name}}</div>
+									</div>
+								</template>
+							</el-table-column>
+							<el-table-column label="电话" prop="phone"></el-table-column>
+							<el-table-column label="部门">
+								<template slot-scope="scope">
+									<span>{{part.name}}</span>
+								</template>
+							</el-table-column>
+							<el-table-column label="权限">
+								<template slot-scope="scope">
+									<el-button size="small" type="primary"
+										@click="updateUser(scope.row,2,'设置权限')">设置</el-button>
+								</template>
+							</el-table-column>
+							<el-table-column label="操作" width="150">
+								<template slot-scope="scope">
+									<div class="hui-table-operation">
+										<span class="table-operation" @click="lookUser(scope.row)">
+											详情
+										</span>
+										<span class="table-operation" v-if="!scope.row.projectFlowId"
+											@click="updateUser(scope.row,3,'修改用户')">
+											编辑
+										</span>
+										<span class="table-operation" v-if="!scope.row.projectFlowId"
+											@click="deleteUser(scope.row)">
+											删除
+										</span>
+									</div>
+								</template>
+							</el-table-column>
+							<template slot="empty">
+								<empty description="当前部门没有直属成员"></empty>
+							</template>
+						</el-table>
+					</div>
+				</div>
+			</div>
+		</div>
+		<!-- <el-dialog :title="title" :visible.sync="visible" width="900px" :append-to-body="true">
+			<user-form v-if="visible && type === 1" :part="part" @callback="callback"></user-form>
+			<role v-if="visible && type === 2" :user="user" @callback="callback"></role>
+			<info-form v-if="visible && type === 3" :user="user" @callback="callback"></info-form>
+		</el-dialog>
+		<el-drawer title="用户详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<user-detail v-if="drawer" :user="user"></user-detail>
+		</el-drawer> -->
+	</div>
+</template>
+
+<script>
+	import {
+		getPartList,
+		getUserListByPart,
+		// deleteUser
+	} from '@/httpApi/organization'
+	import avatar from '@/components/common/avatar'
+	// import role from '@/components/work/organization/user/role'
+	// import detail from '@/components/work/organization/user/detail'
+	// import edit from '@/components/work/organization/user/edit'
+	// import infoForm from '@/components/work/organization/user/infoForm'
+	export default {
+		data() {
+			return {
+				treeData: [],
+				organization: {},
+				project: {},
+				tableData: [],
+				defaultProps: {
+					children: 'children',
+					label: 'name'
+				},
+				part: {},
+				visible: false,
+				user: {},
+				drawer: false,
+				type: 1,
+				title: '',
+				oldCollapse: []
+			}
+		},
+		created() {
+			this.organization = this.$store.getters.organization;
+			this.project = this.$store.getters.project;
+			let logo = !this.organization.logo ? {} : JSON.parse(this.organization.logo);
+			this.organization['logoUrl'] = logo.url;
+			this.init()
+		},
+		methods: {
+			init() {
+				getPartList(this.organization.id, this.project.id).then(res => {
+					if (res.state) {
+						this.treeData = res.data;
+					}
+				})
+			},
+			changeCollapse(part) {
+				setTimeout(() => {
+					this.selectPart(part)
+				}, 300)
+			},
+			selectPart(part) {
+				this.part = part;
+				getUserListByPart({
+					projectId: this.project.id,
+					organizationId: this.organization.id,
+					partId: part.id
+				}).then(
+					res => {
+						if (res.state) {
+							this.tableData = res.data;
+						}
+					})
+			},
+			insertUser() {
+				this.type = 1;
+				this.title = '新增成员';
+				this.visible = true;
+			},
+			updateUser(user, type, title) {
+				this.user = user;
+				this.type = type;
+				this.title = title;
+				this.visible = true;
+			},
+			lookUser(user) {
+				this.user = user;
+				this.user['partName'] = this.part.name;
+				this.drawer = true;
+			},
+			deleteUser(user) {
+				this.$confirm('确定要删除该员工?', () => {
+					deleteUser(this.organization.id, this.project.id, this.part.id,
+						user.id).then(res => {
+						if (res.state) {
+							this.selectPart(this.part);
+							this.$message.success('操作成功');
+						}
+					})
+				});
+			},
+			callback(type) {
+				this.visible = false;
+				if (type === 'init') this.selectPart(this.part);
+			}
+		},
+		components: {
+			avatar,
+			// role,
+			// userDetail,
+			// userForm,
+			// infoForm
+		}
+	}
+</script>
+
+<style lang="scss">
+	.work-user {
+		.yui-tree-box {
+			background: transparent;
+
+			.hui-left-tree {
+				border-right: 1px solid $--color-border;
+			}
+
+			.hui-tree-content {
+				padding: 0;
+			}
+		}
+
+		.hui-left-tree-title {
+			.tree-logo {
+				width: 24px;
+				height: 24px;
+				border-radius: 4px;
+				overflow: hidden;
+
+
+				.el-image {
+					width: 100%;
+					height: 100%;
+
+					.image-slot {
+						background: $--color-background;
+						width: 100%;
+						height: 100%;
+						text-align: center;
+						line-height: 24px;
+					}
+				}
+			}
+
+			.hui-left-tree-sub {
+				font-weight: 400;
+			}
+		}
+	}
+</style>

+ 124 - 0
virgo.wzfrontend/console/src/views/work/space/housing.vue

@@ -0,0 +1,124 @@
+<template>
+	<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-content-insert">
+				<el-button type="primary" size="medium" @click="insertHouse">新增房源</el-button>
+			</div>
+			<div class="hui-flex-box">
+				<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="操作" width="150">
+						<template slot-scope="scope">
+							<div class="hui-table-operation">
+								<span class="table-operation" @click="lookHouse(scope.row)">详情</span>
+								<span class="table-operation" @click="updateHouse(scope.row)">编辑</span>
+								<span class="table-operation" @click="deleteHouse(scope.row)">删除</span>
+							</div>
+						</template>
+					</el-table-column>
+					<template slot="empty">
+						<empty description="暂无数据"></empty>
+					</template>
+				</el-table>
+			</div>
+			<div class="hui-content-pagination">
+				<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+					@current-change="currentChange">
+				</el-pagination>
+			</div>
+		</div>
+		<el-dialog :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
+			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId"></edit>
+		</el-dialog>
+		<el-drawer title="房源详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detailId="detailId"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import {
+		getHouseListByPage,
+		deleteProjectById
+	} from '@/httpApi/space'
+	import edit from '@/components/work/space/house/edit'
+	import detail from '@/components/work/space/house/detail'
+	export default {
+		data() {
+			return {
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				visible: false,
+				detailId: '',
+				isUpdate: false,
+				drawer: false
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				getHouseListByPage({
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					projectId: this.$store.getters.project.id
+				}).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+					}
+				})
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			insertHouse() {
+				this.isUpdate = false;
+				this.visible = true;
+			},
+			updateHouse(val) {
+				this.detailId = val.id;
+				this.isUpdate = true;
+				this.visible = true;
+			},
+			lookHouse(val) {
+				this.detailId = val.id;
+				this.drawer = true;
+			},
+			deleteHouse(val) {
+				this.$confirm('确定要删除该房源?', () => {
+					deleteProjectById(val.id).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功');
+						}
+					})
+				});
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.visible = false;
+			}
+		},
+		components: {
+			edit,
+			detail
+		},
+	}
+</script>
+
+<style>
+</style>

+ 148 - 148
virgo.wzfrontend/console/src/views/work/space/project/list.vue

@@ -1,149 +1,149 @@
-<template>
-	<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-content-insert">
-				<el-button type="primary" size="medium" @click="insertProject">新增项目</el-button>
-			</div>
-			<div class="hui-flex-box">
-				<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="操作" width="150">
-						<template slot-scope="scope">
-							<div class="hui-table-operation">
-								<span class="table-operation" @click="lookProject(scope.row)">详情</span>
-								<span class="table-operation" @click="updateProject(scope.row)">编辑</span>
-								<span class="table-operation" @click="deleteProject(scope.row)">删除</span>
-							</div>
-						</template>
-					</el-table-column>
-					<template slot="empty">
-						<empty description="暂无数据"></empty>
-					</template>
-				</el-table>
-			</div>
-			<div class="hui-content-pagination">
-				<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
-					@current-change="currentChange">
-				</el-pagination>
-			</div>
-		</div>
-		<el-dialog :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
-			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId"></edit>
-		</el-dialog>
-		<el-drawer title="项目详情" :visible.sync="drawer" :size="400" :append-to-body="true">
-			<detail v-if="drawer" :detailId="detailId"></detail>
-		</el-drawer>
-	</div>
-</template>
-
-<script>
-	import {
-		getProjectListByPage,
-		deleteProjectById
-	} from '@/httpApi/work'
-	import edit from '@/components/work/space/project/edit'
-	import detail from '@/components/work/space/project/detail'
-	import {
-		selectProject
-	} from '@/httpApi/loginRegister'
-	import {
-		setComment
-	} from '@/uitls/auth';
-	export default {
-		data() {
-			return {
-				tableData: [],
-				currPage: 1,
-				pageSize: 10,
-				totalCount: 0,
-				visible: false,
-				detailId: '',
-				isUpdate: false,
-				drawer: false
-			}
-		},
-		created() {
-			this.init();
-		},
-		methods: {
-			init() {
-				getProjectListByPage({
-					currPage: this.currPage,
-					pageSize: this.pageSize,
-					operateOrganizationId: this.$store.getters.organization.id
-				}).then(res => {
-					if (res.state) {
-						this.tableData = res.data.dataList;
-						this.totalCount = res.data.totalCount;
-						if (this.$store.getters.project.id) return;
-						this.changeProject(this.tableData[0]);
-					}
-				})
-			},
-			changeProject(data) {
-				if (!data) return;
-				data.projectItemList = data.projectItemList || [];
-				data.projectItemList.sort((a, b) => {
-					return a.id - b.id;
-				});
-				selectProject(data.id).then(res => {
-					if (res.state) {
-						let user = res.data;
-						localStorage.setItem('projectId', data.id);
-						this.$store.dispatch('app/changeUser', user);
-						this.$store.dispatch('app/changeMenuData', user.resource ? JSON.parse(user.resource) : []);
-						setComment(user.menu ? user.menu : JSON.stringify([]));
-						this.$store.dispatch('projectBase/changeProject', data);
-					}
-				});
-			},
-			currentChange(currPage) {
-				this.currPage = currPage;
-				this.init();
-			},
-			insertProject() {
-				this.isUpdate = false;
-				this.visible = true;
-			},
-			updateProject(val) {
-				this.detailId = val.id;
-				this.isUpdate = true;
-				this.visible = true;
-			},
-			lookProject(val) {
-				this.detailId = val.id;
-				this.drawer = true;
-			},
-			deleteProject(val) {
-				if (this.$store.getters.project.id === val.id) return this.$message.warning('不能删除当前项目,请切换项目后删除');
-				this.$confirm('确定要删除该项目?', () => {
-					deleteProjectById(val.id).then(res => {
-						if (res.state) {
-							this.init();
-							this.$message.success('操作成功');
-						}
-					})
-				});
-			},
-			callback(type) {
-				if (type === 'init') this.init();
-				this.visible = false;
-			}
-		},
-		components: {
-			edit,
-			detail
-		},
-	}
-</script>
-
+<template>
+	<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-content-insert">
+				<el-button type="primary" size="medium" @click="insertProject">新增项目</el-button>
+			</div>
+			<div class="hui-flex-box">
+				<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="操作" width="150">
+						<template slot-scope="scope">
+							<div class="hui-table-operation">
+								<span class="table-operation" @click="lookProject(scope.row)">详情</span>
+								<span class="table-operation" @click="updateProject(scope.row)">编辑</span>
+								<span class="table-operation" @click="deleteProject(scope.row)">删除</span>
+							</div>
+						</template>
+					</el-table-column>
+					<template slot="empty">
+						<empty description="暂无数据"></empty>
+					</template>
+				</el-table>
+			</div>
+			<div class="hui-content-pagination">
+				<el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
+					@current-change="currentChange">
+				</el-pagination>
+			</div>
+		</div>
+		<el-dialog :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
+			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId"></edit>
+		</el-dialog>
+		<el-drawer title="项目详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detailId="detailId"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import {
+		getProjectListByPage,
+		deleteProjectById
+	} from '@/httpApi/space'
+	import edit from '@/components/work/space/project/edit'
+	import detail from '@/components/work/space/project/detail'
+	import {
+		selectProject
+	} from '@/httpApi/loginRegister'
+	import {
+		setComment
+	} from '@/uitls/auth';
+	export default {
+		data() {
+			return {
+				tableData: [],
+				currPage: 1,
+				pageSize: 10,
+				totalCount: 0,
+				visible: false,
+				detailId: '',
+				isUpdate: false,
+				drawer: false
+			}
+		},
+		created() {
+			this.init();
+		},
+		methods: {
+			init() {
+				getProjectListByPage({
+					currPage: this.currPage,
+					pageSize: this.pageSize,
+					operateOrganizationId: this.$store.getters.organization.id
+				}).then(res => {
+					if (res.state) {
+						this.tableData = res.data.dataList;
+						this.totalCount = res.data.totalCount;
+						if (this.$store.getters.project.id) return;
+						this.changeProject(this.tableData[0]);
+					}
+				})
+			},
+			changeProject(data) {
+				if (!data) return;
+				data.projectItemList = data.projectItemList || [];
+				data.projectItemList.sort((a, b) => {
+					return a.id - b.id;
+				});
+				selectProject(data.id).then(res => {
+					if (res.state) {
+						let user = res.data;
+						localStorage.setItem('projectId', data.id);
+						this.$store.dispatch('app/changeUser', user);
+						this.$store.dispatch('app/changeMenuData', user.resource ? JSON.parse(user.resource) : []);
+						setComment(user.menu ? user.menu : JSON.stringify([]));
+						this.$store.dispatch('projectBase/changeProject', data);
+					}
+				});
+			},
+			currentChange(currPage) {
+				this.currPage = currPage;
+				this.init();
+			},
+			insertProject() {
+				this.isUpdate = false;
+				this.visible = true;
+			},
+			updateProject(val) {
+				this.detailId = val.id;
+				this.isUpdate = true;
+				this.visible = true;
+			},
+			lookProject(val) {
+				this.detailId = val.id;
+				this.drawer = true;
+			},
+			deleteProject(val) {
+				if (this.$store.getters.project.id === val.id) return this.$message.warning('不能删除当前项目,请切换项目后删除');
+				this.$confirm('确定要删除该项目?', () => {
+					deleteProjectById(val.id).then(res => {
+						if (res.state) {
+							this.init();
+							this.$message.success('操作成功');
+						}
+					})
+				});
+			},
+			callback(type) {
+				if (type === 'init') this.init();
+				this.visible = false;
+			}
+		},
+		components: {
+			edit,
+			detail
+		},
+	}
+</script>
+
 <style lang="scss"></style>

+ 451 - 451
virgo.wzfrontend/console/src/views/work/space/set/list.vue

@@ -1,452 +1,452 @@
-<template>
-	<div class="space-index">
-		<div class="space-null" v-if="projectItemList.length ==0">
-			<img :src="nullImage" alt="" />
-			<div class="space-null-text">您还未添加楼宇信息,可新增楼宇,开启您的空间设置吧!</div>
-			<div class="flow-button">
-				<el-button size="medium" type="primary" @click="insert('projectItem')">
-					<i class="iconfont huifont-xinzeng"></i>新增楼宇
-				</el-button>
-			</div>
-		</div>
-		<div class="space-content" v-else>
-			<div class="space-content-item">
-				<div class="space-title">
-					<div class="space-title-label">楼宇</div>
-					<el-button size="medium" type="primary" @click="insert('projectItem')">
-						<i class="iconfont huifont-xinzeng"></i>新增
-					</el-button>
-				</div>
-				<div class="space-content-box">
-					<div class="space-room-list">
-						<el-row :gutter="10">
-							<el-col :span="12" v-for="item in projectItemList" :key="item.id">
-								<div :class="projectItem.id === item.id?'space-room-item active' : 'space-room-item'"
-									@click="selectTarget(item)">
-									<div class="space-room-image">
-										<img :src="returnImage(item)" alt="" />
-									</div>
-									<div class="space-room-text">
-										<div class="space-room-label">{{item.name}}</div>
-										<div class="space-room-sub">{{item.remark}}</div>
-									</div>
-									<div class="space-room-icon">
-										<el-dropdown trigger="click"
-											@command="command=>commandFunc(command,item,'projectItem')">
-											<div class="target-item-icon">
-												<i class="iconfont huifont-jinhangzhong"></i>
-											</div>
-											<el-dropdown-menu slot="dropdown">
-												<el-dropdown-item command="detail">详情</el-dropdown-item>
-												<el-dropdown-item command="update">编辑</el-dropdown-item>
-												<el-dropdown-item command="delete">删除</el-dropdown-item>
-											</el-dropdown-menu>
-										</el-dropdown>
-									</div>
-								</div>
-							</el-col>
-						</el-row>
-					</div>
-				</div>
-			</div>
-			<div class="space-line"></div>
-			<div class="space-content-item">
-				<div class="space-title">
-					<div class="space-title-label">楼层</div>
-					<el-button size="medium" type="primary" @click="insert('projectItemTarget')">
-						<i class="iconfont huifont-xinzeng"></i>新增
-					</el-button>
-				</div>
-				<div class="space-content-box">
-					<div class="space-undefined" v-if="projectItemTargetList.length === 0">
-						<img :src="undefinedImage" alt="" />
-						<div class="space-undefined-text">暂无数据</div>
-					</div>
-					<el-row class="project-item-traget" :gutter="10" v-else>
-						<el-col :span="8" v-for="(target,index) in projectItemTargetList" :key="target.id">
-							<div class="target-item">
-								<div class="target-item-num">
-									<i class="iconfont huifont-louceng"></i>
-								</div>
-								<div class="target-item-label">{{target.name}}</div>
-								<el-dropdown trigger="click"
-									@command="command=>commandFunc(command,target,'projectItemTarget')">
-									<div class="target-item-icon">
-										<i class="iconfont huifont-jinhangzhong"></i>
-									</div>
-									<el-dropdown-menu slot="dropdown">
-										<el-dropdown-item command="update">编辑</el-dropdown-item>
-										<el-dropdown-item command="delete">删除</el-dropdown-item>
-									</el-dropdown-menu>
-								</el-dropdown>
-							</div>
-						</el-col>
-					</el-row>
-				</div>
-			</div>
-		</div>
-		<el-dialog :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
-			<project-item-form v-if="visible && type === 'projectItem'" @callback="callback" :isUpdate="isUpdate"
-				:detailId="itemId">
-			</project-item-form>
-			<project-item-target-form v-if="visible && type === 'projectItemTarget'" @callback="callback"
-				:isUpdate="isUpdate" :detailId="itemId" :projectItemId="projectItem.id">
-			</project-item-target-form>
-		</el-dialog>
-		<el-drawer title="楼宇详情" :visible.sync="drawer" :size="400" :append-to-body="true">
-			<project-item-detail v-if="drawer" :detailId="itemId"></project-item-detail>
-		</el-drawer>
-	</div>
-</template>
-
-<script>
-	import {
-		getProjectTreeList,
-		getProjectItemList,
-		deleteProjectItemById,
-		deleteProjectItemTarget,
-		deleteRoom
-	} from '@/httpApi/work';
-	import projectItemForm from '@/components/work/space/set/projectItemForm'
-	import projectItemDetail from '@/components/work/space/set/projectItemDetail'
-	import projectItemTargetForm from '@/components/work/space/set/projectItemTargetForm'
-	export default {
-		data() {
-			return {
-				nullImage: require('../../../../assets/image/common/dataNull.png'),
-				undefinedImage: require('../../../../assets/image/common/dataUndefined.png'),
-				projectItemList: [],
-				projectItemTargetList: [],
-				visible: false,
-				itemId: '',
-				isUpdate: false,
-				projectItem: {},
-				projectItemTarget: {},
-				drawer: false
-			}
-		},
-		created() {
-			this.getProjectItemList();
-		},
-		methods: {
-			getProjectItemList() {
-				getProjectTreeList(this.$store.getters.project.id).then(res => {
-					if (res.state) {
-						this.projectItemList = res.data.projectItemList || [];
-						if (this.projectItemList.length === 0) return;
-						if (this.projectItem.id) {
-							let item = this.projectItemList.filter(node => node.id === this.projectItem.id);
-							if (item.length === 0) return this.selectTarget(this.projectItemList[0]);
-							this.selectTarget(item[0]);
-						} else {
-							this.selectTarget(this.projectItemList[0]);
-						}
-					}
-				})
-			},
-			insert(type, projectItemId) {
-				this.type = type;
-				this.isUpdate = false;
-				this.visible = true;
-			},
-			selectTarget(item) {
-				this.projectItem = item;
-				this.projectItemTargetList = item.projectItemTargetList;
-			},
-			commandFunc(operationType, item, type) {
-				this.type = type;
-				this.itemId = item.id;
-				this[operationType]();
-			},
-			update() {
-				this.isUpdate = true;
-				this.visible = true;
-			},
-			detail() {
-				this.drawer = true;
-			},
-			delete() {
-				if (this.type === 'projectItem') {
-					this.$confirm('确定要删除该楼宇?', () => {
-						deleteProjectItemById(this.itemId).then(this.successFunc);
-					});
-				}
-				if (this.type === 'projectItemTarget') {
-					this.$confirm('确定要删除该楼层?', () => {
-						deleteProjectItemTarget(this.itemId).then(this.successFunc);
-					});
-				}
-			},
-			successFunc(res) {
-				if (res.state) {
-					this.getProjectItemList();
-					this.$message.success('操作成功');
-				}
-			},
-			returnImage(item) {
-				let imgUrl = 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/1da893e7d4264dc68ef43e00d5a708e9'
-				if (item.picture) {
-					let picture = JSON.parse(item.picture);
-					if (picture.length > 0) imgUrl = picture[0].url;
-				}
-				return imgUrl;
-			},
-			callback(type) {
-				this.visible = false;
-				if (type === 'init') this.getProjectItemList();
-			}
-		},
-		components: {
-			projectItemForm,
-			projectItemDetail,
-			projectItemTargetForm,
-		},
-	}
-</script>
-
-<style lang="scss">
-	.space-index {
-		width: 100%;
-		height: 100%;
-
-		.space-null {
-			width: 100%;
-			height: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			flex-direction: column;
-
-			img {
-				width: 420px;
-			}
-
-			.space-null-text {
-				padding: 30px 0 20px 0;
-			}
-
-			.el-button {
-				padding-left: 12px;
-
-				span {
-					display: flex;
-					align-items: center;
-				}
-
-				.huifont-xinzeng {
-					padding-right: 10px;
-				}
-			}
-		}
-
-		.space-undefined {
-			width: 100%;
-			height: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			flex-direction: column;
-
-			img {
-				width: 160px;
-			}
-
-			.space-undefined-text {
-				margin-top: 20px;
-				opacity: 0.6;
-			}
-		}
-
-		.space-content {
-			width: 100%;
-			height: 100%;
-			display: flex;
-
-			.space-title {
-				display: flex;
-				justify-content: space-between;
-				padding: 15px 20px;
-				align-items: center;
-
-				.space-title-label {
-					font-size: 16px;
-				}
-
-				.el-button {
-					padding: 8px 16px;
-				}
-			}
-
-			.space-line {
-				background: $--background;
-				width: 12px;
-				height: 100%;
-			}
-
-			.space-content-box {
-				flex: 1;
-				padding: 0 20px 15px 20px;
-				height: 0;
-				overflow-y: auto;
-
-				.space-project-item {
-					background: #242a36;
-					margin-bottom: 20px;
-					border-radius: 2px;
-				}
-			}
-
-			.space-content-item {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-			}
-
-			.project-item-title {
-				height: 56px;
-				display: flex;
-				justify-content: space-between;
-				padding: 0 20px;
-				align-items: center;
-				border-bottom: 1px solid $--color-border;
-			}
-
-			.project-item-traget {
-				.target-item {
-					width: 100%;
-					background: #232A37;
-					padding: 15px;
-					border-radius: 8px;
-					display: flex;
-					align-items: center;
-					box-sizing: border-box;
-					box-sizing: border-box;
-					border: 1px solid #1f242f;
-				}
-
-				.target-item-insert {
-					width: 100%;
-					height: 70px;
-					border: 1px dashed $--color-border;
-					border-radius: 8px;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					cursor: pointer;
-
-					.huifont-xinzeng {
-						margin-right: 5px;
-					}
-				}
-
-				.target-item-insert:hover {
-					border-color: $--color-primary;
-					color: $--color-primary;
-
-					.huifont-xinzeng {
-						color: $--color-primary;
-					}
-				}
-
-				.target-item-num {
-					width: 38px;
-					height: 38px;
-					text-align: center;
-					line-height: 38px;
-					background: #31353f;
-					border-radius: 10px;
-					margin-right: 10px;
-
-					.iconfont {
-						font-size: 20px;
-					}
-				}
-
-				.target-item-label {
-					flex: 1;
-					width: 0;
-					overflow: hidden;
-				}
-			}
-
-			.target-item-icon {
-				transform: rotate(90deg);
-				cursor: pointer;
-
-				.huifont-jinhangzhong {
-					font-size: 20px;
-					color: $--color-common;
-				}
-			}
-
-			.el-col {
-				padding-top: 5px;
-				padding-bottom: 5px;
-			}
-
-			.space-room-list {
-				.space-room-image {
-					img {
-						width: 80px;
-						height: 80px;
-						object-fit: fill;
-						border-radius: 8px;
-					}
-
-					margin-right: 10px;
-				}
-
-				.space-room-item {
-					display: flex;
-					align-items: center;
-					padding: 0 15px;
-					height: 110px;
-					background: #232A37;
-					border-radius: 8px;
-					position: relative;
-					cursor: pointer;
-					border: 1px solid #1f242f;
-
-					.space-room-icon {
-						position: absolute;
-						top: 12px;
-						right: 12px;
-					}
-
-					.space-room-num {
-						width: 48px;
-						height: 48px;
-						background: rgba(255, 255, 255, 0.08);
-						border-radius: 10px;
-						margin-right: 12px;
-						text-align: center;
-						line-height: 48px;
-						font-size: 18px;
-					}
-
-					.space-room-text {
-						flex: 1;
-						width: 0;
-
-						.space-room-label {
-							font-size: 18px;
-							font-weight: 500;
-							margin-bottom: 4px;
-						}
-
-						.space-room-sub {
-							font-size: 12px;
-							opacity: 0.6;
-						}
-					}
-				}
-
-				.space-room-item.active,
-				.space-room-item:hover {
-					border-color: $--color-primary;
-					box-shadow: -1px -1px 10px 1px rgba(51, 133, 255, 0.2) inset;
-				}
-			}
-		}
-	}
+<template>
+	<div class="space-index">
+		<div class="space-null" v-if="projectItemList.length ==0">
+			<img :src="nullImage" alt="" />
+			<div class="space-null-text">您还未添加楼宇信息,可新增楼宇,开启您的空间设置吧!</div>
+			<div class="flow-button">
+				<el-button size="medium" type="primary" @click="insert('projectItem')">
+					<i class="iconfont huifont-xinzeng"></i>新增楼宇
+				</el-button>
+			</div>
+		</div>
+		<div class="space-content" v-else>
+			<div class="space-content-item">
+				<div class="space-title">
+					<div class="space-title-label">楼宇</div>
+					<el-button size="medium" type="primary" @click="insert('projectItem')">
+						<i class="iconfont huifont-xinzeng"></i>新增
+					</el-button>
+				</div>
+				<div class="space-content-box">
+					<div class="space-room-list">
+						<el-row :gutter="10">
+							<el-col :span="12" v-for="item in projectItemList" :key="item.id">
+								<div :class="projectItem.id === item.id?'space-room-item active' : 'space-room-item'"
+									@click="selectTarget(item)">
+									<div class="space-room-image">
+										<img :src="returnImage(item)" alt="" />
+									</div>
+									<div class="space-room-text">
+										<div class="space-room-label">{{item.name}}</div>
+										<div class="space-room-sub">{{item.remark}}</div>
+									</div>
+									<div class="space-room-icon">
+										<el-dropdown trigger="click"
+											@command="command=>commandFunc(command,item,'projectItem')">
+											<div class="target-item-icon">
+												<i class="iconfont huifont-jinhangzhong"></i>
+											</div>
+											<el-dropdown-menu slot="dropdown">
+												<el-dropdown-item command="detail">详情</el-dropdown-item>
+												<el-dropdown-item command="update">编辑</el-dropdown-item>
+												<el-dropdown-item command="delete">删除</el-dropdown-item>
+											</el-dropdown-menu>
+										</el-dropdown>
+									</div>
+								</div>
+							</el-col>
+						</el-row>
+					</div>
+				</div>
+			</div>
+			<div class="space-line"></div>
+			<div class="space-content-item">
+				<div class="space-title">
+					<div class="space-title-label">楼层</div>
+					<el-button size="medium" type="primary" @click="insert('projectItemTarget')">
+						<i class="iconfont huifont-xinzeng"></i>新增
+					</el-button>
+				</div>
+				<div class="space-content-box">
+					<div class="space-undefined" v-if="projectItemTargetList.length === 0">
+						<img :src="undefinedImage" alt="" />
+						<div class="space-undefined-text">暂无数据</div>
+					</div>
+					<el-row class="project-item-traget" :gutter="10" v-else>
+						<el-col :span="8" v-for="(target,index) in projectItemTargetList" :key="target.id">
+							<div class="target-item">
+								<div class="target-item-num">
+									<i class="iconfont huifont-louceng"></i>
+								</div>
+								<div class="target-item-label">{{target.name}}</div>
+								<el-dropdown trigger="click"
+									@command="command=>commandFunc(command,target,'projectItemTarget')">
+									<div class="target-item-icon">
+										<i class="iconfont huifont-jinhangzhong"></i>
+									</div>
+									<el-dropdown-menu slot="dropdown">
+										<el-dropdown-item command="update">编辑</el-dropdown-item>
+										<el-dropdown-item command="delete">删除</el-dropdown-item>
+									</el-dropdown-menu>
+								</el-dropdown>
+							</div>
+						</el-col>
+					</el-row>
+				</div>
+			</div>
+		</div>
+		<el-dialog :title="isUpdate?'编辑':'新增'" :visible.sync="visible" width="900px" :append-to-body="true">
+			<project-item-form v-if="visible && type === 'projectItem'" @callback="callback" :isUpdate="isUpdate"
+				:detailId="itemId">
+			</project-item-form>
+			<project-item-target-form v-if="visible && type === 'projectItemTarget'" @callback="callback"
+				:isUpdate="isUpdate" :detailId="itemId" :projectItemId="projectItem.id">
+			</project-item-target-form>
+		</el-dialog>
+		<el-drawer title="楼宇详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<project-item-detail v-if="drawer" :detailId="itemId"></project-item-detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import {
+		getProjectDetailById,
+		getProjectItemList,
+		deleteProjectItemById,
+		deleteProjectItemTarget,
+		deleteRoom
+	} from '@/httpApi/space';
+	import projectItemForm from '@/components/work/space/set/projectItemForm'
+	import projectItemDetail from '@/components/work/space/set/projectItemDetail'
+	import projectItemTargetForm from '@/components/work/space/set/projectItemTargetForm'
+	export default {
+		data() {
+			return {
+				nullImage: require('../../../assets/image/common/dataNull.png'),
+				undefinedImage: require('../../../assets/image/common/dataUndefined.png'),
+				projectItemList: [],
+				projectItemTargetList: [],
+				visible: false,
+				itemId: '',
+				isUpdate: false,
+				projectItem: {},
+				projectItemTarget: {},
+				drawer: false
+			}
+		},
+		created() {
+			this.getProjectItemList();
+		},
+		methods: {
+			getProjectItemList() {
+				getProjectDetailById(this.$store.getters.project.id).then(res => {
+					if (res.state) {
+						this.projectItemList = res.data.projectItemList || [];
+						if (this.projectItemList.length === 0) return;
+						if (this.projectItem.id) {
+							let item = this.projectItemList.filter(node => node.id === this.projectItem.id);
+							if (item.length === 0) return this.selectTarget(this.projectItemList[0]);
+							this.selectTarget(item[0]);
+						} else {
+							this.selectTarget(this.projectItemList[0]);
+						}
+					}
+				})
+			},
+			insert(type, projectItemId) {
+				this.type = type;
+				this.isUpdate = false;
+				this.visible = true;
+			},
+			selectTarget(item) {
+				this.projectItem = item;
+				this.projectItemTargetList = item.projectItemTargetList;
+			},
+			commandFunc(operationType, item, type) {
+				this.type = type;
+				this.itemId = item.id;
+				this[operationType]();
+			},
+			update() {
+				this.isUpdate = true;
+				this.visible = true;
+			},
+			detail() {
+				this.drawer = true;
+			},
+			delete() {
+				if (this.type === 'projectItem') {
+					this.$confirm('确定要删除该楼宇?', () => {
+						deleteProjectItemById(this.itemId).then(this.successFunc);
+					});
+				}
+				if (this.type === 'projectItemTarget') {
+					this.$confirm('确定要删除该楼层?', () => {
+						deleteProjectItemTarget(this.itemId).then(this.successFunc);
+					});
+				}
+			},
+			successFunc(res) {
+				if (res.state) {
+					this.getProjectItemList();
+					this.$message.success('操作成功');
+				}
+			},
+			returnImage(item) {
+				let imgUrl = 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/1da893e7d4264dc68ef43e00d5a708e9'
+				if (item.picture) {
+					let picture = JSON.parse(item.picture);
+					if (picture.length > 0) imgUrl = picture[0].url;
+				}
+				return imgUrl;
+			},
+			callback(type) {
+				this.visible = false;
+				if (type === 'init') this.getProjectItemList();
+			}
+		},
+		components: {
+			projectItemForm,
+			projectItemDetail,
+			projectItemTargetForm,
+		},
+	}
+</script>
+
+<style lang="scss">
+	.space-index {
+		width: 100%;
+		height: 100%;
+
+		.space-null {
+			width: 100%;
+			height: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			img {
+				width: 420px;
+			}
+
+			.space-null-text {
+				padding: 30px 0 20px 0;
+			}
+
+			.el-button {
+				padding-left: 12px;
+
+				span {
+					display: flex;
+					align-items: center;
+				}
+
+				.huifont-xinzeng {
+					padding-right: 10px;
+				}
+			}
+		}
+
+		.space-undefined {
+			width: 100%;
+			height: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			img {
+				width: 160px;
+			}
+
+			.space-undefined-text {
+				margin-top: 20px;
+				opacity: 0.6;
+			}
+		}
+
+		.space-content {
+			width: 100%;
+			height: 100%;
+			display: flex;
+
+			.space-title {
+				display: flex;
+				justify-content: space-between;
+				padding: 15px 20px;
+				align-items: center;
+
+				.space-title-label {
+					font-size: 16px;
+				}
+
+				.el-button {
+					padding: 8px 16px;
+				}
+			}
+
+			.space-line {
+				background: $--background;
+				width: 12px;
+				height: 100%;
+			}
+
+			.space-content-box {
+				flex: 1;
+				padding: 0 20px 15px 20px;
+				height: 0;
+				overflow-y: auto;
+
+				.space-project-item {
+					background: #242a36;
+					margin-bottom: 20px;
+					border-radius: 2px;
+				}
+			}
+
+			.space-content-item {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+			}
+
+			.project-item-title {
+				height: 56px;
+				display: flex;
+				justify-content: space-between;
+				padding: 0 20px;
+				align-items: center;
+				border-bottom: 1px solid $--color-border;
+			}
+
+			.project-item-traget {
+				.target-item {
+					width: 100%;
+					background: #232A37;
+					padding: 15px;
+					border-radius: 8px;
+					display: flex;
+					align-items: center;
+					box-sizing: border-box;
+					box-sizing: border-box;
+					border: 1px solid #1f242f;
+				}
+
+				.target-item-insert {
+					width: 100%;
+					height: 70px;
+					border: 1px dashed $--color-border;
+					border-radius: 8px;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					cursor: pointer;
+
+					.huifont-xinzeng {
+						margin-right: 5px;
+					}
+				}
+
+				.target-item-insert:hover {
+					border-color: $--color-primary;
+					color: $--color-primary;
+
+					.huifont-xinzeng {
+						color: $--color-primary;
+					}
+				}
+
+				.target-item-num {
+					width: 38px;
+					height: 38px;
+					text-align: center;
+					line-height: 38px;
+					background: #31353f;
+					border-radius: 10px;
+					margin-right: 10px;
+
+					.iconfont {
+						font-size: 20px;
+					}
+				}
+
+				.target-item-label {
+					flex: 1;
+					width: 0;
+					overflow: hidden;
+				}
+			}
+
+			.target-item-icon {
+				transform: rotate(90deg);
+				cursor: pointer;
+
+				.huifont-jinhangzhong {
+					font-size: 20px;
+					color: $--color-common;
+				}
+			}
+
+			.el-col {
+				padding-top: 5px;
+				padding-bottom: 5px;
+			}
+
+			.space-room-list {
+				.space-room-image {
+					img {
+						width: 80px;
+						height: 80px;
+						object-fit: fill;
+						border-radius: 8px;
+					}
+
+					margin-right: 10px;
+				}
+
+				.space-room-item {
+					display: flex;
+					align-items: center;
+					padding: 0 15px;
+					height: 110px;
+					background: #232A37;
+					border-radius: 8px;
+					position: relative;
+					cursor: pointer;
+					border: 1px solid #1f242f;
+
+					.space-room-icon {
+						position: absolute;
+						top: 12px;
+						right: 12px;
+					}
+
+					.space-room-num {
+						width: 48px;
+						height: 48px;
+						background: rgba(255, 255, 255, 0.08);
+						border-radius: 10px;
+						margin-right: 12px;
+						text-align: center;
+						line-height: 48px;
+						font-size: 18px;
+					}
+
+					.space-room-text {
+						flex: 1;
+						width: 0;
+
+						.space-room-label {
+							font-size: 18px;
+							font-weight: 500;
+							margin-bottom: 4px;
+						}
+
+						.space-room-sub {
+							font-size: 12px;
+							opacity: 0.6;
+						}
+					}
+				}
+
+				.space-room-item.active,
+				.space-room-item:hover {
+					border-color: $--color-primary;
+					box-shadow: -1px -1px 10px 1px rgba(51, 133, 255, 0.2) inset;
+				}
+			}
+		}
+	}
 </style>