Browse Source

Merge branch 'master' of http://182.92.174.150:3000/tiegu/czo

dukai 3 years ago
parent
commit
6a8b790063

+ 27 - 0
.prettierrc.js

@@ -0,0 +1,27 @@
+module.exports = {
+    // 最大长度80个字符
+    printWidth: 240,
+    // 行末分号
+    semi: false,
+    // 单引号
+    singleQuote: true,
+    // JSX双引号
+    jsxSingleQuote: false,
+    // 尽可能使用尾随逗号(包括函数参数)
+    trailingComma: 'none',
+    // 在对象文字中打印括号之间的空格。
+    bracketSpacing: true,
+    // > 标签放在最后一行的末尾,而不是单独放在下一行
+    jsxBracketSameLine: false,
+    // 箭头圆括号
+    arrowParens: 'avoid',
+    // 在文件顶部插入一个特殊的 @format 标记,指定文件格式需要被格式化。
+    insertPragma: false,
+    // 缩进
+    tabWidth: 4,
+    // 使用tab还是空格
+    useTabs: true,
+    // 行尾换行格式
+    endOfLine: 'auto',
+    HTMLWhitespaceSensitivity: 'ignore'
+}

+ 8 - 8
src/App.vue

@@ -5,15 +5,15 @@
 </template>
 
 <script>
