Explorar o código

Merge branch 'test' of https://git.agilestar.cn/spfm-group/spfm-market-front into test

syr %!s(int64=3) %!d(string=hai) anos
pai
achega
9856f96664

+ 19 - 0
public/static/views/excel.html

@@ -65,6 +65,14 @@
 		</div>
 	</div>
 	<script>
+		//2021.11.19
+		var managerLevel = JSON.parse(window.sessionStorage.userInfo).managerLevel
+		window.onload = function(){
+			if(managerLevel <= '1'){
+				$('#saves').hide()
+				$('#updates').hide()				
+			}
+		}		 
 		var date = new Date();
 		var month = date.getMonth()
 		if (month >= 1 && month <= 9) {
@@ -316,6 +324,8 @@
 						view: false, // 打印视图
 						zoom: false, // 缩放
 					},
+					// 2021.11.19
+					enableAddRow: managerLevel <= '1' ? false : true, //允许添加行(表格底部添加按钮)
 					showinfobar: true,
 					functionButton: '<button id="updates" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">开启编辑</button> <button id="saves" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;display:none">保存</button>',
 					cellRightClickConfig: {
@@ -346,12 +356,20 @@
 					},
 					hook: {
 						cellMousedown: function (a, b, c) {
+							//2021.11.19
+							if(managerLevel <= '1' ){
+								window.top.$vm.$message({
+								message: '您没有编辑权限',
+								type: 'info'
+								})
+							}else
 							if (flag == false) {
 								window.top.$vm.$message({
 									message: '请先点击开启编辑按钮',
 									type: 'info'
 								})
 							}
+							
 						},//绑定鼠标事件
 					},
 				})
@@ -405,6 +423,7 @@
 				});
 			})
 		}
+		
 	</script>
 </body>
 

+ 4 - 0
public/static/views/text.html

@@ -46,6 +46,8 @@
     <div id="luckysheet" style="width:99%;height:100%">
     </div>
     <script>
+        // 2021.11.19
+        var managerLevel = JSON.parse(window.sessionStorage.userInfo).managerLevel
         var date = new Date();
         var month = date.getMonth()
         if (month >= 1 && month <= 9) {
@@ -107,6 +109,8 @@
                 showstatisticBar: false, // 底部计数
                 myFolderUrl: false,
                 showinfobar: true,
+                // 2021.11.19
+                enableAddRow: managerLevel <= '1' ? false : true, //允许添加行(表格底部添加按钮)
                 showstatisticBarConfig: {
                     count: false, // 计数栏
                     view: false, // 打印视图

+ 80 - 10
src/pages/main/organizaStructure/staffManage.vue

@@ -3,20 +3,55 @@
         <div class="container-box">
             <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
             <div class="search">
-                <mySearch :searchList="searchList" @searchInfo="searchInfo" style="width: 60%"></mySearch>
-                <span>
+                <el-form :model="searchSection" ref="searchSection">
+                    <div class="search-box">
+                        <el-form-item>
+                            <el-select @change="getareatype" :popper-append-to-body="false" v-model="searchSection.cityCompName" placeholder="地市">
+                                <el-option v-for="item in typeopt" :key="item.id" :label="item.roleName"
+                                    :value="item.roleName">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-select  @change="gettype" :popper-append-to-body="false" v-model="searchSection.areaCompName" placeholder="区县">
+                                <el-option v-for="item in kindopt" :key="item.id" :label="item.roleName"
+                                    :value="item.roleName">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-input v-model="searchSection.roleName" placeholder="角色">
+                            </el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-input v-model="searchSection.userName" placeholder="姓名">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </el-form>
+                <div>
+                    <el-button class="btn-check" size="medium" type="primary" plain icon="el-icon-search" @click="searchInfo">搜索</el-button>
+                    <el-button class="btn-check" size="medium" type="primary"  @click="resetSearch">重置</el-button>
+                </div>
+                
+                <!-- <mySearch :searchList="searchList" @searchInfo="searchInfo" style="width: 60%"></mySearch> -->
+                
+            </div>
+            <div class="clearfix" style="margin-top: 20px">
+                <span style="float: right">
                     <!-- <el-button type="primary" @click="dialogCheck(4)" size="medium">导入</el-button> -->
-                    <el-button type="primary" @click="downloadExcel(1)">导出</el-button>
-                    <el-button type="primary" @click="downloadExcel(2)">下载模板</el-button>
+                    
+                    <el-button type="primary" @click="downloadExcel(2)" class="downloadMuban">下载模板</el-button>
                     <myUpload style="display:inline-block;" :fileInfo="fileInfo"
                         :fileList="fileInfo.fileList" @uploadBack='uploadBack'></myUpload>
+                    <el-button type="primary" size="medium" @click="downloadExcel(1)">导出</el-button>
                     <el-button type="primary" @click="dialogCheck(3)" size="medium">添加</el-button>
                     <!-- <el-button type="primary" @click="dialogCheck(3)" size="medium">导入</el-button> -->
                     <!-- <el-button type="primary" @click="dialogCheck(3)" size="medium">导出</el-button> -->
                 </span>
             </div>
             <div class="tabbox">
-                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                <el-table height="calc(100% - 150px)" class="com-table" ref="multipleTable" :data="tableData"
                     tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
                     <el-table-column prop="oaNo" label="员工工号">
                     </el-table-column>
@@ -183,7 +218,7 @@
                     }],
                 },
                 searchList: [{
-                        type: 'input',
+                        type: 'sel',
                         tit: '地市',
                         value: '',
                         width: '24%'
@@ -207,6 +242,7 @@
                         width: '24%',
                     },
                 ],
+                searchSection: {},
                 tooltit: '人员管理',
                 fullscreen: false,
                 total: 0,
@@ -247,12 +283,21 @@
             //搜索数据
             searchInfo(v) {
                 this.params = {};
-                v[0] ? this.params.cityCompName = v[0] : '';
-                v[1] ? this.params.areaCompName = v[1] : '';
-                v[2] ? this.params.roleName = v[2] : '';
-                v[3] ? this.params.userName = v[3] : '';
+                this.searchSection.cityCompName ? this.params.cityCompName = this.searchSection.cityCompName : '';
+                this.searchSection.areaCompName ? this.params.areaCompName = this.searchSection.areaCompName : '';
+                this.searchSection.roleName ? this.params.roleName = this.searchSection.roleName : '';
+                this.searchSection.userName ? this.params.userName = this.searchSection.userName : '';
+                // v[0] ? this.params.cityCompName = v[0] : '';
+                // v[1] ? this.params.areaCompName = v[1] : '';
+                // v[2] ? this.params.roleName = v[2] : '';
+                // v[3] ? this.params.userName = v[3] : '';
                 this.getList(this.params, this.pageSize);
             },
+            resetSearch(){
+                this.searchSection = {};
+                this.params = {};
+                this.getList(this.params, 1);
+            },
             closedia() {
                 this.infolist = {
                     roleName:''
@@ -736,4 +781,29 @@
             }
         }
     }
+    .clearfix:after {
+    content: ".";
+    display: block;
+    height: 0;
+    clear: both;
+    visibility: hidden;
+    }
+
+    .clearfix {
+        *zoom: 1;
+    }
+    .downloadMuban{
+        background: none;
+        color: #107CFF;
+        border: none;
+        padding: 0;
+        vertical-align: bottom;
+    }
+    .search-box{
+        display: flex;
+        div{
+            margin-right: 10px;
+            margin-bottom: 0;
+        }
+    }
 </style>