Procházet zdrojové kódy

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

dukai před 3 roky
rodič
revize
fe129833d6

+ 8 - 0
src/api/system/stockLocation.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+//获取部门树
+export function deptList() {
+	return request({
+		url: '/system/dept/treeselect',
+		method: 'get'
+	})
+}

+ 0 - 27
src/components/UploadMultiple/index.vue

@@ -1,27 +0,0 @@
-<template>
-	<el-dialog title="上传文件" :visible.sync="show" width="500px" append-to-body>
-		<div class="upload">
-			<input type="file" name="file" ref="file" multiple="multiple" @change="getFile" style="display: none" :accept="accept" />
-		</div>
-		<div slot="footer" class="dialog-footer">
-			<el-button type="primary" @click="sub">确 定</el-button>
-			<el-button @click="cancel">取 消</el-button>
-		</div>
-	</el-dialog>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				show: false
-			}
-		},
-		methods: {
-			sub() {},
-			cancel() {}
-		}
-	}
-</script>
-
-<style scoped lang="scss"></style>

+ 12 - 1
src/components/treeChoice/index.vue

@@ -1,7 +1,18 @@
 <template>
 	<div class="tree-choice">
 		<el-input placeholder="输入名称搜索" v-model="filterText" style="margin-bottom: 10px"></el-input>
-		<el-tree :data="dataList" node-key="id" default-expand-all :highlight-current="true" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" @node-click="nodeClick">
+		<el-tree
+			:data="dataList"
+			node-key="id"
+			default-expand-all
+			:highlight-current="true"
+			:expand-on-click-node="false"
+			:filter-node-method="filterNode"
+			ref="tree"
+			@node-click="nodeClick"
+			show-checkbox
+			:props="{ disabled: () => true }"
+		>
 			<span class="custom-tree-node" slot-scope="{ data }">
 				<span>{{ data[nodeVal] }}</span>
 			</span>

+ 1 - 1
src/layout/components/Navbar.vue

@@ -17,7 +17,7 @@
 					<img :src="avatar" class="user-avatar" />
 				</div>
 				<el-dropdown-menu slot="dropdown">
-					<router-link to="/user/profile">
+					<router-link to="/employeenInfo/profile">
 						<el-dropdown-item>个人中心</el-dropdown-item>
 					</router-link>
 					<el-dropdown-item @click.native="setting = true">

+ 4 - 0
src/main.js

@@ -49,6 +49,10 @@ Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
 Vue.prototype.copyFormFiled = copyFormFiled
 
+//修改element组件默认属性
+Element.Dialog.props.closeOnPressEscape.default = false
+Element.Dialog.props.closeOnClickModal.default = false
+
 // 全局组件挂载
 Vue.component('DictTag', DictTag)
 Vue.component('Pagination', Pagination)

+ 13 - 0
src/router/index.js

@@ -80,6 +80,19 @@ export const constantRoutes = [
 			}
 		]
 	},
