| | |
| | | |
| | | // 获取数据下标信息 (picker选择器数据回显) |
| | | export const getIndex = (arr, value, key, nameKey) => { |
| | | if (key) { |
| | | if (!key) { |
| | | for (let i = 0, ii = arr.length; i < ii; i++) { |
| | | if (arr[i] == value) { |
| | | return i; |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 文件路径转字符串 |
| | | export const formattingUrls = (urls) => { |
| | | let arr = []; |
| | | for (let i of urls) { |
| | | arr.push(i.name); |
| | | } |
| | | return arr.join(",") |
| | | } |
| | |
| | | // 版本号 |
| | | version: '2.0.0', |
| | | // 开发环境接口Url |
| | | // devUrl: 'http://z4042833u6.wicp.vip', |
| | | devUrl: 'http://z4042833u6.wicp.vip', |
| | | // devUrl: 'http://192.168.0.109:9528', |
| | | devUrl: 'https://srgdjczzxtpt.com:2080/api', |
| | | // devUrl: 'https://srgdjczzxtpt.com:2080/api', |
| | | // devUrl: 'https://kt39592615.goho.co', |
| | | minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/", |
| | | // minioBaseUrl:"http://192.168.0.103:9528/", |
| | |
| | | import { |
| | | setImageUrl, |
| | | showTips, |
| | | getIndex |
| | | getIndex, |
| | | formattingUrls |
| | | } from '@/common/common.js' |
| | | Vue.config.productionTip = false; |
| | | |
| | |
| | | Vue.prototype.$http = http |
| | | Vue.prototype.$showTips = showTips; |
| | | Vue.prototype.$setImageUrl = setImageUrl; |
| | | Vue.prototype.$getIndex = getIndex |
| | | Vue.prototype.$getIndex = getIndex; |
| | | Vue.prototype.$formattingUrls = formattingUrls; |
| | | // 公共函数 |
| | | import globalFunc from '@/utils/func.js' |
| | | Vue.use(globalFunc, app); |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class="head"> |
| | | <!-- <u-navbar :is-fixed="false" :border-bottom="false" title="个人中心" :background="{ background: 'transprent' }" title-color="#FFFFFF"> |
| | | <view @click="$u.func.route('/pages/system/setting')" slot="right"> |
| | | <image src="/static/images/user/setting.png" class="set-icon" mode="widthFix"></image> |
| | | </view> |
| | | </u-navbar> --> |
| | | <image src="/static/img/center-bg.png" class="head-bg" /> |
| | | |
| | | <!-- 用户信息 --> |
| | | <view class="user-box"> |
| | | <view class="left"> |
| | | <image v-if="userInfo.avatar" :src="setAvatar(userInfo.avatar)" class="avatar" mode="aspectFill"></image> |
| | | <image v-if="userInfo.avatar" :src="setAvatar(userInfo.avatar)" class="avatar" mode="aspectFill"> |
| | | </image> |
| | | <image v-else src="/static/icon/user-01.png" class="avatar" mode="aspectFill"></image> |
| | | <view class="user-name">{{ userInfo.real_name }}</view> |
| | | <view class="user-name" v-if="isLogin">{{ userInfo.real_name }}</view> |
| | | <view class="user-name" v-if="!isLogin">未登录</view> |
| | | <!-- <view class="tag">{{ userInfo.tenant_id }}</view> --> |
| | | </view> |
| | | <view @click="navigator('/subPackage/user/editUserInfo/editUserInfo')" class="edit-btn">编辑资料</view> |
| | | <view v-if="isLogin" @click="navigator('/subPackage/user/editUserInfo/editUserInfo')" class="edit-btn"> |
| | | 编辑资料</view> |
| | | <view v-if="!isLogin" @click="navToLogin()" class="edit-btn">前往登录 ></view> |
| | | </view> |
| | | <!-- 操作按钮 --> |
| | | <view class="nav" v-if="roleType == 1 && addressType == 1"> |
| | | <view class="nav" v-if="roleType == 1 && addressType == 1 && isLogin"> |
| | | <navigator url="/subPackage/user/family/list" hover-class="none" class="nav-item"> |
| | | <!-- <image src="/static/images/user/n1.png" class="icon" mode=""></image> --> |
| | | <u-icon name="account" color="#fff" size="28"></u-icon> |
| | | <u-icon name="account" color="#fff" size="28"></u-icon> |
| | | <view class="name">我的家人</view> |
| | | </navigator> |
| | | <navigator url="/subPackage/house/roomControl/index" hover-class="none" class="nav-item"> |
| | | <!-- <image src="/static/images/user/n2.png" class="icon" mode=""></image> --> |
| | | <u-icon name="home" color="#fff" size="28"></u-icon> |
| | | <u-icon name="home" color="#fff" size="28"></u-icon> |
| | | <view class="name">我的房屋</view> |
| | | </navigator> |
| | | <navigator url="/subPackage/user/district/index" hover-class="none" class="nav-item"> |
| | | <!-- <image src="/static/images/user/n3.png" class="icon" mode=""></image> --> |
| | | <u-icon name="map" color="#fff" size="28"></u-icon> |
| | | <u-icon name="map" color="#fff" size="28"></u-icon> |
| | | <view class="name">我的小区</view> |
| | | </navigator> |
| | | <navigator url="/subPackage/bs/views/zhsb?from=2" hover-class="none" class="nav-item"> |
| | | <!-- <image src="/static/images/user/n4.png" class="icon" mode=""></image> --> |
| | | <u-icon name="file-text" color="#fff" size="28"></u-icon> |
| | | <u-icon name="file-text" color="#fff" size="28"></u-icon> |
| | | <view class="name">出租信息</view> |
| | | </navigator> |
| | | </view> |
| | | </view> |
| | | <!-- 功能列表 --> |
| | | <!-- <view class="cell-box"> |
| | | <u-cell-group :border="false"> |
| | | <u-cell-item title="我的评价"> |
| | | <image slot="icon" src="/static/images/user/c1.png" class="icon" mode=""></image> |
| | | </u-cell-item> |
| | | <u-cell-item title="常见问题"> |
| | | <image slot="icon" src="/static/images/user/c2.png" class="icon" mode=""></image> |
| | | </u-cell-item> |
| | | <u-cell-item title="客服中心" :border-bottom="false"> |
| | | <image slot="icon" src="/static/images/user/c3.png" class="icon" mode=""></image> |
| | | </u-cell-item> |
| | | </u-cell-group> |
| | | </view> --> |
| | | <view class="cell-box"> |
| | | <u-cell-group :border="false" icon="star" :customStyle="{fontSize:'26rpx',color:'#585b61'}"> |
| | | <u-cell title="切换角色" isLink url="/subPackage/user/role/index"> |
| | | <view class="cell-box" v-if="isLogin"> |
| | | <u-cell-group :border="false" icon="star" :customStyle="{fontSize:'26rpx',color:'#585b61'}"> |
| | | <u-cell title="切换角色" isLink url="/subPackage/user/role/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-02.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index"> |
| | | <u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index"> |
| | | <image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | <!-- <u-cell title="测试页面" :border="false" isLink url="/subPackage/house/roomDetails/detail"> |
| | | <image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image> |
| | | </u-cell> --> |
| | | <!-- <u-cell-item title="评分"> |
| | | <image slot="icon" src="/static/images/user/c5.png" class="icon" mode=""></image> |
| | | </u-cell-item> |
| | | <u-cell-item title="反馈"> |
| | | <image slot="icon" src="/static/images/user/c6.png" class="icon" mode=""></image> |
| | | </u-cell-item> |
| | | <u-cell-item title="关于" :border-bottom="false"> |
| | | <image slot="icon" src="/static/images/user/c7.png" class="icon" mode=""></image> |
| | | </u-cell-item> --> |
| | | </u-cell-group> |
| | | </view> |
| | | <view class="cell-box" > |
| | | <view class="cell-box" v-if="isLogin"> |
| | | <u-cell-group :border="false"> |
| | | <u-cell title="退出登录" :border="false" @click="logOut" isLink> |
| | | <u-cell title="退出登录" :border="false" @click="logOut" isLink> |
| | | <image slot="icon" src="/static/icon/menu-center-04.png" class="icon" mode=""></image> |
| | | </u-cell> |
| | | </u-cell-group> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { fetchUserInfo } from "@/api/user.js" |
| | | import { minioBaseUrl } from "@/common/setting.js" |
| | | import { |
| | | fetchUserInfo |
| | | } from "@/api/user.js" |
| | | import { |
| | | minioBaseUrl |
| | | } from "@/common/setting.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | ], |
| | | roleType: 1, |
| | | addressType:1, |
| | | user_info:{} |
| | | addressType: 1, |
| | | user_info: {} |
| | | }; |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | // this.getUserInfo(); |
| | | let role = uni.getStorageSync('activeRole') |
| | |
| | | } |
| | | this.addressType = uni.getStorageSync("siteInfo").addressType; |
| | | }, |
| | | |
| | | |
| | | mounted() { |
| | | this.setHeadHeight() |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | setAvatar(avatar){ |
| | | |
| | | |
| | | setAvatar(avatar) { |
| | | return `${minioBaseUrl}${avatar}` |
| | | }, |
| | | |
| | | |
| | | getUserInfo(){ |
| | | |
| | | |
| | | getUserInfo() { |
| | | let id = uni.getStorageSync("userInfo").user_id; |
| | | // console.log("userInfo===>", uni.getStorageSync("userInfo")) |
| | | // return; |
| | | fetchUserInfo(id).then(res=>{ |
| | | console.log(res) |
| | | if(res.code == 200){ |
| | | console.log(JSON.parse(res.data)); |
| | | return; |
| | | let data = res.data; |
| | | fetchUserInfo(id).then(res => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | console.log(JSON.parse(res.data)); |
| | | return; |
| | | let data = res.data; |
| | | let userInfo = res.data; |
| | | |
| | | |
| | | data = JSON.parse(data); |
| | | if(data.avatar){ |
| | | data.avatar = `${minioBaseUrl}${data.avatar}` |
| | | } |
| | | this.user_info = data; |
| | | this.$u.vuex('userInfo',JSON.parse(userInfo)) |
| | | } |
| | | }) |
| | | if (data.avatar) { |
| | | data.avatar = `${minioBaseUrl}${data.avatar}` |
| | | } |
| | | this.user_info = data; |
| | | this.$u.vuex('userInfo', JSON.parse(userInfo)) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | setHeadHeight() { |
| | | const that = this |
| | | |
| | | |
| | | uni.getSystemInfo({ |
| | | success: function(res) { |
| | | that.headHeight = Number(res.statusBarHeight) + Number(res.platform == 'ios' ? 44 : 48) + 582 |
| | | that.headHeight = Number(res.statusBarHeight) + Number(res.platform == 'ios' ? 44 : |
| | | 48) + 582 |
| | | } |
| | | }); |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | navigator(url) { |
| | | this.$u.func.globalNavigator(url) |
| | | }, |
| | | |
| | | |
| | | navToLogin() { |
| | | uni.redirectTo({ |
| | | url: "/pages/login/login-account" |
| | | }) |
| | | }, |
| | | |
| | | |
| | | logOut() { |
| | | uni.showModal({ |
| | | title: "提示", |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | margin-right: 22rpx; |
| | | } |
| | | } |
| | | |
| | | /deep/ .u-cell__title-text{ |
| | | font-size:28rpx !important; |
| | | |
| | | /deep/ .u-cell__title-text { |
| | | font-size: 28rpx !important; |
| | | font-family: PingFang SC; |
| | | font-weight: 500; |
| | | color: #585b61; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <script> |
| | | import uploadMixin from "@/mixin/uploadMixin"; |
| | | import { |
| | | saveBailReporting |
| | | saveBailReporting, |
| | | getBailReportingDetail, |
| | | updateBailReporting |
| | | } from "@/api/reporting/reporting"; |
| | | export default { |
| | | mixins: [uploadMixin], |
| | |
| | | } |
| | | }, |
| | | showSelectDate: false, |
| | | applyTime: Number(new Date()) |
| | | applyTime: Number(new Date()), |
| | | status: "", |
| | | isEdit: false |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | |
| | | if (option.id) { |
| | | this.isEdit = true; |
| | | this.getDetail(option.id) |
| | | } |
| | | |
| | | let siteInfo = uni.getStorageSync("siteInfo"); |
| | | let userInfo = uni.getStorageSync("userInfo"); |
| | | this.$set(this.info, "houseCode", siteInfo.houseCode); |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | |
| | | getDetail(id) { |
| | | getBailReportingDetail({ |
| | | taskId: id |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | for (let i in this.info) { |
| | | this.info[i] = res.data[i] |
| | | } |
| | | this.info.reportType = 1; |
| | | this.status = data.confirmFlag; |
| | | if (res.data.applyTime) { |
| | | this.applyTime = Number(new Date(res.data.applyTime)) |
| | | } |
| | | this.form.images = this.$setImageUrl(data.locationImageUrls, 2); |
| | | this.info.locationImageUrls = data.locationImageUrls; |
| | | this.info.id = data.id; |
| | | this.info.taskId = data.taskId; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | getLocation() { |
| | | uni.chooseLocation({ |
| | |
| | | sumitInfo() { |
| | | this.$refs.form.validate().then(valid => { |
| | | this.checkImages(); |
| | | saveBailReporting(this.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功', |
| | | success() { |
| | | setTimeout(() => { |
| | | // this.$u.func.globalNavigator("", "navBack") |
| | | uni.navigateBack() |
| | | }, 1000) |
| | | } |
| | | }) |
| | | }) |
| | | if (this.isEdit) { |
| | | this.info.status = 1; |
| | | this.updateRequest() |
| | | } else { |
| | | this.addRequest() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | addRequest() { |
| | | saveBailReporting(this.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 300) |
| | | }) |
| | | }, |
| | | |
| | | updateRequest() { |
| | | updateBailReporting(this.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '保存成功' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 300) |
| | | }) |
| | | }, |
| | | |
| | | navigatorPage() { |
| | | this.$u.func.globalNavigator('bailList', "navTo") |
| | | } |
| | |
| | | goodsImageUrls: [], |
| | | eventType: 1, |
| | | isEdit: false, |
| | | id: "" |
| | | id: "", |
| | | status: "" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | console.log(option); |
| | | if (option.id) { |
| | | this.isEdit = true; |
| | | this.id = opton.id; |
| | | this.id = option.id; |
| | | this.getDetail(option.id); |
| | | } else { |
| | | if (option.type != 1) { |
| | |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | let data = res.data; |
| | | this.status = data.confirmFlag; |
| | | uni.setNavigationBarTitle({ |
| | | title: data.name |
| | | title: data.labelName |
| | | }) |
| | | for (let i in this.info) { |
| | | this.info[i] = data[i] |
| | |
| | | |
| | | if (data.eventType == 1) { |
| | | this.$set(this.info, "reportType", 3); |
| | | } else if (option.type == 2) { |
| | | } else if (data.eventType == 2) { |
| | | this.$set(this.info, "reportType", 4); |
| | | } else { |
| | | this.$set(this.info, "reportType", 5); |
| | |
| | | }, |
| | | |
| | | setTitle(type) { |
| | | if (type == 4) { |
| | | if (type == 2) { |
| | | return "二手手机维修" |
| | | } else if (type == 3) { |
| | | return "二手车交易" |
| | |
| | | title: '保存成功' |
| | | }) |
| | | setTimeout(() => { |
| | | this.reLoadPrePage() |
| | | if (this.status == 4) { |
| | | this.reLoadPrePage() |
| | | } else { |
| | | uni.navigateBack(); |
| | | } |
| | | }, 300) |
| | | }) |
| | | }, |
| | |
| | | <text class="f-32 fw" v-if="i.eventType == 1">打金店</text> |
| | | <text class="f-32 fw" v-if="i.eventType == 3">二手车交易</text> |
| | | <text class="f-32 fw" v-if="i.eventType == 2">二手手机维修</text> |
| | | <u-tag v-if="i.confirmFlag == 4" text="待接收" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | <view class="content"> |
| | | <u-form-item label="社区名称" prop="districtName" borderBottom> |
| | | <!-- <u-form-item label="社区名称" prop="districtName" borderBottom> |
| | | <view class="content-name f-28"> |
| | | {{info.districtName}} |
| | | </view> |
| | | <!-- <u-input v-model="info.districtName" disabled disabledColor="#fff" border="none" placeholder="请输入" |
| | | placeholderClass="f-28 c-99" inputAlign="right"></u-input> --> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | <u-form-item label="酒店名称" prop="hotelName" borderBottom required> |
| | | <u-input v-model="info.hotelName" border="none" placeholder="请输入" placeholderClass="f-28 c-99" |
| | | inputAlign="right"></u-input> |
| | |
| | | } |
| | | ], |
| | | isEdit: false, |
| | | id: "" |
| | | id: "", |
| | | status: "" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | let data = res.data; |
| | | this.status = data.confirmFlag; |
| | | for (let i in this.info) { |
| | | this.info[i] = data[i] |
| | | } |
| | |
| | | this.$refs.form.validate().then(valid => { |
| | | this.checkImages() |
| | | if (this.isEdit) { |
| | | this.info.id = this.id; |
| | | this.info.status = 1; |
| | | this.info.reportType = 2; |
| | | this.setHotelReportingRequest() |
| | |
| | | title: '保存成功' |
| | | }) |
| | | setTimeout(() => { |
| | | this.reLoadPrePage() |
| | | if (this.status == 4) { |
| | | this.reLoadPrePage() |
| | | } else { |
| | | uni.navigateBack(); |
| | | } |
| | | }, 300) |
| | | }) |
| | | }, |
| | |
| | | <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.taskId)"> |
| | | <view class="item-title flex a-i-c j-c-s-b mb-20"> |
| | | <text class="f-32 fw">{{i.hotelName}}</text> |
| | | <u-tag v-if="i.confirmFlag == 4" text="待接收" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | |
| | | { |
| | | title: "二手手机维修", |
| | | bgImg: "/static/icon/nav-bg-14.png", |
| | | path: "form?type=4", |
| | | path: "form?type=2", |
| | | background: "#13C6C7", |
| | | id: "130604" |
| | | }, |
| | |
| | | } |
| | | ], |
| | | isEdit: false, |
| | | id: "" |
| | | id: "", |
| | | status: "" |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | let data = res.data; |
| | | this.status = data.confirmFlag; |
| | | for (let i in this.info) { |
| | | this.info[i] = data[i] |
| | | } |
| | |
| | | title: '修改成功', |
| | | }) |
| | | setTimeout(() => { |
| | | this.reLoadPrePage() |
| | | if (this.status == 4) { |
| | | this.reLoadPrePage() |
| | | } else { |
| | | uni.navigateBack(); |
| | | } |
| | | }, 300) |
| | | }) |
| | | }, |
| | |
| | | <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.taskId)"> |
| | | <view class="item-title flex a-i-c j-c-s-b mb-20"> |
| | | <text class="f-32 fw">{{i.campusName}}</text> |
| | | <u-tag v-if="i.confirmFlag == 4" text="待接收" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag> |
| | | <u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag> |
| | |
| | | |
| | | <script> |
| | | import { |
| | | getSchoolReportingList |
| | | getSchoolReportingList |
| | | } from "@/api/reporting/reporting.js" |
| | | export default { |
| | | data() { |
| | |
| | | </view> |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>走访地址</text> |
| | | <text>{{houseHold.currentAddress}}</text> |
| | | <text class="item-content">{{houseHold.currentAddress}}</text> |
| | | </view> |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>内容</text> |
| | | <text>{{info.context}}</text> |
| | | <text class="item-content">{{info.context}}</text> |
| | | </view> |
| | | <view class="item-row flex j-c-s-b a-i-c"> |
| | | <text>内容</text> |
| | | <text>{{info.wordTime}}</text> |
| | | <text>走访时间</text> |
| | | <text>{{info.workTime}}</text> |
| | | </view> |
| | | |
| | | <view class="image-wrap bgc-ff"> |
| | | <view class="mb-20"> |
| | | 走访图片 |
| | | </view> |
| | | <view class="image-item" v-for="(i,k) in images" @click="previewImage(i)"> |
| | | <u-image :src="i" width="80rpx" height="80rpx"></u-image> |
| | | <u-image :src="i" width="100rpx" height="100rpx"></u-image> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | import { |
| | | getHouseholdDetail |
| | | } from '@/api/house/household.js' |
| | | import { |
| | | bizDictionary, |
| | | update |
| | | } from '@/api/system/dict.js' |
| | | import { |
| | | getLabelListByParentId |
| | | } from "@/api/label/label.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | async onLoad(option) { |
| | | await this.getTypeList(); |
| | | await this.getLabelLit(); |
| | | await this.getLabelList(); |
| | | this.getDetail(option.id); |
| | | }, |
| | | methods: { |
| | |
| | | }).then(res => { |
| | | this.info = res.data; |
| | | this.images = this.$setImageUrl(res.data.url); |
| | | this.getHousehold(res.data.houseHold); |
| | | this.typeName = this.getTypeValue(res.data.type); |
| | | this.labelName = this.getLabelValue(res.data.personType); |
| | | this.getHousehold(res.data.householdId); |
| | | this.typeName = this.$getIndex(this.typeList, res.data.type, "dictKey", "dictValue").name; |
| | | this.labelName = this.$getIndex(this.labelList, res.data.personType, "id", "name").name; |
| | | }) |
| | | }, |
| | | |
| | |
| | | }) |
| | | }, |
| | | |
| | | getLabelLit() { |
| | | getLabelList() { |
| | | getLabelListByParentId({ |
| | | parentId: 100 |
| | | }).then(res => { |
| | | console.log(res); |
| | | this.labelList = res.data; |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | |
| | | getLabelValue(value) { |
| | | |
| | | for (let i = 0, ii = this.labelList.length; i < ii; i++) { |
| | | if (value == this.labelList[i].id) { |
| | | return this.labelList[i].name |
| | |
| | | border-bottom: 1px solid #f5f5f5; |
| | | font-size: 28rpx; |
| | | background-color: #fff; |
| | | |
| | | .item-content { |
| | | width: 70%; |
| | | text-align: right; |
| | | } |
| | | } |
| | | |
| | | .image-wrap { |
| | |
| | | }, |
| | | navTo(id, type, status) { |
| | | if (status == 4) { |
| | | this.navToEdit(type, id); |
| | | if (uni.getStorageSync("activeRole").roleName == "民警") { |
| | | this.navToDetail(type, id) |
| | | } else { |
| | | this.navToEdit(type, id); |
| | | } |
| | | } else { |
| | | this.navToDetail(type, id) |
| | | } |
| | |
| | | <!-- <footer-btn v-if="roleType == 1 && status == 1" text="提交审核" @click="submit" /> --> |
| | | |
| | | <audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action> |
| | | |
| | | <footer-btn v-if="roleType == 2 && status == 2" text="提交" @click="submit" /> |
| | | <footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit" /> |
| | | |
| | | |
| | | <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="goOutDate[tabIndex]" mode="datetime" |
| | |
| | | this.checkImages() |
| | | setTimeout(() => { |
| | | this.submitRequest(this.goOutInfo); |
| | | }, 1000) |
| | | }, 300) |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | // uni.navigateBack() |
| | | }) |
| | | }, |
| | | |
| | | navToEdit() { |
| | | uni.navigateTo({ |
| | | url: `/subPackage/label/bail?id=${this.id}` |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <u-button type="primary" @click="submit">提交审核</u-button> |
| | | </view> --> |
| | | |
| | | |
| | | <footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn> |
| | | <audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action> |
| | | |
| | | <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | basicData: [{ |
| | | label: '社区名称', |
| | | name: "districtName", |
| | | value: '未完善' |
| | | }, |
| | | basicData: [ |
| | | // { |
| | | // label: '社区名称', |
| | | // name: "districtName", |
| | | // value: '未完善' |
| | | // }, |
| | | { |
| | | label: '酒店名称', |
| | | name: 'hotelName', |
| | |
| | | }, |
| | | onLoad(option) { |
| | | this.taskId = option.id; |
| | | this.getDetailInfo(option.id); |
| | | |
| | | let roleName = uni.getStorageSync("activeRole").roleName |
| | | if (roleName == "居民") { |
| | | this.roleType = 2 |
| | | this.roleType = 2; |
| | | uni.setNavigationBarTitle({ |
| | | title: "详情" |
| | | }) |
| | | } else { |
| | | this.roleType = 1 |
| | | } |
| | | }, |
| | | |
| | | onShow() { |
| | | this.getDetailInfo(this.taskId); |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | let data = { |
| | | id: this.id, |
| | | taskId: this.taskId, |
| | | // status: this.selectStatus, |
| | | status: val.type, |
| | | // remark: this.remark |
| | | remark: val.remark |
| | | } |
| | | // if (this.selectStatus == 3 && !this.remark) { |
| | | // uni.showToast({ |
| | | // title: "请输入拒绝原因", |
| | | // icon: "none" |
| | | // }) |
| | | // return; |
| | | // } |
| | | |
| | | setHotelReporting(data).then(res => { |
| | | if (res.code !== 200) { |
| | | uni.showToast({ |
| | |
| | | prePage.$vm.getList(); |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | navToEdit() { |
| | | uni.navigateTo({ |
| | | url: `/subPackage/label/hotel?id=${this.id}` |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <view class="planegraph" v-if="goodsImageUrls.length"> |
| | | <box-title title="物品照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,imageUrls)"> |
| | | <view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20" |
| | | @click="previewImg(i,goodsImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- <view class="bottom-btn" v-if="(roleType == 1 && status == 1) || (roleType == 2 && status == 2)"> |
| | | <u-button type="primary" @click="submit">提交审核</u-button> |
| | | </view> --> |
| | | |
| | | <footer-btn v-if="roleType ==2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn> |
| | | <audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action> |
| | | |
| | | <u-picker :defaultIndex="defaultIndex" :closeOnClickOverlay="true" @close="isPickerShow = false" |
| | |
| | | |
| | | let roleName = uni.getStorageSync("activeRole").roleName |
| | | if (roleName == "居民") { |
| | | this.roleType = 2 |
| | | this.roleType = 2; |
| | | |
| | | } else { |
| | | this.roleType = 1 |
| | | } |
| | |
| | | }).then(res => { |
| | | console.log(res); |
| | | let data = res.data; |
| | | if (this.roleType == 2) { |
| | | uni.setNavigationBarTitle({ |
| | | title: `${data.labelName}详情` |
| | | }) |
| | | } |
| | | |
| | | |
| | | this.id = data.id; |
| | | this.status = data.confirmFlag; |
| | | this.remark = data.confirmNotion; |
| | |
| | | reLoadPrePage() { |
| | | let pages = getCurrentPages(); |
| | | let prePage = pages[pages.length - 2]; |
| | | prePage.$vm.currentPage = 1, |
| | | prePage.$vm.list = []; |
| | | prePage.$vm.currentPage = 1; |
| | | prePage.$vm.list = []; |
| | | prePage.$vm.getList(); |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | navToEdit() { |
| | | uni.navigateTo({ |
| | | url: `/subPackage/label/form?id=${this.id}` |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <lineItem :dataInfo="basicData"></lineItem> |
| | | </view> |
| | | </view> |
| | | <view class="licence" v-if="imageUrls.length"> |
| | | <box-title title="手持身份证" class="box-title"></box-title> |
| | | |
| | | <view class="planegraph" v-if="foImageUrls.length"> |
| | | <box-title title="四个一工程照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in imageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,imageUrls)"> |
| | | <view v-for="(i,k) in foImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,foImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="planegraph" v-if="goodsImageUrls.length"> |
| | | <box-title title="物品照片" class="box-title"></box-title> |
| | | <view class="planegraph" v-if="fireFacsImageUrls.length"> |
| | | <box-title title="灭火器照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20" |
| | | @click="previewImg(i,goodsImageUrls)"> |
| | | <view v-for="(i,k) in fireFacsImageUrls" :key="k" class="ml-20 mt-20" |
| | | @click="previewImg(i,fireFacsImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="planegraph" v-if="scImageUrls.length"> |
| | | <box-title title="安全通道照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in scImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,scImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="planegraph" v-if="patrolImageUrls.length"> |
| | | <box-title title="周边巡查照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in patrolImageUrls" :key="k" class="ml-20 mt-20" |
| | | @click="previewImg(i,patrolImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="planegraph" v-if="antiCollisionImageUrls.length"> |
| | | <box-title title="防撞装置照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in antiCollisionImageUrls" :key="k" class="ml-20 mt-20" |
| | | @click="previewImg(i,antiCollisionImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="planegraph" v-if="haImageUrls.length"> |
| | | <box-title title="高空抛物监控照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in haImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,haImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="examine"> |
| | | <box-title title="审核信息" class="box-title"></box-title> |
| | | <view class="row flex j-c-s-b a-i-c"> |
| | | <text>审核状态</text> |
| | | <text class="row-right">{{form.confirmFlag}}</text> |
| | | </view> |
| | | <view class="row flex j-c-s-b a-i-c" v-if="remark"> |
| | | <text class="f-28">审核状态</text> |
| | | <text class="row-right">{{remark}}</text> |
| | | </view> |
| | | <view class="row flex j-c-s-b a-i-c"> |
| | | <text>审核状态</text> |
| | | <text class="row-right">{{form.confirmFlag}}</text> |
| | |
| | | <!-- <view class="bottom-btn" v-if="(roleType == 1 && status == 1) || (roleType == 2 && status == 2)"> |
| | | <u-button type="primary" @click="submit">提交审核</u-button> |
| | | </view> --> |
| | | |
| | | <footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn> |
| | | <audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action> |
| | | |
| | | <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | basicData: [{ |
| | | label: '社区名称', |
| | | name: "districtName", |
| | | value: '未完善' |
| | | }, |
| | | basicData: [ |
| | | // { |
| | | // label: '社区名称', |
| | | // name: "districtName", |
| | | // value: '未完善' |
| | | // }, |
| | | { |
| | | label: '校园名称', |
| | | name: 'campusName', |
| | |
| | | this.patrolImageUrls = this.$setImageUrl(data.patrolImageUrls); |
| | | this.antiCollisionImageUrls = this.$setImageUrl(data.antiCollisionImageUrls); |
| | | this.haImageUrls = this.$setImageUrl(data.haImageUrls); |
| | | this.scImageUrls = this.$setImageUrl(data.scImageUrls); |
| | | }) |
| | | }, |
| | | |
| | |
| | | prePage.$vm.getList(); |
| | | uni.navigateBack(); |
| | | }, |
| | | navToEdit() { |
| | | uni.navigateTo({ |
| | | url: `/subPackage/label/school?id=${this.id}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | // trigger: ['blur', 'change'] |
| | | // }, |
| | | |
| | | 'type': { |
| | | 'info.type': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择走访类型', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'householdId': { |
| | | 'info.householdId': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择被访问人', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'context': { |
| | | 'info.context': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入工作内容', |
| | |
| | | |
| | | async onLoad(option) { |
| | | await this.getTypeList(); |
| | | await this.getLabelLit(); |
| | | await this.getLabelList(); |
| | | if (option.id) { |
| | | this.isEdit = true; |
| | | this.id = option.id; |
| | |
| | | } |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | |
| | | |
| | | getDetail(id) { |
| | | getWorkLogDetail({ |
| | |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | let data = res.data |
| | | this.typeIndex = this.getTypeValue(data.type).index; |
| | | this.typeName = this.getTypeValue(data.type).name; |
| | | this.workTime = Number(new Date(data.workTime)) |
| | | this.tyepIndex = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").index; |
| | | this.typeName = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").name; |
| | | if (data.workTime) { |
| | | this.workTime = Number(new Date(data.workTime)) |
| | | } |
| | | this.info.type = data.type; |
| | | this.info.workTime = data.workTime; |
| | | this.info.context = data.context; |
| | | this.info.householdId = data.householdId; |
| | | this.info.personType = data.personType; |
| | | this.labelIndex = this.getLabelValue(data.personType).index; |
| | | this.labelName = this.getLabelValue(data.personType).name; |
| | | this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index; |
| | | this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name; |
| | | this.getHouseholdList(); |
| | | this.getHousehold(data.householdId); |
| | | this.form.images = this.$setImageUrl(data.url, 2); |
| | | this.info.id = data.id; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getTypeValue(value) { |
| | | for (let i = 0, ii = this.typeList[0].length; i < ii; i++) { |
| | | if (value == this.typeList[0][i].dictKey) { |
| | | return { |
| | | index: [i], |
| | | name: this.typeList[0][i].dictValue |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | getLabelValue(value) { |
| | | for (let i = 0, ii = this.labelList[0].length; i < ii; i++) { |
| | | if (value == this.labelList[0][i].id) { |
| | | return { |
| | | index: [i], |
| | | name: this.labelList[0][i].name |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | getTypeList() { |
| | |
| | | }) |
| | | }, |
| | | |
| | | getLabelLit() { |
| | | getLabelList() { |
| | | getLabelListByParentId({ |
| | | parentId: 100 |
| | | }).then(res => { |
| | |
| | | } else { |
| | | this.addWorkLogRequest() |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | addWorkLog(this.info).then(res => { |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功', |
| | | success() { |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 1000) |
| | | } |
| | | title: '提交成功' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 300) |
| | | }) |
| | | }, |
| | | |
| | |
| | | uni.showToast({ |
| | | icon: 'success', |
| | | title: '提交成功', |
| | | success() { |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 1000) |
| | | } |
| | | }) |
| | | setTimeout(() => { |
| | | this.reLoadPrePage() |
| | | }, 300) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | //刷新上一页数据后返回 |
| | | reLoadPrePage() { |
| | | let pages = getCurrentPages(); |
| | | let prePage = pages[pages.length - 2]; |
| | | prePage.$vm.resetParams(); |
| | | prePage.$vm.getList(); |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | } |
| | | } |