lilei 6 mēneši atpakaļ
vecāks
revīzija
29cce6820d

+ 2 - 2
App.vue

@@ -1,8 +1,8 @@
 <script>
 	export default {
 		globalData: {
-			// baseUrl: 'http://192.168.2.113:9110/saas/clz/', // 本地
-			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
+			baseUrl: 'http://192.168.2.113:9110/saas/clz/', // 本地
+			// baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},
 		onLaunch: function() {

+ 4 - 17
pages/storeManage/editAdminAuth.vue

@@ -33,7 +33,6 @@
 <script>
 	import { getRoleList } from '@/api/powerRole-md.js'
 	import {saveEmployee,setManager} from '@/api/employee'
-	import { getCurrUserInfo } from '@/api/data.js';
 	export default{
 		data(){
 			return{
@@ -52,11 +51,13 @@
 				loading:false,
 				total:''	,// 获取数据总数
 				userInfo: null,
+				adminId: null
 			}
 		},
 		onLoad(opts) {
 			this.userInfo = this.$store.state.vuex_nowStaffData
-			this.getCurrUserInfo()
+			this.adminId = opts.adminId
+			this.getRoleList()
 		},
 		methods:{
 			radioGroupChange(e){
@@ -75,21 +76,6 @@
 					_this.status = "loadmore"
 				})
 			},
-			getCurrUserInfo(){
-				uni.showLoading({
-					mask:true,
-					title: '正在加载...'
-				})
-				getCurrUserInfo().then(res => {
-					if(res.data){
-						this.formData = Object.assign({},this.formData,{id:res.data.id})
-						this.pageNo = 1
-						this.getRoleList()
-					}else{
-						uni.hideLoading()
-					}
-				})
-			},
 			//  保存
 			save(name){
 				if(!this.formData.roleIds){
@@ -112,6 +98,7 @@
 			},
 			// 设置岗位
 			saveRole(){
+				this.formData.id = this.adminId
 				saveEmployee(this.formData).then(res=>{
 					console.log(res)
 					if(res.status == 200){

+ 5 - 1
pages/storeManage/editIsManage.vue

@@ -35,11 +35,15 @@
 				pageSize: 20,
 				list: [],
 				total: 0,
+				adminId: null
 			}
 		},
 		onShow() {
 			this.getRow(1)
 		},
+		onLoad(opts) {
+			this.adminId = opts.adminId
+		},
 		computed:{
 			userInfo(){
 				return this.$store.state.vuex_userInfo
@@ -88,7 +92,7 @@
 			setNewAdmin(row){
 				this.$store.state.vuex_nowStaffData = row
 				uni.navigateTo({
-					url: "/pages/storeManage/editAdminAuth"
+					url: "/pages/storeManage/editAdminAuth?adminId="+this.adminId
 				})
 			},
 		}

+ 2 - 1
pages/storeManage/personnel.vue

@@ -120,8 +120,9 @@
 			},
 			// 更换负责人
 			editIsManage(){
+				const row = this.list.find(item=>item.isManager == 1)
 				uni.navigateTo({
-					url: "/pages/storeManage/editIsManage"
+					url: "/pages/storeManage/editIsManage?adminId="+row.id
 				})
 			}
 		}