+	{
+		path: '/employeenInfo',
+		component: Layout,
+		hidden: true,
+		children: [
+			{
+				path: 'profile',
+				component: (resolve) => require(['@/views/system/employeenInfo/profile/index'], resolve),
+				name: 'Profile',
+				meta: { title: '个人中心', icon: 'user' }
+			}
+		]
+	},
 	{
 		path: '/monitor/job-log',
 		component: Layout,

+ 7 - 7
src/views/monitor/job/index.vue

@@ -36,20 +36,20 @@
 				</div>
 				<el-table v-loading="loading" border :data="jobList">
 					<el-table-column label="任务编号" width="100" align="center" prop="jobId" />
-					<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
-					<el-table-column label="任务组名" align="center" prop="jobGroup">
+					<el-table-column label="任务名称" align="left" prop="jobName" :show-overflow-tooltip="true" />
+					<el-table-column label="任务组名" align="center" prop="jobGroup" width="200">
 						<template slot-scope="scope">
 							<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup" />
 						</template>
 					</el-table-column>
-					<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
-					<el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
-					<el-table-column label="状态" align="center">
+					<el-table-column label="调用目标字符串" align="left" prop="invokeTarget" :show-overflow-tooltip="true" />
+					<el-table-column label="cron执行表达式" align="left" prop="cronExpression" :show-overflow-tooltip="true" />
+					<el-table-column label="状态" align="center" width="100">
 						<template slot-scope="scope">
-							<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
+							<input type="checkbox" :checked="scope.row.status == '0'" @change="handleStatusChange(scope.row)" />
 						</template>
 					</el-table-column>
-					<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+					<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
 						<template slot-scope="scope">
 							<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['monitor:job:edit']">修改</el-button>
 							<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['monitor:job:remove']">删除</el-button>

+ 23 - 8
src/views/system/dataPermissions/index.vue

@@ -8,7 +8,7 @@
 						<div class="tag" :style="isActive(2)" @click="toTab2">数据权限</div>
 					</div>
 					<div class="actions">
-						<el-button type="primary" icon="el-icon-plus" size="mini " v-show="tabIndex == 1" @click="addRole" v-hasPermi="['system:levelPosition:addLevel']">添加</el-button>
+						<el-button type="primary" icon="el-icon-plus" size="mini " v-show="tabIndex == 1" @click="addRole" v-hasPermi="['system:dataPermissions:addRole']">添加</el-button>
 					</div>
 				</div>
 				<!-- 数据角色表格 -->
@@ -22,12 +22,18 @@
 					<el-table-column label="创建时间" prop="createTime" width="200" align="center" />
 					<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.stop="updRole(scope.row)" v-hasPermi="['system:levelPosition:updLevel']">修改</el-button>
-							<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="delRole(scope.row)" v-hasPermi="['system:levelPosition:delLevel']">删除</el-button>
-							<el-button size="mini" type="text" icon="el-icon-remove" @click.stop="setRole(scope.row)" v-hasPermi="['system:levelPosition:upLevel']" v-if="scope.row.status == 0"
+							<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="updRole(scope.row)" v-hasPermi="['	system:dataPermissions:updRole']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="delRole(scope.row)" v-hasPermi="['system:dataPermissions:delRole']">删除</el-button>
+							<el-button size="mini" type="text" icon="el-icon-remove" @click.stop="setRole(scope.row)" v-hasPermi="['system:dataPermissions:disabledRole']" v-if="scope.row.status == 0"
 								>禁用</el-button
 							>
-							<el-button size="mini" type="text" icon="el-icon-circle-plus" @click.stop="setRole(scope.row)" v-hasPermi="['system:levelPosition:upLevel']" v-if="scope.row.status == 1"
+							<el-button
+								size="mini"
+								type="text"
+								icon="el-icon-circle-plus"
+								@click.stop="setRole(scope.row)"
+								v-hasPermi="['system:dataPermissions:disabledRole']"
+								v-if="scope.row.status == 1"
 								>启用</el-button
 							>
 						</template>
@@ -49,12 +55,12 @@
 					<el-table-column label="机构名称" prop="label" />
 					<el-table-column label="数据权限" class-name="small-padding fixed-width" width="300" align="center">
 						<template slot-scope="scope">
-							<input type="checkbox" :checked="authIds.includes(scope.row.id)" @change="checkboxClick(scope.row, $event)" />
+							<input type="checkbox" :checked="authIds.includes(scope.row.id)" @change="checkboxClick(scope.row, $event)" :disabled="!checkPermi(['system:dataPermissions:updAuth'])" />
 						</template>
 					</el-table-column>
 				</el-table>
 				<!-- 编辑数据角色 -->
-				<el-dialog title="编辑角色" :visible.sync="roleShow" width="30%" :close-on-press-escape="false" :close-on-click-modal="false">
+				<el-dialog :title="roleTitle" :visible.sync="roleShow" width="30%">
 					<el-form ref="roleForm" :model="roleForm" :rules="roleRules" label-width="100px">
 						<el-form-item label="名称" prop="dataRoleName">
 							<div style="width: 200px"><el-input v-model="roleForm.dataRoleName" placeholder="请输入名称" /></div>
@@ -75,6 +81,7 @@
 
 <script>
 	import { roleAdd, roleList, roleUpd, roleDel, roleStatus, authUpd, deptList } from '@/api/system/dataPermissions.js'
+	import { checkPermi } from '@/utils/permission'
 	export default {
 		name: 'dataPermissions',
 		data() {
@@ -109,7 +116,9 @@
 				//部门数据
 				deptList: [],
 				//选中的角色id
-				dataRoleId: 0
+				dataRoleId: 0,
+				//弹窗标题
+				roleTitle: ''
 			}
 		},
 		created() {
@@ -129,6 +138,7 @@
 			}
 		},
 		methods: {
+			checkPermi,
 			//动态选中样式
 			isActive(index) {
 				if (this.tabIndex != index) return {}
@@ -146,6 +156,9 @@
 			},
 			//获取角色数据
 			getRoleList() {
+				if (!checkPermi(['system:dataPermissions:listRole'])) {
+					return
+				}
 				roleList(this.roleParams).then((res) => {
 					if (res.code === 200) {
 						this.roleList = res.rows
@@ -156,6 +169,7 @@
 			//添加角色
 			addRole() {
 				this.roleShow = true
+				this.roleTitle = '角色添加'
 			},
 			//数据角色行选中
 			rowHandler(e) {
@@ -211,6 +225,7 @@
 				this.roleForm.dataRoleName = row.dataRoleName
 				this.roleForm.remark = row.remark
 				this.roleForm.dataRoleId = row.dataRoleId
+				this.roleTitle = '角色修改'
 				this.roleShow = true
 			},
 			//删除角色

+ 40 - 0
src/views/system/stockLocation/index.vue

@@ -0,0 +1,40 @@
+<template>
+	<div class="page-container">
+		<div class="content-container">
+			<TreeChoice :dataList="deptList" nodeKey="id" nodeVal="label" @itemClick="menuClick" />
+			<div class="main"></div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import { deptList } from '@/api/system/stockLocation.js'
+	import TreeChoice from '@/components/treeChoice/index.vue'
+	export default {
+		name: 'stockLocation',
+		components: {
+			TreeChoice
+		},
+		data() {
+			return {
+				//部门数据
+				deptList: []
+			}
+		},
+		created() {
+			this.init()
+		},
+		methods: {
+			//页面初始化
+			init() {
+				deptList().then((res) => {
+					if (res.code === 200) {
+						this.deptList = res.data
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style></style>

+ 1 - 1
src/views/system/tableHead/index.vue

@@ -13,7 +13,7 @@
 						<div class="tag">表头管理</div>
 					</div>
 					<div class="actions">
-						<el-button type="primary" icon="el-icon-plus" size="mini " style="margin: 0 0 10px 3px" @click="handleAdd" v-hasPermi="['system:tableHead:addTable']" v-show="menuId"
+						<el-button type="primary" icon="el-icon-plus" size="mini " style="margin: 0 0 10px 3px" @click="handleAdd" v-hasPermi="['system:tableHead:addTable']" :disabled="!menuId"
 							>添加</el-button
 						>
 					</div>