|  | @ -9,9 +9,10 @@ | 
														
													
														
															
																|  |  | <uv-icon name="arrow-right"></uv-icon> |  |  | <uv-icon name="arrow-right"></uv-icon> | 
														
													
														
															
																|  |  | </template> |  |  | </template> | 
														
													
														
															
																|  |  | </uv-form-item> |  |  | </uv-form-item> | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | <uv-form-item label="维修项目" prop="project" borderBottom @click="projectPickerOpen"> |  |  | <uv-form-item label="维修项目" prop="project" borderBottom @click="projectPickerOpen"> | 
														
													
														
															
																|  |  | <uv-input v-model="form.project" placeholder="请填写维修物品的名称" readonly :fontSize="30" border="none"></uv-input> |  |  |  | 
														
													
														
															
																|  |  |  |  |  | <uv-input v-model="form.project" placeholder="请填写维修物品的名称" readonly :fontSize="30" | 
														
													
														
															
																|  |  |  |  |  | border="none"></uv-input> | 
														
													
														
															
																|  |  | <template v-slot:right> |  |  | <template v-slot:right> | 
														
													
														
															
																|  |  | <uv-icon name="arrow-right"></uv-icon> |  |  | <uv-icon name="arrow-right"></uv-icon> | 
														
													
														
															
																|  |  | </template> |  |  | </template> | 
														
													
												
													
														
															
																|  | @ -59,8 +60,8 @@ | 
														
													
														
															
																|  |  | @confirm="roomConfirm"></uv-picker> --> |  |  | @confirm="roomConfirm"></uv-picker> --> | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | <!-- 维修项目选择 --> |  |  | <!-- 维修项目选择 --> | 
														
													
														
															
																|  |  | <uv-picker ref="projectPicker" :columns="projectList" :itemHeight="100" :round="20" keyName="name" title="选择维修项目" |  |  |  | 
														
													
														
															
																|  |  | @confirm="projectConfirm"></uv-picker> |  |  |  | 
														
													
														
															
																|  |  |  |  |  | <uv-picker ref="projectPicker" :columns="projectList" :itemHeight="100" :round="20" keyName="name" | 
														
													
														
															
																|  |  |  |  |  | title="选择维修项目" @confirm="projectConfirm"></uv-picker> | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | <!-- 图片操作菜单 --> |  |  | <!-- 图片操作菜单 --> | 
														
													
														
															
																|  |  | <uv-action-sheet ref="actionSheet" :actions="list" :round="20" safeAreaInsetBottom @select="selectImageSheet"> |  |  | <uv-action-sheet ref="actionSheet" :actions="list" :round="20" safeAreaInsetBottom @select="selectImageSheet"> | 
														
													
												
													
														
															
																|  | @ -155,10 +156,14 @@ | 
														
													
														
															
																|  |  | currentIndex: undefined, //当前操作的图片索引 |  |  | currentIndex: undefined, //当前操作的图片索引 | 
														
													
														
															
																|  |  | floorList: [], //楼栋列表 |  |  | floorList: [], //楼栋列表 | 
														
													
														
															
																|  |  | // roomNumberList: [], //室号列表 |  |  | // roomNumberList: [], //室号列表 | 
														
													
														
															
																|  |  | projectList : [],		//项目列表 |  |  |  | 
														
													
														
															
																|  |  |  |  |  | projectList: [], //项目列表 | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | }, |  |  | }, | 
														
													
														
															
																|  |  | onShow() { |  |  | onShow() { | 
														
													
														
															
																|  |  |  |  |  | //用户没有登录 | 
														
													
														
															
																|  |  |  |  |  | if (!this.userInfo.id) { | 
														
													
														
															
																|  |  |  |  |  | this.logout() | 
														
													
														
															
																|  |  |  |  |  | } | 
														
													
														
															
																|  |  | if (wx.onNeedPrivacyAuthorization) { |  |  | if (wx.onNeedPrivacyAuthorization) { | 
														
													
														
															
																|  |  | wx.onNeedPrivacyAuthorization(resolve => { |  |  | wx.onNeedPrivacyAuthorization(resolve => { | 
														
													
														
															
																|  |  | this.resolvePrivacyAuthorization = resolve |  |  | this.resolvePrivacyAuthorization = resolve | 
														
													
												
													
														
															
																|  | @ -166,7 +171,7 @@ | 
														
													
														
															
																|  |  | }) |  |  | }) | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | if (this.floorList.length < 1) this.getActorGoList() |  |  | if (this.floorList.length < 1) this.getActorGoList() | 
														
													
														
															
																|  |  | if(this.projectList.length < 1) this.getProjectList() |  |  |  | 
														
													
														
															
																|  |  |  |  |  | if (this.projectList.length < 1) this.getProjectList() | 
														
													
														
															
																|  |  | }, |  |  | }, | 
														
													
														
															
																|  |  | onReady() { |  |  | onReady() { | 
														
													
														
															
																|  |  | this.$refs.form.setRules(this.rules); |  |  | this.$refs.form.setRules(this.rules); | 
														
													
												
													
														
															
																|  | @ -224,8 +229,11 @@ | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | //打开选择楼栋 |  |  | //打开选择楼栋 | 
														
													
														
															
																|  |  | floorPickerOpen() { |  |  | floorPickerOpen() { | 
														
													
														
															
																|  |  | if(this.floorList.length == 0){ |  |  |  | 
														
													
														
															
																|  |  | return uni.showToast({ icon: 'none' , title: '暂无楼栋供用户选择' }) |  |  |  | 
														
													
														
															
																|  |  |  |  |  | if (this.floorList.length == 0) { | 
														
													
														
															
																|  |  |  |  |  | return uni.showToast({ | 
														
													
														
															
																|  |  |  |  |  | icon: 'none', | 
														
													
														
															
																|  |  |  |  |  | title: '暂无楼栋供用户选择' | 
														
													
														
															
																|  |  |  |  |  | }) | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | this.$refs.floorPicker.open(); |  |  | this.$refs.floorPicker.open(); | 
														
													
														
															
																|  |  | }, |  |  | }, | 
														
													
												
													
														
															
																|  | @ -245,16 +253,19 @@ | 
														
													
														
															
																|  |  | // 	} |  |  | // 	} | 
														
													
														
															
																|  |  | // 	this.$refs.roomPicker.open(); |  |  | // 	this.$refs.roomPicker.open(); | 
														
													
														
															
																|  |  | // }, |  |  | // }, | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | //用户选择了项目 |  |  | //用户选择了项目 | 
														
													
														
															
																|  |  | projectConfirm(project) { |  |  | projectConfirm(project) { | 
														
													
														
															
																|  |  | this.form.project = project.value[0].name |  |  | this.form.project = project.value[0].name | 
														
													
														
															
																|  |  | }, |  |  | }, | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | //打开选择项目 |  |  | //打开选择项目 | 
														
													
														
															
																|  |  | projectPickerOpen() { |  |  | projectPickerOpen() { | 
														
													
														
															
																|  |  | if(this.projectList.length == 0){ |  |  |  | 
														
													
														
															
																|  |  | return uni.showToast({ icon: 'none' , title: '暂无项目供用户选择' }) |  |  |  | 
														
													
														
															
																|  |  |  |  |  | if (this.projectList.length == 0) { | 
														
													
														
															
																|  |  |  |  |  | return uni.showToast({ | 
														
													
														
															
																|  |  |  |  |  | icon: 'none', | 
														
													
														
															
																|  |  |  |  |  | title: '暂无项目供用户选择' | 
														
													
														
															
																|  |  |  |  |  | }) | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | this.$refs.projectPicker.open(); |  |  | this.$refs.projectPicker.open(); | 
														
													
														
															
																|  |  | }, |  |  | }, | 
														
													
												
													
														
															
																|  | @ -264,8 +275,11 @@ | 
														
													
														
															
																|  |  | this.$refs.form.validate().then(res => { |  |  | this.$refs.form.validate().then(res => { | 
														
													
														
															
																|  |  | let images = this.form.image.join() |  |  | let images = this.form.image.join() | 
														
													
														
															
																|  |  | if (this.userInfo && this.userInfo.isDai == '1') { |  |  | if (this.userInfo && this.userInfo.isDai == '1') { | 
														
													
														
															
																|  |  | this.cleanfrom()		//清空表单内容 |  |  |  | 
														
													
														
															
																|  |  | return uni.showToast({ icon: 'none' , title: '维修员不能主动提交报修' }) |  |  |  | 
														
													
														
															
																|  |  |  |  |  | this.cleanfrom() //清空表单内容 | 
														
													
														
															
																|  |  |  |  |  | return uni.showToast({ | 
														
													
														
															
																|  |  |  |  |  | icon: 'none', | 
														
													
														
															
																|  |  |  |  |  | title: '维修员不能主动提交报修' | 
														
													
														
															
																|  |  |  |  |  | }) | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | this.$api('addSchoolOrder', { |  |  | this.$api('addSchoolOrder', { | 
														
													
														
															
																|  |  | ...this.form, |  |  | ...this.form, | 
														
													
												
													
														
															
																|  | @ -327,9 +341,18 @@ | 
														
													
														
															
																|  |  | this.$api('getRepairList', res => { |  |  | this.$api('getRepairList', res => { | 
														
													
														
															
																|  |  | this.getRepairList = [] |  |  | this.getRepairList = [] | 
														
													
														
															
																|  |  | this.projectList.push(res.result) |  |  | this.projectList.push(res.result) | 
														
													
														
															
																|  |  | console.log(this.projectList); |  |  |  | 
														
													
														
															
																|  |  | }) |  |  | }) | 
														
													
														
															
																|  |  | } |  |  |  | 
														
													
														
															
																|  |  |  |  |  | }, | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  |  |  |  | //退出登录 | 
														
													
														
															
																|  |  |  |  |  | logout() { | 
														
													
														
															
																|  |  |  |  |  | uni.reLaunch({ | 
														
													
														
															
																|  |  |  |  |  | url: '/pages/login/studentLogin' | 
														
													
														
															
																|  |  |  |  |  | }) | 
														
													
														
															
																|  |  |  |  |  | uni.removeStorageSync('token'); | 
														
													
														
															
																|  |  |  |  |  | uni.removeStorageSync('userInfo'); | 
														
													
														
															
																|  |  |  |  |  | this.$store.commit('setUserInfo', {}) | 
														
													
														
															
																|  |  |  |  |  | }, | 
														
													
														
															
																|  |  | }, |  |  | }, | 
														
													
														
															
																|  |  | computed: { |  |  | computed: { | 
														
													
														
															
																|  |  | ...mapState(['userInfo']), |  |  | ...mapState(['userInfo']), | 
														
													
												
													
														
															
																|  | 
 |