| | |
| | | <view class="dca" v-if="info"> |
| | | <view class="dca_head"> |
| | | <text>任务{{returnStatus(info.status)}}</text> |
| | | <text>工单号:{{info.code}}</text> |
| | | </view> |
| | | <u-gap height="5" bgColor="#EFEFEF"></u-gap> |
| | | <view class="dca_list"> |
| | |
| | | </view> |
| | | <view class="lc_item_content" v-else-if="item.objType === 4"> |
| | | <view class="lc_item_content_item"> |
| | | <view class="lc_item_content_item_label">已催促:</view> |
| | | <!-- <view class="lc_item_content_item_label">已催促:</view> --> |
| | | <view class="lc_item_content_item_val"> |
| | | <text>{{item.content}}</text> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view style="width: 100%; height: calc(84rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="footer"> |
| | | <view class="footer_btn" :style="info.passOnButton === 0 ? 'background-color: #3875C5; color: #ffffff;' : ''" @click="openGB" v-if="info.closeButton === 1">问题关闭</view> |
| | | <view class="footer_btn" style="background-color: #3875C5; color: #ffffff;" @click="openFP" v-if="info.passOnButton === 1">任务分配</view> |
| | | </view> |
| | | <template v-if="info.closeButton === 1 || info.passOnButton === 1"> |
| | | <view style="width: 100%; height: calc(84rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="footer"> |
| | | <view class="footer_btn" :style="info.passOnButton === 0 ? 'background-color: #3875C5; color: #ffffff;' : ''" @click="openGB" v-if="info.closeButton === 1">问题关闭</view> |
| | | <view class="footer_btn" style="background-color: #3875C5; color: #ffffff;" @click="openFP" v-if="info.passOnButton === 1">任务分配</view> |
| | | </view> |
| | | </template> |
| | | <!-- 任务分配 --> |
| | | <u-popup :show="show" :round="10" mode="bottom"> |
| | | <view class="fp"> |
| | |
| | | maxlength="200" count></u--textarea> |
| | | </u-form-item> |
| | | <u-form-item label="上传图片" labelWidth="80" prop="multifileList" labelPosition="top"> |
| | | <u-upload |
| | | <UploadImage |
| | | :fileList="model.multifileList" |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="2" |
| | | multiple |
| | | style="margin-top: 15rpx;" /> |
| | | folder="WORKORDER_LOG_FILE_PATH" |
| | | @dele="deletePic" |
| | | @getFileList="afterRead" |
| | | style="margin-top: 15rpx;" |
| | | /> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | |
| | | maxlength="200" count></u--textarea> |
| | | </u-form-item> |
| | | <u-form-item label="上传图片" labelWidth="120" prop="multifileList" labelPosition="top" required> |
| | | <u-upload |
| | | <UploadImage |
| | | :fileList="model.multifileList" |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="1" |
| | | multiple |
| | | style="margin-top: 15rpx;" /> |
| | | folder="WORKORDER_LOG_FILE_PATH" |
| | | @dele="deletePic" |
| | | @getFileList="afterRead" |
| | | style="margin-top: 15rpx;" |
| | | /> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import UploadImage from '@/components/uploadImage/uploadImage.vue' |
| | | export default { |
| | | components: { UploadImage }, |
| | | data() { |
| | | return { |
| | | id: null, |
| | |
| | | this.getDetails() |
| | | }, |
| | | methods: { |
| | | // 工单催促 |
| | | async urge() { |
| | | let res = await this.$u.api.urge({ workorderId: this.info.id }) |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '催促成功', icon: 'none' }) |
| | | this.getDetails() |
| | | this.show2 = false |
| | | } |
| | | }, |
| | | previewImage(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | |
| | | info: that.model.info, |
| | | passOnUserId: that.model.passOnUserId, |
| | | multifileList: that.model.multifileList, |
| | | workorderId: that.info.id |
| | | workorderId: that.info.id, |
| | | passOnType: this.info.status |
| | | }) |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '操作成功', icon: 'none' }) |
| | |
| | | } |
| | | }, |
| | | // 删除图片 |
| | | deletePic(event) { |
| | | this.model.multifileList.forEach((item, index) => { |
| | | if (item.imgaddr === event.file.imgaddr) { |
| | | this.model.multifileList.splice(index, 1) |
| | | } |
| | | }) |
| | | deletePic(index) { |
| | | this.model.multifileList.splice(index, 1) |
| | | }, |
| | | // 新增图片 |
| | | afterRead(event) { |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/uploadBatch', |
| | | files: event.file.map(e => { |
| | | return { name: 'files', uri: e.url } |
| | | }), |
| | | formData: { |
| | | folder: "WORKORDER_LOG_FILE_PATH", |
| | | }, |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | console.log(obj.data) |
| | | obj.data.forEach(item => { |
| | | item.fileurl = item.imgaddr |
| | | }) |
| | | that.model.multifileList = [...that.model.multifileList, ...obj.data] |
| | | } |
| | | } |
| | | }) |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/web/public/upload', |
| | | // filePath: event.file.url, |
| | | // name: "file", |
| | | // formData: { |
| | | // folder: "WORKORDER_LOG_FILE_PATH" |
| | | // }, |
| | | // success: (res) => { |
| | | // let obj = JSON.parse(res.data) |
| | | // if (obj.code === 200) { |
| | | // obj.data.fileurl = obj.data.imgaddr |
| | | // this.model.multifileList.push(obj.data) |
| | | // } |
| | | // } |
| | | // }); |
| | | afterRead(arr) { |
| | | this.model.multifileList = [...this.model.multifileList, ...arr] |
| | | } |
| | | } |
| | | } |