| | |
| | | |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | | <view class="text-gray margin-bottom-lg">—————————报修基本信息—————————</view> |
| | | <uni-forms-item :label-width="100" name="num" label="工单号:"> |
| | | <view class="divider"><text>报修基本信息</text></view> |
| | | <!-- <view class="text-gray margin-bottom-lg">—————————报修基本信息—————————</view> --> |
| | | <uni-forms-item :label-width="100" name="repairCode" label="工单号:"> |
| | | <uni-easyinput v-model="formData.repairCode" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" required name="num" label="设备编号:"> |
| | | <uni-forms-item :label-width="100" name="repairStatus_dictText" label="工单状态:"> |
| | | <uni-easyinput v-model="formData.repairStatus_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="num" label="设备编号:"> |
| | | <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList" |
| | | placeholder="请选择" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item :label-width="100" name="installationPosition_dictText" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="faultName" label="故障简称:"> |
| | | <uni-easyinput v-model="formData.faultName" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="remark" label="故障开始时间:"> |
| | | <uni-easyinput v-model="formData.faultStartTime" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="outNum" label="维修负责人:"> |
| | | <uni-easyinput v-model="formData.repairer" :disabled="true" /> |
| | | <uni-forms-item :label-width="100" name="reporter_dictText" label="报修人:"> |
| | | <uni-easyinput v-model="formData.reporter_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="reporterPhone_dictText" label="报修人电话:"> |
| | | <uni-easyinput v-model="formData.reporterPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="repairer_dictText" label="维修人:"> |
| | | <uni-easyinput v-model="formData.repairer_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="repairerPhone_dictText" label="维修人电话:"> |
| | | <uni-easyinput v-model="formData.repairerPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="remark" label="备注:"> |
| | | <uni-easyinput v-model="formData.remark" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="outNum" label="报修图片:"> |
| | | <view class="grid col-4 grid-square flex-sub"> |
| | | <view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" |
| | | :data-url="imgList[index]"> |
| | | <image :src="imgList[index]" mode="aspectFill"></image> |
| | | <view class="cu-tag bg-red radius" @tap.stop="DelImg" :data-index="index"> |
| | | <text class='cuIcon-close'></text> |
| | | </view> |
| | | </view> |
| | | <view class="solids" v-if="imgList.length<1"> |
| | | <text class='cuIcon-cameraadd'></text> |
| | | </view> |
| | | </view> |
| | | |
| | | <uni-file-picker limit="9" :value="fileList" :image-styles="imageStyles" @select="select" |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" |
| | | @delete="deletea" :readonly="readonly" /> |
| | | </uni-forms-item> |
| | | |
| | | <view class="text-gray margin-bottom-lg">—————————是否需要领用备件—————————</view> |
| | | <view class="divider"><text>是否需要领用备件</text></view> |
| | | <uni-forms-item :label-width="140" required name="num" label="是否需要领用备件:"> |
| | | <uni-data-select v-model="formData.isSpare" :localdata="SpareList" @change="changeisSpareList" |
| | | placeholder="请选择" :disabled="isUNDERREPAIR" /> |
| | |
| | | :disabled="isUNDERREPAIR" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item v-show="isShow" :label-width="100" name="outNum" label="维修图片:"> |
| | | <view class="grid col-4 grid-square flex-sub"> |
| | | <view class="bg-img" v-for="(item,index) in imgTwoList" :key="index" @tap="ViewImageTwo" |
| | | :data-url="imgTwoList[index]"> |
| | | <image :src="imgTwoList[index]" mode="aspectFill"></image> |
| | | <view class="cu-tag bg-red radius" @tap.stop="DelImgTwo" :data-index="index"> |
| | | <text class='cuIcon-close'></text> |
| | | </view> |
| | | </view> |
| | | <view class="solids" @tap="ChooseImageTwo" v-if="imgTwoList.length<1"> |
| | | <text class='cuIcon-cameraadd'></text> |
| | | </view> |
| | | </view> |
| | | |
| | | <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" @select="select" |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" |
| | | @delete="deletea" :readonly="readonlyRepaier" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | | <uni-forms v-show="isShowUNDEREPAIR" ref="form" :modelValue="ScanData" validate-trigger="bind" |
| | | err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | | <view class="text-gray margin-bottom-lg">—————————管理员领用备件——————————</view> |
| | | <view class="divider"><text>管理员领用备件</text></view> |
| | | <!-- <view class="text-gray margin-bottom-lg">—————————管理员领用备件——————————</view> --> |
| | | <uni-forms-item :label-width="100" required name="sparePartDescription" label="备件描述:"> |
| | | <uni-easyinput type="textarea" v-model="ScanData.sparePartDescription" placeholder="请输入备件描述" |
| | | :disabled="isRuning" /> |
| | |
| | | <uni-forms v-show="isShowRepari" ref="form" :modelValue="formData" validate-trigger="bind" |
| | | err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | | <view class="text-gray margin-bottom-lg">—————————维修结果上报——————————</view> |
| | | <view class="divider"><text>维修结果上报</text></view> |
| | | <!-- <view class="text-gray margin-bottom-lg">—————————维修结果上报——————————</view> --> |
| | | <uni-forms-item :label-width="140" required name="faultReason" label="故障原因:"> |
| | | <uni-easyinput v-model="formData.faultReason" placeholder="请输入故障原因" :disabled="isRepari" /> |
| | | </uni-forms-item> |
| | |
| | | :disabled="isRepari" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="outNum" label="维修图片:"> |
| | | <view class="grid col-4 grid-square flex-sub"> |
| | | <view class="bg-img" v-for="(item,index) in imgThreeList" :key="index" @tap="ViewImageTwo" |
| | | :data-url="imgThreeList[index]"> |
| | | <image :src="imgThreeList[index]" mode="aspectFill"></image> |
| | | <view class="cu-tag bg-red radius" @tap.stop="DelImgTwo" :data-index="index"> |
| | | <text class='cuIcon-close'></text> |
| | | </view> |
| | | </view> |
| | | <view class="solids" @tap="ChooseImageThree" v-if="imgThreeList.length<1"> |
| | | <text class='cuIcon-cameraadd'></text> |
| | | </view> |
| | | </view> |
| | | |
| | | <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" @select="select" |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" |
| | | @delete="deletea" :readonly="readonlyRepaier" /> |
| | | </uni-forms-item> |
| | | |
| | | </uni-group> |
| | | </uni-forms> |
| | | <view v-show="isSHowBtn" class="padding flex flex-direction"> |
| | | <view v-show="isSHowBtn" class="padding flex flex-direction"> |
| | | <view class="flex-sub bg-blue padding-sm margin-xl radius text-sm text-center text-white" |
| | | @click.stop="ProductionTask()" hover-class="is-hover">确定</view> |
| | | </view> |
| | |
| | | mixins: [MescrollMixin], // 使用mixin |
| | | data() { |
| | | return { |
| | | isSHowBtn:true, |
| | | readonly: false, |
| | | readonlyRepaier: false, |
| | | // 图片回显 |
| | | fileLists: [], |
| | | fileList: [], |
| | | // 上传图片的样式 |
| | | imageStyles: { |
| | | width: 90, |
| | | height: 90, |
| | | }, |
| | | sourceType: ['album', 'camera'], |
| | | isSHowBtn: true, |
| | | isShowRepari: false, |
| | | title: '是否需要领用备件', |
| | | title: '', |
| | | isRepari: false, |
| | | isRuning: false, |
| | | isShowUNDEREPAIR: false, |
| | |
| | | url: { |
| | | upload: "/eam/sysFiles/batch_upload", |
| | | stallList: "/eam/eamRepairOrder/queryById", |
| | | getEquipmentList:'eam/equipment/list', |
| | | // getEquipmentList: "eam/equipment/asyncLoadEquipment", |
| | | getEquipmentList: 'eam/equipment/list', |
| | | approval: '/eam/eamRepairOrder/perform' |
| | | }, |
| | | id: '', |
| | |
| | | msg1Title: "", |
| | | procInstId: '', |
| | | values: '', |
| | | isShow: true |
| | | isShow: true, |
| | | flag: '', |
| | | from: '', |
| | | todoName: '' |
| | | |
| | | } |
| | | }, |
| | |
| | | }, |
| | | onLoad(options) { |
| | | const annItem = JSON.parse(decodeURIComponent(options.item)); |
| | | |
| | | this.id = annItem.dataId, |
| | | this.taskId = annItem.id, |
| | | this.procInstId = annItem.procInstId, |
| | | this.values = annItem.values, |
| | | this.assignee = annItem.assignee |
| | | this.flag = options.flag |
| | | this.from = options.from |
| | | if (this.flag == 'task') { |
| | | this.todoName = annItem.taskName |
| | | } else { |
| | | this.todoName = annItem.name |
| | | } |
| | | if (this.from === 'detils') { |
| | | this.id = annItem.id; |
| | | console.log(annItem.id); |
| | | } else { |
| | | this.id = annItem.dataId; |
| | | } |
| | | this.taskId = annItem.id |
| | | this.procInstId = annItem.procInstId |
| | | this.values = annItem.values |
| | | this.assignee = annItem.assignee |
| | | }, |
| | | created() { |
| | | this.getEquipment(); |
| | |
| | | this.isShow = false; |
| | | } |
| | | }, |
| | | |
| | | select(e) { |
| | | const tempFilePaths = e.tempFilePaths; |
| | | uni.showLoading({ |
| | | title: '上传中...' |
| | | }); |
| | | const uploadPromises = tempFilePaths.map((filePath, index) => { |
| | | return new Promise((resolve, reject) => { |
| | | this.$http.upload(this.url.upload, { |
| | | filePath: filePath, |
| | | name: 'file' |
| | | }) |
| | | .then(uploadRes => { |
| | | // 假设服务器返回的结果中包含文件路径 |
| | | const serverFilePath = uploadRes.data.result[0]; |
| | | this.formData.avatar.push(serverFilePath); |
| | | resolve(uploadRes); // 返回结果给 Promise.all |
| | | }) |
| | | .catch(err => { |
| | | console.error(`图片 ${index + 1} 上传失败:`, err); |
| | | reject(err); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | Promise.all(uploadPromises) |
| | | .then(() => { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '全部上传成功' |
| | | }); |
| | | }) |
| | | .catch(err => { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '部分上传失败', |
| | | icon: 'none' |
| | | }); |
| | | console.error('上传异常:', err); |
| | | }); |
| | | }, |
| | | // 删除 |
| | | deletea(e) { |
| | | console.log('删除图片', e); |
| | | }, |
| | | ProductionTask() { |
| | | if (this.formData.reportStatus == 'WAIT_SPARES') { |
| | | if (this.formData.reportStatus == 'UNDER_REPAIR' && this.formData.isSpare == 1) { |
| | | |
| | | if (this.formData.isSpare == undefined || this.formData.isSpare == null || |
| | | this |
| | | .formData.isSpare == |
| | | '') { |
| | | |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '是否需要领用备件不能为空' |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | console.log(this.formData.isSpare) |
| | | if (this.formData.reportStatus === 'WAIT_SPARES' && this.formData.isSpare == 1 && this.flag !== 'task') { |
| | | if (this.ScanData.sparePartDescription == undefined || this.ScanData.sparePartDescription == null || |
| | | this |
| | | .ScanData.sparePartDescription == |
| | |
| | | return false; |
| | | } |
| | | } |
| | | if (this.formData.reportStatus == 'UNDER_REPAIR') { |
| | | |
| | | if (this.formData.faultReason == undefined || this.formData.faultReason == null || |
| | | this |
| | | .formData.faultReason == |
| | | '') { |
| | | |
| | | |
| | | if ( |
| | | this.formData.reportStatus === 'UNDER_REPAIR' && |
| | | this.flag !== 'task' && |
| | | (this.formData.isSpare === 0 || this.ScanData.sparePartDescription?.trim()) |
| | | ) { |
| | | if (this.formData.faultReason == undefined || this.formData.faultReason == null || this.formData |
| | | .faultReason == '') { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '故障原因不能为空' |
| | | }); |
| | | return false; |
| | | } |
| | | if (this.formData.repairDescription == undefined || this.formData.repairDescription == null || |
| | | this |
| | | .formData.repairDescription == |
| | | '') { |
| | | |
| | | if (this.formData.repairDescription == undefined || this.formData.repairDescription == null || this |
| | | .formData.repairDescription == '') { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '维修结果不能为空' |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | uni.showLoading({ |
| | | mask: true, |
| | | title: "加载中....", |
| | | }) |
| | | this.$http.post(this.url.approval, { |
| | | sparePartDescription: this.ScanData.sparePartDescription, |
| | | dataId: this.id, |
| | | equipmentId: this.formData.num, |
| | | faultReason: this.formData.faultReason, |
| | | id: this.id, |
| | | imageFilesResult: this.formData.avatarTwo, |
| | | imageFilesResult: this.formData.avatar, |
| | | instanceId: this.procInstId, |
| | | isUseSpare: this.formData.isSpare, |
| | | repairDescription: this.formData.repairDescription, |
| | | taskId: this.taskId |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.$tip.loaded(); |
| | | uni.hideLoading() |
| | | if (res.data.success) { |
| | | uni.showToast({ |
| | | icon: "success", |
| | | title: '提交成功', |
| | | duration: 2000 |
| | | }); |
| | | // this.$Router.replace({ |
| | | // name: 'ToDoList' |
| | | // }) |
| | | this.$Router.replaceAll({ |
| | | name: 'ToDoList' |
| | | }) |
| | | } else { |
| | | |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.message, |
| | | confirmText: '确定', |
| | | showCancel: false, |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | |
| | | this.partTakeAdviceDetailList[index].istrue = true; |
| | | } |
| | | }, |
| | | |
| | | getEquipment() { |
| | | this.$http.get(this.url.getEquipmentList).then(res => { |
| | | this.$http.get(this.url.getEquipmentList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 9999, |
| | | order: 'desc', |
| | | column: 'createTime' |
| | | }, |
| | | |
| | | }).then(res => { |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | this.equipmentList = res.data.result |
| | | this.equipmentList = res.data.result.records |
| | | } else { |
| | | uni.showToast({ |
| | | icon: "error", |
| | |
| | | this.$tip.error("联网失败") |
| | | }) |
| | | }, |
| | | ChooseImageThree() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 4, |
| | | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], // 从相册选择 |
| | | success: (res) => { |
| | | // 存储选择的图片路径 |
| | | that.imgThreeList = res.tempFilePaths; |
| | | |
| | | // 初始化 formData.avatar 为空字符串 |
| | | that.formData.avatarTwo = []; |
| | | |
| | | // 创建上传任务的 Promise 数组 |
| | | const uploadPromises = res.tempFilePaths.map((filePath, index) => { |
| | | return new Promise((resolve, reject) => { |
| | | that.$http.upload(that.url.upload, { |
| | | filePath: filePath, |
| | | name: 'file' |
| | | }) |
| | | .then(uploadRes => { |
| | | // 假设服务器返回的结果中包含文件路径 |
| | | const filePath = uploadRes.data.result[0]; |
| | | this.formData.avatarTwo.push(filePath); |
| | | resolve(filePath); |
| | | }) |
| | | .catch(err => { |
| | | console.error('图片' + index + '上传失败:', err); |
| | | reject(err); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | // 并发执行所有上传任务 |
| | | Promise.all(uploadPromises) |
| | | .then((uploadedFilePaths) => { |
| | | console.log('所有图片上传成功:', that.formData.avatar); |
| | | }) |
| | | .catch((err) => { |
| | | console.error('图片上传失败:', err); |
| | | that.$tip.error('图片上传失败'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | ChooseImage() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 4, |
| | | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], // 从相册选择 |
| | | success: (res) => { |
| | | // 存储选择的图片路径 |
| | | that.imgList = res.tempFilePaths; |
| | | |
| | | // 初始化 formData.avatar 为空字符串 |
| | | that.formData.avatar = []; |
| | | |
| | | // 创建上传任务的 Promise 数组 |
| | | const uploadPromises = res.tempFilePaths.map((filePath, index) => { |
| | | return new Promise((resolve, reject) => { |
| | | that.$http.upload(that.url.upload, { |
| | | filePath: filePath, |
| | | name: 'file' |
| | | }) |
| | | .then(uploadRes => { |
| | | // 假设服务器返回的结果中包含文件路径 |
| | | const filePath = uploadRes.data.result[0]; |
| | | this.formData.avatar.push(filePath); |
| | | resolve(filePath); |
| | | }) |
| | | .catch(err => { |
| | | console.error('图片' + index + '上传失败:', err); |
| | | reject(err); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | // 并发执行所有上传任务 |
| | | Promise.all(uploadPromises) |
| | | .then((uploadedFilePaths) => { |
| | | console.log('所有图片上传成功:', that.formData.avatar); |
| | | }) |
| | | .catch((err) => { |
| | | console.error('图片上传失败:', err); |
| | | that.$tip.error('图片上传失败'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | ChooseImageTwo() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 4, |
| | | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], // 从相册选择 |
| | | success: (res) => { |
| | | // 存储选择的图片路径 |
| | | that.imgListTwo = res.tempFilePaths; |
| | | |
| | | // 初始化 formData.avatar 为空字符串 |
| | | that.formData.avatarTwo = []; |
| | | |
| | | // 创建上传任务的 Promise 数组 |
| | | const uploadPromises = res.tempFilePaths.map((filePath, index) => { |
| | | return new Promise((resolve, reject) => { |
| | | that.$http.upload(that.url.upload, { |
| | | filePath: filePath, |
| | | name: 'file' |
| | | }) |
| | | .then(uploadRes => { |
| | | const filePath = uploadRes.data.result[0]; |
| | | this.formData.avatarTwo.push(filePath); |
| | | resolve(filePath); |
| | | }) |
| | | .catch(err => { |
| | | console.error('图片' + index + '上传失败:', err); |
| | | reject(err); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | // 并发执行所有上传任务 |
| | | Promise.all(uploadPromises) |
| | | .then((uploadedFilePaths) => { |
| | | console.log('所有图片上传成功:', that.formData.avatarTwo); |
| | | }) |
| | | .catch((err) => { |
| | | console.error('图片上传失败:', err); |
| | | that.$tip.error('图片上传失败'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | ViewImageTwo(e) { |
| | | uni.previewImage({ |
| | | urls: this.imgListTwo, |
| | | current: e.currentTarget.dataset.url |
| | | }); |
| | | }, |
| | | |
| | | ViewImage(e) { |
| | | uni.previewImage({ |
| | | urls: this.imgList, |
| | | current: e.currentTarget.dataset.url |
| | | }); |
| | | }, |
| | | DelImgTwo(e) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确定要删除这段回忆吗?', |
| | | cancelText: '再看看', |
| | | confirmText: '再见', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | this.imgListTwo.splice(e.currentTarget.dataset.index, 1) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | DelImg(e) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确定要删除这段回忆吗?', |
| | | cancelText: '再看看', |
| | | confirmText: '再见', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | this.imgList.splice(e.currentTarget.dataset.index, 1) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | upCallback() { |
| | | this.$http.get(this.url.stallList, { |
| | |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | this.formData.reportStatus = this.announcement1.reportStatus |
| | | |
| | | this.title = this.todoName ?? '详情'; |
| | | if (this.announcement1.reportStatus === 'WAIT_CONFIRM') { |
| | | this.title = '操作工确认'; |
| | | this.isUNDERREPAIR = true; |
| | | } else if (this.announcement1.reportStatus === 'WAIT_SPARES') { |
| | | this.title = '管理员领用备件'; |
| | | this.isUNDERREPAIR = true; |
| | | this.isShowUNDEREPAIR = true; |
| | | |
| | | } else if (this.announcement1.reportStatus === 'UNDER_REPAIR') { |
| | | if (this.announcement1.isUseSpare == 1) { |
| | | this.title = '维修结果上报'; |
| | | } else { |
| | | this.title = '是否需要领用备件'; |
| | | if (this.flag == 'task') { |
| | | // this.title = '维修执行'; |
| | | this.isUNDERREPAIR = true |
| | | this.readonly = true |
| | | this.isRuning = true |
| | | this.isSHowBtn = false |
| | | this.readonlyRepaier = true |
| | | this.isShowRepari = false |
| | | } else if (this.flag !== 'task') { |
| | | // this.title = '操作工确认'; |
| | | this.isUNDERREPAIR = true |
| | | this.readonly = true |
| | | this.isRuning = true |
| | | this.isSHowBtn = true |
| | | this.readonlyRepaier = true |
| | | this.isShowRepari = false |
| | | } |
| | | |
| | | this.isUNDERREPAIR = true; |
| | | this.isShowUNDEREPAIR = true; |
| | | this.isRuning = true; |
| | | this.isShowRepari = true; |
| | | |
| | | }else if (this.announcement1.reportStatus === 'COMPLETE') { |
| | | if (this.announcement1.isUseSpare == 0) { |
| | | this.title = '管理员领用备件'; |
| | | this.isShowRepari=false; |
| | | this.isSHowBtn=false; |
| | | this.isRepari; |
| | | } else if (this.announcement1.reportStatus === 'WAIT_SPARES') { |
| | | if (this.flag == 'task' && this.announcement1.isUseSpare == 1) { |
| | | // this.title = '是否需要领用备件'; |
| | | this.isShowUNDEREPAIR = false; |
| | | this.isUNDERREPAIR = true; |
| | | |
| | | this.readonly = true |
| | | |
| | | this.isSHowBtn = false; |
| | | } else { |
| | | this.title = '操作工确认'; |
| | | // this.title = '管理员领用备件'; |
| | | this.readonly = true |
| | | this.isUNDERREPAIR = true; |
| | | this.isShowUNDEREPAIR = true; |
| | | this.isRuning=true; |
| | | this.isShowRepari=true; |
| | | this.isRepari=true; |
| | | this.isSHowBtn=false; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } else if (this.announcement1.reportStatus === 'UNDER_REPAIR') { |
| | | if (this.announcement1.isUseSpare == 1 && this.flag == 'task') { |
| | | // this.title = '管理员领用备件'; |
| | | this.isShowRepari = true; |
| | | this.readonlyRepaier = true |
| | | this.isShowUNDEREPAIR = true; |
| | | this.isUNDERREPAIR = true; |
| | | this.isRuning = true; |
| | | this.isRepari = true; |
| | | this.readonly = true |
| | | this.isSHowBtn = false; |
| | | |
| | | } else if (this.announcement1.isUseSpare == 1 && this.flag !== 'task') { |
| | | // this.title = '维修执行' |
| | | this.isUNDERREPAIR = true |
| | | this.readonly = true |
| | | this.isShowUNDEREPAIR = true |
| | | this.isRuning = true |
| | | this.isShowRepari = true |
| | | |
| | | } else if (this.announcement1.isUseSpare == 0 && this.flag == 'task') { |
| | | this.readonlyRepaier = true |
| | | this.isUNDERREPAIR = true; |
| | | this.isRuning = true; |
| | | this.isRepari = true; |
| | | this.readonly = true |
| | | this.isSHowBtn = false; |
| | | |
| | | } else { |
| | | // this.title = '是否需要领用备件' |
| | | this.isSHowBtn = true |
| | | this.readonly = true |
| | | } |
| | | } else if (this.announcement1.reportStatus === 'COMPLETE') { |
| | | if (this.flag == 'task' && this.announcement1.isUseSpare == 0) { |
| | | // this.title = '操作工确认' |
| | | this.isUNDERREPAIR = true |
| | | this.isShowUNDEREPAIR = false |
| | | this.readonly = true |
| | | this.readonlyRepaier = true |
| | | this.isRuning = true |
| | | this.isShowRepari = false |
| | | this.isRepari = false |
| | | this.isSHowBtn = false |
| | | } else if (this.flag == 'task' && this.announcement1.isUseSpare == 1) { |
| | | // this.title = '操作工确认' |
| | | this.isUNDERREPAIR = true |
| | | this.isShowUNDEREPAIR = true |
| | | this.isRuning = true |
| | | this.readonlyRepaier = true |
| | | this.isShowRepari = true |
| | | this.isRepari = true |
| | | this.readonly = true |
| | | this.isSHowBtn = false; |
| | | } else if (this.flag !== 'task' && this.announcement1.isUseSpare == 0) { |
| | | // this.title = '维修执行' |
| | | this.isUNDERREPAIR = true |
| | | this.readonlyRepaier = true |
| | | this.readonly = true |
| | | this.isRuning = true |
| | | |
| | | } |
| | | |
| | | } |
| | | console.log(this.announcement1.reportImageFiles) |
| | | if (this.announcement1.reportImageFiles) { |
| | | try { |
| | | const parsedData = JSON.parse(this.announcement1.reportImageFiles); |
| | | this.imageFilesList = parsedData; |
| | | this.imgList = parsedData.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }); |
| | | |
| | | this.fileList = this.imgList.map(url => ({ |
| | | url: url, |
| | | extname: 'png', |
| | | name: 'eam' |
| | | })); |
| | | } catch (error) { |
| | | console.error('JSON 解析失败:', error); |
| | | this.imageFilesList = []; |
| | | this.imgList = []; |
| | | this.fileList = []; |
| | | } |
| | | } |
| | | console.log(this.fileLists) |
| | | this.formData.num = this.announcement1.equipmentId |
| | | this.formData.repairStatus_dictText = this.announcement1.repairStatus_dictText |
| | | this.formData.repairCode = this.announcement1.repairCode |
| | | this.formData.repairer = this.announcement1.repairer |
| | | this.formData.installationPosition_dictText = this.announcement1 |
| | | .installationPosition_dictText |
| | | this.formData.faultName = this.announcement1.faultName |
| | | this.formData.repairer_dictText = this.announcement1.repairer_dictText |
| | | this.formData.repairerPhone_dictText = this.announcement1.repairerPhone_dictText |
| | | this.formData.reporter_dictText = this.announcement1.reporter_dictText |
| | | this.formData.reporterPhone_dictText = this.announcement1.reporterPhone_dictText |
| | | this.formData.faultStartTime = this.announcement1.faultStartTime |
| | | this.formData.remark = this.announcement1.remark |
| | | this.formData.repairDescription = this.announcement1.repairDescription |
| | |
| | | this.isShow = true; |
| | | } |
| | | this.ScanData.sparePartDescription = this.announcement1.sparePartDescription |
| | | this.formData.avatar = this.announcement1.reportImageFiles |
| | | this.imageFilesList = JSON.parse(this.formData.avatar) |
| | | const imageObjects = JSON.parse(this.formData.avatar) |
| | | this.imgList = imageObjects.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }) |
| | | this.formData.avatarTwo = this.announcement1.imageFiles |
| | | this.imageAvatarTwo = JSON.parse(this.formData.avatarTwo) |
| | | const imageObjectTwo = JSON.parse(this.formData.avatarTwo) |
| | | if(this.formData.isSpare == 1){ |
| | | this.imgThreeList = imageObjectTwo.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }) |
| | | }else{ |
| | | this.imgTwoList = imageObjectTwo.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }) |
| | | if (this.announcement1.imageFiles) { |
| | | try { |
| | | const parsedDataIn = JSON.parse(this.announcement1.imageFiles); |
| | | this.imageAvatarTwo = parsedDataIn; |
| | | this.imgTwoList = parsedDataIn.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }); |
| | | |
| | | this.fileLists = this.imgTwoList.map(url => ({ |
| | | url: url, |
| | | extname: 'png', |
| | | name: 'eam' |
| | | })); |
| | | } catch (error) { |
| | | console.error('JSON 解析失败:', error); |
| | | this.imageAvatarTwo = []; |
| | | this.imgTwoList = []; |
| | | this.fileLists = []; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | |
| | | border-color: #55aaff; |
| | | } |
| | | |
| | | .divider { |
| | | display: flex; |
| | | align-items: center; |
| | | text-align: center; |
| | | color: gray; |
| | | /* 文字颜色 */ |
| | | margin: 20px 0; |
| | | /* 上下间距 */ |
| | | } |
| | | |
| | | .divider::before, |
| | | .divider::after { |
| | | content: ''; |
| | | flex: 1; |
| | | border-bottom: 1px solid gray; |
| | | /* 横线颜色 */ |
| | | margin: 0 16px; |
| | | /* 横线与文字之间的间距 */ |
| | | } |
| | | |
| | | .divider text { |
| | | white-space: nowrap; |
| | | /* 防止文字换行 */ |
| | | } |
| | | |
| | | .content { |
| | | margin-top: 5px; |