From 6f1203d1cf895efc473fade3ab049fc30d92c618 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期三, 26 三月 2025 16:48:23 +0800 Subject: [PATCH] 优化 --- h5/pages/visitorApplication/visitorApplication.vue | 339 +------------------------------------------------------- 1 files changed, 6 insertions(+), 333 deletions(-) diff --git a/h5/pages/visitorApplication/visitorApplication.vue b/h5/pages/visitorApplication/visitorApplication.vue index 5b8f978..0fd3b21 100644 --- a/h5/pages/visitorApplication/visitorApplication.vue +++ b/h5/pages/visitorApplication/visitorApplication.vue @@ -61,17 +61,12 @@ <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> </view> </view> - <view class="list_item"> + <!-- <view class="list_item"> <view class="list_item_label"> <text></text> <text>鏄惁鏂藉伐浣滀笟</text> </view> <view class="list_item_content"> - <!-- <switch color="#4e99a9" style="transform: scale(0.8)" @change="constructionChange" /> --> -<!-- <u-radio-group v-model="form1.type"> - <u-radio label="鏄�" :name="1" activeColor="#4d99a8" class="mr24" /> - <u-radio label="鍚�" :name="0" activeColor="#4d99a8" /> - </u-radio-group> --> <view class="checkbox_wrap"> <view class="check_item" @click="constructionChange(1)"> <text>鏄�</text> @@ -86,7 +81,7 @@ </view> </view> - </view> + </view> --> <view v-if="form1.type == '1'" class="list_item"> <view class="list_item_label"> <text></text> @@ -430,7 +425,7 @@ if (type === 'day') { return `${value}鏃 } -<<<<<<< HEAD +// <<<<<<< HEAD this.$forceUpdate() this.closeInput() }, @@ -555,10 +550,9 @@ title: '璇佷欢鍙风爜鏍煎紡閿欒', icon: 'none' }) -======= + } if (type === 'hour') { return `${value}鏃禶 ->>>>>>> f0f08cc1ff84d45de32d8bff4a40e6a7d0d7a9e6 } if (type === 'minute') { return `${value}鍒哷 @@ -791,7 +785,9 @@ }, selectedReason(e) { this.form1.reason = e.value[0].title + this.form1.type = e.value[0].constructionType console.log(e.value[0].title) + console.log(e.value[0].constructionType) this.showReason = false }, submitCart() { @@ -1442,329 +1438,6 @@ color: #222222; } } -<<<<<<< HEAD - let arr = JSON.parse(JSON.stringify(this.withUserList)) - this.personnel.push(arr) - this.show3 = false - this.withUserList.name = '' - this.withUserList.phone = '' - this.withUserList.idcardType = '' - this.withUserList.idcardTypeName = '' - this.withUserList.companyName = '' - this.withUserList.idcardNo = '' - this.withUserList.faceImg = '' - this.withUserList.faceImgUrl = '' - this.withUserList.imgurl = '' - this.withUserList.imgurlUrl = '' - }, - upload(type) { - this.type = type - if (type === 'faceImg') { - this.$refs.cropper.open() - return - } - uni.chooseImage({ - success: (chooseImageRes) => { - // if (type === 'faceImg') { - // this.photoSrc = chooseImageRes.tempFilePaths[0]; - // this.$refs.tlyPictureCut.showPop(); - // return - // } - uni.showLoading({ title: '涓婁紶涓�', mask: true }); - for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { - uni.uploadFile({ - url: `${this.$baseUrl}public/api/uploadFtp.do`, - filePath: chooseImageRes.tempFilePaths[i], - name: 'file', - formData: { - folderCode: 'MEMBER_IMG' - }, - success: (uploadFileRes) => { - let res = JSON.parse(uploadFileRes.data) - if (type === 'faceImg') { - this.withUserList.faceImg = res.data.halfPath - this.withUserList.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath - } else { - this.withUserList.imgurl = res.data.halfPath - this.withUserList.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath - } - }, - complete() { - if (i === chooseImageRes.tempFilePaths.length - 1) { - uni.hideLoading(); - } - } - }); - } - } - }); - }, - seleIdcard(e) { - this.withUserList.idcardType = e.value[0].id - this.withUserList.idcardTypeName = e.value[0].name - this.show6 = false - }, - submitCart() { - if (!this.carName) return uni.showToast({ - title: '璇疯緭鍏ヨ溅鐗屽彿鐮�', - icon: 'none' - }) - this.cars.push(this.carName) - this.form1.carNos = this.cars.join(',') - this.carName = '' - this.show2 = false - }, - deleCars(i) { - this.cars.splice(i, 1) - this.form1.carNos = this.cars.join(',') - }, - submitMJ() { - let arr = [] - let names = [] - this.columns.forEach(item => { - if (item.active) { - arr.push(item.id) - names.push(item.name) - } - }) - if (arr.length === 0) return uni.showToast({ - title: '璇烽�夋嫨闂ㄧ', - icon: 'none' - }) - this.form1.doorSelectName = names.join(',') - this.form1.doors = arr.join(',') - this.show = false - }, - seleMJ(i) { - this.columns.forEach((item,index) => { - if (index === i) { - item.active = !item.active - } - }) - }, - openLC() { - if (!this.form1.starttime) return uni.showToast({ - title: '璇峰厛閫夋嫨鍏ュ巶鏃堕棿', - icon: 'none' - }) - this.show5 = true - }, - setinDate(e) { - this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'); - this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd'), this.day - 1) - this.show4 = false - }, - setoutDate(e) { - this.form1.endtime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'); - this.show5 = false - }, - formatTimeStamp(date) { - return Date.parse(new Date(`${date}`)) || Date.parse(new Date(`${date.replace(/-/g,'/')}`)) - }, - // 鏌ヨ鐢ㄦ埛 - getUser() { - if (this.verify === '0') { - if (this.form1.phone1) { - this.$u.api.getVisitedMember({ - mobile: this.form1.phone1 - }).then(res => { - if (res.code === 200) { - this.form1.receptMemberId = res.data.id - this.form1.receptMemberName = res.data.name - } - }) - } - } else { - if (this.form1.phone1 && this.form1.receptMemberName) { - this.$u.api.getVisitedMember({ - mobile: this.form1.phone1, - name: this.form1.receptMemberName - }).then(res => { - if (res.code === 200) { - this.form1.receptMemberId = res.data.id - this.form1.receptMemberName = res.data.name - } - }) - } - } - }, - // 琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛� - getUserValid() { - this.$u.api.getSystemDictData({ - dictCode: 'SYSTEM', - label: 'BEVISITED_USER_VALID' - }).then(res => { - if (res.code === 200) { - this.verify = res.data.code - } - }) - }, - // 鑾峰彇鏄惁闇�瑕侀�夋嫨闂ㄧ/闂ㄧ鍒楄〃 - getvisit() { - this.$u.api.getSystemDictData({ - dictCode: 'SYSTEM', - label: 'SELECT_DOORS_VISIT_REQUIRED' - }).then(res => { - if (res.code === 200) { - this.accessControl = res.data.code - if (res.data.code === '1') { - this.$u.api.deviceRoleList({ type: 1 }) - .then(device => { - if (device.code === 200) { - if (device.data.length > 0) { - device.data.forEach(item => { - item.active = false - }) - this.columns = device.data - } - } - }) - } - } - }) - }, - confirm(e) { - this.show = false - } - } - } -</script> -<style> - page { - background-color: #F7F7F7 !important; - } - .u-upload__button { - margin: 0 !important; - } -</style> -<style lang="scss" scoped> - .visit { - width: 100%; - .menjin { - width: 100%; - .respondent-title { - width: 100%; - height: 100rpx; - line-height: 100rpx; - text-align: center; - font-size: 32rpx; - font-weight: 500; - color: #222222; - } - .list { - width: 100%; - height: 400rpx; - display: flex; - flex-direction: column; - .list_item { - width: 100%; -======= - .checkbox_wrap{ ->>>>>>> f0f08cc1ff84d45de32d8bff4a40e6a7d0d7a9e6 - display: flex; - align-items: center; - .check_item{ - display: flex; - align-items: center; - margin-left: 20rpx; - } - image{ - width: 42rpx; - height: 42rpx; - margin-left: 10rpx; - } - } - } - } - - .cate { - width: 100%; - padding: 30rpx; - box-sizing: border-box; - background-color: #ffffff; - - .cate_head { - font-size: 32rpx; - font-family: PingFangSC, PingFang SC; - font-weight: 600; - color: #222222; - } - - .cate_list { - width: 100%; - display: flex; - align-items: center; - flex-wrap: wrap; - margin-top: 30rpx; - - .cate_list_item { - height: 64rpx; - padding: 0 20rpx; - box-sizing: border-box; - background-color: #eeeeee; - border-radius: 4rpx; - margin-right: 20rpx; - margin-bottom: 20rpx; - display: flex; - align-items: center; - - &:last-child { - margin-right: 0 !important; - } - - text { - font-size: 26rpx; - font-family: PingFangSC, PingFang SC; - font-weight: 400; - color: #333333; - margin-right: 30rpx; - } - } - } - - .cate_add { - width: 200rpx; - height: 50rpx; - display: flex; - align-items: center; - justify-content: center; - background: rgba(2, 94, 239, 0); - border-radius: 25rpx; - border: 1rpx solid #4c99a8; - font-size: 22rpx; - font-family: PingFangSC, PingFang SC; - font-weight: 400; - margin-top: 20rpx; - color: #4c99a8; - margin: 0 auto; - } - } - - .zw { - width: 100%; - height: calc(env(safe-area-inset-bottom) + 118rpx); - } - - .footer { - width: 100%; - padding: 0 30rpx; - padding-bottom: env(safe-area-inset-bottom); - box-sizing: border-box; - margin-top: 80rpx; - // position: fixed; - // left: 0; - // bottom: 30rpx; - - .footer_btn { - width: 100%; - height: 88rpx; - line-height: 88rpx; - text-align: center; - background: #4c99a8; - border-radius: 44rpx; - font-size: 32rpx; - font-weight: 600; - color: #ffffff; } } } -- Gitblit v1.9.3