场所采集/记录/维护、报事审核、场所维护、租户详情页面更新
| | |
| | | method: 'GET',
|
| | | params
|
| | | })
|
| | | } |
| | | |
| | | export const confirmHouseRental = (data) => { |
| | | return http.request({ |
| | | url: 'blade-houseRental/houseRental/confirmHouseRental', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const getPlaceDetail = (params) => { |
| | | return http.request({ |
| | | url: '/blade-placeExt/placeExt/getDetail', |
| | | method: 'GET', |
| | | params |
| | | }) |
| | | } |
| | |
| | | </view>
|
| | | <rentForm ref="rentform" />
|
| | | </view>
|
| | | <view class="addPerson-box">
|
| | | <u-button class="btn-item" color="#2CD5C0" plain style="width: 300rpx;"
|
| | | @click="addRentForm">再加一人</u-button>
|
| | | </view>
|
| | | </view>
|
| | | </u-form>
|
| | | <!-- 事件类型下拉框 -->
|
| | |
| | | @cancel="dueTimeShow = false"></u-datetime-picker>
|
| | |
|
| | | <view class="bottom-tools">
|
| | | <u-button class="btn-item" color="#2CD5C0" @click="addRentForm">再加一人</u-button>
|
| | | <u-button class="btn-item" type="error" @click="isModelShow = true" v-if="rentId !== ''">删除</u-button>
|
| | | <u-button class="btn-item" type="warning" @click=""
|
| | | v-if="auditStatus == '0' && currentRole === 'admin'">审核</u-button>
|
| | | <u-button class="btn-item" type="success" @click="verify" |
| | | v-if="auditStatus == 0 && currentRole.roleAlias === 'wgy'">确认</u-button>
|
| | | <u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)"
|
| | | @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
|
| | | </view> |
| | | <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息" |
| | | </view>
|
| | | <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
|
| | | @cancel="isModelShow = false" @confirm="deleteRent"></u-modal>
|
| | | <u-picker v-if="isAuditShow" :closeOnClickOverlay="true" @close="isAuditShow = false" :columns="auditColumns"
|
| | | :show="isAuditShow" @confirm="verifyConfirm" keyName="name" @cancel="isAuditShow = false"></u-picker>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | import {
|
| | | addHouseRental,
|
| | | updateRetalInfo, |
| | | deleteRentalInfo
|
| | | updateRetalInfo,
|
| | | deleteRentalInfo,
|
| | | confirmHouseRental
|
| | | } from '@/api/houseRental/houseRental.js'
|
| | | import {
|
| | | data
|
| | |
| | | }
|
| | | ]
|
| | | },
|
| | | isAuditShow: false,
|
| | | auditColumns: [
|
| | | [{
|
| | | name: "待确认",
|
| | | status: 0
|
| | | },
|
| | | {
|
| | | name: "已确认",
|
| | | status: 1
|
| | | },
|
| | | ]
|
| | | ],
|
| | | selectBusList: [],
|
| | | selectBusTitle: '',
|
| | | selectBusModel: '',
|
| | |
| | | houseCode: '',
|
| | | rentId: '',
|
| | | auditStatus: null,
|
| | | currentTime: Number(new Date()), |
| | | isModelShow: false, |
| | | |
| | | currentTime: Number(new Date()),
|
| | | isModelShow: false,
|
| | |
|
| | | }
|
| | | },
|
| | | onLoad(option) {
|
| | |
| | | }
|
| | | },
|
| | | mounted() {
|
| | | this.currentRole = uni.getStorageSync("activeRole")
|
| | | this.currentRole = uni.getStorageSync("activeRole") |
| | | console.log(this.currentRole);
|
| | | },
|
| | | methods: {
|
| | | showSelectBus(data, title, model, key) {
|
| | |
| | | }
|
| | | })
|
| | | },
|
| | | // 确认操作
|
| | | verify() {
|
| | | this.isAuditShow = true
|
| | | },
|
| | | verifyConfirm(e) {
|
| | | const auditStatus = e.value[0].status |
| | | confirmHouseRental({ |
| | | id: this.rentId, |
| | | auditStatus |
| | | }).then(res => { |
| | | const { code, data } = res |
| | | if (code !== 200) { |
| | | uni.showToast({ |
| | | title: "确认失败", |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } |
| | | uni.showToast({ |
| | | title: "确认成功", |
| | | icon: 'success' |
| | | }) |
| | | this.isAuditShow = false |
| | | this.getCurrentRentInfo() |
| | | })
|
| | | },
|
| | | // 更新操作
|
| | | async update() {
|
| | | let houseTenantVOList = []
|
| | |
| | | houseRentalList
|
| | | }
|
| | | } = await getHouseRentInfo(this.houseCode)
|
| | | this.auditStatus = houseRentalList.auditStatus
|
| | | this.auditStatus = houseRentalList[0].auditStatus |
| | | console.log(this.auditStatus);
|
| | | const images = []
|
| | | const {
|
| | | houseStatus,
|
| | |
| | | })
|
| | | return
|
| | | }
|
| | | this.isModelShow = false |
| | | uni.showToast({ |
| | | title: '删除成功', |
| | | icon: 'success', |
| | | duration: 1000, |
| | | complete: () => { |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 1000) |
| | | } |
| | | this.isModelShow = false
|
| | | uni.showToast({
|
| | | title: '删除成功',
|
| | | icon: 'success',
|
| | | duration: 1000,
|
| | | complete: () => {
|
| | | setTimeout(() => {
|
| | | uni.navigateBack()
|
| | | }, 1000)
|
| | | }
|
| | | })
|
| | | },
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | .rent-info {
|
| | | .addPerson-box {
|
| | | margin-top: 30rpx;
|
| | | }
|
| | |
|
| | | .rent-box {
|
| | | padding: 20rpx;
|
| | | background-color: #ffffff;
|
| | |
| | | <u--input v-model="form.name" border="none"></u--input>
|
| | | </u-form-item>
|
| | | <u-form-item label="电话号码" class="form-item">
|
| | | <u--input v-model="form.phone" border="none"></u--input>
|
| | | <u--input v-model="form.telephone" border="none"></u--input>
|
| | | </u-form-item>
|
| | | <u-form-item label="咱据地" class="form-item">
|
| | | <u--input v-model="form.address" border="none"></u--input>
|
| | | <u--input v-model="form.tempAddress" border="none"></u--input>
|
| | | </u-form-item>
|
| | | </u-form>
|
| | | </view>
|
| | |
| | | return {
|
| | | form: {
|
| | | name: '',
|
| | | phone: '',
|
| | | address: ''
|
| | | telephone: '',
|
| | | tempAddress: ''
|
| | | },
|
| | | rules: {
|
| | | name: {
|
| | |
| | | <box-title title="基础信息"></box-title>
|
| | | </view>
|
| | | <view class="item">
|
| | | <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
|
| | | <u-form-item v-if="!stdId" @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
|
| | | :required="isRequired" :disabled="isDisabled" prop="buildingCode">
|
| | | <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
|
| | | </u--input>
|
| | |
| | | </view>
|
| | | </u-sticky>
|
| | | <view class="list">
|
| | | <view class="list-item bgc-ff mb-20" v-for="item in siteList" :key="item.id" @click="pushPage(item.id)">
|
| | | <view class="list-item bgc-ff mb-20" v-for="item in siteList" :key="item.id" @click="pushPage(item.placeId, item.id)">
|
| | | <view class="item-title flex a-i-c j-c-s-b mb-20">
|
| | | <text class="f-32 fw">{{ item.placeName ? item.placeName : '场所信息未完善' }}</text>
|
| | | <!-- <u-tag text="待审批" type="warning" plain plainFill></u-tag> -->
|
| | |
| | | const res = await getSiteMaintenanceData({
|
| | | ...params,
|
| | | ...this.pagingParams
|
| | | })
|
| | | }) |
| | | console.log(res);
|
| | | const {
|
| | | code,
|
| | | data: {
|
| | |
| | | })
|
| | | return res
|
| | | },
|
| | | pushPage(id) { |
| | | const siteData = this.siteList.find(item => item.id === id) |
| | | const siteDataStr = JSON.stringify(siteData)
|
| | | // this.$u.func.globalNavigator('/subPackage/workbench/views/examine?id='+id) |
| | | this.$u.func.globalNavigator('/subPackage/workbench/views/examine?siteData='+siteDataStr)
|
| | | pushPage(placeId, id) {
|
| | | this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`)
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | data() {
|
| | | return {
|
| | | tabsList: [{
|
| | | type: 1,
|
| | | type: 0,
|
| | | name: '全部'
|
| | | },
|
| | | {
|
| | | type: 2,
|
| | | type: 1,
|
| | | name: '待完善'
|
| | | },
|
| | | {
|
| | | type: 3,
|
| | | type: 2,
|
| | | name: '已完善'
|
| | | }
|
| | | ],
|
| | |
| | | <view class="licence">
|
| | | <box-title title="营业执照" class="box-title"></box-title>
|
| | | <view class="info">
|
| | | <view class="images-box"></view>
|
| | | <view class="images-box">
|
| | | <u-image v-if="imageObj.imageUrls" width="80" height="80" :src="imageObj.imageUrls"
|
| | | @click="preViewImg(imageObj.imageUrls)"></u-image>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="planegraph">
|
| | | <box-title title="场所平面图" class="box-title"></box-title>
|
| | | <view class="info">
|
| | | <view class="images-box"></view>
|
| | | <view class="images-box">
|
| | | <u-image v-if="imageObj.planImageUrl" width="80" height="80" :src="imageObj.planImageUrls"
|
| | | @click="preViewImg(imageObj.planImageUrl)"></u-image>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="personnel">
|
| | | <box-title title="从业人员" class="box-title"></box-title>
|
| | | <view class="info">
|
| | | <view class="person-box" v-for="(item, index) in personnelData" :key="index">
|
| | | <view class="person-box" v-for="(item, index) in placePersonList" :key="item.id">
|
| | | <view class="title">人员信息-#{{ index + 1 }}</view>
|
| | | <line-item :data-info="item"></line-item>
|
| | | <view class="info-box">
|
| | | <view class="content">
|
| | | <text>姓名</text>
|
| | | <text>{{ item.name || '未完善' }}</text>
|
| | | </view>
|
| | | <view class="content">
|
| | | <text>电话号码</text>
|
| | | <text>{{ item.telephone || '未完善' }}</text>
|
| | | </view>
|
| | | <view class="content">
|
| | | <text>暂住地</text>
|
| | | <text>{{ item.tempAddress || '未完善' }}</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | import boxTitle from '@/components/boxTitle/index.vue'
|
| | | import lineItem from '../components/lineItem.vue'
|
| | | import {
|
| | | checkPlaceExtData
|
| | | checkPlaceExtData,
|
| | | getPlaceDetail
|
| | | } from '@/api/placeExp/placeExp.js'
|
| | | export default {
|
| | | components: {
|
| | |
| | | data() {
|
| | | return {
|
| | | basicData: [{
|
| | | label: '场所名称', |
| | | label: '场所名称',
|
| | | name: "placeName",
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '法人信息', |
| | | label: '法人信息',
|
| | | name: 'legalPerson',
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '法人电话', |
| | | label: '法人电话',
|
| | | name: 'legalTel',
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '场所位置', |
| | | label: '场所位置',
|
| | | name: 'localtion',
|
| | | value: '未完善'
|
| | | },
|
| | | ],
|
| | | personnelData: [
|
| | | [{
|
| | | label: '姓名',
|
| | | value: '未完善',
|
| | | },
|
| | | {
|
| | | label: '电话号码',
|
| | | value: '未完善',
|
| | | },
|
| | | {
|
| | | label: '暂住地',
|
| | | value: '未完善',
|
| | | }
|
| | | ]
|
| | | ],
|
| | | placePersonList: [],
|
| | | form: {
|
| | | confirmFlag: '待审核',
|
| | | confirmNotion: ''
|
| | | },
|
| | | imageObj: {
|
| | | imageUrls: '',
|
| | | planImageUrls: ''
|
| | | },
|
| | | isPickerShow: false,
|
| | | columns: [
|
| | |
| | | },
|
| | | ]
|
| | | ],
|
| | | currentId: '', |
| | | currentData: {}
|
| | | currentData: {
|
| | | placeId: '',
|
| | | id: ''
|
| | | },
|
| | | }
|
| | | },
|
| | | onLoad(option) {
|
| | | // const {
|
| | | // id
|
| | | // } = option
|
| | | // this.currentId = id |
| | | const { siteData } = option |
| | | this.currentData = JSON.parse(siteData)
|
| | | const {
|
| | | placeId,
|
| | | id
|
| | | } = option
|
| | | this.currentData = {
|
| | | placeId,
|
| | | id
|
| | | }
|
| | | },
|
| | | onShow() {
|
| | | this.setDefaultValue()
|
| | | },
|
| | | methods: { |
| | | setDefaultValue() { |
| | | this.basicData.forEach(item => { |
| | | item.value = this.currentData[item.name] |
| | | }) |
| | | methods: {
|
| | | async setDefaultValue() {
|
| | | const {
|
| | | code,
|
| | | data
|
| | | } = await getPlaceDetail({
|
| | | placeId: this.currentData.placeId
|
| | | })
|
| | | if (code !== 200) {
|
| | | uni.showToast({
|
| | | title: '数据请求失败',
|
| | | icon: "error"
|
| | | })
|
| | | return
|
| | | }
|
| | | Object.keys(this.imageObj).forEach(key => {
|
| | | this.imageObj[key] = data[key]
|
| | | })
|
| | | this.basicData.forEach(item => {
|
| | | item.value = data[item.name] || '未完善'
|
| | | })
|
| | | this.placePersonList = data.placePractitioner
|
| | | },
|
| | | async checkPlaceExt(data) {
|
| | | const res = await checkPlaceExtData(data)
|
| | |
| | | })
|
| | | return
|
| | | }
|
| | | uni.navigateBack()
|
| | | uni.showToast({
|
| | | title: '审核成功',
|
| | | icon: 'success',
|
| | | duration: 1500,
|
| | | complete() {
|
| | | setTimeout(() => {
|
| | | uni.navigateBack()
|
| | | }, 1500)
|
| | | }
|
| | | })
|
| | | },
|
| | | handleConfirm(e) {
|
| | | this.form.confirmFlag = e.value[0].name
|
| | | this.isPickerShow = false
|
| | | },
|
| | | preViewImg(url) {
|
| | | uni.previewImage({
|
| | | urls: [url], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
|
| | | })
|
| | | },
|
| | | submit() {
|
| | | const {
|
| | |
| | | confirmNotion
|
| | | })
|
| | | this.checkPlaceExt(data)
|
| | | }, |
| | | findObjValue(value, obj) { |
| | | const res = obj.find(item => { |
| | | return item.name == value |
| | | }) |
| | | return res |
| | | },
|
| | | findObjValue(value, obj) {
|
| | | const res = obj.find(item => {
|
| | | return item.name == value
|
| | | })
|
| | | return res
|
| | | },
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | .info {
|
| | |
|
| | |
|
| | | .title {
|
| | | font-size: 30rpx;
|
| | | padding-left: 10rpx;
|
| | |
| | | min-height: 100rpx;
|
| | | background-color: #fff;
|
| | | }
|
| | |
|
| | | .info-box {
|
| | | .content {
|
| | | font-size: 30rpx;
|
| | | border-bottom: 1rpx solid #f6f6f6;
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | | background-color: #fff;
|
| | | padding: 20rpx;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .form {
|
| | |
| | | <script>
|
| | | import {
|
| | | getRentalHouseContent,
|
| | | getPage,
|
| | | getStatistics
|
| | | } from '@/api/houseRental/houseRental.js'
|
| | | export default {
|
| | |
| | | name: '审核通过',
|
| | | value: '1'
|
| | | },
|
| | | {
|
| | | name: '审核不通过',
|
| | | value: '2'
|
| | | },
|
| | | // {
|
| | | // name: '审核不通过',
|
| | | // value: '2'
|
| | | // },
|
| | | {
|
| | | name: '未到期',
|
| | | value: '10'
|
| | |
| | | },
|
| | | onLoad() {
|
| | | this.getStatistics()
|
| | | this.getList()
|
| | | },
|
| | | onShow() {
|
| | | this.tenantList = []
|
| | |
| | | floor: floor[0].value |
| | | } |
| | | }
|
| | | this.getRentalHouseInfo(params)
|
| | | this.getRentalHouseInfo(params) |
| | | this.getStatistics(auditStatus[0].value)
|
| | | },
|
| | | getStatistics() {
|
| | | getStatistics().then(res => {
|
| | | getStatistics(auditStatus = '') { |
| | | let params = {} |
| | | if (auditStatus) { |
| | | params = { |
| | | auditStatus |
| | | } |
| | | }
|
| | | getStatistics(params).then(res => {
|
| | | console.log(res, "+------------")
|
| | | this.statistics = res.data
|
| | | })
|
| | | },
|
| | | getList() {
|
| | | getPage(this.query).then(res => {
|
| | | console.log(res)
|
| | | })
|
| | | },
|
| | | findObjValue(value, obj) {
|
| | |
| | | </view>
|
| | | </u-sticky>
|
| | | <view class="list">
|
| | | <view class="list-item bgc-ff mb-20" v-for="item in reportList" :key="item.id" @click="pushPage(item.id)">
|
| | | <view class="list-item bgc-ff mb-20" v-for="item in reportList" :key="item.id" @click="pushPage(item)">
|
| | | <view class="item-title flex a-i-c j-c-s-b mb-20">
|
| | | <text class="f-32 fw">{{ findObjValue(item.type, typeList, 'type').name }}</text>
|
| | | <u-tag class="u_tag" size="mini" plain plainFill :text="findObjValue(item.status, tabList, 'status').name" :type="findObjValue(item.status, tabList, 'status').type"></u-tag>
|
| | | <u-tag class="u_tag" size="mini" plain plainFill :text="findObjValue(item.confirmFlag, tabList, 'status').name" :type="findObjValue(item.confirmFlag, tabList, 'status').type"></u-tag> |
| | | </view>
|
| | | <view class="item-row flex a-i-c j-c-s-b">
|
| | | <text class="f-28">姓名</text>
|
| | |
| | | })
|
| | | return res
|
| | | },
|
| | | pushPage(id) {
|
| | | this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id)
|
| | | pushPage(item) { |
| | | const data = JSON.stringify(item)
|
| | | // this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id) |
| | | this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?data='+data)
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | <view class="text">事件照片</view>
|
| | | </view>
|
| | | <view class="pic-data">
|
| | | <u-image class="img" v-for="i in 1" src="" width="80" height="80"></u-image>
|
| | | <u-image class="img" :src="imgUrls" width="80" height="80"></u-image>
|
| | | </view>
|
| | | </view>
|
| | | <view class="audit-box">
|
| | |
| | | <u-form labelWidth="70" :model="form" class="form" ref="form">
|
| | | <u-form-item label="事件状态" @click="isPickerShow = true" class="form-item">
|
| | | <u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
|
| | | border="none"></u--input>
|
| | | border="none" :placeholder="defaultPlaceholder"></u--input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | | <u-form-item label="备注" class="form-item">
|
| | |
| | | <view class="bottom">
|
| | | <u-button type="primary" @click="submit">提交处理</u-button>
|
| | | </view>
|
| | | <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
|
| | | <u-picker :defaultIndex="[defaultColums]" :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
|
| | | :columns="columns" keyName="name" @cancel="isPickerShow = false" @confirm="handleConfirm"></u-picker>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import lineItem from '../components/lineItem.vue' |
| | | import { checkReportForRepairsData } from '@/api/task/taskReportForRepairs.js'
|
| | | import lineItem from '../components/lineItem.vue'
|
| | | import {
|
| | | checkReportForRepairsData
|
| | | } from '@/api/task/taskReportForRepairs.js'
|
| | | export default {
|
| | | components: {
|
| | | lineItem
|
| | |
| | | data() {
|
| | | return {
|
| | | basicData: [{
|
| | | label: '当前位置',
|
| | | label: '当前位置', |
| | | name: 'address',
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '业主',
|
| | | label: '业主', |
| | | name: 'realName',
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '手机号码',
|
| | | label: '手机号码', |
| | | name: 'phone',
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '事件类型',
|
| | | label: '事件类型', |
| | | name: 'type',
|
| | | value: '未完善'
|
| | | },
|
| | | {
|
| | | label: '事件描述',
|
| | | label: '事件描述', |
| | | name: 'confirmNotion',
|
| | | value: '未完善'
|
| | | }
|
| | | ],
|
| | | typeList: [{
|
| | | name: "公共维修",
|
| | | type: 1
|
| | | },
|
| | | {
|
| | | name: "居家维修",
|
| | | type: 2
|
| | | },
|
| | | {
|
| | | name: "矛盾纠纷",
|
| | | type: 3
|
| | | },
|
| | | {
|
| | | name: "投诉举报",
|
| | | type: 4
|
| | | },
|
| | | {
|
| | | name: "企业商户上报",
|
| | | type: 5
|
| | | }
|
| | | ],
|
| | | form: {
|
| | | confirmFlag: '待审核',
|
| | | confirmFlag: '',
|
| | | confirmNotion: ''
|
| | | }, |
| | | defaultPlaceholder: "", |
| | | defaultColums: 0, |
| | | imgUrls: '',
|
| | | currentId: '',
|
| | | defaultData: {},
|
| | | isPickerShow: false,
|
| | | columns: [
|
| | | [{
|
| | |
| | | ]
|
| | | ]
|
| | | }
|
| | | }, |
| | | onLoad(option) { |
| | | const { id } = option |
| | | this.currentId = id |
| | | },
|
| | | methods: { |
| | | async checkReportForRepairs() { |
| | | const { confirmFlag, confirmNotion } = this.form |
| | | const res = await checkReportForRepairsData({ |
| | | id: this.currentId, |
| | | confirmFlag: this.findObjValue(confirmFlag, this.columns[0]).status, |
| | | confirmNotion |
| | | }) |
| | | |
| | | if (res.code !== 200) { |
| | | uni.showToast({ |
| | | title: "提交处理失败", |
| | | icon: "error" |
| | | }) |
| | | return |
| | | } |
| | | |
| | | uni.showToast({ |
| | | title: "处理事件成功", |
| | | icon: "success", |
| | | duration: 1500, |
| | | complete() { |
| | | setTimeout(() =>{ |
| | | uni.navigateBack() |
| | | }, 1500) |
| | | onLoad(option) {
|
| | | // const { id } = option
|
| | | // this.currentId = id
|
| | | const {
|
| | | data
|
| | | } = option
|
| | | this.defaultData = JSON.parse(data)
|
| | | },
|
| | | onShow() {
|
| | | this.setDefaultValue()
|
| | | },
|
| | | methods: {
|
| | | async checkReportForRepairs() {
|
| | | const {
|
| | | confirmFlag,
|
| | | confirmNotion
|
| | | } = this.form
|
| | | const res = await checkReportForRepairsData({
|
| | | // id: this.currentId, |
| | | id: this.defaultData.id,
|
| | | confirmFlag: this.findObjValue(confirmFlag, this.columns[0], 'name').status,
|
| | | confirmNotion
|
| | | })
|
| | |
|
| | | if (res.code !== 200) {
|
| | | uni.showToast({
|
| | | title: "提交处理失败",
|
| | | icon: "error"
|
| | | })
|
| | | return
|
| | | }
|
| | |
|
| | | uni.showToast({
|
| | | title: "处理事件成功",
|
| | | icon: "success",
|
| | | duration: 1500,
|
| | | complete() {
|
| | | setTimeout(() => {
|
| | | uni.navigateBack()
|
| | | }, 1500)
|
| | | }
|
| | | })
|
| | |
|
| | | },
|
| | | setDefaultValue() { |
| | | console.log(this.defaultData); |
| | | this.basicData.forEach(item => { |
| | | item.value = this.defaultData[item.name] || '未完善' |
| | | if (item.name === 'type') { |
| | | item.value = this.findObjValue(item.value, this.typeList, 'type').name || '未完善' |
| | | } |
| | | }) |
| | | |
| | | this.imgUrls = this.defaultData.imgUrls |
| | | let columns = this.columns[0] |
| | | this.defaultColums = columns.findIndex(item => item.status == this.defaultData.confirmFlag) |
| | | this.defaultPlaceholder = columns[this.defaultColums].name |
| | | }, |
| | | submit() { |
| | | this.checkReportForRepairs() |
| | | submit() {
|
| | | this.checkReportForRepairs()
|
| | | },
|
| | | handleConfirm(e) {
|
| | | this.form.confirmFlag = e.value[0].name
|
| | | this.isPickerShow = false
|
| | | }, |
| | | findObjValue(value, obj) { |
| | | const res = obj.find(item => { |
| | | return item.name == value |
| | | }) |
| | | return res |
| | | },
|
| | | findObjValue(value, obj, word) {
|
| | | const res = obj.find(item => {
|
| | | return item[word] == value
|
| | | })
|
| | | return res
|
| | | },
|
| | | }
|
| | | }
|