工作日志数据交互, 住户审核列表,任务页面数据渲染
12 files modified
1 files added
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 住户新增修改 |
| | | export const updateHousehold = (data) => { |
| | | return http.request({ |
| | | url: 'blade-household/household/update', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 获取住户列表 |
| | | export const getHouseholdList = (params) => { |
| | | return http.request({ |
| | | url: 'blade-household/household/page', |
| | | method: 'GET', |
| | | params: params |
| | | }) |
| | | } |
| | |
| | | method: 'POST',
|
| | | data
|
| | | })
|
| | | } |
| | | }
|
| | |
|
| | | //报事报修数据统计
|
| | | export const getRepairsStatistics = (params) => {
|
| | | return http.request({
|
| | | url: 'blade-taskReportForRepairs/taskReportForRepairs/getStatistics',
|
| | | method: 'GET',
|
| | | params: {
|
| | | ...params
|
| | | }
|
| | | })
|
| | | }
|
| | |
|
| | |
| | | import http from '@/http/api.js' |
| | | |
| | | |
| | | export const addWorkLog = (params) => { |
| | | export const addWorkLog = (data) => { |
| | | return http.request({ |
| | | url: '/blade-gridWorkLog/gridWorkLog/saver', |
| | | url: '/blade-gridWorkLog/gridWorkLog/save', |
| | | method: 'POST', |
| | | params |
| | | data |
| | | }) |
| | | } |
| | |
| | | // devUrl:'http://192.168.1.50:9528', |
| | | devUrl: 'http://192.168.0.102:9528', |
| | | // devUrl: 'https://srgdjczzxtpt.com:2080/api', |
| | | minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/", |
| | | // minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/", |
| | | minioBaseUrl: 'http://192.168.0.102:9528/', |
| | | // 数据中台接口url |
| | | // dataCenterUrl: 'http://10.10.2.192/services', |
| | | dataCenterUrl: 'https://sk.hubeishuiyi.cn/services', |
| | |
| | | maxCount: "5", |
| | | previewFullImage: true, |
| | | uploadText: "上传中", |
| | | url: minioBaseUrl + "/blade-resource/oss/endpoint/put-file-attach", |
| | | url: minioBaseUrl + "blade-resource/oss/endpoint/put-file", |
| | | header: {}, |
| | | }, |
| | | } |
| | |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
| | | }, |
| | | { |
| | | "path": "list/auditList", |
| | | "style": { |
| | | "navigationBarTitleText": "住户审核", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black" |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | |
| | | <u-swiper :list="swiperList" height="260rpx"></u-swiper>
|
| | | </view>
|
| | | <view class="" v-if="roleType != 1">
|
| | | <u-grid :border="false" :col="curSelectSite.addressType != 2?4:2">
|
| | | <u-grid :border="false" :col="liveList.length">
|
| | | <!-- <u-grid-item v-for="(i,k) in cellList" :key="k" @click.native="toPage(i)">
|
| | | <u-icon :name="i.icon" :size="45"></u-icon>
|
| | | <text class="f-26 mt-20">{{i.text}}</text>
|
| | |
| | | this.getMenuList()
|
| | | this.getSiteList()
|
| | | this.getNoticeList()
|
| | | this.getFrequencyNumber()
|
| | | this.getTypeNumber()
|
| | | // this.getFrequencyNumber()
|
| | | // this.getTypeNumber()
|
| | | },
|
| | |
|
| | | getBanner(){
|
| | |
| | | :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs> |
| | | </view> |
| | | <view class="list"> |
| | | <view class="notic-list flex j-c-s-b bgc-ff" v-for="(item,index) in noticeList" :key="index" @click="navTo(item.id)"> |
| | | <view class="notic-list flex j-c-s-b bgc-ff" v-for="(item,index) in noticeList" :key="index" |
| | | @click="navTo(item.id)"> |
| | | <!-- <view class="f-28 mb-30"> |
| | | {{item.title}} |
| | | </view> |
| | |
| | | <view class="tag-content"> |
| | | <u-tag :text="item.dictValue" plain plainFill size="mini"> </u-tag> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex j-c-s-b a-i-c"> |
| | | <view class="flex a-i-c"> |
| | | <u-icon name="eye-fill" size="16" color="#CECECE"></u-icon> |
| | |
| | | .notic-list { |
| | | padding: 30rpx; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | |
| | | .notic-list-left { |
| | | width: calc(100% - 260rpx - 20rpx); |
| | | height: 200rpx; |
| | | } |
| | | |
| | | |
| | | .notice-title { |
| | | width: 100%; |
| | | display: -webkit-box; |
| | |
| | | -webkit-line-clamp: 2; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | |
| | | .tag-content { |
| | | display: inline-flex; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="header bgc-ff"> |
| | | <view class="tab"> |
| | | <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}" |
| | | :activeStyle="{color:'#017BFC'}"></u-tabs> |
| | | </view> |
| | | <view class="search-box"> |
| | | <u-search placeholder="请输入住户名" v-model="keyword" :clearabled="true" :showAction="true" :animation="true" |
| | | @search="search" @clear="clear"></u-search> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list"> |
| | | <!-- <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.name,i.id)"> |
| | | <view class="item-title flex a-i-c j-c-s-b mb-20"> |
| | | <text class="f-32 fw">{{i.name}}</text> |
| | | <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | | </view> |
| | | <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">时间</text> |
| | | <text class="f-28 c-66">{{i.createTime}}</text> |
| | | </view> |
| | | <view class="item-row flex a-i-c j-c-s-b"> |
| | | <text class="f-28">地址</text> |
| | | <text class="address f-28 c-66">{{i.addressName}}</text> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="card-box flex bgc-ff" v-for="(item,index) in list" :key="index"> |
| | | <view class="l flex-1 flex a-i-c"> |
| | | <view class="head-img mr-20"> |
| | | <u--image shape="circle" :showLoading="true" :src="item.src|| '/static/icon/user-01.png'" |
| | | width="120rpx" height="120rpx"></u--image> |
| | | </view> |
| | | <view class="info f-28"> |
| | | <view>姓名:{{item.name}}</view> |
| | | <view class="flex"> |
| | | 手机:{{item.phoneNumber?item.phoneNumber:"--"}} |
| | | </view> |
| | | <view class=""> |
| | | 楼盘:{{item.aoiName}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="r flex f-d-c j-c-s-a"> |
| | | <view> |
| | | <u-tag v-if="item.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="item.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="item.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | | </view> |
| | | <view v-if="item.confirmFlag == 1"> |
| | | <u-button size='small' type="primary" class="u_btn_blue" text="审核" |
| | | @click="auditResident(item,index)"></u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getHouseholdList, |
| | | updateHousehold |
| | | } from "@/api/house/household.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabList: [{ |
| | | name: "待审核", |
| | | status: 1 |
| | | }, |
| | | { |
| | | name: "审核通过", |
| | | status: 2 |
| | | }, |
| | | // { |
| | | // name: "已拒绝", |
| | | // status: 3 |
| | | // }, |
| | | ], |
| | | tabIndex: 0, |
| | | currentStatus: 1, |
| | | list: [], |
| | | loadingStatus: 'nomore', |
| | | currentPage: 1, |
| | | frequency: '', |
| | | keyword: "" |
| | | } |
| | | }, |
| | | |
| | | onLoad(option) { |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | this.currentPage++ |
| | | this.getList() |
| | | }, |
| | | |
| | | methods: { |
| | | changeTab(e) { |
| | | this.tabIndex = e.index; |
| | | this.currentStatus = e.status; |
| | | this.list = []; |
| | | this.currentPage = 1; |
| | | this.getList(); |
| | | }, |
| | | search() { |
| | | this.resetParams() |
| | | this.getList() |
| | | }, |
| | | clear() { |
| | | this.keyword = ''; |
| | | this.resetParams() |
| | | this.getList() |
| | | }, |
| | | |
| | | resetParams() { |
| | | this.list = []; |
| | | this.currentPage = 1; |
| | | }, |
| | | getList() { |
| | | getHouseholdList({ |
| | | page: this.currentPage, |
| | | size: 20, |
| | | confirmFlag: this.currentStatus, |
| | | name: this.keyword, |
| | | }).then(res => { |
| | | if (res.code != 200) { |
| | | uni.showToast({ |
| | | title: '数据请求失败', |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } |
| | | let records = res.data.records; |
| | | this.list = [...this.list, ...records] |
| | | this.loadingStatus = 'nomore' |
| | | }) |
| | | }, |
| | | auditResident(item,index){ |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "是否要通过该住户?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | item.confirmFlag = 2; |
| | | this.auditResidentRequest(item); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | auditResidentRequest(item,index){ |
| | | updateHousehold(item).then(res=>{ |
| | | if(res.code == 200){ |
| | | uni.showToast({ |
| | | title:"操作成功" |
| | | }) |
| | | // this.$set(this.list,index,item); |
| | | this.list.splice(index,1); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #F5F5F5; |
| | | } |
| | | |
| | | .header { |
| | | width: 100%; |
| | | position: fixed; |
| | | /*#ifdef H5*/ |
| | | top: 88rpx; |
| | | /*#endif*/ |
| | | /*#ifdef MP-WEIXIN*/ |
| | | top: 0; |
| | | /*#endif*/ |
| | | left: 0; |
| | | z-index: 10; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .tab { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .search-box { |
| | | padding: 20rpx 0; |
| | | } |
| | | |
| | | .tab /deep/.u-tabs__wrapper__nav__item { |
| | | flex: 1; |
| | | } |
| | | |
| | | .list { |
| | | margin: 218rpx 30rpx 0; |
| | | } |
| | | |
| | | .list-item { |
| | | padding: 0 30rpx 20rpx; |
| | | border-radius: 8rpx; |
| | | |
| | | .item-title { |
| | | padding: 30rpx 0; |
| | | border-bottom: 1px solid #F5F5F5; |
| | | } |
| | | |
| | | .item-row { |
| | | padding: 10rpx 0; |
| | | |
| | | .address { |
| | | width: 65%; |
| | | } |
| | | } |
| | | } |
| | | .card-box{ |
| | | padding: 20rpx; |
| | | margin-bottom: 20rpx; |
| | | .info{ |
| | | line-height: 60rpx; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </view> |
| | | |
| | | <view class="content"> |
| | | <u-form-item label="大门是否装备防撞装置" prop="antiCollision" :borderBottom="false" ref="scFlag" required |
| | | @click="isShowScStatus = true"> |
| | | <u-form-item label="大门是否装备防撞装置" prop="antiCollision" :borderBottom="false" ref="scFlag" required> |
| | | <u-radio-group v-model="info.antiCollision"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList" :key="index" |
| | | :label="item" :name="item"> |
| | |
| | | <template> |
| | | <view class=""> |
| | | <view class="block bgc-ff mb-20 mt-20"> |
| | | <!-- <view class="block bgc-ff mb-20 mt-20"> |
| | | <view class="caption"> |
| | | <view class="flex a-i-c"> |
| | | <view class="line"></view> |
| | |
| | | <text class="f-28">本月</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="nav bgc-ff mb-20"> |
| | | </view> --> |
| | | <view class="nav bgc-ff mb-20 mt-20"> |
| | | <view class="caption"> |
| | | <view class="flex a-i-c"> |
| | | <view class="line"></view> |
| | | <text class="f-32 fw">公安</text> |
| | | </view> |
| | | </view> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('subPackage/workbench/views/report')"> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/report')"> |
| | | <text class="f-28">报事报修</text> |
| | | <view class="flex"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">3</view> |
| | | <block v-if="repairsCount > 0"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">{{repairsCount}}</view> |
| | | </block> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="nav-item flex j-c-s-b a-i-c"> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/house/list/auditList')"> |
| | | <text class="f-28">住户审核</text> |
| | | <view class="flex"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">3</view> |
| | | <block v-if="countInfo.zhufang > 0"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">{{countInfo.zhufang}}</view> |
| | | </block> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | <text class="f-32 fw">住建</text> |
| | | </view> |
| | | </view> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/rental')"> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/rental')"> |
| | | <text class="f-28">出租房管理</text> |
| | | <view class="flex"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">3</view> |
| | | <block v-if="countInfo.chuzhu > 0"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">{{countInfo.chuzhu}}</view> |
| | | </block> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | <text class="f-32 fw">综治</text> |
| | | </view> |
| | | </view> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/task/taskList')"> |
| | | <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/task/taskList')"> |
| | | <text class="f-28">综治任务</text> |
| | | <view class="flex"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">3</view> |
| | | <block v-if="comprehensiveTask > 0"> |
| | | <text class="f-28 c-99">待处理</text> |
| | | <view class="dot bgc-main">{{countInfo.comprehensiveTask}}</view> |
| | | </block> |
| | | <u-icon name="arrow-right" color="#999"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCountFrequencyNumber } from "@/api/task/task.js" |
| | | import { |
| | | getCountTypeNumber |
| | | } from "@/api/task/task.js" |
| | | import { |
| | | getRepairsStatistics |
| | | } from "@/api/task/taskReportForRepairs.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | navList: [{ |
| | | name: "", |
| | | |
| | | }] |
| | | }], |
| | | repairsCount: 0, |
| | | countInfo: {} |
| | | } |
| | | }, |
| | | |
| | | onLoad(){ |
| | | |
| | | onShow() { |
| | | this.getCount(); |
| | | this.getRepairsCount(); |
| | | }, |
| | | |
| | | methods:{ |
| | | getCount(){ |
| | | getCountFrequencyNumber().then(res=>{ |
| | | console.log(res); |
| | | |
| | | methods: { |
| | | getCount() { |
| | | getCountTypeNumber().then(res => { |
| | | if (res.code == 200) { |
| | | this.countInfo = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | navTo(url){ |
| | | getRepairsCount() { |
| | | getRepairsStatistics().then(res => { |
| | | if (res.code == 200) { |
| | | this.repairsCount = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | navTo(url) { |
| | | this.$u.func.globalNavigator(url) |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | |
| | |
| | | margin: 20rpx auto; |
| | | border-radius: 4rpx; |
| | | |
| | | |
| | | |
| | | |
| | | .row { |
| | | padding: 30rpx 0 34rpx; |
| | | } |
| | | } |
| | | |
| | | .caption { |
| | | width: 100%; |
| | | padding: 30rpx; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #F5F5F5; |
| | | |
| | | |
| | | .line { |
| | | width: 6rpx; |
| | | height: 28rpx; |
| | |
| | | margin: 0 10rpx 0 20rpx; |
| | | } |
| | | } |
| | | .mb-20{ |
| | | |
| | | .mb-20 { |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .mt-20{ |
| | | margin-top:20rpx; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="content bgc-ff"> |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="uForm" labelWidth="90" |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | <u-form-item label="姓名" prop="info.name" borderBottom ref="item1"> |
| | | <u-input v-model="info.title" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99" |
| | | <u-form-item label="姓名" prop="info.name" borderBottom required> |
| | | <u-input v-model="info.name" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="手机号" prop="info.phone" borderBottom ref="item1"> |
| | | <u-input v-model="info.title" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99" |
| | | <u-form-item label="手机号" prop="phone" borderBottom required> |
| | | <u-input v-model="info.phone" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="内容" borderBottom ref="item1"> |
| | | <u-input type="textarea" v-model="info.address" border="none" placeholderClass="f-28 c-99" |
| | | <u-form-item label="内容" borderBottom required> |
| | | <u-input type="textarea" v-model="info.context" border="none" placeholderClass="f-28 c-99" |
| | | inputAlign="right"> |
| | | |
| | | </u-input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="走访时间" prop="applyTime" borderBottom required @click="showSelectDate = true"> |
| | | <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入" |
| | | <u-form-item label="走访时间" prop="workTime" :borderBottom="false" required @click="showSelectDate = true"> |
| | | <u-input v-model="info.workTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <!-- <u-form-item label="房屋" prop="houseCode" :borderBottom="false" required |
| | | @click="isShowScStatus = true"> |
| | | <u-input v-model="info.scStatus" disabled disabledColor="#fff" border="none" placeholder="请选择" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> --> |
| | | </u-form> |
| | | </view> |
| | | <view class="upload bgc-ff"> |
| | | <view class="f-28">走访图片</view> |
| | | <view class="mt-20"> |
| | | <u-upload :fileList="images" :previewFullImage="uploadConfig.previewFullImage" |
| | | <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage" |
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount" |
| | | :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic"> |
| | | <view class="upload-item upload-icon flex_base"> |
| | |
| | | </u-upload> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="applyTime" mode="datetime" |
| | | :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker> |
| | | |
| | | <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="workTime" mode="datetime" |
| | | :formatter="formatter" @confirm="confirmDate" @cancel="isShowPicker = false"></u-datetime-picker> |
| | | <!-- <u-picker :show="isShowPicker" :columns="scStatus" :defaultIndex="houseIndex" @cancel="isShowPicker = false" |
| | | @confirm="confirmHouse()"></u-picker> --> |
| | | <view class="footer"> |
| | | <button class="footer-btn">提交</button> |
| | | <button class="footer-btn" @click="submitInfo">提交</button> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addWorkLog |
| | | } from "@/api/workLog/workLog.js" |
| | | import uploadMixin from "@/mixin/uploadMixin"; |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | data() { |
| | | return { |
| | | form: { |
| | | images: [] |
| | | }, |
| | | info: { |
| | | title: "", |
| | | content: "" |
| | | name: "", |
| | | phone: "", |
| | | context: "" |
| | | }, |
| | | rules: { |
| | | 'title': { |
| | | 'name': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入工作主题', |
| | | message: '请输入姓名', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'content': { |
| | | 'phone': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入手机号', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'context': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入工作内容', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | }, |
| | | |
| | | images: [ |
| | | |
| | | ], |
| | | showSelectDate:false |
| | | showSelectDate: false, |
| | | workTime: Number(new Date()), |
| | | isShowPicker: false, |
| | | houseIndex: [0] |
| | | } |
| | | }, |
| | | methods:{ |
| | | |
| | | onLoad() { |
| | | let userInfo = uni.getStorageSync("userInfo"); |
| | | this.$set(this.info, "name", userInfo.real_name); |
| | | this.$set(this.info, "phone", userInfo.phone); |
| | | }, |
| | | methods: { |
| | | |
| | | confirmDate(e) { |
| | | this.showSelectDate = false; |
| | | this.info.applyTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.info.workTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss') |
| | | }, |
| | | |
| | | |
| | | getLocation(){ |
| | | uni.chooseLocation({ |
| | | success:(res)=>{ |
| | | console.log(res); |
| | | } |
| | | |
| | | confirmHouse(e) { |
| | | this.houseIndex = e.indexs; |
| | | this.info.houseCode = e.value[0]; |
| | | this.isShowPicker = false; |
| | | }, |
| | | |
| | | checkImages() { |
| | | if (this.form.images.length) { |
| | | this.$set(this.info, "url", this.setImages()) |
| | | } |
| | | }, |
| | | |
| | | setImages() { |
| | | let urls = []; |
| | | for (let i of this.form.images) { |
| | | urls.push(i.name); |
| | | } |
| | | return urls.join(",") |
| | | }, |
| | | |
| | | |
| | | submitInfo() { |
| | | this.$refs.form.validate().then(valid => { |
| | | this.checkImages(); |
| | | addWorkLog(this.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功', |
| | | success() { |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 1000) |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | |
| | | margin: 20rpx 30rpx; |
| | | padding: 0 30rpx; |
| | | } |
| | | .row{ |
| | | padding:20rpx 0; |
| | | border-bottom:1px solid |
| | | |
| | | .row { |
| | | padding: 20rpx 0; |
| | | border-bottom: 1px solid |
| | | } |
| | | .location-btn{ |
| | | width:116rpx; |
| | | height:46rpx; |
| | | |
| | | .location-btn { |
| | | width: 116rpx; |
| | | height: 46rpx; |
| | | line-height: 46rpx; |
| | | border-radius: 4rpx; |
| | | border:1px solid currentColor; |
| | | padding:0; |
| | | border: 1px solid currentColor; |
| | | padding: 0; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .upload { |
| | | margin: 0 30rpx; |
| | | padding: 30rpx; |
| | | |
| | | .upload-item { |
| | | width: 140rpx; |
| | | height: 140rpx; |