-	export default {
-		name: 'App',
-		metaInfo() {
-			return {
-				title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
-				titleTemplate: (title) => {
-					return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
-				}
+export default {
+	name: 'App',
+	metaInfo() {
+		return {
+			title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
+			titleTemplate: title => {
+				return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
 			}
 		}
 	}
+}
 </script>

+ 48 - 39
src/api/login.js

@@ -2,58 +2,67 @@ import request from '@/utils/request'
 
 // 登录方法
 export function login(username, password, code, uuid) {
-  const data = {
-    username,
-    password,
-    code,
-    uuid
-  }
-  return request({
-    url: '/login',
-    headers: {
-      isToken: false
-    },
-    method: 'post',
-    data: data
-  })
+	const data = {
+		username,
+		password,
+		code,
+		uuid
+	}
+	return request({
+		url: '/login',
+		headers: {
+			isToken: false
+		},
+		method: 'post',
+		data: data
+	})
 }
 
 // 注册方法
 export function register(data) {
-  return request({
-    url: '/register',
-    headers: {
-      isToken: false
-    },
-    method: 'post',
-    data: data
-  })
+	return request({
+		url: '/register',
+		headers: {
+			isToken: false
+		},
+		method: 'post',
+		data: data
+	})
 }
 
 // 获取用户详细信息
 export function getInfo() {
-  return request({
-    url: '/getInfo',
-    method: 'get'
-  })
+	return request({
+		url: '/getInfo',
+		method: 'get'
+	})
 }
 
 // 退出方法
 export function logout() {
-  return request({
-    url: '/logout',
-    method: 'post'
-  })
+	return request({
+		url: '/logout',
+		method: 'post'
+	})
 }
 
 // 获取验证码
 export function getCodeImg() {
-  return request({
-    url: '/captchaImage',
-    headers: {
-      isToken: false
-    },
-    method: 'get',
-    timeout: 20000
-  })
-}
+	return request({
+		url: '/captchaImage',
+		headers: {
+			isToken: false
+		},
+		method: 'get',
+		timeout: 20000
+	})
+}
+export function getComList() {
+	return request({
+		url: '/system/dept/companyList',
+		headers: {
+			isToken: false
+		},
+		method: 'get'
+	})
+}

+ 10 - 7
src/components/userChoice/index.vue

@@ -19,6 +19,7 @@
 			</div> -->
 		</div>
 		<span slot="footer" class="dialog-footer">
+			<el-input v-model="userName" disabled size="small" style="width: 100px; margin-right: 10px" />
 			<el-button type="primary" size="small" @click="submit">确 定</el-button>
 		</span>
 	</el-dialog>
@@ -37,7 +38,8 @@ export default {
 			userId: null, // 人员id
 			depList: [], // 公司部门树
 			postList: [], // 级别职称树
-			personList: [] // 人员列表
+			personList: [], // 人员列表
+			userName: '' //展示人名
 		}
 	},
 	components: { Treeselect },
@@ -62,7 +64,7 @@ export default {
 		},
 		//获取级别数据
 		getLevelList() {
-			getLevelTreeSelect().then((res) => {
+			getLevelTreeSelect().then(res => {
 				if (res.code == 200) {
 					this.postList = res.data
 					this.postList.unshift({ id: '0', label: '全部级别' })
@@ -81,20 +83,21 @@ export default {
 		// 人员查询
 		selectPerson() {
 			this.personList = []
-			selectListByDeptId(this.deptId, this.postId).then((res) => {
-				console.log(res)
+			selectListByDeptId(this.deptId, this.postId).then(res => {
 				this.personList = res.data
 			})
 		},
 		// 选定人员
-		selectedPerson() {},
+		selectedPerson(e) {
+			this.userName = this.personList.find(item => item.userId === e).realName
+		},
 		// 确认提交
 		submit() {
 			if (this.userId) {
 				this.$emit('selectedPerson', this.userId)
 				this.open = false
 			} else {
-				this.$notify({title: '警告', message: '请选择人员', type: 'warning'})
+				this.$notify({ title: '警告', message: '请选择人员', type: 'warning' })
 			}
 		}
 	}
@@ -103,7 +106,7 @@ export default {
 <style scoped>
 .list_item {
 	height: 200px;
-	overflow-y: scroll;
+	overflow-y: auto;
 	display: flex;
 	flex-wrap: wrap;
 	padding: 0px 10px;

+ 12 - 10
src/utils/request.js

@@ -8,7 +8,7 @@ import errorCode from '@/utils/errorCode'
 let downloadLoadingInstance
 let pending = []
 let cancelToken = axios.CancelToken
-let removePending = (config) => {
+let removePending = config => {
 	for (let p in pending) {
 		let key = +p
 		let item = pending[key]
@@ -30,9 +30,9 @@ var instance = axios.create({
 })
 
 instance.interceptors.request.use(
-	(config) => {
+	config => {
 		removePending(config)
-		config.cancelToken = new cancelToken((c) => {
+		config.cancelToken = new cancelToken(c => {
 			pending.push({
 				url: config.url,
 				method: config.method,
@@ -41,7 +41,9 @@ instance.interceptors.request.use(
 				cancel: c
 			})
 		})
-		if (getToken()) {
+		// 是否需要设置 token
+		const isToken = (config.headers || {}).isToken === false
+		if (getToken() && !isToken) {
 			config.headers['Authorization'] = 'Bearer ' + getToken()
 		}
 		// get请求映射params参数
@@ -53,13 +55,13 @@ instance.interceptors.request.use(
 		}
 		return config
 	},
-	(error) => {
+	error => {
 		return Promise.reject(error)
 	}
 )
 
 instance.interceptors.response.use(
-	(response) => {
+	response => {
 		removePending(response.config)
 		const code = response.data.code || 200
 		const message = errorCode[code] || response.data.msg || errorCode['default']
@@ -78,7 +80,7 @@ instance.interceptors.response.use(
 		}
 		return response.data
 	},
-	(error) => {
+	error => {
 		console.log(error)
 		let { message } = error
 		if (message == 'Network Error') {
@@ -124,14 +126,14 @@ export function download(url, params, filename) {
 	return instance
 		.post(url, params, {
 			transformRequest: [
-				(params) => {
+				params => {
 					return tansParams(params)
 				}
 			],
 			headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
 			responseType: 'blob'
 		})
-		.then(async (data) => {
+		.then(async data => {
 			const isLogin = await blobValidate(data)
 			if (isLogin) {
 				const blob = new Blob([data])
@@ -141,7 +143,7 @@ export function download(url, params, filename) {
 			}
 			downloadLoadingInstance.close()
 		})
-		.catch((r) => {
+		.catch(r => {
 			console.error(r)
 			notifi({ message: '下载文件出现错误,请联系管理员!', type: 'error' })
 			downloadLoadingInstance.close()

+ 6 - 6
src/views/index.vue

@@ -3,12 +3,12 @@
 </template>
 
 <script>
-	export default {
-		data() {
-			return {}
-		},
-		mounted() {}
-	}
+export default {
+	data() {
+		return {}
+	},
+	mounted() {}
+}
 </script>
 
 <style scoped lang="scss"></style>

+ 242 - 220
src/views/login.vue

@@ -9,7 +9,7 @@
 					<div class="header-left-line"></div>
 					<div class="header-left-text">
 						<div style="font-size: 24px">CZO智能分析管理系统</div>
-						<div style="font-size: 12px"> Enterprise management integration platform </div>
+						<div style="font-size: 12px">Enterprise management integration platform</div>
 					</div>
 				</div>
 				<div class="header-right">
@@ -24,7 +24,7 @@
 			<div class="inner">
 				<div class="main-info">
 					<div class="main-info-text">企业智能信息化 高效管理 节能降耗</div>
-					<div class="main-info-text" style="margin-top: 20px"> 实现 标准化、机制化、流程化、责任化、市场化、人性化 </div>
+					<div class="main-info-text" style="margin-top: 20px">实现 标准化、机制化、流程化、责任化、市场化、人性化</div>
 					<div class="main-info-link">
 						<a href="javascript:void(0);">产品视频</a>
 						<a href="javascript:void(0);">企业诊断</a>
@@ -45,10 +45,18 @@
 								<input type="password" auto-complete="off" v-model="formData.password" @keyup.enter="handleLogin" />
 							</label>
 						</div>
+						<div class="main-login-from-com">
+							<label>
+								<span>公司</span>
+								<select v-model="formData.companyId" class="com-select">
+									<option v-for="item in comList" :key="item.companyId" :value="item.companyId">{{ item.companyName }}</option>
+								</select>
+							</label>
+						</div>
 						<div class="main-login-from-pass">
 							<label>
 								<span>验证码</span>
-								<input type="text" auto-complete="off" v-model="formData.code" style="width: 110px" @keyup.enter="handleLogin" />
+								<input type="text" auto-complete="off" v-model="formData.code" style="width: 150px" @keyup.enter="handleLogin" />
 								<img :src="codeUrl" @click="getCode" class="login-code-img" />
 							</label>
 						</div>
@@ -73,258 +81,272 @@
 </template>
 
 <script>
-	import { getCodeImg } from '@/api/login'
-	import Cookies from 'js-cookie'
-	import { encrypt, decrypt } from '@/utils/jsencrypt'
-	export default {
-		data() {
-			return {
-				codeUrl: '',
-				loading: false,
-				formData: {
-					username: 'admin',
-					password: 'admin123',
-					code: '',
-					uuid: ''
-				},
-				redirect: undefined
-			}
-		},
-		watch: {
-			$route: {
-				handler: function (route) {
-					this.redirect = route.query && route.query.redirect
-				},
-				immediate: true
-			}
-		},
-		created() {
-			this.getCode()
-			//this.getCookie();
-		},
-		methods: {
-			getCode() {
-				getCodeImg().then((res) => {
-					this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
-					if (this.captchaOnOff) {
-						this.codeUrl = 'data:image/gif;base64,' + res.img
-						this.formData.uuid = res.uuid
-					}
-				})
+import { getCodeImg, getComList } from '@/api/login'
+import Cookies from 'js-cookie'
+import { encrypt, decrypt } from '@/utils/jsencrypt'
+export default {
+	data() {
+		return {
+			codeUrl: '',
+			loading: false,
+			formData: {
+				username: 'admin',
+				password: 'admin123',
+				code: '',
+				uuid: '',
+				companyId: 0
 			},
-			handleLogin() {
-				if (this.formData.username.trim() == '') {
-					this.$msg({ type: 'error', message: '账号不能为空' })
-					return
-				}
-				if (this.formData.password.trim() == '') {
-					this.$msg({ type: 'error', message: '密码不能为空' })
-					return
+			redirect: undefined,
+			comList: []
+		}
+	},
+	watch: {
+		$route: {
+			handler: function (route) {
+				this.redirect = route.query && route.query.redirect
+			},
+			immediate: true
+		}
+	},
+	created() {
+		this.getCode()
+		//this.getCookie();
+	},
+	methods: {
+		getCode() {
+			getCodeImg().then(res => {
+				this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
+				if (this.captchaOnOff) {
+					this.codeUrl = 'data:image/gif;base64,' + res.img
+					this.formData.uuid = res.uuid
 				}
-				if (this.formData.code.trim() == '') {
-					this.$msg({ type: 'error', message: '未输入验证码' })
-					return
+			})
+			getComList().then(res => {
+				if (res.code === 200) {
+					this.comList = res.data
+					res.data.length && (this.formData.companyId = res.data[0].companyId)
 				}
-				this.loading = true
-				this.$store
-					.dispatch('Login', this.formData)
-					.then(() => {
-						this.$router.push({ path: this.redirect || '/' }).catch(() => {})
-					})
-					.catch(() => {
-						this.loading = false
-					})
+			})
+		},
+		handleLogin() {
+			if (this.formData.username.trim() == '') {
+				this.$msg({ type: 'error', message: '账号不能为空' })
+				return
+			}
+			if (this.formData.password.trim() == '') {
+				this.$msg({ type: 'error', message: '密码不能为空' })
+				return
 			}
+			if (this.formData.code.trim() == '') {
+				this.$msg({ type: 'error', message: '未输入验证码' })
+				return
+			}
+			this.loading = true
+			this.$store
+				.dispatch('Login', this.formData)
+				.then(() => {
+					this.$router.push({ path: this.redirect || '/' }).catch(() => {})
+				})
+				.catch(() => {
+					this.loading = false
+				})
 		}
 	}
+}
 </script>
 
 <style scoped lang="scss">
-	.login {
+.login {
+	width: 100%;
+	height: 100vh;
+	.login-code-img {
+		width: 80px;
+		height: 30px;
+	}
+	.header,
+	.footer {
 		width: 100%;
-		height: 100vh;
-		.login-code-img {
-			width: 120px;
-			height: 50px;
-		}
-		.header,
-		.footer {
-			width: 100%;
+		height: 80px;
+		background: url('~@/assets/images/login/line.jpg') 0 0 no-repeat;
+	}
+	.main {
+		width: 100%;
+		height: calc(100vh - 160px);
+		background: url('~@/assets/images/login/main.jpg') 0 0 no-repeat;
+	}
+	.inner {
+		width: 80%;
+		margin: 0 auto;
+		display: flex;
+	}
+	.header {
+		.inner {
 			height: 80px;
-			background: url('~@/assets/images/login/line.jpg') 0 0 no-repeat;
-		}
-		.main {
-			width: 100%;
-			height: calc(100vh - 160px);
-			background: url('~@/assets/images/login/main.jpg') 0 0 no-repeat;
+			justify-content: space-between;
+			align-items: center;
+			.header-left {
+				display: flex;
+				color: #fff;
+				.header-left-logo,
+				.header-left-line,
+				.header-left-text {
+					height: 60px;
+					display: flex;
+					align-items: center;
+				}
+				.header-left-line {
+					width: 2px;
+					background: url('~@/assets/images/login/1.png') 0 0 no-repeat;
+					margin: 0 5px;
+				}
+				.header-left-text {
+					height: 50px;
+					align-items: flex-start;
+					flex-direction: column;
+					justify-content: space-around;
+				}
+			}
+			.header-right {
+				height: 60px;
+				display: flex;
+				align-items: flex-end;
+				span {
+					background-color: #3cc3cc;
+					display: inline-block;
+					border-radius: 5px;
+					padding: 3px 5px;
+					margin-left: 8px;
+				}
+			}
 		}
+	}
+	.footer {
 		.inner {
-			width: 80%;
-			margin: 0 auto;
-			display: flex;
+			height: 80px;
+			align-items: center;
+			a {
+				display: inline-block;
+				background-color: #3cc3cc;
+				border-radius: 5px;
+				-webkit-box-shadow: 0 0 11px 3px #4fcaca inset;
+				box-shadow: inset 0 0 11px 3px #4fcaca;
+				width: 175px;
+				height: 50px;
+				border: 1px solid #000;
+				font-size: 18px;
+				margin-right: 8px;
+				color: #fff;
+				text-align: center;
+				line-height: 50px;
+			}
 		}
-		.header {
-			.inner {
-				height: 80px;
-				justify-content: space-between;
-				align-items: center;
-				.header-left {
-					display: flex;
+	}
+	.main {
+		.inner {
+			height: 100%;
+			align-items: center;
+			justify-content: space-between;
+			.main-info {
+				.main-info-text {
 					color: #fff;
-					.header-left-logo,
-					.header-left-line,
-					.header-left-text {
-						height: 60px;
-						display: flex;
-						align-items: center;
-					}
-					.header-left-line {
-						width: 2px;
-						background: url('~@/assets/images/login/1.png') 0 0 no-repeat;
-						margin: 0 5px;
-					}
-					.header-left-text {
-						height: 50px;
-						align-items: flex-start;
-						flex-direction: column;
-						justify-content: space-around;
-					}
+					font-size: 28px;
+					font-weight: bolder;
 				}
-				.header-right {
-					height: 60px;
-					display: flex;
-					align-items: flex-end;
-					span {
-						background-color: #3cc3cc;
+				.main-info-link {
+					margin-top: 100px;
+					a {
 						display: inline-block;
+						width: 175px;
+						height: 50px;
+						color: #fff;
 						border-radius: 5px;
-						padding: 3px 5px;
-						margin-left: 8px;
+						text-align: center;
+						line-height: 50px;
+						font-size: 18px;
+						border: 1px solid #000;
+						&:first-child {
+							background: rgba(7, 34, 83, 0.89);
+							-webkit-box-shadow: 0 0 11px 3px rgba(8, 49, 157, 0.8) inset;
+							box-shadow: inset 0 0 11px 3px rgba(8, 49, 157, 0.8);
+						}
+						&:last-child {
+							background: rgba(51, 204, 204, 0.7);
+							-webkit-box-shadow: 0 0 11px 3px #4fcaca inset;
+							box-shadow: inset 0 0 11px 3px #4fcaca;
+							margin-left: 8px;
+						}
 					}
 				}
 			}
-		}
-		.footer {
-			.inner {
-				height: 80px;
-				align-items: center;
-				a {
-					display: inline-block;
-					background-color: #3cc3cc;
-					border-radius: 5px;
-					-webkit-box-shadow: 0 0 11px 3px #4fcaca inset;
-					box-shadow: inset 0 0 11px 3px #4fcaca;
-					width: 175px;
-					height: 50px;
-					border: 1px solid #000;
+			.main-login {
+				width: 360px;
+				.main-login-title {
+					width: 100%;
+					height: 45px;
+					line-height: 45px;
 					font-size: 18px;
-					margin-right: 8px;
+					background: #07276a;
+					border-radius: 5px 5px 0 0;
 					color: #fff;
 					text-align: center;
-					line-height: 50px;
 				}
-			}
-		}
-		.main {
-			.inner {
-				height: 100%;
-				align-items: center;
-				justify-content: space-between;
-				.main-info {
-					.main-info-text {
-						color: #fff;
-						font-size: 28px;
-						font-weight: bolder;
-					}
-					.main-info-link {
-						margin-top: 100px;
-						a {
-							display: inline-block;
-							width: 175px;
-							height: 50px;
-							color: #fff;
-							border-radius: 5px;
-							text-align: center;
-							line-height: 50px;
-							font-size: 18px;
-							border: 1px solid #000;
-							&:first-child {
-								background: rgba(7, 34, 83, 0.89);
-								-webkit-box-shadow: 0 0 11px 3px rgba(8, 49, 157, 0.8) inset;
-								box-shadow: inset 0 0 11px 3px rgba(8, 49, 157, 0.8);
+				.main-login-form {
+					width: 100%;
+					background: #a4a4af;
+					border-radius: 0 0 5px 5px;
+					padding: 40px 30px;
+					box-sizing: border-box;
+					.main-login-from-user,
+					.main-login-from-pass,
+					.main-login-from-com {
+						width: 300px;
+						border: 1px solid #000;
+						height: 30px;
+						border-radius: 5px;
+						margin-bottom: 10px;
+						overflow: hidden;
+						label {
+							display: flex;
+							span {
+								display: inline-block;
+								width: 70px;
+								height: 50px;
+								background-color: #a6a6a6;
+								text-align: center;
+								line-height: 30px;
 							}
-							&:last-child {
-								background: rgba(51, 204, 204, 0.7);
-								-webkit-box-shadow: 0 0 11px 3px #4fcaca inset;
-								box-shadow: inset 0 0 11px 3px #4fcaca;
-								margin-left: 8px;
+							input {
+								display: block;
+								width: 230px;
+								height: 30px;
+								padding: 0;
+								margin: 0;
+								border: none;
+								background-color: #fff;
+								outline: none;
+								line-height: 30px;
+								padding-left: 5px;
 							}
 						}
+						.com-select {
+							width: 235px;
+							height: 30px;
+							outline: none;
+						}
 					}
-				}
-				.main-login {
-					width: 360px;
-					.main-login-title {
-						width: 100%;
-						height: 45px;
-						line-height: 45px;
-						font-size: 18px;
-						background: #07276a;
-						border-radius: 5px 5px 0 0;
-						color: #fff;
-						text-align: center;
-					}
-					.main-login-form {
-						width: 100%;
-						background: #a4a4af;
-						border-radius: 0 0 5px 5px;
-						padding: 40px 30px;
-						box-sizing: border-box;
-						.main-login-from-user,
-						.main-login-from-pass {
-							width: 300px;
-							border: 1px solid #000;
+					.main-login-from-btn {
+						button {
+							width: 100%;
+							color: #fff;
+							background-color: #07276a;
 							height: 50px;
 							border-radius: 5px;
-							margin-bottom: 20px;
-							overflow: hidden;
-							label {
-								display: flex;
-								span {
-									display: inline-block;
-									width: 70px;
-									height: 50px;
-									background-color: #a6a6a6;
-									text-align: center;
-									line-height: 50px;
-								}
-								input {
-									display: block;
-									width: 230px;
-									height: 50px;
-									padding: 0;
-									margin: 0;
-									border: none;
-									background-color: #fff;
-									outline: none;
-									line-height: 30px;
-									padding-left: 5px;
-								}
-							}
-						}
-						.main-login-from-btn {
-							button {
-								width: 100%;
-								color: #fff;
-								background-color: #07276a;
-								height: 50px;
-								border-radius: 5px;
-								outline: none;
-							}
+							outline: none;
 						}
 					}
 				}
 			}
 		}
 	}
+}
 </style>

+ 16 - 25
src/views/system/stockLocation/index.vue

@@ -8,16 +8,7 @@
 						<div class="tag">库位信息</div>
 					</div>
 					<div class="actions">
-						<el-button
-							type="primary"
-							icon="el-icon-plus"
-							size="mini"
-							v-hasPermi="['system:dataPermissions:addRole']"
-							style="margin-right: 10px"
-							@click="addStockShow"
-							v-if="hasDeptIds.length"
-							>添加</el-button
-						>
+						<el-button type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['system:dataPermissions:addRole']" style="margin-right: 10px" @click="addStockShow" v-if="hasDeptIds.length">添加</el-button>
 						<right-toolbar @queryTable="getList" :isShowSearch="false"></right-toolbar>
 					</div>
 				</div>
@@ -29,8 +20,8 @@
 					<el-table-column label="描述" prop="remark" />
 					<el-table-column label="操作" class-name="small-padding fixed-width" width="300" align="center">
 						<template slot-scope="scope">
-							<el-button size="mini" type="text" icon="el-icon-edit" @click="choiceUser(scope.row)" v-hasPermi="['	system:dataPermissions:updRole']">保管员</el-button>
-							<el-button size="mini" type="text" icon="el-icon-edit" @click="updStock(scope.row)" v-hasPermi="['	system:dataPermissions:updRole']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-edit" @click="choiceUser(scope.row)" v-hasPermi="['system:dataPermissions:updRole']">保管员</el-button>
+							<el-button size="mini" type="text" icon="el-icon-edit" @click="updStock(scope.row)" v-hasPermi="['system:dataPermissions:updRole']">修改</el-button>
 							<el-button size="mini" type="text" icon="el-icon-delete" @click="delStock(scope.row)" v-hasPermi="['system:dataPermissions:delRole']">删除</el-button>
 						</template>
 					</el-table-column>
@@ -53,7 +44,7 @@
 						<el-button type="primary" size="small" @click="stockSub">保 存</el-button>
 					</div>
 				</el-dialog>
-				<UserChoice ref="userChoice" @selectedPerson="selectedPerson"/>
+				<UserChoice ref="userChoice" @selectedPerson="selectedPerson" />
 			</div>
 		</div>
 	</div>
@@ -87,7 +78,7 @@ export default {
 			stockForm: { deptId: '', locationName: '', remark: '', deptName: '' },
 			//库位表单验证
 			stockRules: { locationName: [{ required: true, message: '名称不能为空', trigger: 'blur' }] },
-			locationId: '', // 库位id
+			locationId: '' // 库位id
 		}
 	},
 	methods: {
@@ -98,7 +89,7 @@ export default {
 				return
 			}
 			this.loading = true
-			stockList({ deptIds: this.hasDeptIds }).then((res) => {
+			stockList({ deptIds: this.hasDeptIds }).then(res => {
 				if (res.code === 200) {
 					this.dataList = res.data
 					this.loading = false
@@ -121,7 +112,7 @@ export default {
 		},
 		//检测重名
 		checkName(data) {
-			let o = this.dataList.find((item) => item.locationName == data.locationName && item.locationId != data.locationId)
+			let o = this.dataList.find(item => item.locationName == data.locationName && item.locationId != data.locationId)
 			if (o) {
 				return '库位名称重复'
 			}
@@ -134,7 +125,7 @@ export default {
 		},
 		//库位弹窗提交
 		stockSub() {
-			this.$refs.stockForm.validate((valid) => {
+			this.$refs.stockForm.validate(valid => {
 				if (valid) {
 					let checkFiled = this.checkName(this.stockForm)
 					if (checkFiled) {
@@ -142,10 +133,10 @@ export default {
 						return
 					}
 					if (this.stockForm.locationId) {
-						stockUpd(this.stockForm).then((res) => {
+						stockUpd(this.stockForm).then(res => {
 							if (res.code === 200) {
 								this.$msg({ message: '修改成功' })
-								this.dataList = this.dataList.map((item) => {
+								this.dataList = this.dataList.map(item => {
 									if (item.locationId == this.stockForm.locationId) {
 										return {
 											...item,
@@ -160,7 +151,7 @@ export default {
 							}
 						})
 					} else {
-						stockAdd(this.stockForm).then((res) => {
+						stockAdd(this.stockForm).then(res => {
 							if (res.code === 200) {
 								this.$msg({ message: '添加成功' })
 								this.getList()
@@ -174,15 +165,15 @@ export default {
 		//选择人员
 		choiceUser(row) {
 			this.locationId = row.locationId
-			treeselect().then((response) => {
+			treeselect().then(response => {
 				this.deptOptions = response.data
-				this.deptOptions.unshift({id: '0', label: '全部部门'})
+				this.deptOptions.unshift({ id: '0', label: '全部部门' })
 				this.$refs.userChoice.init(true, this.deptOptions)
 			})
 		},
 		//人员回调
 		selectedPerson(data) {
-			updateKeeper({keeper: data, locationId: this.locationId}).then(res => {
+			updateKeeper({ keeper: data, locationId: this.locationId }).then(res => {
 				this.getList()
 			})
 		},
@@ -203,10 +194,10 @@ export default {
 			this.$modal
 				.confirm('确定要删除吗')
 				.then(() => {
-					stockDel(row.locationId).then((res) => {
+					stockDel(row.locationId).then(res => {
 						if (res.code == 200) {
 							this.$msg({ message: '删除成功' })
-							this.dataList = this.dataList.filter((item) => item.locationId != row.locationId)
+							this.dataList = this.dataList.filter(item => item.locationId != row.locationId)
 						} else {
 							this.$msg({ type: 'error', message: res.msg })
 						}