| | |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // åéçä¿¡éªè¯ç |
| | | export const sendSms = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/smsEmail/sendSms', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | // login |
| | | export const loginPost = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/member/accountLogin', |
| | | url: '/loginH5', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | export const loginCaptcha = () => { |
| | | return http({ |
| | | url: '/captcha', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | export const getUserInfo = () => { |
| | | return http({ |
| | | url: '/getUserInfo', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // æ¥è¯¢äººåç¸å
³ä¿¡æ¯0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå,示ä¾å¼(1) |
| | | export const findTypeMemberInfo = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/member/findTypeMemberInfo', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // éç½®å¯ç |
| | | export const resetPassword = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/visits/resetPassword', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // ä¿®æ¹å¯ç |
| | | export const uploadPassword = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/member/updatePwd', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // loginout |
| | | export const logoutPost = (data) => { |
| | | return http({ |
| | | url: '/logout', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 鿣鿿 å建 |
| | | export const DangerCreate = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDanger/create', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 鿣åºå |
| | | export const DangerArea = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDanger/create', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 鿣 ç±»å |
| | | export const DangerConfigType = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDangerParam/list', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 鿣 æ¥è¯¢åºåå
å®å
¨å |
| | | export const findHiddenAreaMemberList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/hiddenDangerParam/findHiddenAreaMemberList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // è½¦è¾ å表 |
| | | export const getCarsList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/cars/list', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è½¦è¾å¯é¢çº¦æ¶æ®µ |
| | | export const carCanReservationDate = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/carCanReservationDate', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è½¦è¾ é¢çº¦è®°å½ |
| | | export const carUseBookList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/carUseBookList', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // ç¨è½¦ç³è¯·æäº¤ |
| | | export const carUseBookCraete = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/create', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // ä»»å¡ä¸å¿ |
| | | export const taskCenter = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/member/taskCenter', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è½¦è¾ æ´¾è½¦è®°å½ |
| | | export const carUseBookPaiche = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/carUseBook/page', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 访客æ¥å¤ |
| | | export const createVisit = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/visits/createVisit', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢è¢«è®¿äººå表 |
| | | export const getVisitedMember = (data) => { |
| | | return http({ |
| | |
| | | }) |
| | | } |
| | | Vue.prototype.$goBack = () => { uni.navigateBack() } |
| | | Vue.prototype.$eventBus = new Vue() |
| | | Vue.prototype.$onWait = new Promise((resolve) => { |
| | | Vue.prototype.$reslove = resolve |
| | | }) |
| | |
| | | "easycom": {
|
| | | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
| | | },
|
| | | "pages": [ |
| | | { |
| | | "path": "pages/index/index", |
| | | "style": { |
| | | "navigationBarTitleText": "访客ä¸å¿", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | "pages": [
|
| | | {
|
| | | "path": "pages/index/index",
|
| | | "style": {
|
| | | "navigationBarTitleText": "访客ä¸å¿",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/notice/notice",
|
| | | "style": {
|
| | |
| | | }
|
| | |
|
| | | }, {
|
| | | "path": "pages/staff/sendACar",
|
| | | "path": "pages/staff/vehicle/sendACar",
|
| | | "style": {
|
| | | "navigationBarTitleText": "派车记å½",
|
| | | "enablePullDownRefresh": false
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | ,{
|
| | | "path" : "pages/staffLogin/forgetPsd",
|
| | | "style" : |
| | | {
|
| | | "navigationBarTitleText": "æ¾åå¯ç ",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | |
| | | }
|
| | | ,{
|
| | | "path" : "pages/staff/snapshotResult",
|
| | | "style" : |
| | | {
|
| | | "navigationBarTitleText": "鿣鿿",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | |
| | | }
|
| | | ,{
|
| | | "path" : "pages/staff/vehicle/applePeo",
|
| | | "style" : |
| | | {
|
| | | "navigationBarTitleText": "éæ©äººå",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | |
| | | }
|
| | | ],
|
| | | "subPackages": [{
|
| | | "root": "n_pages",
|
| | |
| | | (item.selAnswer && |
| | | item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) || |
| | | item.selAnswer == line.code |
| | | (item.selAnswer == line.code && status != '2') || |
| | | (item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) |
| | | " |
| | | /> |
| | | <image |
| | |
| | | (item.selAnswer && |
| | | item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) || |
| | | item.selAnswer == line.code |
| | | (item.selAnswer == line.code && status != '2') || |
| | | (item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) |
| | | " |
| | | style="color: rgba(2, 94, 239, 1)" |
| | | ><text class="mr24" style="color: rgba(2, 94, 239, 1)">{{ |
| | |
| | | <text |
| | | v-if=" |
| | | item.selAnswer && |
| | | item.selAnswer == line.code && |
| | | item.answer !== item.selAnswer && |
| | | status == '2' |
| | | " |
| | |
| | | " |
| | | > |
| | | <image src="@/static/meeting/icon/ic_choose_sel@2x.png" /> |
| | | <text>åçæ£ç¡®</text> |
| | | <text class="success">åçæ£ç¡®</text> |
| | | </view> |
| | | </template> |
| | | <template v-if="item.type == 2"> |
| | |
| | | <image src="@/static/checkbox@2x.png" v-if="!line.checked" /> |
| | | <image |
| | | src="@/static/checkbo1x_sel@2x.png" |
| | | v-if="line.checked || (item.selAnswer === item.answer && line.checked)" |
| | | v-if=" |
| | | (line.checked && status != '2') || |
| | | (item.selAnswer === item.answer && |
| | | line.checked && |
| | | status != '2') |
| | | " |
| | | /> |
| | | <image |
| | | src="@/static/checkbox_wrong@2x.png" |
| | |
| | | status == '2' |
| | | " |
| | | /> |
| | | <text v-if="!item.selAnswer || item.selAnswer !== line.code" |
| | | <text v-if="!line.checked" |
| | | ><text class="mr24">{{ line.code }}</text> |
| | | {{ line.value }}</text |
| | | > |
| | | <text |
| | | v-if=" |
| | | (item.selAnswer && |
| | | item.answer === item.selAnswer && |
| | | item.selAnswer == line.code) || |
| | | item.selAnswer == line.code |
| | | (line.checked && status != '2') || |
| | | (item.selAnswer === item.answer && |
| | | line.checked && |
| | | status != '2') |
| | | " |
| | | style="color: rgba(2, 94, 239, 1)" |
| | | ><text class="mr24" style="color: rgba(2, 94, 239, 1)">{{ |
| | |
| | | > |
| | | <text |
| | | v-if=" |
| | | item.selAnswer && |
| | | item.answer !== item.selAnswer && |
| | | line.checked && |
| | | item.selAnswer !== item.answer && |
| | | status == '2' |
| | | " |
| | | style="color: rgba(237, 69, 69, 1)" |
| | |
| | | " |
| | | > |
| | | <image src="@/static/meeting/icon/ic_choose_sel@2x.png" /> |
| | | <text>åçæ£ç¡®</text> |
| | | <text class="success">åçæ£ç¡®</text> |
| | | </view> |
| | | </template> |
| | | </view> |
| | |
| | | v-if="status == '2'" |
| | | style="background-color: #db534c" |
| | | class="box_list_answer_btn" |
| | | @click="status = '0'" |
| | | @click="handleAgain" |
| | | >çé¢å¤±è´¥ï¼åæ¥ä¸æ¬¡</view |
| | | > |
| | | <!-- å¤é --> |
| | |
| | | this.list.forEach((item, i) => { |
| | | if (index === i) { |
| | | item.options.forEach((item2, j) => { |
| | | if(j === jeck){ |
| | | if (j === jeck) { |
| | | item2.checked = !item2.checked |
| | | } |
| | | }) |
| | |
| | | } else { |
| | | this.status = '1' |
| | | } |
| | | }, |
| | | handleAgain() { |
| | | this.status = '0' |
| | | this.getProblems() |
| | | }, |
| | | next() { |
| | | uni.navigateTo({ |
| | |
| | | color: #e42d2d; |
| | | margin-left: 16rpx; |
| | | } |
| | | .success { |
| | | color: #275de6; |
| | | } |
| | | } |
| | | } |
| | | .list_item { |
| | |
| | | if (this.total > 10) { |
| | | this.getList() |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | handleDetail(id) { |
| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="number" maxlength="11" placeholder="请è¾å
¥æ§å¯ç " placeholder-style="color: #999999;" /> |
| | | <input type="password" v-model="param.oldPwd" :maxlength="32" placeholder="请è¾å
¥æ§å¯ç " placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="number" maxlength="11" placeholder="请è¾å
¥6-18使°åã忝ç»å" placeholder-style="color: #999999;" /> |
| | | <input type="password" v-model="param.newPwd" :maxlength="32" placeholder="请è¾å
¥6-18使°åã忝ç»å" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | |
| | | <text>*</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input type="number" maxlength="11" placeholder="请åè¾ä¸æ¬¡æ°å¯ç " placeholder-style="color: #999999;" /> |
| | | <input type="password" v-model="param.newPwdTemp" :maxlength="32" placeholder="请åè¾ä¸æ¬¡æ°å¯ç " placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <text>å¦å¯ç éå¿ï¼è¯·èç³»ååºç³»ç»ç®¡çåéç½®</text> |
| | | </view> |
| | | <view class="footer-box"> |
| | | <view class="submit-button">æäº¤</view> |
| | | <view class="submit-button" @click="onSubmit">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { uploadPassword } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | param: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param } = this |
| | | if (!param.oldPwd) return uni.showToast({ |
| | | title: 'æ§å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.newPwd) return uni.showToast({ |
| | | title: 'æ°å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.newPwdTemp) return uni.showToast({ |
| | | title: '确认å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (param.newPwdTemp != param.newPwd) return uni.showToast({ |
| | | title: '两次è¾å
¥å¯ç ä¸ä¸è´', |
| | | icon: 'none' |
| | | }) |
| | | uploadPassword({ |
| | | ...param |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: "/pages/staffLogin/login" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="title_wrap"> |
| | | <view class="name">æææï¼æ¬¢è¿ç»å½ï½</view> |
| | | <view class="name">{{ userInfo.realname || '' }}ï¼æ¬¢è¿ç»å½ï½</view> |
| | | <view class="btn" @click="loginOut">éåºç»å½</view> |
| | | </view> |
| | | <view class="banner_wrap"> |
| | |
| | | <view class="h1">æçä¼è®®æ¥å</view> |
| | | <view class="h2">MY MEETING CALENDAR</view> |
| | | </view> |
| | | <view class="img_wrap" @click="jump('/pages/staff/sendACar')"> |
| | | <view class="img_wrap" @click="jump('/pages/staff/vehicle/sendACar')"> |
| | | <image class="img" src="@/static/staff/ic_paichejilu.png"></image> |
| | | <view class="h1">派车记å½</view> |
| | | <view class="h2">VEHICLE DISPATCH</view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { logoutPost } from '@/api' |
| | | export default { |
| | | data() { |
| | | return {}; |
| | | return { |
| | | userInfo: uni.getStorageSync('userInfo') |
| | | }; |
| | | }, |
| | | onLoad(){ |
| | | console.log('userInfo', this.userInfo); |
| | | }, |
| | | methods: { |
| | | jump(path){ |
| | |
| | | }); |
| | | }, |
| | | loginOut() { |
| | | uni.clearStorageSync() |
| | | this.$store.commit('empty') |
| | | logoutPost() |
| | | uni.redirectTo({ |
| | | url: '/pages/staffLogin/login' |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image class="mr12 search" src="../../static/ic_search@2x.png" mode="widthFix"></image> |
| | | <input v-model="param.name" @blur="initData()" type="text" placeholder="æç´¢" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <view v-for="item in memberList" :key="item.id" class="line"> |
| | | <image :src="item.faceImgFull ? item.faceImgFull : require('@/static/logo@2x.png')" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | <!-- <text class="tag">tag</text> --> |
| | | </view> |
| | | <view class="depart">{{ item.companyName }}</view> |
| | | </view> |
| | | <checkbox class="checkbox" /> |
| | | <text></text> |
| | | </view> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in 100" :key="i">{{ item }}</text> |
| | | </view> |
| | | <image @click="isShowSelMem = true" class="open_icon" src="../../static/staff/renyuan_ic_open.png" mode=""></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认(00/20)</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup :show="isShowSelMem" :round="12" mode="bottom" @close="isShowSelMem = false"> |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼xx人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line"> |
| | | <image src="../../static/logo@2x.png" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <view class="btn">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { findHiddenAreaMemberList } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | param: {}, |
| | | |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | uni.navigateBack() |
| | | }, |
| | | initData() { |
| | | const { param } = this |
| | | findHiddenAreaMemberList({ |
| | | name: param.name |
| | | }).then(res => { |
| | | this.memberList = res.data || [] |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .modal { |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn{ |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_wrap { |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | } |
| | | .member_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | } |
| | | .search_inp { |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search{ |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image class="mr12 search" src="../../static/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <view class="line"> |
| | | <image src="../../static/logo@2x.png" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | <text class="tag">tag</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <checkbox class="checkbox" /> |
| | | <text></text> |
| | | </view> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in 100" :key="i">{{ item }}</text> |
| | | </view> |
| | | <image @click="isShowSelMem = true" class="open_icon" src="../../static/staff/renyuan_ic_open.png" mode=""></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认(00/20)</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup :show="isShowSelMem" :round="12" mode="bottom" @close="isShowSelMem = false"> |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼xx人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line"> |
| | | <image src="../../static/logo@2x.png" class="avatar" mode=""></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <view class="btn">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image |
| | | class="mr12 search" |
| | | src="../../static/ic_search@2x.png" |
| | | mode="widthFix" |
| | | ></image> |
| | | <input |
| | | v-model="param.name" |
| | | @blur="initData()" |
| | | type="text" |
| | | placeholder="æç´¢" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <checkbox-group @change="changeMem"> |
| | | <view v-for="item in memberList" :key="item.id" class="line"> |
| | | <image |
| | | :src=" |
| | | item.faceImgFull |
| | | ? item.faceImgFull |
| | | : require('@/static/logo@2x.png') |
| | | " |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | <!-- <text class="tag">tag</text> --> |
| | | </view> |
| | | <view class="depart">{{ item.companyName }}</view> |
| | | </view> |
| | | <label> |
| | | <checkbox |
| | | :value="String(item.id)" |
| | | class="checkbox" |
| | | /> |
| | | </label> |
| | | <text></text> |
| | | </view> |
| | | </checkbox-group> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in 100" :key="i">{{ item }}</text> |
| | | </view> |
| | | <image |
| | | @click="isShowSelMem = true" |
| | | class="open_icon" |
| | | src="../../static/staff/renyuan_ic_open.png" |
| | | mode="" |
| | | ></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认(00/20)</view> |
| | | </view> --> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowSelMem" |
| | | :round="12" |
| | | mode="bottom" |
| | | @close="isShowSelMem = false" |
| | | > |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼xx人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line"> |
| | | <image |
| | | src="../../static/logo@2x.png" |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">name</text> |
| | | </view> |
| | | <view class="depart">xxç§å®¤</view> |
| | | </view> |
| | | <view class="btn">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { findHiddenAreaMemberList } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | param: {}, |
| | | |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | uni.navigateBack() |
| | | }, |
| | | changeMem(e) { |
| | | console.log( e.detail.value[0]); |
| | | const id = Number(e.detail.value[0]) |
| | | const item = this.memberList.find(i => i.id === id) |
| | | console.log('item', item); |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/snapshot?id=${item.id}&name=${item.name}` |
| | | }) |
| | | }, |
| | | initData() { |
| | | const { param } = this |
| | | findHiddenAreaMemberList({ |
| | | name: param.name |
| | | }).then(res => { |
| | | this.memberList = res.data || [] |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .modal { |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn{ |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn { |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_wrap { |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | } |
| | | .member_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | } |
| | | .search_inp { |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search{ |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search { |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>鿣åºå</text> |
| | | </view> |
| | | <view class="value" @click="isShowArea = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>æ¥å人</text> |
| | | </view> |
| | | <view class="value" @click="selMember"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ£ç±»å</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="name">ç°åºæ
åµ</view> |
| | | <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-if="!param.imgurlUrl"><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon></view> |
| | | <view class="adduser_list_item_ipt1_upload" @click="upload('imgurl')" v-else><image :src="param.imgurlUrl" mode="widthFix"></image></view> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>鿣åºå</text> |
| | | </view> |
| | | <view class="value" @click="isShowArea = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.areaName ? '#000000' : '#999999' }" |
| | | >{{ param.areaName ? param.areaName : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>æ¥å人</text> |
| | | </view> |
| | | <view class="value" @click="selMember"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.checkorName ? '#000000' : '#999999' }" |
| | | >{{ param.checkorName ? param.checkorName : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ£ç±»å</text> |
| | | </view> |
| | | <view class="value" @click="isShowType = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.categoryName ? '#000000' : '#999999' }" |
| | | >{{ param.categoryName ? param.categoryName : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="name">ç°åºæ
åµ</view> |
| | | <view class="wrap"> |
| | | <view class="adduser_list_item_ipt1_upload" @click="showUpload = true" |
| | | ><u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon |
| | | ></view> |
| | | <view |
| | | class="adduser_list_item_ipt1_upload" |
| | | v-for="(item, i) in submitFileList" |
| | | :key="i" |
| | | ><image :src="item.fileurlFull" mode="widthFix"></image |
| | | ></view> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="upload_line" style="padding: 15px 0 0;"> |
| | | <view class="name" style="margin-bottom: 10rpx;"> |
| | | <text style="color: #e42d2d;">*</text> |
| | | <text>æ
åµè¯´æ</text> |
| | | </view> |
| | | <view class="value" |
| | | ><textarea |
| | | placeholder="è¯·è¯¦ç»æè¿°ç°åºæ
åµï¼ä¸å°äº10个å" |
| | | minlength="10" |
| | | v-model="param.content" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥äºº</text> |
| | | </view> |
| | | <view class="value" |
| | | ><input |
| | | type="text" |
| | | disabled |
| | | placeholder="请è¾å
¥ææ¥äºº" |
| | | v-model="param.memberName" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>èç³»çµè¯</text> |
| | | </view> |
| | | <view class="value" |
| | | ><input |
| | | type="text" |
| | | disabled |
| | | placeholder="请è¾å
¥èç³»çµè¯" |
| | | v-model="param.memberPhone" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥æ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="isShowTime = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.submitTime ? '#000000' : '#999999' }" |
| | | >{{ param.submitTime ? param.submitTime : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥äºº</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥ææ¥äºº" v-model="param.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>èç³»çµè¯</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥èç³»çµè¯" v-model="param.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text></text> |
| | | <text>ææ¥æ¶é´</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- åºå --> |
| | | <u-picker keyName="name" :show="isShowArea" :columns="areaOptions" @confirm="seletedArea" @cancel="isShowArea = false"></u-picker> |
| | | </view> |
| | | <view class="footer" |
| | | ><view class="footer_btn" @click="onSubmit">æäº¤</view></view |
| | | > |
| | | </view> |
| | | <!-- --> |
| | | <!-- åºå --> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="isShowArea" |
| | | closeOnClickOverlay |
| | | :columns="areaOptions" |
| | | @confirm="seletedArea" |
| | | @close="isShowArea = false" |
| | | @cancel="isShowArea = false" |
| | | ></u-picker> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="isShowType" |
| | | closeOnClickOverlay |
| | | :columns="areaType" |
| | | @confirm="seletedType" |
| | | @close="isShowType = false" |
| | | @cancel="isShowType = false" |
| | | ></u-picker> |
| | | <!-- --> |
| | | <u-datetime-picker |
| | | :show="isShowTime" |
| | | :minDate="new Date().getTime()" |
| | | mode="datetime" |
| | | closeOnClickOverlay |
| | | @cancel="isShowTime = false" |
| | | @close="isShowTime = false" |
| | | @confirm="seletedDate" |
| | | ></u-datetime-picker> |
| | | <!-- --> |
| | | <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay> |
| | | <view class="upload_wrap"> |
| | | <view class="btn" @click="uploadImage">éæ©å¾ç</view> |
| | | <view class="btn" @click="uploadVideo">éæ©è§é¢</view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { uploadUrl } from '@/api' |
| | | import { |
| | | uploadUrl, |
| | | DangerCreate, |
| | | DangerConfigType |
| | | } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | isShowArea: false, |
| | | areaOptions: [[{ name: '111', id: 11 }, { name: '111', id: 11 }]] |
| | | }; |
| | | }, |
| | | methods: { |
| | | seletedArea(e) { |
| | | const item = e.value[0]; |
| | | console.log(item); |
| | | this.isShowArea = false; |
| | | }, |
| | | selMember() { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/memberSel' |
| | | }); |
| | | }, |
| | | upload() { |
| | | uni.chooseImage({ |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }); |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'MEMBER_IMG' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log('uploadFileRes', uploadFileRes); |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | if (type === 'faceImg') { |
| | | this.param.faceImg = res.data.halfPath |
| | | this.param.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath |
| | | } else { |
| | | this.param.imgurl = res.data.halfPath |
| | | this.param.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath |
| | | } |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | getUser() {} |
| | | } |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | submitFileList: [], |
| | | |
| | | isShowArea: false, |
| | | isShowType: false, |
| | | isShowTime: false, |
| | | showUpload: false, |
| | | |
| | | areaOptions: [], |
| | | areaType: [], |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option && option.id) { |
| | | this.$set(this.param, 'checkUserId', option.id) |
| | | this.$set(this.param, 'applyCheckUserId', option.id) |
| | | this.$set(this.param, 'checkorName', option.name) |
| | | } |
| | | this.initConfig() |
| | | const userInfo = uni.getStorageSync('userInfo') || {} |
| | | this.$set(this.param, 'memberName', userInfo.realname) |
| | | this.$set(this.param, 'memberPhone', userInfo.mobile) |
| | | this.$set(this.param, 'memberId', userInfo.id) |
| | | this.$set(this.param, 'submitTime', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param, submitFileList } = this |
| | | if (!param.areaName) return uni.showToast({ |
| | | title: 'è¯·éæ©éæ£åºå', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.applyCheckUserId) return uni.showToast({ |
| | | title: 'è¯·éæ©æ¥å人', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.categoryName) return uni.showToast({ |
| | | title: 'è¯·éæ©éæ£ç±»å', |
| | | icon: 'none' |
| | | }) |
| | | |
| | | DangerCreate({ |
| | | ...param, |
| | | submitFileList |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$jump('/pages/staff/snapshotResult') |
| | | } |
| | | }) |
| | | }, |
| | | seletedArea(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'areaId', item.id) |
| | | this.$set(this.param, 'areaName', item.name) |
| | | console.log(item) |
| | | this.isShowArea = false |
| | | }, |
| | | seletedType(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'cateId', item.id) |
| | | this.$set(this.param, 'categoryName', item.name) |
| | | console.log(item) |
| | | this.isShowType = false |
| | | }, |
| | | seletedSafety(e) { |
| | | |
| | | }, |
| | | seletedDate(e) { |
| | | this.$set(this.param, 'submitTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')) |
| | | this.isShowTime = false |
| | | }, |
| | | initConfig() { |
| | | DangerConfigType({ type: '1' }).then(res => { |
| | | this.areaType = [res.data] |
| | | }) |
| | | DangerConfigType({ type: '0' }).then(res => { |
| | | this.areaOptions = [res.data] |
| | | }) |
| | | }, |
| | | selMember() { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/memberSel' |
| | | }) |
| | | }, |
| | | uploadImage() { |
| | | this.showUpload = false |
| | | uni.chooseImage({ |
| | | count: 6, |
| | | success: (chooseImageRes) => { |
| | | console.log('chooseImageRes.tempFilePaths', chooseImageRes.tempFilePaths) |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }) |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('res', res) |
| | | let obj = { |
| | | type: '0' |
| | | } |
| | | obj.fileurl = res.data.halfPath |
| | | obj.fileurlFull = res.data.addr |
| | | this.submitFileList.push(obj) |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | uploadVideo() { |
| | | this.showUpload = false |
| | | let that = this |
| | | uni.chooseVideo({ |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }) |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('uploadFileRes', res) |
| | | let obj = { type: '1' } |
| | | obj.fileurl = res.data.halfPath |
| | | obj.fileurlFull = res.data.addr |
| | | that.submitFileList.push(obj) |
| | | console.log(that.submitFileList) |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getUser() { } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #E5E5E5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | .wrap{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | margin-right: 24rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .main_app { |
| | | // padding-top: 10rpx; |
| | | .upload_wrap { |
| | | width: 100%; |
| | | .btn { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .footer { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #4e99a9; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="ima_wrap"> |
| | | <image src="@/static/driver/btn_qiandao@2x.png" mode="widthFix"></image> |
| | | <u-icon class="txt" color="#fff" size="72" name="checkbox-mark"></u-icon> |
| | | </view> |
| | | <view class="h1">æäº¤æå</view> |
| | | <view class="placeholder9">æè°¢ä½ çåé¦ï¼æä»¬å°å°½å¿«æ ¸å®å¤ç</view> |
| | | <view class="btn" @click="$jump('/pages/staff/index')">è¿åé¦é¡µ</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_app{ |
| | | text-align: center; |
| | | .btn{ |
| | | margin-top: 60rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | width: 300rpx; |
| | | margin: 60rpx auto; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #fff; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | border: 1rpx solid #4e99a9; |
| | | border-radius: 50rpx; |
| | | color: #4e99a9; |
| | | } |
| | | .h1{ |
| | | font-size: 44rpx; |
| | | font-weight: 600; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | .ima_wrap{ |
| | | width: 300rpx; |
| | | height: 300rpx; |
| | | margin: 300rpx auto 40rpx; |
| | | position: relative; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | image{ |
| | | width: 100%; |
| | | position: absolute; |
| | | } |
| | | .txt{ |
| | | font-size: 50rpx; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="box"> |
| | | <scroll-view scroll-x class="box_head"> |
| | | <view class="box_head_search"> |
| | | <view class="box_head_search_ipt"> |
| | | <image src="@/static/n/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢ä»»å¡åç§°" /> |
| | | </view> |
| | | <view class="box_head_search_sha" @click="show = true"> |
| | | <image src="@/static/n/ic_shaixuan@2x.png" mode="widthFix"></image> |
| | | <text>çé</text> |
| | | </view> |
| | | </view> |
| | | <view class="box_head_list"> |
| | | <view class="box_head_item active">å¾
å¤ç 12</view> |
| | | <view class="box_head_item">å·²å¤ç</view> |
| | | <view class="box_head_item">æåèµ·ç</view> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="box_list"> |
| | | <view class="box_list_item" v-for="(item, index) in 3" :key="index"> |
| | | <view class="box_list_item_head"> |
| | | <text>䏿©å¯çå³å¡å
¥åç³è¯·</text> |
| | | <text class="loading">å¾
å®¡æ ¸</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>被访é®äººï¼</text> |
| | | <text>人äºé¨-çäºè</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>è¿åæ¶é´ï¼</text> |
| | | <text>12-12 09:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç¦»åæ¶é´ï¼</text> |
| | | <text>12-12 12:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>æ¥è®¿äºç±ï¼</text> |
| | | <text>ä¸å¡æ¥å¾</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>éè¡è½¦è¾ï¼</text> |
| | | <text>çA88888</text> |
| | | </view> |
| | | <view class="box_list_item_nr_x"></view> |
| | | <view class="box_list_item_nr_text"> |
| | | <text class="time">2023-12-12 09:00æäº¤</text> |
| | | <text class="btn" @click="handleAppr()">å»å¤ç</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- çé --> |
| | | <u-popup :show="show" mode="bottom" :round="10" :closeable="true" @close="show = false"> |
| | | <view class="search"> |
| | | <view class="search_head">ä»»å¡çé</view> |
| | | <view class="search_list"> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">åå»ºæ¥æ</view> |
| | | <view class="search_list_item_val"> |
| | | <view class="search_list_item_val_row" @click="tiemShow = true" :style="{ color: search.startTime ? '#000' : '' }">{{search.startTime ? search.startTime : 'å¼å§æ¥æ'}}</view> |
| | | <view class="search_list_item_val_z">-</view> |
| | | <view class="search_list_item_val_row" @click="tiemShow1 = true" :style="{ color: search.endTime ? '#000' : '' }">{{search.endTime ? search.endTime : 'ç»ææ¥æ'}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">è®¢åæ¥æº</view> |
| | | <view class="search_list_item_cates"> |
| | | <view :class="index === i ? 'search_list_item_cates_row active' : 'search_list_item_cates_row'" |
| | | v-for="(item, index) in cate" |
| | | :key="index" |
| | | @click="clickItem(index)"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="search_footer"> |
| | | <view class="search_footer_item" @click="show = false">åæ¶</view> |
| | | <view class="search_footer_item t">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-datetime-picker |
| | | :show="tiemShow" |
| | | v-model="time" |
| | | mode="datetime" |
| | | @confirm="confirmLeft" |
| | | @cancel="tiemShow = false" |
| | | ></u-datetime-picker> |
| | | <u-datetime-picker |
| | | :show="tiemShow1" |
| | | v-model="time1" |
| | | mode="datetime" |
| | | @confirm="confirmRight" |
| | | @cancel="tiemShow1 = false" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | <view class="box"> |
| | | <scroll-view scroll-x class="box_head"> |
| | | <view class="box_head_search"> |
| | | <view class="box_head_search_ipt"> |
| | | <image src="@/static/n/ic_search@2x.png" mode="widthFix"></image> |
| | | <input type="text" placeholder="æç´¢ä»»å¡åç§°" /> |
| | | </view> |
| | | <view class="box_head_search_sha" @click="show = true"> |
| | | <image src="@/static/n/ic_shaixuan@2x.png" mode="widthFix"></image> |
| | | <text>çé</text> |
| | | </view> |
| | | </view> |
| | | <view class="box_head_list"> |
| | | <view class="box_head_item active">å¾
å¤ç 12</view> |
| | | <view class="box_head_item">å·²å¤ç</view> |
| | | <view class="box_head_item">æåèµ·ç</view> |
| | | <view class="box_head_item">æéæç</view> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="box_list"> |
| | | <view class="box_list_item" v-for="(item, index) in 3" :key="index"> |
| | | <view class="box_list_item_head"> |
| | | <text>䏿©å¯çå³å¡å
¥åç³è¯·</text> |
| | | <text class="loading">å¾
å®¡æ ¸</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>被访é®äººï¼</text> |
| | | <text>人äºé¨-çäºè</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>è¿åæ¶é´ï¼</text> |
| | | <text>12-12 09:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç¦»åæ¶é´ï¼</text> |
| | | <text>12-12 12:00</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>æ¥è®¿äºç±ï¼</text> |
| | | <text>ä¸å¡æ¥å¾</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>éè¡è½¦è¾ï¼</text> |
| | | <text>çA88888</text> |
| | | </view> |
| | | <view class="box_list_item_nr_x"></view> |
| | | <view class="box_list_item_nr_text"> |
| | | <text class="time">2023-12-12 09:00æäº¤</text> |
| | | <text class="btn" @click="handleAppr()">å»å¤ç</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- çé --> |
| | | <u-popup |
| | | :show="show" |
| | | mode="bottom" |
| | | :round="10" |
| | | :closeable="true" |
| | | @close="show = false" |
| | | > |
| | | <view class="search"> |
| | | <view class="search_head">ä»»å¡çé</view> |
| | | <view class="search_list"> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">åå»ºæ¥æ</view> |
| | | <view class="search_list_item_val"> |
| | | <view |
| | | class="search_list_item_val_row" |
| | | @click="tiemShow = true" |
| | | :style="{ color: search.startTime ? '#000' : '' }" |
| | | >{{ search.startTime ? search.startTime : "å¼å§æ¥æ" }}</view |
| | | > |
| | | <view class="search_list_item_val_z">-</view> |
| | | <view |
| | | class="search_list_item_val_row" |
| | | @click="tiemShow1 = true" |
| | | :style="{ color: search.endTime ? '#000' : '' }" |
| | | >{{ search.endTime ? search.endTime : "ç»ææ¥æ" }}</view |
| | | > |
| | | </view> |
| | | </view> |
| | | <view class="search_list_item"> |
| | | <view class="search_list_item_label">è®¢åæ¥æº</view> |
| | | <view class="search_list_item_cates"> |
| | | <view |
| | | :class=" |
| | | index === i |
| | | ? 'search_list_item_cates_row active' |
| | | : 'search_list_item_cates_row' |
| | | " |
| | | v-for="(item, index) in cate" |
| | | :key="index" |
| | | @click="clickItem(index)" |
| | | > |
| | | {{ item.name }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="search_footer"> |
| | | <view class="search_footer_item" @click="show = false">åæ¶</view> |
| | | <view class="search_footer_item t">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-datetime-picker |
| | | :show="tiemShow" |
| | | v-model="time" |
| | | mode="datetime" |
| | | @confirm="confirmLeft" |
| | | @cancel="tiemShow = false" |
| | | ></u-datetime-picker> |
| | | <u-datetime-picker |
| | | :show="tiemShow1" |
| | | v-model="time1" |
| | | mode="datetime" |
| | | @confirm="confirmRight" |
| | | @cancel="tiemShow1 = false" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | show: false, |
| | | tiemShow: false, |
| | | tiemShow1: false, |
| | | time: '', |
| | | i: null, |
| | | time: '', |
| | | time1: '', |
| | | search: { |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | cate: [ |
| | | { name: '访客ç³è¯·', id: 1 }, |
| | | { name: 'å³å¡ç³è¯·', id: 2 }, |
| | | { name: 'ç¨è½¦ç³è¯·', id: 3 } |
| | | ] |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleAppr(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/task/visitorApprove' |
| | | }) |
| | | }, |
| | | clickItem(index) { |
| | | this.i = index |
| | | }, |
| | | confirmLeft(e) { |
| | | console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')) |
| | | this.search.startTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow = false |
| | | }, |
| | | confirmRight(e) { |
| | | this.search.endTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow1 = false |
| | | } |
| | | } |
| | | } |
| | | import { taskCenter } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | show: false, |
| | | tiemShow: false, |
| | | tiemShow1: false, |
| | | time: '', |
| | | i: null, |
| | | time: '', |
| | | time1: '', |
| | | search: { |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | pagination: {}, |
| | | dataList: [], |
| | | cate: [ |
| | | { name: '访客ç³è¯·', id: 1 }, |
| | | { name: 'å³å¡ç³è¯·', id: 2 }, |
| | | { name: 'ç¨è½¦ç³è¯·', id: 3 } |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | const { pagination } = this |
| | | taskCenter({ |
| | | model: {} |
| | | }).then(res => { |
| | | this.dataList = res.data.records |
| | | }) |
| | | }, |
| | | handleAppr(item) { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/task/visitorApprove' |
| | | }) |
| | | }, |
| | | clickItem(index) { |
| | | this.i = index |
| | | }, |
| | | confirmLeft(e) { |
| | | console.log(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')) |
| | | this.search.startTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow = false |
| | | }, |
| | | confirmRight(e) { |
| | | this.search.endTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.tiemShow1 = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | page { |
| | | background-color: #F7F7F7 !important; |
| | | } |
| | | page { |
| | | background-color: #f7f7f7 !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .box { |
| | | width: 100%; |
| | | .box_head { |
| | | width: 100%; |
| | | height: 190rpx; |
| | | padding: 12rpx 30rpx; |
| | | box-sizing: border-box; |
| | | background: #FFFFFF; |
| | | position: sticky; |
| | | top: 0; |
| | | left: 0; |
| | | .box_head_search { |
| | | width: 100%; |
| | | height: 76rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 24rpx; |
| | | .box_head_search_ipt { |
| | | flex: 1; |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | background: #F7F7F7; |
| | | border-radius: 50rpx; |
| | | margin-right: 30rpx; |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #B2B2B2; |
| | | } |
| | | } |
| | | .box_head_search_sha { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | text { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | .box_head_list { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | .active { |
| | | border: 1rpx solid #4c99a8 !important; |
| | | color: #4c99a8 !important; |
| | | } |
| | | .box_head_item { |
| | | padding: 0 30rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 30rpx; |
| | | border: 1rpx solid #999999; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | margin-right: 20rpx; |
| | | } |
| | | } |
| | | } |
| | | .box_list { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .box_list_item { |
| | | width: 100%; |
| | | margin-bottom: 20rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | .box_list_item_head { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%); |
| | | border-radius: 8rpx 8rpx 0rpx 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .loading { |
| | | color: #4c99a8; |
| | | } |
| | | .success { |
| | | color: #03C68F; |
| | | } |
| | | .error { |
| | | color: #E0312A; |
| | | } |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #FFFFFF; |
| | | .box_list_item_nr_x { |
| | | width: 100%; |
| | | height: 1rpx; |
| | | background-color: #E5E5E5; |
| | | } |
| | | .box_list_item_nr_text { |
| | | .time{ |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .btn{ |
| | | padding: 0 32rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | background: #279BAA; |
| | | color: #fff; |
| | | font-size: 26rpx; |
| | | font-weight: 300; |
| | | text-align: center; |
| | | border-radius: 30rpx; |
| | | } |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | margin-top: 20rpx; |
| | | } |
| | | .box_list_item_nr_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .search_head { |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .search_list { |
| | | width: 100%; |
| | | margin-top: 34rpx; |
| | | .search_list_item { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-bottom: 48rpx; |
| | | .search_list_item_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .search_list_item_cates { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | .active { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_list_item_cates_row { |
| | | padding: 0 26rpx; |
| | | height: 64rpx; |
| | | line-height: 64rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 36rpx; |
| | | margin-right: 20rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | &:last-child { |
| | | margin: 0; |
| | | } |
| | | } |
| | | } |
| | | .search_list_item_val { |
| | | width: 100%; |
| | | height: 64rpx; |
| | | background: #F7F7F7; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #E5E5E5; |
| | | display: flex; |
| | | align-items: center; |
| | | .search_list_item_val_row { |
| | | flex: 1; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .search_list_item_val_z { |
| | | flex-shrink: 0; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin: 0 30rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .t { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #4c99a8; |
| | | margin-right: 18rpx; |
| | | border: 1rpx solid #4c99a8; |
| | | border-radius: 44rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .box { |
| | | width: 100%; |
| | | .box_head { |
| | | width: 100%; |
| | | height: 190rpx; |
| | | padding: 12rpx 30rpx; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | position: sticky; |
| | | top: 0; |
| | | left: 0; |
| | | .box_head_search { |
| | | width: 100%; |
| | | height: 76rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 24rpx; |
| | | .box_head_search_ipt { |
| | | flex: 1; |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | background: #f7f7f7; |
| | | border-radius: 50rpx; |
| | | margin-right: 30rpx; |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #b2b2b2; |
| | | } |
| | | } |
| | | .box_head_search_sha { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | text { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | .box_head_list { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .active { |
| | | border: 1rpx solid #4c99a8 !important; |
| | | color: #4c99a8 !important; |
| | | } |
| | | .box_head_item { |
| | | text-align: center; |
| | | flex: 1; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 30rpx; |
| | | border: 1rpx solid #999999; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | margin-right: 10rpx; |
| | | &:nth-last-child(1) { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .box_list { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .box_list_item { |
| | | width: 100%; |
| | | margin-bottom: 20rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | .box_list_item_head { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%); |
| | | border-radius: 8rpx 8rpx 0rpx 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .loading { |
| | | color: #4c99a8; |
| | | } |
| | | .success { |
| | | color: #03c68f; |
| | | } |
| | | .error { |
| | | color: #e0312a; |
| | | } |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .box_list_item_nr_x { |
| | | width: 100%; |
| | | height: 1rpx; |
| | | background-color: #e5e5e5; |
| | | } |
| | | .box_list_item_nr_text { |
| | | .time { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .btn { |
| | | padding: 0 32rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | background: #279baa; |
| | | color: #fff; |
| | | font-size: 26rpx; |
| | | font-weight: 300; |
| | | text-align: center; |
| | | border-radius: 30rpx; |
| | | } |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | margin-top: 20rpx; |
| | | } |
| | | .box_list_item_nr_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .search_head { |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .search_list { |
| | | width: 100%; |
| | | margin-top: 34rpx; |
| | | .search_list_item { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-bottom: 48rpx; |
| | | .search_list_item_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .search_list_item_cates { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | .active { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_list_item_cates_row { |
| | | padding: 0 26rpx; |
| | | height: 64rpx; |
| | | line-height: 64rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 36rpx; |
| | | margin-right: 20rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | &:last-child { |
| | | margin: 0; |
| | | } |
| | | } |
| | | } |
| | | .search_list_item_val { |
| | | width: 100%; |
| | | height: 64rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | .search_list_item_val_row { |
| | | flex: 1; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .search_list_item_val_z { |
| | | flex-shrink: 0; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin: 0 30rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .t { |
| | | background: #4c99a8 !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .search_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #4c99a8; |
| | | margin-right: 18rpx; |
| | | border: 1rpx solid #4c99a8; |
| | | border-radius: 44rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="search_inp df_ac"> |
| | | <image |
| | | class="mr12 search" |
| | | src="@/static/ic_search@2x.png" |
| | | mode="widthFix" |
| | | ></image> |
| | | <input |
| | | v-model="param.name" |
| | | @blur="initData()" |
| | | type="text" |
| | | placeholder="æç´¢" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | <view class="member_list"> |
| | | <checkbox-group v-model="selList" @change="changeMem"> |
| | | <view v-for="item in memberList" :key="item.id" class="line"> |
| | | <image |
| | | :src=" |
| | | item.faceImgFull |
| | | ? item.faceImgFull |
| | | : require('@/static/logo@2x.png') |
| | | " |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | <!-- <text class="tag">tag</text> --> |
| | | </view> |
| | | <view class="depart">{{ item.companyName }}</view> |
| | | </view> |
| | | <label> |
| | | <checkbox :checked="item.checked" :value="String(item.id)" class="checkbox" /> |
| | | </label> |
| | | <text></text> |
| | | </view> |
| | | </checkbox-group> |
| | | <view class="empty"></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="sub_wrap"> |
| | | <view class="sel_mem"> |
| | | <text>已鿩ï¼</text> |
| | | <view class="members"> |
| | | <text v-for="(item, i) in selList" :key="i">{{ item.name }}ï¼</text> |
| | | </view> |
| | | <image |
| | | @click="isShowSelMem = true" |
| | | class="open_icon" |
| | | src="@/static/staff/renyuan_ic_open.png" |
| | | mode="" |
| | | ></image> |
| | | </view> |
| | | <view class="btn" @click="onSubmit">确认({{selList.length}}/20)</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowSelMem" |
| | | :round="12" |
| | | mode="bottom" |
| | | @close="isShowSelMem = false" |
| | | > |
| | | <view class="modal"> |
| | | <view class="modal_header"> |
| | | <text class="status">已鿩ï¼{{ selList.length }}人</text> |
| | | <text class="btn" @click="isShowSelMem = false">确认</text> |
| | | </view> |
| | | <view class="modal_mem_list"> |
| | | <view class="line" v-for="(item, i) in selList" :key="i"> |
| | | <image |
| | | :src=" |
| | | item.faceImgFull |
| | | ? item.faceImgFull |
| | | : require('@/static/logo@2x.png') |
| | | " |
| | | class="avatar" |
| | | mode="" |
| | | ></image> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <text class="name">{{ item.name }}</text> |
| | | </view> |
| | | <view class="depart">{{ item.componey }}</view> |
| | | </view> |
| | | <view class="btn" @click="handleRemove(item)">ç§»é¤</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { findTypeMemberInfo } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | memberList: [], |
| | | selList: [], |
| | | param: {}, |
| | | |
| | | isShowSelMem: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$eventBus.$emit('applePeo', this.selList) |
| | | uni.navigateBack() |
| | | }, |
| | | changeMem(e) { |
| | | const arr = e.detail.value |
| | | let arrTemp = arr.map(item => { |
| | | let obj = {} |
| | | this.memberList.forEach(ite => { |
| | | if (item == ite.id) { |
| | | obj.name = ite.name.split('-')[0] |
| | | obj.componey = ite.name.split('-')[1] || '' |
| | | obj.id = ite.id |
| | | } |
| | | }) |
| | | return obj |
| | | }) |
| | | this.selList = arrTemp |
| | | // this.$forceUpdate() |
| | | }, |
| | | handleRemove(item) { |
| | | const selIndex = this.selList.findIndex(i => i.id === item.id) |
| | | this.selList.splice(selIndex, 1) |
| | | this.memberList.forEach(ite => { |
| | | if(item.id === ite.id){ |
| | | ite.checked = false |
| | | } |
| | | }) |
| | | // console.log(this.memberList); |
| | | this.$forceUpdate() |
| | | }, |
| | | initData() { |
| | | const { param } = this |
| | | findTypeMemberInfo({ |
| | | name: param.name, |
| | | type: '2' |
| | | }).then(res => { |
| | | this.memberList = res.data || [] |
| | | this.memberList.forEach(i => { |
| | | i.checked = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .modal { |
| | | padding: 40rpx 30rpx; |
| | | .modal_header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .status { |
| | | font-weight: 600; |
| | | } |
| | | .btn { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | .modal_mem_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .btn { |
| | | width: 80rpx; |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #999999; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_wrap { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | z-index: 9999; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | box-shadow: 0rpx 0rpx 6rpx 0rpx #b2b2b2; |
| | | padding: 30rpx 30rpx 64rpx; |
| | | .sel_mem { |
| | | display: flex; |
| | | align-items: center; |
| | | .members { |
| | | width: 500rpx; |
| | | color: #4d98a7; |
| | | white-space: nowrap; |
| | | overflow: hidden; //ææ¬è¶
åºéè |
| | | text-overflow: ellipsis; |
| | | margin-right: 20rpx; |
| | | } |
| | | .open_icon { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | } |
| | | } |
| | | .btn { |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #279baa; |
| | | border-radius: 44rpx; |
| | | color: #fff; |
| | | text-align: center; |
| | | margin-top: 22rpx; |
| | | } |
| | | } |
| | | .member_list { |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .avatar { |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .depart { |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .info { |
| | | display: flex; |
| | | margin-bottom: 16rpx; |
| | | .name { |
| | | font-size: 30rpx; |
| | | } |
| | | .tag { |
| | | font-size: 24rpx; |
| | | border-radius: 4rpx; |
| | | border: 1rpx solid #f62710; |
| | | color: #f62710; |
| | | padding: 0rpx 6rpx; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .empty { |
| | | width: 100%; |
| | | height: 280rpx; |
| | | } |
| | | } |
| | | .search_inp { |
| | | height: 72rpx; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | padding-left: 16rpx; |
| | | .search { |
| | | width: 28rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="$goBack()"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç³è¯·è½¦è¾</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input type="text" placeholder="请è¾å
¥ç³è¯·è½¦è¾" v-model="param.receptMemberName" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡åºåæ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="isShowDatetime = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°ç±»å«</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text>{{ 111 }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input type="text" placeholder="请è¾å
¥" v-model="param.address" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ä¹è½¦äººå</text> |
| | | </view> |
| | | <view class="value" @click="$jump('/pages/staff/memberSel')"> |
| | | <text class="mr6" :style="{ color: param.peo ? '#000000' : '#999999' }">{{ param.peo ? param.peo : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="label"> |
| | | <text style="color: #e42d2d;">*</text> |
| | | <text>ç¨è½¦äºç±</text> |
| | | </view> |
| | | <view class="value"> |
| | | <textarea type="text" placeholder="请è¾å
¥" :maxlength="-1" v-model="param.reson" placeholder-style="color: #999999;" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tip"> |
| | | <view class="title">注æäºé¡¹ï¼</view> |
| | | <view class="line">1ãå
¬å¸è½¦è¾å¤åºéåçç¨è½¦ç³è¯·è¡¨ï¼ç»æ¹ååæ¹å¯å¤åºï¼ååºï¼ã</view> |
| | | <view class="line">2ãå¸å¤ç¨è½¦éæ»ç»å审æ¹ã</view> |
| | | <view class="line">3ãååºè½¦è¾å¿
é¡»éµå®äº¤éè§åï¼å®å
¨è¡é©¶ã对äºè½¦è¾åç交éæå¤ï¼å¯¹å½äºäººåç¬¬ä¸æ¹é æäººèº«ä¼¤å®³åæå¤±ï¼å
¬å¸å¯ä»¥åå©å¤çä¿é©å
¬å¸èµå¿ç¸å
³äºå®ï¼ä½ä¸æ¿æ
ä»»ä½è´£ä»»åè´¹ç¨ã</view> |
| | | <view class="line">4ãå
¬å¸åç»ç³è¯·äººç¨è½¦ï¼ç³è¯·å车人为第ä¸è´£ä»»äººï¼ä¸å
许转åç»å
¶ä»äººä½¿ç¨ï¼è¥è¦åç»ä»äººä½¿ç¨ãè´£ä»»äººè¦æ¿æ
å
¨é¨è´£ä»»ã</view> |
| | | </view> |
| | | <view class="sub_btn" @click="handleSub">æäº¤</view> |
| | | <!-- --> |
| | | <u-datetime-picker :show="isShowDatetime" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDatetime = false" mode="date"></u-datetime-picker> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="$goBack()"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.startTime ? '#000000' : '#999999' }" |
| | | > |
| | | <text v-if="param.startTime"> |
| | | {{ param.startTime.slice(5, 16) }}è³{{ |
| | | param.endTime.slice(11, 16) |
| | | }} |
| | | </text> |
| | | <text v-else>è¯·éæ©</text> |
| | | </text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç³è¯·è½¦è¾</text> |
| | | </view> |
| | | <view class="value" @click="$goBack()"> |
| | | <input |
| | | type="text" |
| | | disabled |
| | | placeholder="请è¾å
¥ç³è¯·è½¦è¾" |
| | | v-model="param.carCode" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡åºåæ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="isShowDatetime = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.planUseDate ? '#000000' : '#999999' }" |
| | | >{{ param.planUseDate ? param.planUseDate : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°ç±»å«</text> |
| | | </view> |
| | | <view class="value"> |
| | | <text>{{ param.type == "1" ? "å¸å¤" : "å¸å
" }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ç®çå°</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input |
| | | type="text" |
| | | placeholder="请è¾å
¥" |
| | | v-model="param.addr" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ä¹è½¦äººå</text> |
| | | </view> |
| | | <view class="value" @click="$jump('/pages/staff/vehicle/applePeo')"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ |
| | | color: |
| | | param.memberList && param.memberList.length > 0 |
| | | ? '#000000' |
| | | : '#999999', |
| | | }" |
| | | > |
| | | <text v-if="param.memberNames"> |
| | | {{ param.memberNames }} |
| | | </text> |
| | | <text v-else>è¯·éæ©</text> |
| | | </text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="upload_line"> |
| | | <view class="label"> |
| | | <text style="color: #e42d2d">*</text> |
| | | <text>ç¨è½¦äºç±</text> |
| | | </view> |
| | | <view class="value"> |
| | | <textarea |
| | | type="text" |
| | | placeholder="请è¾å
¥" |
| | | :maxlength="-1" |
| | | v-model="param.content" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tip"> |
| | | <view class="title">注æäºé¡¹ï¼</view> |
| | | <view class="line" |
| | | >1ãå
¬å¸è½¦è¾å¤åºéåçç¨è½¦ç³è¯·è¡¨ï¼ç»æ¹ååæ¹å¯å¤åºï¼ååºï¼ã</view |
| | | > |
| | | <view class="line">2ãå¸å¤ç¨è½¦éæ»ç»å审æ¹ã</view> |
| | | <view class="line" |
| | | >3ãååºè½¦è¾å¿
é¡»éµå®äº¤éè§åï¼å®å
¨è¡é©¶ã对äºè½¦è¾åç交éæå¤ï¼å¯¹å½äºäººåç¬¬ä¸æ¹é æäººèº«ä¼¤å®³åæå¤±ï¼å
¬å¸å¯ä»¥åå©å¤çä¿é©å
¬å¸èµå¿ç¸å
³äºå®ï¼ä½ä¸æ¿æ
ä»»ä½è´£ä»»åè´¹ç¨ã</view |
| | | > |
| | | <view class="line" |
| | | >4ãå
¬å¸åç»ç³è¯·äººç¨è½¦ï¼ç³è¯·å车人为第ä¸è´£ä»»äººï¼ä¸å
许转åç»å
¶ä»äººä½¿ç¨ï¼è¥è¦åç»ä»äººä½¿ç¨ãè´£ä»»äººè¦æ¿æ
å
¨é¨è´£ä»»ã</view |
| | | > |
| | | </view> |
| | | <view class="sub_btn" @click="handleSub">æäº¤</view> |
| | | <!-- --> |
| | | <u-datetime-picker |
| | | :show="isShowDatetime" |
| | | :minDate="new Date(param.startTime).getTime()" |
| | | :maxDate="new Date(param.endTime).getTime()" |
| | | @confirm="confirmDate" |
| | | @cancel="isShowDatetime = false" |
| | | mode="datetime" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | minDate: '', |
| | | isShowDatetime: false, |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.minDate = new Date().getTime() |
| | | }, |
| | | methods: { |
| | | handleSub() { |
| | | console.log('---'); |
| | | }, |
| | | confirmDate(e) { |
| | | console.log(e.value); |
| | | this.param.aa = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | } |
| | | } |
| | | } |
| | | import dayjs from 'dayjs' |
| | | import { carUseBookCraete } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | minDate: '', |
| | | isShowDatetime: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$eventBus.$on('applePeo', (res) => { |
| | | this.$set(this.param, 'memberList', res) |
| | | this.$set(this.param, 'memberIds', res.map(i => i.id).join(',')) |
| | | this.$set(this.param, 'memberNames', res.map(i => i.name).join(',')) |
| | | }) |
| | | }, |
| | | onLoad(option) { |
| | | console.log(option) |
| | | this.param = { ...option } |
| | | this.minDate = new Date().getTime() |
| | | |
| | | }, |
| | | methods: { |
| | | handleSub() { |
| | | const { param } = this |
| | | console.log('---', param) |
| | | if (!param.planUseDate) return uni.showToast({ |
| | | title: 'è¯·éæ©é¢è®¡ç¨è½¦æ¶é´', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.addr) return uni.showToast({ |
| | | title: '请è¾å
¥ç®çå°', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.memberList || param.memberList.length === 0) return uni.showToast({ |
| | | title: 'è¯·éæ©ä¹è½¦äººå', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.content) return uni.showToast({ |
| | | title: '请è¾å
¥ç¨è½¦äºç±', |
| | | icon: 'none' |
| | | }) |
| | | carUseBookCraete({ |
| | | ...param, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success' |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: '/pages/staff/index' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | confirmDate(e) { |
| | | |
| | | this.param.planUseDate = dayjs(e.value).format('YYYY-MM-DD HH:mm') |
| | | this.isShowDatetime = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #E5E5E5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .sub_btn{ |
| | | position: fixed; |
| | | bottom: 84rpx; |
| | | left: 30rpx; |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #279BAA; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | | border-radius: 44rpx; |
| | | font-size: 30rpx; |
| | | color: #FFFFFF; |
| | | .sub_btn { |
| | | position: fixed; |
| | | bottom: 84rpx; |
| | | left: 30rpx; |
| | | width: 690rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 44rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | .tip{ |
| | | background: #F7F7F7; |
| | | padding: 30rpx 30rpx 180rpx; |
| | | margin: 0 -30rpx; |
| | | .title{ |
| | | line-height: 40rpx; |
| | | margin-bottom: 22rpx; |
| | | } |
| | | .line{ |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | line-height: 36rpx; |
| | | } |
| | | } |
| | | .tip { |
| | | background: #f7f7f7; |
| | | padding: 30rpx 30rpx 180rpx; |
| | | margin: 0 -30rpx; |
| | | .title { |
| | | line-height: 40rpx; |
| | | margin-bottom: 22rpx; |
| | | } |
| | | .line { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | line-height: 36rpx; |
| | | } |
| | | } |
| | | .main_app { |
| | | padding-bottom: 0; |
| | | // padding-top: 10rpx; |
| | | padding-bottom: 0; |
| | | // padding-top: 10rpx; |
| | | } |
| | | |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="app_header"> |
| | | <view class="item" @click="isShowDate = true"> |
| | | <text v-if="param.queryDate">{{ param.queryDate }}</text> |
| | | <text v-else class="placeholder9">éæ©æ¥æ</text> |
| | | <u-icon class="ml12" name="arrow-down" color="#999999" /> |
| | | </view> |
| | | <view class="item" @click="isShowCar = true"> |
| | | <text v-if="param.carCode">{{ param.carCode }}</text> |
| | | <text v-else class="placeholder9">éæ©è½¦è¾</text> |
| | | <u-icon class="ml12" name="arrow-down" color="#999999" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="box_list"> |
| | | <view |
| | | class="box_list_item" |
| | | v-for="(item, index) in dataList" |
| | | :key="index" |
| | | > |
| | | <view class="box_list_item_head"> |
| | | <text>{{ item.carCode }}</text> |
| | | <text class="loading" v-if="item.status == '0'">ç³è¯·ä¸</text> |
| | | <text class="grr" v-if="item.status == '1'">审æ¹ä¸</text> |
| | | <text class="grr" v-if="item.status == '2'">审æ¹éè¿</text> |
| | | <text class="error" v-if="item.status == '3'">审æ¹ä¸éè¿</text> |
| | | <text class="grr" v-if="item.status == '4'">已忶</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>å¼å§æ¶é´ï¼</text> |
| | | <text>{{ item.startTime.slice(5, 16) }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç»ææ¶é´ï¼</text> |
| | | <text>{{ item.endTime.slice(5, 16) }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>é¢çº¦äººï¼</text> |
| | | <text>{{ item.memberName }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç®çå°ï¼</text> |
| | | <text>{{ item.addr }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="code" |
| | | :show="isShowCar" |
| | | @close="isShowCar = false" |
| | | :closeOnClickOverlay="true" |
| | | :columns="carsList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker |
| | | mode="date" |
| | | :show="isShowDate" |
| | | :minDate="minDate" |
| | | @close="isShowDate = false" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedDate" |
| | | @cancel="isShowDate = false" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { carUseBookPaiche, getCarsList } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | carsList: [], |
| | | param: { |
| | | memberId: uni.getStorageSync('userInfo').memberId |
| | | }, |
| | | minDate: '', |
| | | pagination: { |
| | | page: 0, |
| | | capacity: 10 |
| | | }, |
| | | total: 0, |
| | | dataList: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.minDate = new Date(dayjs().format('YYYY') + '-01-01').getTime() |
| | | // this.param.queryDate = dayjs().format('YYYY-MM-DD') |
| | | this.getList() |
| | | this.initData() |
| | | }, |
| | | onReachBottom() { |
| | | if (this.total > 10) { |
| | | this.getList() |
| | | } |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | const { param, pagination } = this |
| | | pagination.page = pagination.page + 1 |
| | | carUseBookPaiche({ |
| | | ...pagination, |
| | | model: { ...param } |
| | | }).then(res => { |
| | | if (pagination.page === 1) { |
| | | this.dataList = res.data.records |
| | | } else { |
| | | this.dataList = [...list, ...res.data.records] |
| | | } |
| | | this.total = res.data.total |
| | | }) |
| | | }, |
| | | seletedCar(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'carCode', item.code) |
| | | this.$set(this.param, 'carId', item.id) |
| | | this.isShowCar = false |
| | | if (this.param.carId && this.param.queryDate) { |
| | | this.pagination.page = 0 |
| | | this.getList() |
| | | } |
| | | }, |
| | | seletedDate(e) { |
| | | this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | if (this.param.carId && this.param.queryDate) { |
| | | this.pagination.page = 0 |
| | | this.getList() |
| | | } |
| | | }, |
| | | endtimeClose() { |
| | | this.param.endTime = '' |
| | | this.param.startTime = '' |
| | | this.isShowEndDate = false |
| | | }, |
| | | timeFilter(mode, options) { |
| | | if (mode === 'minute') { |
| | | return options.filter(option => option === '00' || option === '30' || option === '60') |
| | | } |
| | | return options |
| | | }, |
| | | initData() { |
| | | getCarsList({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.carsList = [res.data] |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_app { |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | | } |
| | | .app_header { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 -15rpx; |
| | | background-color: #fff; |
| | | .item { |
| | | width: 360rpx; |
| | | height: 72rpx; |
| | | margin: 15rpx; |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .box_list { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | .box_list_item { |
| | | width: 100%; |
| | | margin-bottom: 20rpx; |
| | | &:last-child { |
| | | margin: 0 !important; |
| | | } |
| | | .box_list_item_head { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%); |
| | | border-radius: 8rpx 8rpx 0rpx 0rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .loading { |
| | | color: #4c99a8; |
| | | } |
| | | .success { |
| | | color: #03c68f; |
| | | } |
| | | .error { |
| | | color: #e0312a; |
| | | } |
| | | .grr{ |
| | | color: #999999; |
| | | } |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .box_list_item_nr_item { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="app_header"> |
| | | <view class="item" @click="isShowCar = true"> |
| | | <text v-if="false">xx</text> |
| | | <text v-else class="placeholder9">éæ©è½¦è¾</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | <view class="item" @click="isShowDate = true"> |
| | | <text v-if="param.aa">{{ param.aa }}</text> |
| | | <text v-else class="placeholder9">éæ©æ¥æ</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="time_list"> |
| | | <view class="item" v-for="item,i in timeList" :key="i">{{ item.time }}</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_footer"> |
| | | <view class="df_ac"> |
| | | <view>已鿩ï¼</view> |
| | | <view class="sel_time">xxxxxx</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="left"> |
| | | <view class="item" v-for="item in colorOptions" :key="item.name"> |
| | | <view class="box" :style="{ background: item.color }"></view> |
| | | <view class="">{{ item.name }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="sub" @click="$jump('/pages/staff/vehicle/apply')">确认é¢çº¦</view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker keyName="name" :show="isShowCar" :columns="carList" @confirm="seletedCar" @cancel="isShowCar = false"></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker :show="isShowDate" :minDate="minDate" @confirm="confirmDate" @cancel="isShowDate = false" mode="date"></u-datetime-picker> |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="app_header"> |
| | | <view class="item" @click="isShowCar = true"> |
| | | <text v-if="param.carCode">{{ param.carCode }}</text> |
| | | <text v-else class="placeholder9">éæ©è½¦è¾</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | <view class="item" @click="isShowDate = true"> |
| | | <text v-if="param.queryDate">{{ param.queryDate }}</text> |
| | | <text v-else class="placeholder9">éæ©æ¥æ</text> |
| | | <u-icon name="arrow-down" color="#999999" /> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="time_list"> |
| | | <view |
| | | class="item" |
| | | :class="{ disable: item.isUse == 1, active: item.checked == '1' }" |
| | | @click="datetimeClick(item, i)" |
| | | v-for="(item, i) in timeList" |
| | | :key="i" |
| | | >{{ item.startHours }}-{{ item.endHours }}</view |
| | | > |
| | | </view> |
| | | <!-- --> |
| | | <view class="main_footer"> |
| | | <view class="df_ac"> |
| | | <view>已鿩ï¼</view> |
| | | <view class="sel_time">{{ selDatetime }}</view> |
| | | </view> |
| | | <view class="btns"> |
| | | <view class="left"> |
| | | <view class="item" v-for="item in colorOptions" :key="item.name"> |
| | | <view class="box" :style="{ background: item.color }"></view> |
| | | <view class="">{{ item.name }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="sub" @click="onSubmit">确认é¢çº¦</view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="code" |
| | | :show="isShowCar" |
| | | :columns="carsList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker |
| | | :show="isShowDate" |
| | | :minDate="minDate" |
| | | @confirm="confirmDate" |
| | | @cancel="isShowDate = false" |
| | | mode="date" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | import { getCarsList, carCanReservationDate } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | param: {}, |
| | | |
| | | minDate: '', |
| | | carList: [[{ name: 'aa', value: '11' }]], |
| | | timeList: [ |
| | | { time: '08:30-09:00' }, |
| | | { time: '08:30-09:00' }, |
| | | { time: '08:30-09:00' }, |
| | | { time: '08:30-09:00' }, |
| | | ], |
| | | |
| | | colorOptions: [ |
| | | { color: '#279BAA', name: '已鿩' }, |
| | | { color: '#F7F7F7', name: 'å¯é¢çº¦' }, |
| | | { color: '#cccccc', name: 'ä¸å¯é¢çº¦' }, |
| | | ] |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.minDate = new Date().getTime() |
| | | }, |
| | | methods: { |
| | | confirmDate(e) { |
| | | console.log(e.value); |
| | | this.param.aa = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | }, |
| | | seletedCar(e) { |
| | | console.log(e.value); |
| | | this.param.aa = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | param: {}, |
| | | |
| | | minDate: '', |
| | | carsList: [[{ name: 'aa', value: '11' }]], |
| | | timeList: [], |
| | | selDatetime: '', |
| | | |
| | | colorOptions: [ |
| | | { color: '#279BAA', name: '已鿩' }, |
| | | { color: '#F7F7F7', name: 'å¯é¢çº¦' }, |
| | | { color: '#cccccc', name: 'ä¸å¯é¢çº¦' }, |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.minDate = new Date().getTime() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param } = this |
| | | const selTimeList = this.timeList.filter(i => i.checked == '1') |
| | | if (selTimeList.length == -1) { |
| | | return uni.showToast({ |
| | | title: '请å
éæ©ç¨è½¦æ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | const obj = { |
| | | carCode: param.carCode, |
| | | carId: param.carId , |
| | | startTime: selTimeList[0].startTime, |
| | | endTime: selTimeList[selTimeList.length - 1].endTime, |
| | | dateDay: param.queryDate, |
| | | type: '0' |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&dateDay=${obj.dateDay}&type=${obj.type}` |
| | | }) |
| | | // this.$jump('/pages/staff/vehicle/apply') |
| | | }, |
| | | datetimeClick(item, index) { |
| | | if(item.isUse == '1') return |
| | | const { timeList } = this |
| | | const selTimeList = timeList.filter(i => i.checked == '1') |
| | | if (selTimeList.length === 0) { |
| | | this.timeList.forEach((ite, i) => { |
| | | if (i === index) { |
| | | ite.checked = '1' |
| | | this.$forceUpdate() |
| | | } |
| | | }) |
| | | } else { |
| | | const findIndex = selTimeList.findIndex(i => i.index === index) |
| | | console.log('findIndex', findIndex) |
| | | if (findIndex === -1) { |
| | | const startNum = index - selTimeList[0].index |
| | | const endNum = index - selTimeList[selTimeList.length - 1].index |
| | | if (startNum == 1 || startNum == -1 || endNum == 1 || endNum == -1) { |
| | | console.log('ç¸é»') |
| | | item.checked = true |
| | | this.$forceUpdate() |
| | | } else { |
| | | return uni.showToast({ |
| | | title: 'è¯·éæ©ç¸é»çæ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } else { |
| | | if (index === selTimeList[0].index || index === selTimeList[selTimeList.length - 1].index) { |
| | | item.checked = false |
| | | this.$forceUpdate() |
| | | } else { |
| | | return uni.showToast({ |
| | | title: '请å
åæ¶æå¤å±çæ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | const selTimeLists = this.timeList.filter(i => i.checked == '1') |
| | | // console.log('selTimeList', selTimeList); |
| | | if (selTimeLists.length === 0) { |
| | | this.selDatetime = '' |
| | | } else { |
| | | this.selDatetime = this.param.queryDate.slice(5) + ' ' + selTimeLists[0].startHours + '-' + selTimeLists[selTimeLists.length - 1].endHours |
| | | } |
| | | // if(true){ |
| | | // this.selDatetime.push(item) |
| | | // } |
| | | }, |
| | | confirmDate(e) { |
| | | this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.isShowDate = false |
| | | if(this.param.carId && this.param.queryDate){ |
| | | this.gettimes() |
| | | } |
| | | }, |
| | | initData() { |
| | | getCarsList({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.carsList = [res.data] |
| | | }) |
| | | }, |
| | | gettimes() { |
| | | const { param } = this |
| | | carCanReservationDate({ |
| | | dateDay: param.queryDate, |
| | | carId: param.carId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.timeList = res.data || [] |
| | | this.timeList.forEach((i, j) => { |
| | | i.checked = '0', |
| | | i.index = j |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | seletedCar(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'carCode', item.code) |
| | | this.$set(this.param, 'carId', item.id) |
| | | if(this.param.carId && this.param.queryDate){ |
| | | this.gettimes() |
| | | } |
| | | this.isShowCar = false |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .main_app { |
| | | .app_header { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 -15rpx; |
| | | .item { |
| | | width: 330rpx; |
| | | height: 72rpx; |
| | | margin: 15rpx; |
| | | padding: 0 30rpx; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .main_footer{ |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #EEEEEE; |
| | | .sel_time{ |
| | | color: #279BAA; |
| | | } |
| | | .btns{ |
| | | margin-top: 10rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .left{ |
| | | display: flex; |
| | | .item{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 20rpx; |
| | | .box{ |
| | | margin-right: 10rpx; |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | } |
| | | } |
| | | .sub{ |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279BAA; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #FFFFFF; |
| | | } |
| | | } |
| | | } |
| | | .time_list{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 30rpx 0; |
| | | flex-wrap: wrap; |
| | | .item{ |
| | | width: 220rpx; |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | text-align: center; |
| | | background: #F7F7F7; |
| | | border-radius: 4rpx; |
| | | margin-bottom: 24rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .active{ |
| | | background-color: #279BAA; |
| | | color: #fff; |
| | | } |
| | | .disable{ |
| | | background-color: #cccccc; |
| | | color: #999999; |
| | | } |
| | | } |
| | | |
| | | .app_header { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 -15rpx; |
| | | .item { |
| | | width: 330rpx; |
| | | height: 72rpx; |
| | | margin: 15rpx; |
| | | padding: 0 30rpx; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .main_footer { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee; |
| | | .sel_time { |
| | | color: #279baa; |
| | | } |
| | | .btns { |
| | | margin-top: 10rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .left { |
| | | display: flex; |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 20rpx; |
| | | .box { |
| | | margin-right: 10rpx; |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | } |
| | | } |
| | | .sub { |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | } |
| | | .time_list { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 30rpx 0; |
| | | flex-wrap: wrap; |
| | | .item { |
| | | width: 220rpx; |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | text-align: center; |
| | | background: #f7f7f7; |
| | | border-radius: 4rpx; |
| | | margin-bottom: 24rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .active { |
| | | background-color: #279baa; |
| | | color: #fff; |
| | | } |
| | | .disable { |
| | | background-color: #cccccc; |
| | | color: #999999; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ©è½¦è¾</text> |
| | | </view> |
| | | <view class="value" @click="isShowCar = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="isShowDate = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="have_info"> |
| | | <view class="tit">æ¨ç³è¯·çç¨è½¦æ¶æ®µå·²æè½¦è¾é¢çº¦</view> |
| | | <view class="content"> |
| | | <view class="card">çA1212</view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦æ¶æ®µ</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç®çå°</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ä¹è½¦äººæ°</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦äºç±</text> |
| | | <text>111111</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç³è¯·äºº</text> |
| | | <text>111111</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="main_footer"> |
| | | <text>已鿩ï¼</text> |
| | | <text class="sel">132123</text> |
| | | <text class="btn" @click="$jump('/pages/staff/vehicle/apply')">确认é¢çº¦</text> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="isShowCar" |
| | | @close="isShowCar = false" |
| | | :closeOnClickOverlay="true" |
| | | :columns="carList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <u-datetime-picker |
| | | mode="datetime" |
| | | keyName="name" |
| | | :show="isShowDate" |
| | | :filter="timeFilter" |
| | | @close="isShowDate = false" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedDate" |
| | | @cancel="isShowDate = false" |
| | | /> |
| | | |
| | | </view> |
| | | <view class="main_app"> |
| | | <view class="main_wrap"> |
| | | <!-- --> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>éæ©è½¦è¾</text> |
| | | </view> |
| | | <view class="value" @click="isShowCar = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.carCode ? '#000000' : '#999999' }" |
| | | >{{ param.carCode ? param.carCode : "è¯·éæ©" }}</text |
| | | > |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>é¢è®¡ç¨è½¦æ¶æ®µ</text> |
| | | </view> |
| | | <view class="value" @click="isShowDate = true"> |
| | | <text |
| | | class="mr6" |
| | | :style="{ color: param.startTime ? '#999999' : '#999999' }" |
| | | > |
| | | <template v-if="param.startTime"> |
| | | {{ param.startHours }}è³{{ param.endHours }} |
| | | </template> |
| | | <template v-else> è¯·éæ© </template> |
| | | </text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="have_info" v-if="info && info.length > 0"> |
| | | <view class="tit">æ¨ç³è¯·çç¨è½¦æ¶æ®µå·²æè½¦è¾é¢çº¦</view> |
| | | <view class="content" v-for="item,i in info" :key="i"> |
| | | <view class="card">{{ item.carCode }}</view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦æ¶æ®µ</text> |
| | | <text> |
| | | {{ item.startTime.slice(5, 16) }}è³{{ |
| | | item.endTime.slice(5, 16) |
| | | }}</text |
| | | > |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç®çå°</text> |
| | | <text>{{ item.addr }}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ä¹è½¦äººæ°</text> |
| | | <text>{{ item.memberIds.split(",").length }}人</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç¨è½¦äºç±</text> |
| | | <text>{{ item.content }}</text> |
| | | </view> |
| | | <view class="line"> |
| | | <text>ç³è¯·äºº</text> |
| | | <text>{{ item.memberName }} {{ item.memberMobile}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="main_footer"> |
| | | <text>已鿩ï¼</text> |
| | | <text class="sel" v-if="param.startTime" |
| | | >{{ param.startHours }}è³{{ param.endHours }}</text |
| | | > |
| | | <text class="btn" @click="onSubmit">确认é¢çº¦</text> |
| | | </view> |
| | | <!-- --> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="code" |
| | | :show="isShowCar" |
| | | @close="isShowCar = false" |
| | | :closeOnClickOverlay="true" |
| | | :columns="carsList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <u-datetime-picker |
| | | mode="datetime" |
| | | :show="isShowDate" |
| | | :filter="timeFilter" |
| | | title="å¼å§æ¶é´" |
| | | :minDate="minDate" |
| | | @close="isShowDate = false" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedDate" |
| | | @cancel="isShowDate = false" |
| | | /> |
| | | <u-datetime-picker |
| | | mode="datetime" |
| | | :show="isShowEndDate" |
| | | :filter="timeFilter" |
| | | title="ç»ææ¶é´" |
| | | :minDate="new Date(param.startTime || null).getTime()" |
| | | @close="endtimeClose" |
| | | :closeOnClickOverlay="true" |
| | | @confirm="seletedEndDate" |
| | | @cancel="endtimeClose" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCarsList, carUseBookList } from '@/api' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | carList: [], |
| | | datetimeOp: [] |
| | | }; |
| | | }, |
| | | methods: { |
| | | seletedCar() {}, |
| | | seletedDate() { |
| | | this.isShowDate = false; |
| | | }, |
| | | timeFilter(mode, options) { |
| | | if (mode === 'minute') { |
| | | return options.filter(option => option === '00' || option === '30'); |
| | | } |
| | | return options; |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | isShowEndDate: false, |
| | | carsList: [], |
| | | info: [], |
| | | |
| | | minDate: '' |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.minDate = new Date(dayjs().format('YYYY-MM-DD HH:') + '00:00').getTime() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { param, info } = this |
| | | if (info.length > 0) return uni.showToast({ |
| | | title: 'è¯·éæ°éæ©æ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.startTime) return uni.showToast({ |
| | | title: '请å
éæ©ç¨è½¦æ¶é´æ®µ', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.carId) return uni.showToast({ |
| | | title: 'è¯·éæ©è½¦è¾', |
| | | icon: 'none' |
| | | }) |
| | | const obj = { |
| | | carCode: param.carCode, |
| | | carId: param.carId, |
| | | startTime: param.startTime, |
| | | endTime: param.endTime, |
| | | type: '1' |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&type=${obj.type}` |
| | | }) |
| | | // this.$jump('/pages/staff/vehicle/apply') |
| | | }, |
| | | getInfo() { |
| | | const { param } = this |
| | | carUseBookList({ |
| | | carId: param.carId, |
| | | startTime: param.startTime, |
| | | endTime: param.endTime, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.info = res.data |
| | | } |
| | | }) |
| | | }, |
| | | seletedCar(e) { |
| | | const item = e.value[0] |
| | | this.$set(this.param, 'carCode', item.code) |
| | | this.$set(this.param, 'carId', item.id) |
| | | this.isShowCar = false |
| | | if (this.param.carId && this.param.startTime) { |
| | | this.getInfo() |
| | | } |
| | | }, |
| | | seletedDate(e) { |
| | | this.param.startTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss') |
| | | this.param.startHours = dayjs(e.value).format('MM-DD HH:mm') |
| | | console.log(this.param.startTime) |
| | | this.isShowDate = false |
| | | this.isShowEndDate = true |
| | | }, |
| | | seletedEndDate(e) { |
| | | this.param.endTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss') |
| | | this.param.endHours = dayjs(e.value).format('MM-DD HH:mm') |
| | | console.log(this.param.endTime) |
| | | this.isShowEndDate = false |
| | | if (this.param.carId && this.param.startTime) { |
| | | this.getInfo() |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | endtimeClose() { |
| | | this.param.endTime = '' |
| | | this.param.startTime = '' |
| | | this.isShowEndDate = false |
| | | }, |
| | | timeFilter(mode, options) { |
| | | if (mode === 'minute') { |
| | | return options.filter(option => option === '00' || option === '30' || option === '60') |
| | | } |
| | | return options |
| | | }, |
| | | initData() { |
| | | getCarsList({ |
| | | type: 1 |
| | | }).then(res => { |
| | | this.carsList = [res.data] |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .have_info { |
| | | .tit { |
| | | color: #ed4545; |
| | | margin: 40rpx 0 24rpx; |
| | | } |
| | | .content { |
| | | background: #f7f7f7; |
| | | border-radius: 16rpx; |
| | | padding: 30rpx 30rpx 10rpx; |
| | | .card { |
| | | margin-bottom: 30rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | | } |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-of-type(1) { |
| | | width: 150rpx; |
| | | color: #888888; |
| | | } |
| | | &:nth-of-type(2) { |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | padding: 0 0 200rpx; |
| | | .tit { |
| | | color: #ed4545; |
| | | margin: 40rpx 0 24rpx; |
| | | } |
| | | .content { |
| | | background: #f7f7f7; |
| | | border-radius: 16rpx; |
| | | padding: 30rpx 30rpx 10rpx; |
| | | margin-bottom: 20rpx; |
| | | .card { |
| | | margin-bottom: 30rpx; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | | } |
| | | .line { |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | text { |
| | | &:nth-of-type(1) { |
| | | width: 150rpx; |
| | | color: #888888; |
| | | } |
| | | &:nth-of-type(2) { |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .main_wrap { |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | padding: 30rpx 0; |
| | | .label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | text { |
| | | &:nth-child(1) { |
| | | color: #e42d2d; |
| | | margin-right: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | .value { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | textarea { |
| | | margin-top: 12rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .adduser_list_item_ipt1_upload { |
| | | margin-top: 24rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | background: #f7f7f7; |
| | | color: #666666; |
| | | font-size: 22rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .main_footer { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .btn { |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | .sel { |
| | | color: #279baa; |
| | | flex: 1; |
| | | } |
| | | position: fixed; |
| | | width: 100%; |
| | | left: 0; |
| | | background-color: #fff; |
| | | bottom: 0; |
| | | padding: 20rpx 30rpx 84rpx; |
| | | box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .btn { |
| | | width: 184rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | text-align: center; |
| | | background: #279baa; |
| | | box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee; |
| | | border-radius: 36rpx; |
| | | font-size: 30rpx; |
| | | color: #ffffff; |
| | | } |
| | | .sel { |
| | | color: #279baa; |
| | | flex: 1; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="visit"> |
| | | <view class="list"> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>被访人å§å</text> |
| | | </view> |
| | | <view class="list_item_content"><input type="text" placeholder="请è¾å
¥å§å" v-model="form1.receptMemberName" @blur="getUser" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="show4 = true"> |
| | | <text :style="{ color: form1.starttime ? '#000000' : '' }">{{ form1.starttime ? form1.starttime : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ç¦»åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openLC"> |
| | | <text :style="{ color: form1.endtime ? '#000000' : '' }">{{ form1.endtime ? form1.endtime : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <div class="empty"></div> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>è系人</text> |
| | | </view> |
| | | <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="请è¾å
¥è系人å§å" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ææºå·</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input |
| | | type="number" |
| | | maxlength="11" |
| | | v-model="form1.phone1" |
| | | :placeholder="'请è¾å
¥èç³»äººææºå·'" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>æ¥è®¿åä½</text> |
| | | </view> |
| | | <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="请è¾å
¥æ¥è®¿åä½çå
¨ç§°" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥å车è¾</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openInput(1)"> |
| | | <text :style="{ color: form1.carNos ? '#000000' : '' }">{{ form1.carNos ? form1.carNos : '请è¾å
¥è½¦çå·ç ' }}</text> |
| | | <!-- <input type="text" placeholder="请è¾å
¥è½¦çå·" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" /> --> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>é车人æ°</text> |
| | | </view> |
| | | <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="请è¾å
¥éè½¦äººåæ»æ°" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>æ¥è®¿äºç±</text> |
| | | </view> |
| | | <view class="list_item_content"><input type="text" v-model="form1.reason" placeholder="请è¾å
¥æ¥è®¿äºç±" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | </view> |
| | | <view class="zw"></view> |
| | | <view class="footer"><view class="footer_btn" @click="submit">æäº¤</view></view> |
| | | <!-- å
¥åºæ¶é´ --> |
| | | <u-datetime-picker :show="show4" :minDate="new Date().getTime()" mode="datetime" @cancel="show4 = false" @confirm="setinDate"></u-datetime-picker> |
| | | <!-- ç¦»åºæ¶é´ --> |
| | | <u-datetime-picker |
| | | v-if="form1.starttime" |
| | | :show="show5" |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | :maxDate="formatTimeStamp(maxTime)" |
| | | mode="datetime" |
| | | @cancel="show5 = false" |
| | | @confirm="setoutDate" |
| | | ></u-datetime-picker> |
| | | <!-- è½¦è¾ --> |
| | | <u-popup :show="show2" :round="10" :safeAreaInsetBottom="true" :closeable="true" mode="bottom" @close="show2 = false"> |
| | | <view class="addcar"> |
| | | <view class="addcar_head">æ·»å 车è¾</view> |
| | | <view class="addcar_ipt"><input type="text" v-model="carName" placeholder="请è¾å
¥è½¦çå·" /></view> |
| | | <view class="addcar_footer"> |
| | | <view class="addcar_footer_item" @click="show2 = false">åæ¶</view> |
| | | <view class="addcar_footer_item t" @click="submitCart">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-picker keyName="name" :show="show6" :columns="columns1" @confirm="seleIdcard" @cancel="show6 = false"></u-picker> |
| | | <!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> --> |
| | | <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" /> |
| | | <qf-image-cropper ref="cropper" :width="280" :height="280" :radius="30" @crop="uploadImg"></qf-image-cropper> |
| | | </view> |
| | | <view class="visit"> |
| | | <view class="list"> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>被访人å§å</text> |
| | | </view> |
| | | <view class="list_item_content" @click="showName = true"> |
| | | <text :style="{ color: form1.receptMemberName ? '#000000' : '' }">{{ |
| | | form1.receptMemberName |
| | | ? form1.receptMemberName + " " + form1.receptCompanyName |
| | | : "è¯·éæ©" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="show4 = true"> |
| | | <text :style="{ color: form1.starttime ? '#000000' : '' }">{{ |
| | | form1.starttime ? form1.starttime : "è¯·éæ©" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ç¦»åæ¶é´</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openLC"> |
| | | <text :style="{ color: form1.endtime ? '#000000' : '' }">{{ |
| | | form1.endtime ? form1.endtime : "è¯·éæ©" |
| | | }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon> |
| | | </view> |
| | | </view> |
| | | <div class="empty"></div> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>è系人</text> |
| | | </view> |
| | | <view class="list_item_content" |
| | | ><input |
| | | type="text" |
| | | v-model="form1.name" |
| | | placeholder="请è¾å
¥è系人å§å" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>ææºå·</text> |
| | | </view> |
| | | <view class="list_item_content"> |
| | | <input |
| | | type="number" |
| | | maxlength="13" |
| | | v-model="form1.phone" |
| | | :placeholder="'请è¾å
¥èç³»äººææºå·'" |
| | | placeholder-style="color: #999999;" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>æ¥è®¿åä½</text> |
| | | </view> |
| | | <view class="list_item_content" |
| | | ><input |
| | | type="text" |
| | | v-model="form1.companyName" |
| | | placeholder="请è¾å
¥æ¥è®¿åä½çå
¨ç§°" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>å
¥å车è¾</text> |
| | | </view> |
| | | <view class="list_item_content" @click="openInput(1)"> |
| | | <text :style="{ color: form1.carNos ? '#000000' : '' }">{{ |
| | | form1.carNos ? form1.carNos : "请è¾å
¥è½¦çå·ç " |
| | | }}</text> |
| | | <!-- <input type="text" placeholder="请è¾å
¥è½¦çå·" v-model="form1.carNos" maxlength="8" placeholder-style="color: #999999;" /> --> |
| | | </view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>é车人æ°</text> |
| | | </view> |
| | | <view class="list_item_content" |
| | | ><input |
| | | type="number" |
| | | v-model="form1.memberNum" |
| | | placeholder="请è¾å
¥éè½¦äººåæ»æ°" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | <view class="list_item"> |
| | | <view class="list_item_label"> |
| | | <text>*</text> |
| | | <text>æ¥è®¿äºç±</text> |
| | | </view> |
| | | <view class="list_item_content" |
| | | ><input |
| | | type="text" |
| | | v-model="form1.reason" |
| | | placeholder="请è¾å
¥æ¥è®¿äºç±" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | </view> |
| | | </view> |
| | | <view class="zw"></view> |
| | | <view class="footer" |
| | | ><view class="footer_btn" @click="submit">æäº¤</view></view |
| | | > |
| | | <!-- å
¥åºæ¶é´ --> |
| | | <u-datetime-picker |
| | | :show="show4" |
| | | :minDate="new Date().getTime()" |
| | | mode="datetime" |
| | | @cancel="show4 = false" |
| | | @confirm="setinDate" |
| | | ></u-datetime-picker> |
| | | <!-- ç¦»åºæ¶é´ --> |
| | | <u-datetime-picker |
| | | v-if="form1.starttime" |
| | | :show="show5" |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | :maxDate="formatTimeStamp(maxTime)" |
| | | mode="datetime" |
| | | @cancel="show5 = false" |
| | | @confirm="setoutDate" |
| | | ></u-datetime-picker> |
| | | <!-- è½¦è¾ --> |
| | | <u-popup |
| | | :show="show2" |
| | | :round="10" |
| | | :safeAreaInsetBottom="true" |
| | | :closeable="true" |
| | | mode="bottom" |
| | | @close="show2 = false" |
| | | > |
| | | <view class="addcar"> |
| | | <view class="addcar_head">æ·»å 车è¾</view> |
| | | <view class="addcar_ipt" |
| | | ><input type="text" v-model="carName" placeholder="请è¾å
¥è½¦çå·" |
| | | /></view> |
| | | <view class="addcar_footer"> |
| | | <view class="addcar_footer_item" @click="show2 = false">åæ¶</view> |
| | | <view class="addcar_footer_item t" @click="submitCart">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-picker |
| | | keyName="name" |
| | | :show="showName" |
| | | closeOnClickOverlay |
| | | :columns="memberList" |
| | | @confirm="seleteName" |
| | | @cancel="showName = false" |
| | | @close="showName = false" |
| | | ></u-picker> |
| | | <!-- <tly-picture-cut ref="tlyPictureCut" :pictureSrc="photoSrc" @createImg="uploadImg"></tly-picture-cut> --> |
| | | <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" /> |
| | | <qf-image-cropper |
| | | ref="cropper" |
| | | :width="280" |
| | | :height="280" |
| | | :radius="30" |
| | | @crop="uploadImg" |
| | | ></qf-image-cropper> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import tlyPictureCut from '@/components/tly-picture-cut/tlyPictureCut.vue'; |
| | | import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'; |
| | | import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue'; |
| | | import { getDaysAfterDate } from '@/utils/utils.js'; |
| | | import tlyPictureCut from '@/components/tly-picture-cut/tlyPictureCut.vue' |
| | | import keyboardInput from '@/components/keyboard-input/keyboard-input.vue' |
| | | import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue' |
| | | import { getDaysAfterDate } from '@/utils/utils.js' |
| | | import { createVisit, getVisitedMember } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | photoSrc: '', |
| | | type: '', |
| | | inputType: '', |
| | | show1: false, |
| | | show2: false, |
| | | show4: false, |
| | | show5: false, |
| | | show6: false, |
| | | show7: false, |
| | | fileList: [], |
| | | columns1: [[{ name: '身份è¯', id: 0 }, { name: '港澳è¯ä»¶', id: 1 }, { name: 'æ¤ç
§', id: 2 }]], |
| | | columnsNames: [[{ name: 'å¼ ä¸', id: 0 }, { name: 'å¼ ä¸', id: 1 }, { name: 'å¼ ä¸', id: 2 }]], |
| | | columns: [], |
| | | cars: [], |
| | | day: null, |
| | | maxTime: '', |
| | | carName: '', |
| | | personnel: [], |
| | | userAnswerId: '', |
| | | form1: { |
| | | phone1: '', |
| | | receptMemberId: '', |
| | | receptMemberName: '', |
| | | starttime: '', |
| | | endtime: '', |
| | | doors: '', |
| | | doorSelectName: '', |
| | | reason: '', |
| | | carNos: '' |
| | | }, |
| | | withUserList: { |
| | | name: '', |
| | | phone: '', |
| | | idcardType: '', |
| | | idcardTypeName: '', |
| | | companyName: '', |
| | | idcardNo: '', |
| | | faceImg: '', |
| | | faceImgUrl: '', |
| | | imgurl: '', |
| | | imgurlUrl: '' |
| | | }, |
| | | visit: '', |
| | | form: {}, |
| | | accessControl: '', |
| | | verify: '' |
| | | }; |
| | | }, |
| | | components: { tlyPictureCut, keyboardInput, QfImageCropper }, |
| | | onLoad(options) { |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data); |
| | | } |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | }, |
| | | methods: { |
| | | openInput(type) { |
| | | this.inputType = type; |
| | | this.$refs.keyboard.open(); |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.form1.carNos = e; |
| | | } else if (this.inputType === 2) { |
| | | this.withUserList.carNos = e; |
| | | } |
| | | this.$forceUpdate(); |
| | | this.closeInput(); |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | }, |
| | | uploadImg(file) { |
| | | this.$refs.cropper.close(); |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }); |
| | | uni.uploadFile({ |
| | | url: `${this.$baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`, |
| | | filePath: file.tempFilePath, |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'MEMBER_IMG' |
| | | }, |
| | | success: uploadFileRes => { |
| | | let res = JSON.parse(uploadFileRes.data); |
| | | this.withUserList.faceImg = res.data.halfPath; |
| | | this.withUserList.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath; |
| | | }, |
| | | complete() { |
| | | uni.hideLoading(); |
| | | } |
| | | }); |
| | | }, |
| | | submit() { |
| | | if (!this.form1.receptMemberId) |
| | | return uni.showToast({ |
| | | title: 'è¯·å¡«åææç访é®äºº', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.starttime) |
| | | return uni.showToast({ |
| | | title: 'å
¥åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.endtime) |
| | | return uni.showToast({ |
| | | title: 'ç¦»åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.doorSelectName && this.accessControl == 1) |
| | | return uni.showToast({ |
| | | title: '访é®é¨ç¦ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | if (!this.form1.reason) |
| | | return uni.showToast({ |
| | | title: 'æè®¿äºç±ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }); |
| | | // this.form1.starttime = this.form1.starttime + ':00' |
| | | // this.form1.endtime = this.form1.endtime + ':00' |
| | | let data = JSON.parse(JSON.stringify(this.form1)); |
| | | data.starttime = data.starttime + ':00'; |
| | | data.endtime = data.endtime + ':00'; |
| | | this.$u.api |
| | | .createFk({ |
| | | ...this.form, |
| | | ...data, |
| | | openid: this.$store.state.openId, |
| | | withUserList: this.personnel |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | uni.reLaunch({ |
| | | url: `/pages/appointmentDetails/appointmentDetails?id=${res.data}` |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | deleUser(i) { |
| | | this.personnel.splice(i, 1); |
| | | }, |
| | | getVisit1() { |
| | | // æ¯å¦éè¦çé¢ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'HEALTH_CARD' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.visit = res.data.code; |
| | | } |
| | | }); |
| | | // èµ·å§æ¶é´æ¶é¿ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'VISIT_CONFIG', |
| | | label: 'VALIDATE_VISIT' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.day = Number(res.data.code); |
| | | // console.log(nextDay('after', true, this.day)) |
| | | } |
| | | }); |
| | | }, |
| | | 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}visitsAdmin/cloudService/web/public/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(','); |
| | | }, |
| | | 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 hh:MM'), this.day) |
| | | this.maxTime = this.form1.starttime.slice(0, 11) + '23:59' |
| | | this.form1.endtime = '' |
| | | 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; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | photoSrc: '', |
| | | type: '', |
| | | inputType: '', |
| | | show1: false, |
| | | show2: false, |
| | | show4: false, |
| | | show5: false, |
| | | show7: false, |
| | | showName: false, |
| | | fileList: [], |
| | | memberList: [[{ name: '身份è¯', id: 0 }, { name: '港澳è¯ä»¶', id: 1 }, { name: 'æ¤ç
§', id: 2 }]], |
| | | columnsNames: [[{ name: 'å¼ ä¸', id: 0 }, { name: 'å¼ ä¸', id: 1 }, { name: 'å¼ ä¸', id: 2 }]], |
| | | columns: [], |
| | | cars: [], |
| | | day: null, |
| | | maxTime: '', |
| | | carName: '', |
| | | personnel: [], |
| | | userAnswerId: '', |
| | | form1: { |
| | | receptMemberId: '', |
| | | receptMemberName: '', |
| | | starttime: '', |
| | | endtime: '', |
| | | reason: '', |
| | | carNos: '' |
| | | }, |
| | | visit: '', |
| | | form: {}, |
| | | accessControl: '', |
| | | verify: '' |
| | | } |
| | | }, |
| | | components: { tlyPictureCut, keyboardInput, QfImageCropper }, |
| | | onLoad(options) { |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data) |
| | | } |
| | | this.getUser() |
| | | const userInfo = uni.getStorageSync('userInfo') || {} |
| | | this.$set(this.form1, 'receptMemberName', userInfo.realname) |
| | | this.$set(this.form1, 'receptMemberId', userInfo.id || '') |
| | | this.$set(this.form1, 'receptCompanyName', userInfo.company.companyName || '') |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | }, |
| | | methods: { |
| | | openInput(type) { |
| | | this.inputType = type |
| | | this.$refs.keyboard.open() |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.form1.carNos = e |
| | | } else if (this.inputType === 2) { |
| | | this.withUserList.carNos = e |
| | | } |
| | | this.$forceUpdate() |
| | | this.closeInput() |
| | | }, |
| | | seleteName(e) { |
| | | this.$set(this.form1, 'receptMemberName', e.value[0].name) |
| | | this.$set(this.form1, 'receptMemberId', e.value[0].id) |
| | | this.$set(this.form1, 'receptCompanyName', e.value[0].companyName) |
| | | this.showName = false |
| | | }, |
| | | getUser() { |
| | | getVisitedMember().then(res => { |
| | | this.memberList = [res.data || []] |
| | | }) |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close() |
| | | }, |
| | | submit() { |
| | | const { form1 } = this |
| | | if (!this.form1.receptMemberId) |
| | | return uni.showToast({ |
| | | title: 'è¯·éæ©ææç被访人', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.starttime) |
| | | return uni.showToast({ |
| | | title: 'å
¥åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.endtime) |
| | | return uni.showToast({ |
| | | title: 'ç¦»åºæ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.name) return uni.showToast({ |
| | | title: 'è系人ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.companyName) return uni.showToast({ |
| | | title: 'æ¥è®¿åä½ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.carNos) return uni.showToast({ |
| | | title: 'å
¥å车è¾ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.memberNum) return uni.showToast({ |
| | | title: 'é车人æ°ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!this.form1.reason) return uni.showToast({ |
| | | title: 'æè®¿äºç±ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | // this.form1.starttime = this.form1.starttime + ':00' |
| | | // this.form1.endtime = this.form1.endtime + ':00' |
| | | let data = JSON.parse(JSON.stringify(this.form1)) |
| | | data.starttime = data.starttime + ':00' |
| | | data.endtime = data.endtime + ':00' |
| | | createVisit({ |
| | | ...data, |
| | | type: '2', |
| | | openid: this.$store.state.openId |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success' |
| | | }) |
| | | }) |
| | | uni.reLaunch({ |
| | | url: `/pages/staff/index` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | deleUser(i) { |
| | | this.personnel.splice(i, 1) |
| | | }, |
| | | getVisit1() { |
| | | // æ¯å¦éè¦çé¢ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'HEALTH_CARD' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.visit = res.data.code |
| | | } |
| | | }) |
| | | // èµ·å§æ¶é´æ¶é¿ |
| | | this.$u.api |
| | | .getSystemDictData({ |
| | | dictCode: 'VISIT_CONFIG', |
| | | label: 'VALIDATE_VISIT' |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.day = Number(res.data.code) |
| | | // console.log(nextDay('after', true, this.day)) |
| | | } |
| | | }) |
| | | }, |
| | | 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(',') |
| | | }, |
| | | 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 hh:MM'), this.day) |
| | | this.maxTime = this.form1.starttime.slice(0, 11) + '23:59' |
| | | this.form1.endtime = '' |
| | | 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, '/')}`)) |
| | | }, |
| | | // 被æè®¿äººä¿¡æ¯æ ¡éªæ¹å¼ï¼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 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style> |
| | | page { |
| | | background-color: #f7f7f7 !important; |
| | | background-color: #f7f7f7 !important; |
| | | } |
| | | .u-upload__button { |
| | | margin: 0 !important; |
| | | margin: 0 !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .visit { |
| | | width: 100%; |
| | | padding-top: 10rpx 0; |
| | | .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%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | text { |
| | | font-size: 28rpx; |
| | | color: #000000; |
| | | } |
| | | image { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .menjin_footer { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .menjin_footer_item { |
| | | flex: 1; |
| | | height: 80rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 10rpx; |
| | | background-color: #025eef; |
| | | color: #ffffff; |
| | | font-size: 26rpx; |
| | | margin-left: 30rpx; |
| | | &:first-child { |
| | | margin-left: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | width: 100%; |
| | | padding-top: 10rpx 0; |
| | | .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%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | text { |
| | | font-size: 28rpx; |
| | | color: #000000; |
| | | } |
| | | image { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | .menjin_footer { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .menjin_footer_item { |
| | | flex: 1; |
| | | height: 80rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 10rpx; |
| | | background-color: #025eef; |
| | | color: #ffffff; |
| | | font-size: 26rpx; |
| | | margin-left: 30rpx; |
| | | &:first-child { |
| | | margin-left: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .addcar { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | .addcar_head { |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .addcar_ipt { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | text-align: center; |
| | | background: #f7f7f7; |
| | | border-radius: 50rpx; |
| | | margin-top: 60rpx; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #000000; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .addcar_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 60rpx; |
| | | .t { |
| | | background: #025eef !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .addcar_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #025eef; |
| | | text-align: center; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #025eef; |
| | | margin-right: 18rpx; |
| | | &:last-child { |
| | | margin-right: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | .list_item { |
| | | width: 100%; |
| | | // min-height: 98rpx; |
| | | padding: 30rpx 0; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | .addcar { |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | .addcar_head { |
| | | text-align: center; |
| | | font-size: 32rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .addcar_ipt { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | text-align: center; |
| | | background: #f7f7f7; |
| | | border-radius: 50rpx; |
| | | margin-top: 60rpx; |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #000000; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .addcar_footer { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 60rpx; |
| | | .t { |
| | | background: #025eef !important; |
| | | color: #ffffff !important; |
| | | } |
| | | .addcar_footer_item { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | font-size: 32rpx; |
| | | font-weight: 400; |
| | | color: #025eef; |
| | | text-align: center; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #025eef; |
| | | margin-right: 18rpx; |
| | | &:last-child { |
| | | margin-right: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .list { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | | .empty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | .list_item { |
| | | width: 100%; |
| | | // min-height: 98rpx; |
| | | padding: 30rpx 0; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | |
| | | .list_item_label { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | .list_item_label { |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | text { |
| | | &:nth-child(2) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | text { |
| | | &:nth-child(2) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | |
| | | &:nth-child(1) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #e42d2d; |
| | | } |
| | | } |
| | | } |
| | | &:nth-child(1) { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #e42d2d; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .list_item_content { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | .list_item_content { |
| | | flex: 1; |
| | | height: 100%; |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin-right: 6rpx; |
| | | } |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | input { |
| | | width: 100%; |
| | | height: 100%; |
| | | text-align: right; |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .zw { |
| | | width: 100%; |
| | | height: calc(env(safe-area-inset-bottom) + 118rpx); |
| | | } |
| | | .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; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | .footer { |
| | | width: 100%; |
| | | padding: 0 30rpx; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | left: 0; |
| | | bottom: 68rpx; |
| | | |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #4e99a9; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .footer_btn { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | | background: #4e99a9; |
| | | border-radius: 44rpx; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="login"> |
| | | <image class="login_bg" src="@/static/login_bg@2x.png" /> |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="login_title">宿³°ç©æµæºæ
§ååº</view> |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.phone" maxlength="18" placeholder="请è¾å
¥ææºå·" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input |
| | | v-model="form.validCode" |
| | | placeholder="请è¾å
¥éªè¯ç " |
| | | type="text" |
| | | /> |
| | | <text class="captcha" v-if="countDown == 0" @click="initCaptcha" |
| | | >è·åéªè¯ç </text |
| | | > |
| | | <text class="placeholder9" v-else>{{ countDown }}</text> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.password" |
| | | type="password" |
| | | placeholder="请è¾å
¥æ°å¯ç " |
| | | /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.newPassword" |
| | | type="password" |
| | | placeholder="è¯·åæ¬¡è¾å
¥æ°å¯ç " |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n" @click="onLogin">确认修æ¹</view> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowProtocol" |
| | | @close="isShowProtocol = false" |
| | | mode="center" |
| | | > |
| | | <view class="modal">111</view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { resetPassword, sendSms } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | }, |
| | | isShowProtocol: false, |
| | | countDown: 0 |
| | | } |
| | | }, |
| | | |
| | | onLoad() { |
| | | }, |
| | | |
| | | methods: { |
| | | dealChange(e) { |
| | | console.log(e) |
| | | }, |
| | | initCaptcha() { |
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | sendSms({ phone: this.form.phone }).then(res => { |
| | | this.countDown = 60 |
| | | setInterval(() => { |
| | | if (this.countDown == 0) return |
| | | this.countDown-- |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.validCode) return uni.showToast({ |
| | | title: 'éªè¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: 'æ°å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.newPassword) return uni.showToast({ |
| | | title: '确认å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (form.password != form.newPassword) return uni.showToast({ |
| | | title: '两次è¾å
¥å¯ç ä¸ä¸è´', |
| | | icon: 'none' |
| | | }) |
| | | resetPassword({ |
| | | ...form |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: "/pages/staffLogin/login" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .login { |
| | | width: 100%; |
| | | height: 100vh; |
| | | display: flex; |
| | | padding-top: 160rpx; |
| | | box-sizing: border-box; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | background: linear-gradient( |
| | | 180deg, |
| | | rgba(39, 155, 170, 0.2) 0%, |
| | | rgba(39, 155, 170, 0) 100% |
| | | ); |
| | | .login_logo { |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | } |
| | | .login_bg { |
| | | position: absolute; |
| | | top: 0; |
| | | width: 750rpx; |
| | | } |
| | | .login_title { |
| | | font-size: 44rpx; |
| | | font-weight: 600; |
| | | color: #333333; |
| | | margin-top: 40rpx; |
| | | margin-bottom: 120rpx; |
| | | } |
| | | .login_list { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | .login_list_item { |
| | | width: 100%; |
| | | border-radius: 50rpx; |
| | | height: 98rpx; |
| | | padding: 0 40rpx; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | margin-bottom: 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .captcha { |
| | | color: #279baa; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | color: #666666; |
| | | margin-left: 24rpx; |
| | | border: none; |
| | | } |
| | | } |
| | | } |
| | | .login_btn { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | margin-top: 80rpx; |
| | | .for_psd { |
| | | color: #279baa; |
| | | margin-top: 40rpx; |
| | | width: 140rpx; |
| | | text-align: center; |
| | | margin: 40rpx auto; |
| | | } |
| | | .login_btn_n { |
| | | width: 100%; |
| | | height: 98rpx; |
| | | background: #279baa; |
| | | box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | border-radius: 50rpx; |
| | | } |
| | | } |
| | | .deal_wrap { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | text-align: center; |
| | | bottom: 108rpx; |
| | | .deal { |
| | | color: #279baa; |
| | | } |
| | | } |
| | | } |
| | | .modal { |
| | | padding: 32rpx; |
| | | } |
| | | </style> |
| | |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.account" |
| | | maxlength="18" |
| | | placeholder="è´¦å·" |
| | | /> |
| | | <input v-model="form.username" maxlength="18" placeholder="è´¦å·" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input v-model="form.password" type="password" placeholder="å¯ç " /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input v-model="form.code" placeholder="éªè¯ç " type="text" /> |
| | | <image |
| | | @click="initCaptcha" |
| | | :src="captcha.image" |
| | | class="captcha" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n" @click="onLogin">ç«å³ç»å½</view> |
| | | <view class="for_psd">å¿è®°å¯ç </view> |
| | | <view @click="$jump('/pages/staffLogin/forgetPsd')" class="for_psd" |
| | | >å¿è®°å¯ç </view |
| | | > |
| | | </view> |
| | | |
| | | <view class="deal_wrap"> |
| | | <checkbox @change="dealChange" /> |
| | | <text>ç»å½å³åæ</text> |
| | | <text class="deal">ã宿³°ç©æµç¨æ·åè®®ã</text> |
| | | <text class="deal" @click="isShowProtocol = true" |
| | | >ã宿³°ç©æµç¨æ·åè®®ã</text |
| | | > |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowProtocol" |
| | | @close="isShowProtocol = false" |
| | | mode="center" |
| | | > |
| | | <view class="modal">111</view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { loginPost } from '@/api' |
| | | import { loginPost, loginCaptcha, getUserInfo } from '@/api' |
| | | import { mapState, mapMutations } from 'vuex' |
| | | export default { |
| | | name: 'login', |
| | | |
| | |
| | | form: { |
| | | account: '', |
| | | password: '', |
| | | } |
| | | }, |
| | | isShowProtocol: false, |
| | | captcha: {} |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | onLoad() { |
| | | this.initCaptcha() |
| | | }, |
| | | |
| | | methods: { |
| | | ...mapMutations(["setToken", "setUserInfo"]), |
| | | dealChange(e) { |
| | | console.log(e) |
| | | }, |
| | | initCaptcha() { |
| | | loginCaptcha().then(res => { |
| | | this.captcha = res.data |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.account) return uni.showToast({ |
| | | title: 'è´¦å·åä¸è½ä¸ºç©º', |
| | | if (!form.username) return uni.showToast({ |
| | | title: 'è´¦å·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: 'å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.code) return uni.showToast({ |
| | | title: 'éªè¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | loginPost({ |
| | | ...form, |
| | | uuid: this.captcha.uuid, |
| | | openId: this.$store.state.openId |
| | | }).then(res => { |
| | | console.log('res', res); |
| | | if (res.code === 200) { |
| | | this.setToken(res.data) |
| | | getUserInfo().then(ress => { |
| | | this.setUserInfo(ress.data) |
| | | uni.redirectTo({ |
| | | url: "/pages/staff/index" |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .captcha { |
| | | width: 200rpx; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | |
| | | } |
| | | } |
| | | } |
| | | .modal { |
| | | padding: 32rpx; |
| | | } |
| | | </style> |
| | |
| | | // æ¸
空ææç¼å |
| | | empty(state) { |
| | | state.token = '' |
| | | state.userInfo = '' |
| | | state.userInfo = {} |
| | | uni.removeStorageSync('userInfo') |
| | | uni.removeStorageSync('token') |
| | | } |
| | |
| | | export const http = function (options) { |
| | | { |
| | | return new Promise((resolve, reject) => { |
| | | let token = uni.getStorageSync('token') |
| | | let token = uni.getStorageSync('token') || '' |
| | | // å¨ç»å½çæ¶åéè¦å¨å token uni.setStorageSync("authorization","è¿éæ¯ç»å½è·åçtokenå¼") |
| | | |
| | | // uni.showLoading({ |
| | |
| | | method: options.method || 'GET', |
| | | header: options.header || { |
| | | // æ ¹æ®å®é
æ¥å£è®¾è®¡ key å token æè
authorization |
| | | token: token, |
| | | dm_user_token: token, |
| | | "content-type": 'application/json' |
| | | }, |
| | | success: (res) => { |
| | |
| | | // ç»å½è¿æ |
| | | if (data.code === 401) { |
| | | uni.navigateTo({ |
| | | url: '/packageA/loginAgain/loginAgain' |
| | | }) |
| | | url: '/pages/staffLogin/login' |
| | | }); |
| | | } |
| | | if (data.code !== 200) { |
| | | uni.showToast({ |
| | |
| | | uni.showToast({ |
| | | title: 'è¯·æ±æ¥å£å¤±è´¥' |
| | | }) |
| | | |
| | | // è¿åéè¯¯æ¶æ¯ |
| | | reject(err) |
| | | uni.hideLoading() |