| | |
| | | </u-form>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="upload bgc-ff">
|
| | | <view class="f-28">图片</view>
|
| | | <view class="mt-20">
|
| | | <u-upload :fileList="imageList" :previewFullImage="uploadConfig.previewFullImage"
|
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
|
| | | :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'imageList')"
|
| | | @delete="deletePics($event,'imageList')">
|
| | | <view class="upload-item upload-icon flex_base">
|
| | | <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
|
| | | </view>
|
| | | </u-upload>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="upload bgc-ff">
|
| | | <view class="f-28">视频</view>
|
| | | <view class="mt-20">
|
| | | <u-upload :fileList="videoList" :previewFullImage="uploadConfig.previewFullImage"
|
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
|
| | | :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'videoList')"
|
| | | @delete="deletePics($event,'videoList')">
|
| | | <view class="upload-item upload-icon flex_base">
|
| | | <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
|
| | | </view>
|
| | | </u-upload>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | |
|
| | | <!-- <view class="bottom" v-if="from == 'list'">
|
| | | <u-button type="primary" @click="submit">提交处理</u-button>
|
| | | </view> -->
|
| | |
|
| | | <!-- <footer-btn @click="submit" v-if="from == 'list'"></footer-btn> -->
|
| | |
|
| | |
|
| | | <view class="footer flex a-i-c j-c-s-b" v-if="from == 'list'">
|
| | | <button class="footer-btn" @click="submit()">处置</button>
|
| | | <button class="footer-btn">转办</button>
|
| | | <button class="footer-btn" @click="submit(0)">处置</button>
|
| | | <button class="footer-btn" @click="submit(1)">转办</button>
|
| | | </view>
|
| | |
|
| | | <u-picker :defaultIndex="[defaultColums]" :closeOnClickOverlay="true" @close="isPickerShow = false"
|
| | | :show="isPickerShow" ref="uPicker" :columns="columns" keyName="name" @cancel="isPickerShow = false"
|
| | | @confirm="handleConfirm"></u-picker>
|
| | |
|
| | | <u-picker :defaultIndex="peopleIndex" :closeOnClickOverlay="true" @close="isShowPeoplePicker = false"
|
| | | :show="isShowPeoplePicker" ref="pPicker" :columns="peopleList" keyName="distictName"
|
| | | @cancel="isShowPeoplePicker = false" @confirm="handlePeopleConfirm" @change="changePeople"></u-picker>
|
| | |
|
| | |
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | import lineItem from '../components/lineItem.vue'
|
| | | import captionRow from '@/components/caption/caption.vue'
|
| | | import {
|
| | | checkReportForRepairsData
|
| | | checkReportForRepairsData,
|
| | | reportSave
|
| | | } from '@/api/task/taskReportForRepairs.js'
|
| | | import {
|
| | | getPeopleType
|
| | |
| | | import {
|
| | | minioBaseUrl
|
| | | } from "@/common/setting.js"
|
| | | import uploadMixin from "@/mixin/uploadMixin";
|
| | | export default {
|
| | | mixins: [uploadMixin],
|
| | | components: {
|
| | | captionRow,
|
| | | lineItem
|
| | |
| | | from: "list",
|
| | | peopleList: [
|
| | | [{
|
| | | name: "网格员",
|
| | | type: 1
|
| | | distictName: "网格员",
|
| | | type: 0
|
| | | },
|
| | | {
|
| | | name: "物业人员",
|
| | | distictName: "物业人员",
|
| | | type: 2
|
| | | }
|
| | | ],
|
| | |
|
| | | ]
|
| | |
|
| | | []
|
| | | ],
|
| | | peopleIndex: [0, 0],
|
| | | isShowPeoplePicker: false,
|
| | | transferUserId: "",
|
| | | content: "",
|
| | | imageList: [],
|
| | | videoList: []
|
| | | }
|
| | | },
|
| | | onLoad(option) {
|
| | |
| | | data
|
| | | } = option
|
| | | this.defaultData = JSON.parse(data)
|
| | | this.getPeopleList(0)
|
| | | },
|
| | | onShow() {
|
| | | this.setDefaultValue()
|
| | | },
|
| | | methods: {
|
| | |
|
| | | getPeopleList() {
|
| | | getPeopleType().then(res => {
|
| | |
|
| | | getPeopleList(type) {
|
| | | getPeopleType({
|
| | | houseCode: this.defaultData.addressCode,
|
| | | type
|
| | | }).then(res => {
|
| | | console.log(res);
|
| | | this.$set(this.peopleList, 1, res.data);
|
| | | })
|
| | | },
|
| | |
|
| | |
| | | this.isPickerShow = true;
|
| | | }
|
| | | },
|
| | |
|
| | |
|
| | | setImgUrl(url) {
|
| | | return `${minioBaseUrl}${url}`
|
| | |
| | | }, 1500)
|
| | | }
|
| | | })
|
| | |
|
| | | },
|
| | |
|
| | | setDefaultValue() {
|
| | | console.log(this.defaultData);
|
| | | this.basicData.forEach(item => {
|
| | |
| | | this.defaultPlaceholder = columns[this.defaultColums].name
|
| | | },
|
| | |
|
| | | submit() {
|
| | | this.checkReportForRepairs()
|
| | | submit(type) {
|
| | | if (type == 1) {
|
| | | this.isShowPeoplePicker = true;
|
| | | } else {
|
| | | let data = {
|
| | | confirmFlag: 2,
|
| | | content: this.form.confirmNotion,
|
| | | imageList: this.getFileName(this.imageList),
|
| | | mobile: this.defaultData.mobile,
|
| | | peopleType: 0,
|
| | | repairId: this.defaultData.id,
|
| | | videoList: this.getFileName(this.videoList)
|
| | | }
|
| | | this.submitRequest(data)
|
| | | }
|
| | | // this.checkReportForRepairs()
|
| | | },
|
| | |
|
| | | getFileName(urls) {
|
| | | if (urls.length) {
|
| | | let arr = [];
|
| | | for (let i of url) {
|
| | | arr.push(i.name);
|
| | | }
|
| | | return arr.join(",");
|
| | | } else {
|
| | | return ""
|
| | | }
|
| | | },
|
| | |
|
| | |
|
| | | submitRequest(data) {
|
| | | reportSave(data).then(res => {
|
| | | if (res.code == 200) {
|
| | | uni.showToast({
|
| | | title: "操作成功"
|
| | | })
|
| | | uni.navigateBack()
|
| | | }
|
| | | })
|
| | | },
|
| | |
|
| | | handleConfirm(e) {
|
| | | this.form.confirmFlag = e.value[0].name
|
| | | this.isPickerShow = false
|
| | |
| | | urls: this.imgUrls,
|
| | | current: url
|
| | | })
|
| | | },
|
| | |
|
| | |
|
| | | changePeople(e) {
|
| | | console.log(e);
|
| | | const {
|
| | | columnIndex,
|
| | | value,
|
| | | values, // values为当前变化列的数组内容
|
| | | index,
|
| | | // 微信小程序无法将picker实例传出来,只能通过ref操作
|
| | | picker = this.$refs.pPicker
|
| | | } = e
|
| | | if (columnIndex === 0) {
|
| | | // picker为选择器this实例,变化第二列对应的选项
|
| | | // picker.setColumnValues(1, this.columnData[index])
|
| | | this.getPeopleList(value[0].type)
|
| | | }
|
| | | },
|
| | |
|
| | | handlePeopleConfirm(e) {
|
| | | console.log(e)
|
| | | let {
|
| | | value,
|
| | | indexs
|
| | | } = e;
|
| | | this.transferUserId = value[1].id
|
| | | this.peopleIndex = indexs;
|
| | | // this.content = `事件已移交至${value[0].distictName}${value[1].distictName}`
|
| | | let data = {
|
| | | addressCode: this.defaultData.addressCode,
|
| | | confirmFlag: 1,
|
| | | content: `事件已移交至${value[0].distictName}${value[1].distictName}`,
|
| | | peopleType: 1,
|
| | | repairId: this.defaultData.id,
|
| | | transferUserId: value[1].id
|
| | | }
|
| | | console.log(data);
|
| | | this.submitRequest(data)
|
| | | },
|
| | |
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | .upload {
|
| | | margin: 0 30rpx;
|
| | | padding: 30rpx;
|
| | |
|
| | | .upload-item {
|
| | | width: 140rpx;
|
| | | height: 140rpx;
|
| | | border: 1px solid #EEEEEE;
|
| | | }
|
| | | }
|
| | | </style> |