| | |
| | | /** |
| | | * 第三方登录 |
| | | */ |
| | | thirdLogin(token, thirdType,tenantId) { |
| | | return http.get(`/sys/thirdLogin/getLoginUser/${token}/${thirdType}/${tenantId}`); |
| | | thirdLogin(token, thirdType) { |
| | | return http.get(`/sys/thirdLogin/getLoginUser/${token}/${thirdType}`); |
| | | }, |
| | | /** |
| | | * 退出 |
| | |
| | | let token = uni.getStorageSync(ACCESS_TOKEN); |
| | | if (token) { |
| | | if (to.path === '/pages/login/login' || to.path === '/pages/login/loginOauth2') { |
| | | if (from.path === '/pages/index/index') { |
| | | return; |
| | | } else { |
| | | next() |
| | | } |
| | | // if (from.path === '/pages/index/index') { |
| | | // return; |
| | | // } else { |
| | | // next() |
| | | // } |
| | | next({ |
| | | path: '/pages/index/index' |
| | | }) |
| | | } |
| | | next() |
| | | } else { |
| | |
| | | { |
| | | //注意:path必须跟pages.json中的地址对应,最前面别忘了加'/'哦 |
| | | path: '/pages/device/device', |
| | | //aliasPath:'/', //对于h5端你必须在首页加上aliasPath并设置为/ |
| | | name: 'device', |
| | | meta: { |
| | | title: '设备', |
| | |
| | | { |
| | | //注意:path必须跟pages.json中的地址对应,最前面别忘了加'/'哦 |
| | | path: '/pages/spare/spare', |
| | | //aliasPath:'/', //对于h5端你必须在首页加上aliasPath并设置为/ |
| | | name: 'spare', |
| | | meta: { |
| | | title: '备件', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/historicalInspection/historicalInspection', |
| | | name: 'historicalInspection', |
| | | meta: { |
| | | title: '历史点检', |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | path: '/pages/checkList/checkListDetils/checkListDetils', |
| | | name: 'checkListDetils', |
| | | meta: { |
| | |
| | | name: 'baoZhou', |
| | | meta: { |
| | | title: '周保', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/historicalMaintenance/historicalMaintenance', |
| | | name: 'historicalMaintenance', |
| | | meta: { |
| | | title: '历史保养', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/historicalRepair/historicalRepair', |
| | | name: 'historicalRepair', |
| | | meta: { |
| | | title: '历史维修', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils', |
| | | name: 'maintenanceReport', |
| | | meta: { |
| | |
| | | let BASE_URL = '/jeecg-boot' |
| | | let BASE_URL = '' |
| | | if (process.env.NODE_ENV == 'development') { |
| | | |
| | | BASE_URL = '/jeecg-boot' // 开发环境 |
| | |
| | | BASE_URL = '/jeecg-boot' // 生产环境 |
| | | } |
| | | let staticDomainURL ='/sys/common/static'; |
| | | let staticURL ='https://192.168.100.105:9999/jeecg-boot/sys/common/static'; |
| | | let staticURL ='http://125.76.225.53:8086/jeecg-boot/sys/common/static/'; |
| | | const configService = { |
| | | apiUrl: BASE_URL, |
| | | staticDomainURL: staticDomainURL, |
| | |
| | | case 504: |
| | | break |
| | | case 401: |
| | | uni.removeStorageSync(ACCESS_TOKEN); // 清除 token |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '登录超时,需要重新登录!', |
| | |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.reLaunch({ |
| | | url: '/pages/login/login' |
| | | }) |
| | | url: '/pages/login/loginOauth2' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | break |
| | | break; |
| | | |
| | | // case 401: |
| | | // uni.showModal({ |
| | | // title: '提示', |
| | | // content: '登录超时,需要重新登录!', |
| | | // showCancel: false, |
| | | // success: (res) => { |
| | | // if (res.confirm) { |
| | | // uni.reLaunch({ |
| | | // url: '/pages/login/login' |
| | | // }) |
| | | // } |
| | | // } |
| | | // }); |
| | | // break |
| | | default: |
| | | tip.error({ |
| | | duration: 0, |
| | |
| | | data:[ |
| | | { |
| | | title:"待办", |
| | | icon:icon_prefix+"wait_work.png", |
| | | icon:icon_prefix+"todo.png", |
| | | description:"待办事项", |
| | | useCount:1000, |
| | | page:'ToDoList' |
| | | }, |
| | | { |
| | | title:"已办", |
| | | icon:icon_prefix+"wait_work.png", |
| | | icon:icon_prefix+"todoManger.png", |
| | | description:"已办事项", |
| | | useCount:1000, |
| | | page:'TaskManagerList' |
| | |
| | | useCount:10000, |
| | | page:'spare' |
| | | } |
| | | // ,{ |
| | | // title:"已办", |
| | | // icon:icon_prefix+"yiban.png", |
| | | // description:"已办事项", |
| | | // useCount:10000, |
| | | // page:'helloWorld' |
| | | // } |
| | | // { |
| | | // title:"考勤", |
| | | // icon:icon_prefix+"kaoqin.png", |
| | | // description:"工作考勤", |
| | | // useCount:10000, |
| | | // page:'helloWorld' |
| | | // },{ |
| | | // title:"日程", |
| | | // icon:icon_prefix+"richeng.png", |
| | | // description:"建立和查看个人工作安排", |
| | | // useCount:10000, |
| | | // page:'helloWorld' |
| | | // },{ |
| | | // title:"请假申请", |
| | | // icon:icon_prefix+"qingjia1.png", |
| | | // description:"请假申请", |
| | | // useCount:10000, |
| | | // page:'helloWorld' |
| | | // },{ |
| | | // title:"出差申请", |
| | | // icon:icon_prefix+"chuchai.png", |
| | | // description:"出差申请", |
| | | // useCount:10000, |
| | | // page:'helloWorld' |
| | | // },{ |
| | | // title:"公文发文", |
| | | // icon:icon_prefix+"gongwen.png", |
| | | // description:"公文发文", |
| | | // useCount:10000, |
| | | // page:'helloWorld' |
| | | // },{ |
| | | // title:"通知公告", |
| | | // icon:icon_prefix+"tongzhi.png", |
| | | // description:"查看企业对员工下发的通知公告", |
| | | // useCount:10000, |
| | | // page:'annotationList' |
| | | // },{ |
| | | // title:"内部邮件", |
| | | // icon:icon_prefix+"youjian.png", |
| | | // description:"查看内部消息", |
| | | // useCount:10000, |
| | | // dot:false, |
| | | // page:'helloWorld' |
| | | // },{ |
| | | // title:"通讯录", |
| | | // icon:icon_prefix+"tongxun.png", |
| | | // description:"查看部门,组员", |
| | | // useCount:10000, |
| | | // page:'levelAddressBook' |
| | | // } |
| | | ] |
| | | } |
| | | |
| | |
| | | description:"设备周保", |
| | | useCount:10000, |
| | | page:'baoZhou' |
| | | }, |
| | | { |
| | | title:"历史点检", |
| | | icon:icon_prefix+"icon_historicalInspection.png", |
| | | description:"历史点检", |
| | | useCount:10000, |
| | | page:'historicalInspection' |
| | | },{ |
| | | title:"历史保养", |
| | | icon:icon_prefix+"icon_historicalMaintenance.png", |
| | | description:"历史保养", |
| | | useCount:10000, |
| | | page:'historicalMaintenance' |
| | | } |
| | | ] |
| | | } |
| | |
| | | data:[ |
| | | { |
| | | title:"报修", |
| | | icon:icon_prefix+"xinwen.png", |
| | | icon:icon_prefix+"baoxiu.png", |
| | | description:"设备报修", |
| | | useCount:10000, |
| | | page:'reportRepairList' |
| | | page:'reportRepair' |
| | | },{ |
| | | title:"待维修", |
| | | icon:icon_prefix+"toupiao.png", |
| | | icon:icon_prefix+"repair.png", |
| | | description:"设备维修", |
| | | useCount:10000, |
| | | page:'maintenanceReport' |
| | | },{ |
| | | title:"历史维修", |
| | | icon:icon_prefix+"historicalRepair.png", |
| | | description:"历史维修", |
| | | useCount:10000, |
| | | page:'historicalRepair' |
| | | } |
| | | ] |
| | | } |
| | |
| | | "quickapp": {}, |
| | | /* 快应用特有相关 */ |
| | | "mp-weixin": { |
| | | "appid": "wx2ba5c5690b35d173", |
| | | "appid" : "", |
| | | "setting": { |
| | | "urlCheck": false, |
| | | "es6": true |
| | |
| | | }, |
| | | "h5": { |
| | | "title": "设备管理", |
| | | "domain": "myhjdc.cn", |
| | | "domain" : "houjie.xalxzn.com", |
| | | "router": { |
| | | "mode": "hash", |
| | | "base": "/h5" |
| | | "base" : "/h5/" |
| | | }, |
| | | "devServer": { |
| | | "port": "8080", |
| | | "https": true, |
| | | "port" : "8866", |
| | | "https" : false, |
| | | "proxy": { |
| | | /**配置服务器路径**/ |
| | | "/jeecg-boot": { |
| | | "target": "https://192.168.100.105:9999", // 目标服务器 |
| | | "changeOrigin": true |
| | | "target" : "http://houjie.xalxzn.com:8866", // 目标服务器 |
| | | "changeOrigin" : true, |
| | | "secure": false |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | /**配置服务器路径**/ // 目标服务器 |
| | | |
| | |
| | | "resolved": "https://registry.npmmirror.com/@dcloudio/uni-ui/-/uni-ui-1.5.7.tgz", |
| | | "integrity": "sha512-DugxSIrQrze1FLdUOj9a+JEQ0bHGjnJTcGUK1mN/MivKg7nuKJBRWk5Ipa9sUdoBznX6ndz5h2e7Uao6x1CdCw==" |
| | | }, |
| | | "@zxing/library": { |
| | | "version": "0.21.3", |
| | | "resolved": "https://registry.npmmirror.com/@zxing/library/-/library-0.21.3.tgz", |
| | | "integrity": "sha512-hZHqFe2JyH/ZxviJZosZjV+2s6EDSY0O24R+FQmlWZBZXP9IqMo7S3nb3+2LBWxodJQkSurdQGnqE7KXqrYgow==", |
| | | "requires": { |
| | | "@zxing/text-encoding": "~0.9.0", |
| | | "ts-custom-error": "^3.2.1" |
| | | } |
| | | }, |
| | | "@zxing/text-encoding": { |
| | | "version": "0.9.0", |
| | | "resolved": "https://registry.npmmirror.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", |
| | | "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", |
| | | "optional": true |
| | | }, |
| | | "file-saver": { |
| | | "version": "2.0.5", |
| | | "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", |
| | |
| | | "version": "2.3.8", |
| | | "resolved": "https://registry.npmmirror.com/html5-qrcode/-/html5-qrcode-2.3.8.tgz", |
| | | "integrity": "sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==" |
| | | }, |
| | | "ts-custom-error": { |
| | | "version": "3.3.1", |
| | | "resolved": "https://registry.npmmirror.com/ts-custom-error/-/ts-custom-error-3.3.1.tgz", |
| | | "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==" |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/historicalInspection/historicalInspection", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/historicalMaintenance/historicalMaintenance", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/historicalRepair/historicalRepair", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | "allowsBounceVertical": "NO" |
| | | }, |
| | | "navigationBarBackgroundColor": "#0081ff", |
| | | "navigationBarTitleText": "JEECG BOOT", |
| | | "navigationBarTitleText": "MDC", |
| | | "navigationStyle": "custom", |
| | | "navigationBarTextStyle": "white" |
| | | }, |
| | |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in msgList" :key="index" |
| | | @click="onClickProductionTask(item)"> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程分类:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold text-blue radius text-right"> |
| | | {{item.category_dictText}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.procDefName}} |
| | |
| | | } |
| | | |
| | | if (url) { |
| | | uni.navigateTo({ |
| | | uni.redirectTo({ |
| | | |
| | | url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}&flag=${flag}` |
| | | }); |
| | |
| | | <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList" |
| | | placeholder="请选择" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item :label-width="80" required name="maintenanceStatus_dictText" label="工单状态:"> |
| | | <uni-easyinput v-model="formData.maintenanceStatus_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" required name="installationPosition_dictText" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="maintenanceDate" label="保养日期:"> |
| | | <uni-easyinput v-model="formData.maintenanceDate" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="operator" label="保养人:"> |
| | | <uni-easyinput v-model="formData.operator" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="operatorPhone_dictText" label="保养人电话:"> |
| | | <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="remark" label="备注:"> |
| | | <uni-easyinput v-model="formData.remark" placeholder="请输入备注" :disabled="true" /> |
| | |
| | | :sourceType="sourceType" @select="select" @progress="progress" @success="success" |
| | | @fail="fail" @delete="deletea" /> |
| | | </uni-forms-item> |
| | | <!-- <view class="text-gray margin-bottom-lg">—————————— 班组长确认 ——————————</view> |
| | | <uni-forms-item name="outNum" required label="确认类型:"> |
| | | <uni-data-select :localdata="formData.msListCategory" popup-title="请选择" @change="changeType" |
| | | :clear="false"> |
| | | </uni-data-select> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" required label="确认意见:"> |
| | | <uni-easyinput type="textarea" v-model="formData.ttitle" placeholder="请输入内容"></uni-easyinput> |
| | | </uni-forms-item> --> |
| | | |
| | | </uni-group> |
| | | </uni-forms> |
| | | |
| | |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">子保养项:</view> |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.subItemName!=null && item.subItemName.length>10"> |
| | | {{(item.subItemName).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.subItemName}} |
| | | </view> --> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.subItemName}} |
| | | </view> |
| | |
| | | |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">点检结果:</view> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">保养结果:</view> |
| | | <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> |
| | | <uni-data-select :localdata="item.restle" v-model="item.maintenanceResult" |
| | | @change="handleCode($event, index)" /> |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | for (let i = 0; i < this.partTakeAdviceDetailList.length; i++) { |
| | | if (this.partTakeAdviceDetailList[i].inspectionResult === "2") { |
| | | if (this.partTakeAdviceDetailList[i].maintenanceResult === "2") { |
| | | if (this.partTakeAdviceDetailList[i].reportFlag === undefined || this |
| | | .partTakeAdviceDetailList[i].reportFlag === null || this.partTakeAdviceDetailList[i] |
| | | .reportFlag === '') { |
| | |
| | | }, |
| | | select(e) { |
| | | const tempFilePaths = e.tempFilePaths; |
| | | |
| | | // if (!Array.isArray(tempFilePaths) || tempFilePaths.length === 0) { |
| | | // uni.showToast({ |
| | | // title: '请选择文件', |
| | | // icon: 'none' |
| | | // }); |
| | | // return; |
| | | // } |
| | | |
| | | uni.showLoading({ |
| | | title: '上传中...' |
| | | }); |
| | | |
| | | const uploadPromises = tempFilePaths.map((filePath, index) => { |
| | | return new Promise((resolve, reject) => { |
| | | this.$http.upload(this.url.upload, { |
| | |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | this.formData.num = this.announcement1.equipmentId, |
| | | this.formData.orderNum = this.announcement1.orderNum, |
| | | this.formData.operator = this.announcement1.operator_dictText, |
| | | this.formData.maintenanceDate = this.announcement1.maintenanceDate, |
| | | this.formData.id = this.announcement1.id, |
| | | this.formData.num = this.announcement1.equipmentId |
| | | this.formData.orderNum = this.announcement1.orderNum |
| | | this.formData.operator = this.announcement1.operator_dictText |
| | | this.formData.installationPosition_dictText = this.announcement1 |
| | | .installationPosition_dictText |
| | | this.formData.maintenanceStatus_dictText = this.announcement1.maintenanceStatus_dictText |
| | | this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText |
| | | this.formData.maintenanceDate = this.announcement1.maintenanceDate |
| | | this.formData.id = this.announcement1.id |
| | | this.formData.remark = this.announcement1.remark |
| | | this.hasInspectionDateArrived(); |
| | | } |
| | |
| | | <uni-forms-item :label-width="80" name="num" label="工单号:"> |
| | | <uni-easyinput v-model="formData.orderNum" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" required name="num" label="设备编号:"> |
| | | <uni-forms-item :label-width="80" name="maintenanceStatus_dictText" label="工单状态:"> |
| | | <uni-easyinput v-model="formData.maintenanceStatus_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" 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="80" name="installationPosition_dictText" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="maintenanceDate" label="保养日期:"> |
| | | <uni-easyinput v-model="formData.maintenanceDate" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="operator" label="保养人:"> |
| | | <uni-easyinput v-model="formData.operator" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="operator" label="保养人电话:"> |
| | | <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="remark" label="备注:"> |
| | | <uni-easyinput v-model="formData.remark" :disabled="true" /> |
| | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.subItemName}} |
| | | </view> |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.subItemName!=null && item.subItemName.length>10"> |
| | | {{(item.subItemName).toString().substr(0,10)+'...'}} |
| | | </view> --> |
| | | |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.subItemName}} |
| | | </view> --> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">保养要求:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.itemDemand}} |
| | | </view> |
| | | <!-- <zb-tooltip placement="left" ref="tooltip7" > |
| | | <view slot="content"> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.itemDemand}} |
| | | </view> |
| | | </view> |
| | | <view > |
| | | <button size="mini">更多</button > |
| | | </view> |
| | | </zb-tooltip> --> |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.itemDemand}} |
| | | </view> --> |
| | | |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">是否报修:</view> |
| | |
| | | </uni-collapse> |
| | | |
| | | |
| | | <uni-forms v-show="isShowSure" ref="form" :modelValue="ScanData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-forms v-show="isShowSure" ref="form" :modelValue="ScanData" validate-trigger="bind" |
| | | err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | | <view class="divider"><text>班组长确认信息</text></view> |
| | | <!-- <view class="text-gray margin-bottom-lg">—————————班组长确认信息——————————</view> --> |
| | | <uni-forms-item :label-width="80" required name="typeName" label="确认类型:"> |
| | | <uni-data-select v-model="ScanData.typeName" :localdata="ScanData.handlingType" |
| | | @change="changehandlingType" placeholder="请选择" :disabled="isShowSure" /> |
| | | @change="changehandlingType" placeholder="请选择" :disabled="isShowSureBtn" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" required name="handlingSuggestion" label="确认意见:"> |
| | | <uni-easyinput type="textarea" v-model="ScanData.handlingSuggestion" :disabled="isShowSure" /> |
| | | <uni-easyinput type="textarea" v-model="ScanData.handlingSuggestion" :disabled="isShowSureBtn"/> |
| | | </uni-forms-item> |
| | | |
| | | </uni-group> |
| | |
| | | mixins: [MescrollMixin], // 使用mixin |
| | | data() { |
| | | return { |
| | | isShowSureBtn:false, |
| | | readonly: false, |
| | | readonlyFirstFanl: false, |
| | | readonlyFirst: false, |
| | |
| | | procInstId: '', |
| | | values: '', |
| | | flag: '', |
| | | from: '', |
| | | imageFiles: '', |
| | | imageObjectInIt: [], |
| | | imageFilesList: [], |
| | | imageObjectFinal: [], |
| | | imageFilesnitialAcceptList: [] |
| | | imageFilesnitialAcceptList: [], |
| | | todoName: '' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | onLoad(options) { |
| | | const annItem = JSON.parse(decodeURIComponent(options.item)); |
| | | this.flag = options.flag |
| | | console.log(this.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.variables = annItem.variables |
| | | this.id = annItem.dataId |
| | | this.taskId = annItem.id |
| | | this.procInstId = annItem.procInstId |
| | | this.assignee = annItem.assignee |
| | |
| | | // }) |
| | | this.$Router.replaceAll({ |
| | | name: 'ToDoList' |
| | | }) |
| | | } else { |
| | | |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.message, |
| | | confirmText: '确定', |
| | | showCancel: false, |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data.result.equipmentCode) |
| | | this.title = this.todoName ?? '详情' |
| | | this.formData.num = this.announcement1.equipmentId |
| | | this.formData.orderNum = this.announcement1.orderNum |
| | | this.formData.maintenanceStatus_dictText = this.announcement1.maintenanceStatus_dictText |
| | | this.formData.installationPosition_dictText = this.announcement1 |
| | | .installationPosition_dictText |
| | | this.formData.operator = this.announcement1.operator_dictText |
| | | this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText |
| | | this.formData.maintenanceDate = this.announcement1.maintenanceDate |
| | | this.formData.remark = this.announcement1.remark |
| | | this.ScanData.finalAcceptanceComment = this.announcement1.finalAcceptanceComment |
| | | |
| | | if (this.announcement1.randomInspectionFlag != null) { |
| | | this.ScanData.InspectionFlagName = this.announcement1.randomInspectionFlag |
| | | } |
| | |
| | | */ |
| | | case 'WAIT_INITIAL_ACCEPTANCE': |
| | | if (this.flag == 'task') { |
| | | this.title = '详情' |
| | | this.readonly = true; |
| | | this.readonlyFirst = true; |
| | | this.isShowSure = true; |
| | | this.isHideFist = true; |
| | | this.isShowLast = true; |
| | | this.isShowBtn = false; |
| | | } else { |
| | | this.title = '初检' |
| | | // this.title = '详情' |
| | | this.readonly = true |
| | | this.isShowSure = true; |
| | | this.isHideFist = true; |
| | | this.isShowSureBtn=true |
| | | this.readonlyFirst = true |
| | | this.isShowSure = true |
| | | this.isHideFist = true |
| | | this.isShowLast = true |
| | | this.isShowBtn = false |
| | | } else { |
| | | // this.title = '初检' |
| | | this.readonly = true |
| | | this.isShowSureBtn=true |
| | | this.isShowSure = true |
| | | this.isHideFist = true |
| | | } |
| | | |
| | | break |
| | |
| | | */ |
| | | case 'WAIT_FINAL_ACCEPTANCE': |
| | | if (this.flag == 'task') { |
| | | this.title = '详情' |
| | | // this.title = '详情' |
| | | this.readonly = true |
| | | this.readonlyFirst = true |
| | | this.isHideFist = true; |
| | | this.isShowLast = true; |
| | | this.isShowSure = true; |
| | | this.isHideLast = true; |
| | | this.isShowBtn = false; |
| | | this.isfinal = true; |
| | | this.readonlyFirstFanl = true; |
| | | this.isHideFist = true |
| | | this.isShowLast = true |
| | | this.isShowSure = true |
| | | this.isHideLast = true |
| | | this.isShowBtn = false |
| | | this.isfinal = true |
| | | this.isShowSureBtn=true |
| | | this.readonlyFirstFanl = true |
| | | } else { |
| | | this.title = '设能部终验' |
| | | // this.title = '设能部终验' |
| | | this.readonly = true |
| | | this.isShowSureBtn=true |
| | | this.readonlyFirst = true |
| | | this.isHideFist = true; |
| | | this.isShowLast = true; |
| | | this.isShowSure = true; |
| | | this.isHideLast = true; |
| | | this.isHideFist = true |
| | | this.isShowLast = true |
| | | this.isShowSure = true |
| | | this.isHideLast = true |
| | | } |
| | | |
| | | break |
| | |
| | | case 'WAIT_CONFIRM': |
| | | |
| | | if (this.flag == 'task') { |
| | | this.title = '详情' |
| | | // this.title = '详情' |
| | | this.readonly = true |
| | | |
| | | this.isHideLast = false |
| | | this.isHideFist = false |
| | | this.isShowBtn = false |
| | | this.isShowSure = true |
| | | } else { |
| | | this.title = '班组长确认' |
| | | // this.title = '班组长确认' |
| | | this.isHideLast = false |
| | | this.readonly = true |
| | | this.isHideFist = false |
| | | this.isShowBtn = true |
| | | this.isShowSure = false |
| | | this.isShowSure = true |
| | | |
| | | } |
| | | |
| | | break |
| | |
| | | this.isHideFist = true |
| | | this.isShowLast = true |
| | | this.isfinal = true |
| | | this.isShowSureBtn=true |
| | | this.readonlyFirst = true |
| | | this.readonly = true |
| | | this.readonlyFirstFanl = true |
| | | this.isShowBtn = false |
| | | this.title = '详情' |
| | | // this.title = '详情' |
| | | break |
| | | |
| | | case 'UNDER_MAINTENANCE': |
| | | |
| | | this.isfinal = true |
| | | this.readonlyFirst = true |
| | | this.readonly = true |
| | | this.readonlyFirstFanl = true |
| | | this.isShowBtn = false |
| | | this.title = '详情' |
| | | break |
| | | |
| | | case 'WAIT_MAINTENANCE': |
| | | if (this.flag == 'task') |
| | | this.readonly = true |
| | | this.isShowBtn = false |
| | | break |
| | | } |
| | | this.ScanData.initialAcceptanceComment = this.announcement1.initialAcceptanceComment |
| | | this.ScanData.typeName = this.announcement1.confirmDealType |
| | |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in msgList" :key="index" |
| | | @click="onClickProductionTask(item)"> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程分类:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold text-blue radius text-right"> |
| | | {{item.category_dictText}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">流程名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.flowName}} |
| | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">之前处理人:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.preNodeAssignee_dictText}} |
| | | </view> |
| | | </view> |
| | |
| | | url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts'; |
| | | break; |
| | | case (name === '点检工单' && type === '设备点检'): |
| | | url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils'; |
| | | url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils'; |
| | | |
| | | break; |
| | | default: |
| | | default:ToDoCheckDetils |
| | | console.warn(`No URL found for name: ${name} and type: ${type}`); |
| | | return; |
| | | } |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">{{title}}</block> |
| | | </cu-custom> |
| | |
| | | <!-- 关闭按钮 --> |
| | | <text class="close-btn" @tap.stop="showPreview = false">×</text> |
| | | <!-- 图片展示 --> |
| | | <image :src="previewImageSrc" mode="aspectFit" class="preview-image" /> |
| | | <image :src="previewImageSrc" mode="aspectFit" class="preview-image" @error="handleImageError" |
| | | :show-menu-by-longpress="false" /> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <uni-forms-item :label-width="80" name="num" label="工单号:"> |
| | | <uni-easyinput v-model="formData.orderNum" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" required name="num" label="设备编号:"> |
| | | <uni-forms-item :label-width="80" name="inspectionStatus_dictText" label="工单状态:"> |
| | | <uni-easyinput v-model="formData.inspectionStatus_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item :label-width="80" 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="80" name="installationPosition_dictText" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item :label-width="80" name="remark" label="点检日期:"> |
| | |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="outNum" label="点检人:"> |
| | | <uni-easyinput v-model="formData.operator" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="operatorPhone_dictText" label="点检人电话:"> |
| | | <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="formData.remark" label="备注:"> |
| | | <uni-easyinput v-model="formData.remark" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="outNum" label="点检图片:"> |
| | | |
| | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.itemDemand}} |
| | | </view> |
| | | |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.itemDemand!=null && item.itemDemand.length>10"> |
| | | {{(item.itemDemand).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.itemDemand}} |
| | | </view> --> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">点检结果:</view> |
| | |
| | | procInstId: '', |
| | | values: '', |
| | | flag: '', |
| | | from: '', |
| | | standardId: '', |
| | | previewImageSrc: '' |
| | | previewImageSrc: '', |
| | | todoName: '' |
| | | |
| | | |
| | | } |
| | |
| | | onLoad(options) { |
| | | const annItem = JSON.parse(decodeURIComponent(options.item)); |
| | | this.flag = options.flag |
| | | console.log(this.flag) |
| | | this.id = annItem.dataId |
| | | if (this.flag == 'task') { |
| | | this.todoName = annItem.taskName |
| | | } else { |
| | | this.todoName = annItem.name |
| | | } |
| | | this.from = options.from |
| | | 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 |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | handleImageError(e) { |
| | | const icon_prefix = "/static/"; |
| | | this.previewImageSrc = icon_prefix + "icn_erro.png" |
| | | }, |
| | | changehandlingType(e) { |
| | | this.ScanData.typeName = e; |
| | | }, |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | if (this.ScanData.handlingSuggestion == undefined || this.ScanData.handlingSuggestion == null || |
| | | if (this.ScanData.handlingSuggestion == undefined || this.ScanData.handlingSuggestion == |
| | | null || |
| | | this |
| | | .ScanData.handlingSuggestion == |
| | | '') { |
| | |
| | | // }) |
| | | this.$Router.replaceAll({ |
| | | name: 'ToDoList' |
| | | }) |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.message, |
| | | confirmText: '确定', |
| | | showCancel: false, |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | |
| | | console.log(this.announcement1.operator_dictText) |
| | | this.formData.operator = this.announcement1.operator_dictText |
| | | this.formData.num = this.announcement1.equipmentId |
| | | this.formData.remark = this.announcement1.remark |
| | | this.formData.installationPosition_dictText = this.announcement1 |
| | | .installationPosition_dictText |
| | | this.formData.inspectionStatus_dictText = this.announcement1.inspectionStatus_dictText |
| | | this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText |
| | | this.formData.orderNum = this.announcement1.orderNum |
| | | this.formData.inspectionDate = this.announcement1.inspectionDate |
| | | this.formData.inspectionStatus = this.announcement1.inspectionStatus |
| | | this.ScanData.typeName = this.announcement1.confirmDealType |
| | | this.formData.confirmComment = this.announcement1.confirmDealType_dictText |
| | | this.ScanData.handlingSuggestion = this.announcement1.confirmComment |
| | | this.title = this.todoName ?? '详情'; |
| | | if (this.announcement1.standardId !== null) { |
| | | this.standardId = this.announcement1.standardId |
| | | this.getStandardFile() |
| | | } |
| | | if (this.formData.inspectionStatus == 'WAIT_INSPECTION') { |
| | | if (this.flag == 'task') { |
| | | // this.title = '班组长确认' |
| | | this.readonly = true |
| | | this.isShowBtn = false |
| | | } |
| | | } |
| | | if (this.formData.inspectionStatus == 'COMPLETE') { |
| | | if (this.flag == 'task') { |
| | | this.title = '班组长确认' |
| | | // this.title = '班组长确认' |
| | | this.isTouch = true |
| | | this.readonly = true |
| | | this.isShowTeam = true |
| | |
| | | } |
| | | } else if (this.formData.inspectionStatus == 'WAIT_CONFIRM') { |
| | | if (this.flag == 'task') { |
| | | this.title = '点检执行'; |
| | | // this.title = '班组长确认'; |
| | | this.readonly = true |
| | | this.isShowTeam = true |
| | | this.isTouch = true |
| | | this.isShowBtn = false |
| | | } else { |
| | | this.title = '点检开始'; |
| | | // this.title = '点检开始'; |
| | | this.isShowTeam = true |
| | | this.isTouch = false |
| | | this.readonly = true |
| | |
| | | |
| | | } else if (this.formData.inspectionStatus == 'UNDER_INSPECTION') { |
| | | if (this.flag == 'task') { |
| | | this.title = '点检开始'; |
| | | // this.title = '点检开始'; |
| | | this.isShowBtn = false; |
| | | |
| | | } |
| | |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">执行</block> |
| | | <block slot="content">点检执行</block> |
| | | </cu-custom> |
| | | <view class="container"> |
| | | <template> |
| | |
| | | <!-- 关闭按钮 --> |
| | | <text class="close-btn" @tap.stop="showPreview = false">×</text> |
| | | <!-- 图片展示 --> |
| | | <image :src="previewImageSrc" mode="aspectFit" class="preview-image" /> |
| | | <image :src="previewImageSrc" mode="aspectFit" class="preview-image" @error="handleImageError" |
| | | :show-menu-by-longpress="false"/> |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | |
| | | <uni-forms-item :label-width="80" name="orderNum" label="工单号:"> |
| | | <uni-easyinput v-model="formData.orderNum" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" required name="num" label="设备编号:"> |
| | | <uni-forms-item :label-width="80" name="inspectionStatus_dictText" label="工单状态:"> |
| | | <uni-easyinput v-model="formData.inspectionStatus_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" 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="80" name="installationPosition_dictText" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="remark" label="点检日期:"> |
| | | <uni-easyinput v-model="formData.inspectionDate" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="outNum" label="点检人:"> |
| | | <uni-easyinput v-model="formData.operator" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="operatorPhone_dictText" label="点检人电话:"> |
| | | <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="80" name="remark" label="备注:"> |
| | | <uni-easyinput type="textarea" v-model="formData.remark" :disabled="true" /> |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | handleImageError(e) { |
| | | const icon_prefix="/static/"; |
| | | this.previewImageSrc=icon_prefix+"icn_erro.png" |
| | | }, |
| | | select(e) { |
| | | const tempFilePaths = e.tempFilePaths; |
| | | uni.showLoading({ |
| | |
| | | this.formData.num = this.announcement1.equipmentId |
| | | this.formData.remark = this.announcement1.remark |
| | | this.formData.orderNum = this.announcement1.orderNum |
| | | this.formData.operator = this.announcement1.operator |
| | | this.formData.operator = this.announcement1.operator_dictText |
| | | this.formData.inspectionStatus_dictText = this.announcement1.inspectionStatus_dictText |
| | | |
| | | this.formData.installationPosition_dictText = this.announcement1 |
| | | .installationPosition_dictText |
| | | this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText |
| | | this.formData.inspectionDate = this.announcement1.inspectionDate |
| | | this.hasInspectionDateArrived(); |
| | | |
| | |
| | | <uni-forms-item name="num" label="工单号:"> |
| | | <uni-easyinput v-model="formData.equipmentCode" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="inspectionStatus_dictText" label="工单状态:"> |
| | | <uni-easyinput v-model="formData.inspectionStatus_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item required name="num" label="设备编码:"> |
| | | <uni-easyinput v-model="formData.equipmentCode" :disabled="true" /> |
| | | </uni-forms-item> |
| | |
| | | <uni-group top="1"> |
| | | <view class="divider"><text>报修基本信息</text></view> |
| | | <!-- <view class="text-gray margin-bottom-lg">—————————报修基本信息—————————</view> --> |
| | | <uni-forms-item :label-width="100" name="num" label="工单号:"> |
| | | <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 :label-width="100" name="outNum" label="报修图片:"> |
| | | |
| | | <uni-file-picker limit="9" :value="fileList" :image-styles="imageStyles" @select="select" |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" @delete="deletea" |
| | | :readonly="readonly" /> |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" |
| | | @delete="deletea" :readonly="readonly" /> |
| | | </uni-forms-item> |
| | | |
| | | <view class="divider"><text>是否需要领用备件</text></view> |
| | |
| | | </uni-forms-item> |
| | | <uni-forms-item v-show="isShow" :label-width="100" name="outNum" label="维修图片:"> |
| | | <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" @select="select" |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" @delete="deletea" |
| | | :readonly="readonlyRepaier" /> |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" |
| | | @delete="deletea" :readonly="readonlyRepaier" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="outNum" label="维修图片:"> |
| | | <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" @select="select" |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" @delete="deletea" |
| | | :readonly="readonlyRepaier" /> |
| | | :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" |
| | | @delete="deletea" :readonly="readonlyRepaier" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | |
| | | procInstId: '', |
| | | values: '', |
| | | isShow: true, |
| | | flag: '' |
| | | flag: '', |
| | | from: '', |
| | | todoName: '' |
| | | |
| | | } |
| | | }, |
| | |
| | | onLoad(options) { |
| | | const annItem = JSON.parse(decodeURIComponent(options.item)); |
| | | this.flag = options.flag |
| | | console.log(this.flag) |
| | | this.id = annItem.dataId, |
| | | this.taskId = annItem.id, |
| | | this.procInstId = annItem.procInstId, |
| | | this.values = annItem.values, |
| | | 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() { |
| | |
| | | console.log('删除图片', e); |
| | | }, |
| | | ProductionTask() { |
| | | 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.formData.reportStatus === 'WAIT_SPARES' && this.formData.isSpare == 1 && this.flag !== 'task') { |
| | | if (this.ScanData.sparePartDescription == undefined || this.ScanData.sparePartDescription == null || |
| | | this |
| | | .ScanData.sparePartDescription == |
| | |
| | | |
| | | |
| | | |
| | | if (this.formData.reportStatus == 'UNDER_REPAIR' && this.flag !== 'task' && this.formData.isSpare == 0) { |
| | | 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: '维修结果不能为空' |
| | |
| | | } |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | uni.showLoading({ |
| | | mask: true, |
| | | title: "加载中....", |
| | |
| | | }); |
| | | this.$Router.replaceAll({ |
| | | name: 'ToDoList' |
| | | }) |
| | | } else { |
| | | |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.message, |
| | | confirmText: '确定', |
| | | showCancel: false, |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | this.formData.reportStatus = this.announcement1.reportStatus |
| | | |
| | | this.title = this.todoName ?? '详情'; |
| | | if (this.announcement1.reportStatus === 'WAIT_CONFIRM') { |
| | | if (this.flag == 'task') { |
| | | this.title = '维修执行'; |
| | | // this.title = '维修执行'; |
| | | this.isUNDERREPAIR = true |
| | | this.readonly = true |
| | | this.isRuning = true |
| | |
| | | this.readonlyRepaier=true |
| | | this.isShowRepari = false |
| | | } else if (this.flag !== 'task') { |
| | | this.title = '操作工确认'; |
| | | // this.title = '操作工确认'; |
| | | this.isUNDERREPAIR = true |
| | | this.readonly = true |
| | | this.isRuning = true |
| | |
| | | |
| | | } else if (this.announcement1.reportStatus === 'WAIT_SPARES') { |
| | | if (this.flag == 'task' && this.announcement1.isUseSpare == 1) { |
| | | this.title = '是否需要领用备件'; |
| | | // 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; |
| | |
| | | |
| | | } else if (this.announcement1.reportStatus === 'UNDER_REPAIR') { |
| | | if (this.announcement1.isUseSpare == 1 && this.flag == 'task') { |
| | | this.title = '管理员领用备件'; |
| | | // this.title = '管理员领用备件'; |
| | | this.isShowRepari = true; |
| | | this.readonlyRepaier = true |
| | | this.isShowUNDEREPAIR = true; |
| | |
| | | this.isSHowBtn = false; |
| | | |
| | | } else if (this.announcement1.isUseSpare == 1 && this.flag !== 'task') { |
| | | this.title = '维修执行' |
| | | // 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.title = '是否需要领用备件' |
| | | this.isSHowBtn = true |
| | | this.readonly = true |
| | | } |
| | | } else if (this.announcement1.reportStatus === 'COMPLETE') { |
| | | if (this.flag == 'task' && this.announcement1.isUseSpare == 0) { |
| | | this.title = '操作工确认' |
| | | // this.title = '操作工确认' |
| | | this.isUNDERREPAIR = true |
| | | this.isShowUNDEREPAIR = false |
| | | this.readonly = true |
| | |
| | | this.isRepari = false |
| | | this.isSHowBtn = false |
| | | } else if (this.flag == 'task' && this.announcement1.isUseSpare == 1) { |
| | | this.title = '操作工确认' |
| | | // this.title = '操作工确认' |
| | | this.isUNDERREPAIR = true |
| | | this.isShowUNDEREPAIR = true |
| | | this.isRuning = true |
| | |
| | | this.readonly = true |
| | | this.isSHowBtn = false; |
| | | }else if (this.flag !== 'task' && this.announcement1.isUseSpare == 0){ |
| | | this.title = '维修执行' |
| | | // this.title = '维修执行' |
| | | this.isUNDERREPAIR = true |
| | | this.readonlyRepaier=true |
| | | this.readonly = true |
| | |
| | | } |
| | | 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 |
| | |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">周保</block> |
| | | <block slot="content">待周保</block> |
| | | <block slot="right"> |
| | | <view @click="search"> |
| | | <image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" /> |
| | |
| | | return { |
| | | type: 'top', |
| | | scrollLeft: 0, |
| | | |
| | | formData: { |
| | | |
| | | orderNum: '', |
| | | InspectionFlagName: '', |
| | | randomInspectionFlagList: [{ |
| | |
| | | NavBarColor: this.NavBarColor, |
| | | activeColor: '#5277A6', |
| | | url: { |
| | | |
| | | stallList: "/eam/weekMaintenanceOrder/list", |
| | | collect: "eam/weekMaintenanceOrder/collect" |
| | | |
| | | }, |
| | | |
| | | upOption: { |
| | |
| | | decodeURIComponent(options.equipmentId) : |
| | | ''; |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | changehandlingInspectionFlag(e) { |
| | | this.formData.InspectionFlagName = e; |
| | | }, |
| | |
| | | <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList" |
| | | placeholder="请选择" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item name="installationPosition_dictText" :label-width="80" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="maintenanceDate" :label-width="80" label="保养日期:"> |
| | | <uni-easyinput v-model="formData.maintenanceDate" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="80" label="保养人:"> |
| | | <uni-forms-item name="operator_dictText" :label-width="80" label="保养人:"> |
| | | <uni-easyinput v-model="formData.operator_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="80" label="备注"> |
| | | <uni-forms-item name="operatorPhone_dictText" :label-width="80" label="保养人电话:"> |
| | | <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="remark" :label-width="80" label="备注"> |
| | | <uni-easyinput type="textarea" v-model="formData.remark" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="80" label="保养图片:"> |
| | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.subItemName}} |
| | | </view> |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.subItemName!=null && item.subItemName.length>10"> |
| | | {{(item.subItemName).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.subItemName}} |
| | | </view> --> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">保养要求:</view> |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.itemDemand!=null && item.itemDemand.length>10"> |
| | | {{(item.itemDemand).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.itemDemand}} |
| | | </view> --> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.itemDemand}} |
| | | </view> |
| | |
| | | }, |
| | | |
| | | |
| | | // upCallback() { |
| | | // this.$http.get(this.url.stallList, { |
| | | // params: { |
| | | // id: this.id |
| | | // }, |
| | | // }).then(res => { |
| | | // this.announcement1 = res.data.result |
| | | // console.log("url", res) |
| | | // //设置列表数据 |
| | | // if (res.data.success) { |
| | | // console.log("res", res.data.result.equipmentCode) |
| | | // this.formData.num = this.announcement1.equipmentId |
| | | // this.formData.orderNum = this.announcement1.orderNum |
| | | // this.formData.operatorPhone_dictText=this.announcement1.operatorPhone_dictText |
| | | // this.formData.installationPosition_dictText=this.announcement1.installationPosition_dictText |
| | | // this.formData.maintenanceDate = this.announcement1.maintenanceDate |
| | | // this.formData.operator = this.announcement1.operator_dictText |
| | | // this.formData.remark = this.announcement1.remark |
| | | // this.formData.avatar = this.announcement1.imageFiles |
| | | // const imageObjects = JSON.parse(this.formData.avatar); |
| | | // // 提取 filePath 并拼接 IP 和端口 |
| | | // this.imgList = imageObjects.map(imageObj => { |
| | | // return `${this.ipAndPort}${imageObj.filePath}`; |
| | | // }); |
| | | |
| | | // // 根据 imgList 构造 fileLists |
| | | // this.fileLists = this.imgList.map(url => ({ |
| | | // url: url, |
| | | // extname: 'png', |
| | | // name: 'eam' |
| | | // })); |
| | | // } |
| | | // }).catch(() => { |
| | | // //联网失败, 结束加载 |
| | | // }) |
| | | // }, |
| | | |
| | | upCallback() { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | id: this.id |
| | | }, |
| | | } |
| | | }).then(res => { |
| | | this.announcement1 = res.data.result |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data.result.equipmentCode) |
| | | this.formData.num = this.announcement1.equipmentId, |
| | | this.formData.orderNum = this.announcement1.orderNum, |
| | | this.formData.maintenanceDate = this.announcement1.maintenanceDate, |
| | | this.formData.operator = this.announcement1.operator, |
| | | this.formData.remark = this.announcement1.remark, |
| | | this.formData.avatar = this.announcement1.imageFiles |
| | | const imageObjects = JSON.parse(this.formData.avatar); |
| | | // 提取 filePath 并拼接 IP 和端口 |
| | | this.announcement1 = res.data?.result || {}; |
| | | console.log("url", res); |
| | | |
| | | // 判断是否成功获取数据 |
| | | if (res.data.success && this.announcement1) { |
| | | console.log("res", this.announcement1.equipmentCode); |
| | | |
| | | // 定义字段映射关系 |
| | | const fieldMapping = { |
| | | num: 'equipmentId', |
| | | orderNum: 'orderNum', |
| | | operatorPhone_dictText: 'operatorPhone_dictText', |
| | | installationPosition_dictText: 'installationPosition_dictText', |
| | | maintenanceDate: 'maintenanceDate', |
| | | operator_dictText: 'operator_dictText', |
| | | remark: 'remark', |
| | | avatar: 'imageFiles' |
| | | }; |
| | | Object.keys(fieldMapping).forEach(key => { |
| | | const sourceKey = fieldMapping[key]; |
| | | this.formData[key] = this.announcement1[sourceKey] ?? ''; |
| | | }); |
| | | |
| | | // 处理图片列表 |
| | | this.handleImageFiles(this.formData.avatar); |
| | | } |
| | | }).catch(() => { |
| | | // 联网失败, 结束加载 |
| | | console.error('请求失败'); |
| | | }); |
| | | }, |
| | | // 单独处理图片文件的方法 |
| | | handleImageFiles(imageFiles) { |
| | | try { |
| | | const imageObjects = JSON.parse(imageFiles || '[]'); |
| | | this.imgList = imageObjects.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }); |
| | | |
| | | // 根据 imgList 构造 fileLists |
| | | // 构造 fileLists |
| | | this.fileLists = this.imgList.map(url => ({ |
| | | url: url, |
| | | extname: 'png', |
| | | name: 'eam' |
| | | })); |
| | | } catch (e) { |
| | | console.error('解析 imageFiles 出错:', e); |
| | | this.imgList = []; |
| | | this.fileLists = []; |
| | | } |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | /* 检索 */ |
| | | getSera(res) { |
| | |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">点检列表</block> |
| | | <block slot="content">待点检</block> |
| | | <block slot="right"> |
| | | <view @click="search"> |
| | | <image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" /> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">设备名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.equipmentName}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">安装位置:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.installationPosition}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">点检日期:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.inspectionDate}} |
| | |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">点检过期日期:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-red radius text-right"> |
| | | {{item.expirationTime}} |
| | | </view> |
| | | </view> |
| | |
| | | * @param {Object} item |
| | | * 详情页面 |
| | | */ |
| | | onClickProductionTask(item) { |
| | | |
| | | onClickProductionTask(item, flag = 'task', from = 'detils') { |
| | | let url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure'; |
| | | uni.navigateTo({ |
| | | url: '/pages/checkList/checkListDetils/checkListDetils?item=' + |
| | | encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | }) |
| | | |
| | | url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}&flag=${flag}&from=${from}` |
| | | }); |
| | | }, |
| | | // onClickProductionTask(item) { |
| | | |
| | | // uni.navigateTo({ |
| | | // url: '/pages/checkList/checkListDetils/checkListDetils?item=' + |
| | | // encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | // }) |
| | | |
| | | // }, |
| | | |
| | | search() { |
| | | this.$refs.popup.open(); |
| | |
| | | <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList" |
| | | placeholder="请选择" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="inspectionDate" :label-width="80" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="inspectionDate" :label-width="80" label="点检日期:"> |
| | | <uni-easyinput v-model="formData.inspectionDate" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="80" label="点检人:"> |
| | | <uni-easyinput v-model="formData.operator" :disabled="true" /> |
| | | <uni-forms-item name="operator_dictText" :label-width="80" label="点检人:"> |
| | | <uni-easyinput v-model="formData.operator_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="80" label="备注"> |
| | | <uni-forms-item name="operatorPhone_dictText" :label-width="80" label="点检人电话:"> |
| | | <uni-easyinput v-model="formData.operatorPhone_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item name="remark" :label-width="80" label="备注"> |
| | | <uni-easyinput type="textarea" v-model="formData.remark" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="80" label="点检图片:"> |
| | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.itemDemand}} |
| | | </view> |
| | | <!-- <view class="flex-sub bg-white padding-xs margin-xs radius text-right" |
| | | v-if="item.itemDemand!=null && item.itemDemand.length>10"> |
| | | {{(item.itemDemand).toString().substr(0,10)+'...'}} |
| | | </view> |
| | | |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right" v-else> |
| | | {{item.itemDemand}} |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="flex"> |
| | |
| | | }, |
| | | |
| | | |
| | | // ChooseImage() { |
| | | // var that = this; |
| | | // uni.chooseImage({ |
| | | // count: 4, |
| | | // sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | // sourceType: ['album'], // 从相册选择 |
| | | // success: (res) => { |
| | | // // 存储选择的图片路径 |
| | | // that.imgList = res.tempFilePaths; |
| | | // 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]; |
| | | // // 追加到 formData.avatar 中,并用逗号分隔 |
| | | // 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('图片上传失败'); |
| | | // }); |
| | | // } |
| | | // }); |
| | | // }, |
| | | // ViewImage(e) { |
| | | // uni.previewImage({ |
| | | // urls: this.imgList, |
| | | // current: e.currentTarget.dataset.url |
| | | // }); |
| | | // }, |
| | | // 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.num = this.announcement1.equipmentId |
| | | this.formData.installationPosition_dictText=this.announcement1.installationPosition_dictText |
| | | this.formData.orderNum = this.announcement1.orderNum |
| | | this.formData.operator = this.announcement1.operator |
| | | this.formData.operator_dictText = this.announcement1.operator_dictText |
| | | this.formData.operatorPhone_dictText = this.announcement1.operatorPhone_dictText |
| | | this.formData.remark = this.announcement1.remark |
| | | this.formData.inspectionDate = this.announcement1.inspectionDate |
| | | if (this.announcement1.standardId !== null) { |
| | |
| | | <!-- 下载按钮 --> |
| | | <image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)" |
| | | style="height: 25px; width: 25px; margin-right: 10px;"></image> |
| | | <!-- <button size="mini" @click="downloadFile(file)"> |
| | | <view class="icon-download">下载</view> |
| | | </button> --> |
| | | <!-- 删除按钮 --> |
| | | <image v-show="showBtn" src="/static/icon_del.png" @click="deleteFile(index)" |
| | | style="height: 25px; width: 25px;"></image> |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="flex margin-bottom-xs"> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | @click="goReportRepair()">报修</button> |
| | | <button v-if="authIncludes('eam:reportRepair:add')" class="flex-sub cu-btn bg-blue margin-sm lg" |
| | | hover-class="is-hover" @click="goReportRepair()">报修</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | @click="goCheck()">点检</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | |
| | | msg1Title: "" |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('从 store 获取的 auth:', this.$store.getters.getAuth) |
| | | }, |
| | | computed: { |
| | | authList() { |
| | | return this.$store.getters.getAuth || [] |
| | | }, |
| | | top() { |
| | | return this.CustomBar * 2 + 160 |
| | | }, |
| | |
| | | this.getFileList() |
| | | }, |
| | | methods: { |
| | | authIncludes(code) { |
| | | return this.authList.some(auth => auth.action === code) |
| | | }, |
| | | downloadFile(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // downFile(item) { |
| | | // this.$http.download(this.url.downloadFile, { |
| | | // params: { |
| | | // id:item.id |
| | | // }, |
| | | // }).then(res => { |
| | | // if (!res) { |
| | | // this.$message.warning('文件下载失败') |
| | | // return |
| | | // } else { |
| | | // let fileName = item.fileName; |
| | | // if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | // window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | // } else { |
| | | // let url = window.URL.createObjectURL(new Blob([res])); |
| | | // let link = document.createElement('a'); |
| | | // link.style.display = 'none'; |
| | | // link.href = url; |
| | | // link.setAttribute('download', fileName); |
| | | // document.body.appendChild(link); |
| | | // link.click() |
| | | // document.body.removeChild(link) //下载完成移除元素 |
| | | // window.URL.revokeObjectURL(url) //释放掉blob对象 |
| | | // } |
| | | // } |
| | | // }).catch((err) => { |
| | | // uni.showToast({ |
| | | // title: '获取文件列表失败', |
| | | // icon: 'none' |
| | | // }); |
| | | // }); |
| | | // }, |
| | | |
| | | |
| | | getFileList() { |
| | | this.$http.get(this.url.fileList, { |
| | | params: { |
| | |
| | | uni.redirectTo({ |
| | | url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}` |
| | | }); |
| | | |
| | | }, |
| | | /** |
| | | * 点检 |
| | |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | | <view class="file-list margin-sm"> |
| | | <view class="file-item" v-for="(file, index) in this.selectedFiles" :key="index"> |
| | | <view class="file-icon"> |
| | | <!-- 文件图标 --> |
| | | <image src="/static/icon_file.png" style="height: 25px; width: 25px; margin-right: 10px;" |
| | | mode='aspectFit' class="zai-logo "></image> |
| | | |
| | | </view> |
| | | <view class="file-name"> |
| | | <!-- 文件名 --> |
| | | {{file.fileName}} |
| | | </view> |
| | | <view class="file-actions"> |
| | | <!-- 下载按钮 --> |
| | | <image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)" |
| | | style="height: 25px; width: 25px; margin-right: 10px;"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="flex margin-bottom-xs"> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | <button v-if="authIncludes('eam:reportRepair:add')" class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | @click="goReportRepair()">报修</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | @click="goCheck()">点检</button> |
| | |
| | | stringify |
| | | } from "querystring"; |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | import { |
| | | saveAs |
| | | } from 'file-saver'; // 引入 file-saver 库 |
| | | export default { |
| | | mixins: [MescrollMixin], // 使用mixin |
| | | data() { |
| | | return { |
| | | |
| | | formData: {}, |
| | | formData: { |
| | | fileLists: [] |
| | | }, |
| | | fileLists: [], |
| | | NavBarColor: this.NavBarColor, |
| | | url: { |
| | | stallList: "/eam/equipment/queryById" |
| | | stallList: "/eam/equipment/queryById", |
| | | add: 'eam/equipmentAttachment/add', |
| | | upload: "/eam/sysFiles/batch_upload", |
| | | downloadFile: 'eam/equipmentAttachment/downloadFile' |
| | | }, |
| | | id: '', |
| | | upOption: { |
| | |
| | | msg1Title: "" |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | authList() { |
| | | return this.$store.getters.getAuth || [] |
| | | }, |
| | | top() { |
| | | return this.CustomBar * 2 + 160 |
| | | }, |
| | |
| | | onLoad(options) { |
| | | const decodedEquipmentId = decodeURIComponent(options.equipmentId); |
| | | this.id = decodedEquipmentId; |
| | | // const data = options.query; |
| | | // this.id = JSON.parse(data).equipmentId; |
| | | // console.log(data) |
| | | // this.id = options.equipmentId; |
| | | // console.log(options) |
| | | console.log(this.id) |
| | | if (!this.id) { |
| | | uni.showModal({ |
| | |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | authIncludes(code) { |
| | | return this.authList.some(auth => auth.action === code) |
| | | }, |
| | | downloadFile(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要下载吗', |
| | | cancelText: '取消', |
| | | confirmText: '确认', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | this.downFile(item) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | |
| | | downFile(item) { |
| | | this.$http.download(this.url.downloadFile, { |
| | | params: { |
| | | id: item.id |
| | | }, |
| | | responseType: 'blob' // 确保响应类型为 blob |
| | | }).then(response => { |
| | | console.log('Response:', response); // 查看完整响应结构 |
| | | |
| | | // 获取 tempFilePath(Blob URL) |
| | | const tempFilePath = response.tempFilePath; |
| | | |
| | | if (!tempFilePath) { |
| | | uni.showToast({ |
| | | title: '文件下载失败', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let fileName = item.fileName; |
| | | |
| | | // 创建 <a> 标签并触发下载 |
| | | const link = document.createElement('a'); |
| | | link.href = tempFilePath; |
| | | link.setAttribute('download', fileName); |
| | | link.style.display = 'none'; |
| | | |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | |
| | | // 清理资源 |
| | | document.body.removeChild(link); |
| | | |
| | | }).catch(err => { |
| | | console.error('Download error:', err); |
| | | uni.showToast({ |
| | | title: '文件下载失败', |
| | | icon: 'none' |
| | | }); |
| | | }); |
| | | }, |
| | | getFileList() { |
| | | this.$http.get(this.url.fileList, { |
| | | params: { |
| | | equipmentId: this.id, |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | column: 'createTime', |
| | | order: 'desc' |
| | | }, |
| | | }).then(res => { |
| | | if (res.data.success) { |
| | | this.selectedFiles = res.data.result.records || []; |
| | | |
| | | } |
| | | }).catch(() => { |
| | | uni.showToast({ |
| | | title: '获取文件列表失败', |
| | | icon: 'none' |
| | | }); |
| | | }); |
| | | }, |
| | | uploadFail(e) { |
| | | console.log('上传失败:', e) |
| | | }, |
| | | |
| | | |
| | | |
| | | onFileSelect(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 serverFile = uploadRes.data.result[0]; |
| | | console.log(serverFile); |
| | | // 提取fileSuffix并拼接 |
| | | if (serverFile.fileSuffix && serverFile.fileName && !serverFile |
| | | .fileName.includes('.')) { |
| | | serverFile.fileName += '.' + serverFile.fileSuffix; |
| | | } |
| | | this.fileLists = []; |
| | | // 防止重复添加(根据 id 或 fileName 判断) |
| | | if (!this.fileLists.some(file => file.id === serverFile.id)) { |
| | | this.fileLists.push(serverFile); |
| | | } |
| | | resolve(); |
| | | }) |
| | | .catch(err => { |
| | | console.error(`文件 ${index + 1} 上传失败`, err); |
| | | uni.showToast({ |
| | | title: `第 ${index + 1} 个文件上传失败`, |
| | | icon: 'none' |
| | | }); |
| | | reject(err); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | Promise.all(uploadPromises) |
| | | .then(() => { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '全部上传成功,正在提交...' |
| | | }); |
| | | this.submitFileList(); // 自动提交所有文件 |
| | | }) |
| | | .catch(() => { |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '部分上传失败', |
| | | icon: 'none' |
| | | }); |
| | | }); |
| | | }, |
| | | // 文件删除回调 |
| | | onFileDelete(e) { |
| | | console.log('删除文件:', e.index); |
| | | }, |
| | | |
| | | // 删除单个文件 |
| | | deleteFile(index) { |
| | | this.fileLists.splice(index, 1); |
| | | }, |
| | | |
| | | |
| | | submitFileList() { |
| | | if (!this.fileLists.length) { |
| | | uni.showToast({ |
| | | title: '没有可提交的文件', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | console.log(this.fileLists) |
| | | this.$http.post(this.url.add, { |
| | | equipmentId: this.id, |
| | | fileList: this.fileLists |
| | | }).then(res => { |
| | | if (res.data.success) { |
| | | uni.showToast({ |
| | | title: '提交成功' |
| | | }); |
| | | this.getFileList(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '提交失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '提交异常', |
| | | icon: 'none' |
| | | }); |
| | | console.error('提交失败:', err); |
| | | }); |
| | | }, |
| | | goHome() { |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | |
| | | * 报修 |
| | | */ |
| | | goReportRepair() { |
| | | console.log('getSera 方法被调用'); |
| | | uni.redirectTo({ |
| | | url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}` |
| | | }); |
| | |
| | | taskCountBySelf() { |
| | | let token = uni.getStorageSync(ACCESS_TOKEN) |
| | | this.$http.get(this.url.countItem).then(res => { |
| | | console.log("res::taskCountBySelf>", res) |
| | | this.toDomsgCount = res.data.result |
| | | }) |
| | | }, |
| | |
| | | if (/wxwork/i.test(navigator.userAgent)) { |
| | | this.env.thirdApp = true |
| | | this.env.wxWork = true |
| | | //this.env.thirdType='wechat_enterprise' |
| | | this.env.thirdType = 'wechat_enterprise' |
| | | } |
| | | // 判断当时是否是钉钉环境 |
| | | if (/dingtalk/i.test(navigator.userAgent)) { |
| | |
| | | doThirdLogin(token) { |
| | | this.ThirdLogin({token: token, thirdType: this.env.thirdType}).then(res => { |
| | | if (res.data.success) { |
| | | uni.showToast({ |
| | | title: '登录', |
| | | icon: 'none', |
| | | duration: 3000, |
| | | content: res |
| | | }); |
| | | this.loginSuccess() |
| | | |
| | | } else { |
| | | this.requestFailed(res) |
| | | } |
| | |
| | | this.$Router.replaceAll({name: 'index'}) |
| | | }, |
| | | requestFailed(err) { |
| | | this.$message.warning("登录失败") |
| | | uni.showToast({ |
| | | title: '登录', |
| | | icon: 'none', |
| | | duration: 3000, |
| | | content: err |
| | | }); |
| | | }, |
| | | goRedirectUrl() { |
| | | let obj = getUrlParams(this.redirectUrl); |
| | |
| | | /** 后台构造oauth2登录地址 */ |
| | | sysOAuth2Login(source) { |
| | | let domainURL = configService.apiUrl; |
| | | let url = `${domainURL}/sys/thirdLogin/oauth2/${source}/login`; |
| | | let url = `http://houjie.xalxzn.com:8866/jeecg-boot/sys/thirdLogin/oauth2/${source}/login`; |
| | | let state = window.location.origin + window.location.search |
| | | url += `?state=${encodeURIComponent(state)}`; |
| | | console.log('sysOAuth2Login====》', url) |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">维修</block> |
| | | <block slot="content">待维修</block> |
| | | <block slot="right"> |
| | | <view @click="search"> |
| | | <image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" /> |
| | | </view> |
| | | </block> |
| | | </cu-custom> |
| | | |
| | | <view style="width: 100%;"> |
| | |
| | | <!-- 基础表单校验 --> |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group title="" top="0"> |
| | | <uni-forms-item name="numbers" label="领料申请单号:"> |
| | | <uni-easyinput type="text" v-model="formData.num" placeholder="请输入领料申请单号检索" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="name" label="领料产品:"> |
| | | <uni-easyinput v-model="formData.partNumNameModel" placeholder="请输入领料产品" /> |
| | | <uni-forms-item name="numbers" label="工单编号:"> |
| | | <uni-easyinput type="text" v-model="formData.num" placeholder="请输入工单编号检索" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">设备编号:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.equipmentId_dictText}} |
| | | {{item.equipmentCode}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">故障简称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.faultName}} |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">设备名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.equipmentName}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">安装位置:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.installationPosition}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">维修状态:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-green radius text-right"> |
| | | {{item.reportStatus_dictText}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | |
| | | {{item.faultStartTime}} |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">操作:</view> |
| | |
| | | */ |
| | | onClickProductionTask(item) { |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils?item=' + |
| | | encodeURIComponent(JSON.stringify(item)) |
| | | // uni.navigateTo({ |
| | | // url: '/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils?item=' + |
| | | // encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | }) |
| | | // }) |
| | | }, |
| | | |
| | | search() { |
| | |
| | | |
| | | resetTask() { |
| | | this.formData.num = '' |
| | | this.formData.partNumNameModel = '' |
| | | this.$refs.popup.close(); |
| | | this.mescroll.resetUpScroll() |
| | | |
| | |
| | | /* 检索 */ |
| | | getSera() { |
| | | this.$refs.popup.close(); |
| | | let keyword = this.TabCur |
| | | |
| | | this.msgList = []; |
| | | |
| | | if (keyword == 0) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*', |
| | | status: 'published' |
| | | repairCode:this.formData.num, |
| | | reportStatus: 'WAIT_REPAIR', |
| | | equipmentId: this.equipmentId || '' |
| | | } |
| | | }).then(res => { |
| | | //联网成功的回调,隐藏下拉刷新和上拉加载的状态; |
| | |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | |
| | | } else if (keyword == 1) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | status: 'training', |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*' |
| | | |
| | | } |
| | | }).then(res => { |
| | | //联网成功的回调,隐藏下拉刷新和上拉加载的状态; |
| | | |
| | | this.announcement1 = res.data.result.records |
| | | this.mescroll.endSuccess(this.announcement1.length); |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data) |
| | | this.msg1Count = res.data.result.total |
| | | this.msg2Title = "通知(" + res.data.result.total + ")"; |
| | | for (let annItem of this.announcement1) { |
| | | this.msgList.push(annItem) |
| | | } |
| | | } |
| | | if (page.num == 1) { |
| | | this.msgList = []; //如果是第一页需手动制空列表 |
| | | this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | } |
| | | |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | |
| | | } else if (keyword == 2) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | status: 'completed', |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*' |
| | | |
| | | } |
| | | }).then(res => { |
| | | //联网成功的回调,隐藏下拉刷新和上拉加载的状态; |
| | | |
| | | this.announcement1 = res.data.result.records |
| | | this.mescroll.endSuccess(this.announcement1.length); |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data) |
| | | this.msg3Count = res.data.result.total |
| | | this.msg1Title = "通知(" + res.data.result.total + ")"; |
| | | for (let annItem of this.announcement1) { |
| | | this.msgList.push(annItem) |
| | | } |
| | | } |
| | | if (page.num == 1) { |
| | | this.msgList = []; //如果是第一页需手动制空列表 |
| | | this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | } |
| | | |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | |
| | | |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | | <!-- <uni-forms-item name="num" :label-width="100" label="工单号:"> |
| | | <!-- <uni-forms-item name="num" :label-width="100" label="工单编号:"> |
| | | <uni-easyinput v-model="formData.repairCode" :disabled="true" /> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item required name="num" :label-width="100" label="设备编号:"> |
| | | <uni-forms-item name="num" :label-width="100" label="设备编号:"> |
| | | <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList" |
| | | placeholder="请选择" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="faultStartTime" :label-width="100" label="故障开始时间:"> |
| | | <uni-easyinput v-model="formData.faultStartTime" :disabled="true" /> |
| | | <uni-forms-item name="equipmentName" :label-width="100" label="设备名称:"> |
| | | <uni-easyinput v-model="formData.equipmentName" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="reportStatus" :label-width="100" label="报修状态:"> |
| | | <uni-forms-item name="installationPosition_dictText" :label-width="100" label="安装位置:"> |
| | | <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="reportStatus" :label-width="100" label="维修状态:"> |
| | | <uni-easyinput v-model="formData.reportStatus" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="faultName" :label-width="100" label="故障简称"> |
| | |
| | | <uni-forms-item name="outNum" :label-width="100" label="故障描述:"> |
| | | <uni-easyinput v-model="formData.faultDescription" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="faultStartTime" :label-width="100" label="故障开始时间:"> |
| | | <uni-easyinput v-model="formData.faultStartTime" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label-width="100" name="repairer_dictText" label="是否停机:"> |
| | | <uni-easyinput v-model="formData.breakdownFlag_dictText" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="remark" :label-width="100" label="备注:"> |
| | | <uni-easyinput v-model="formData.remark" :disabled="true" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="outNum" :label-width="100" label="维修图片:"> |
| | | <uni-forms-item name="outNum" :label-width="100" label="报修图片:"> |
| | | <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" |
| | | :sourceType="sourceType" @select="select" @progress="progress" @success="success" |
| | | @fail="fail" @delete="deletea" :readonly="true" /> |
| | |
| | | uploadUrl: "/sys/common/upload", |
| | | formData: { |
| | | num: '', |
| | | avatar: [] |
| | | avatar: [], |
| | | equipmentName: '', |
| | | installationPosition: '', |
| | | breakdownFlag_dictText: '', |
| | | |
| | | reporter_dictText: '', |
| | | |
| | | faultStartTime: '', |
| | | reportStatus: '', |
| | | faultName: '', |
| | | faultDescription: '', |
| | | remark: '' |
| | | }, |
| | | NavBarColor: this.NavBarColor, |
| | | url: { |
| | |
| | | |
| | | onLoad(options) { |
| | | const annItem = JSON.parse(decodeURIComponent(options.item)); |
| | | this.id = annItem.id |
| | | |
| | | |
| | | this.formData.installationPosition_dictText = annItem.installationPosition |
| | | this.formData.num = annItem.equipmentId |
| | | this.formData.equipmentName = annItem.equipmentName |
| | | this.formData.breakdownFlag_dictText = annItem.breakdownFlag_dictText |
| | | this.formData.faultStartTime = annItem.faultStartTime |
| | | this.formData.reportStatus = annItem.reportStatus_dictText |
| | | this.formData.faultName = annItem.faultName |
| | | this.formData.faultDescription = annItem.faultDescription |
| | | this.formData.remark = annItem.remark |
| | | this.formData.avatar = annItem.imageFiles || '[]'; // 默认空数组字符串 |
| | | try { |
| | | const imageObjects = JSON.parse(this.formData.avatar); |
| | | |
| | | // 确保 imageObjects 是数组类型 |
| | | if (Array.isArray(imageObjects)) { |
| | | this.imgList = imageObjects.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }); |
| | | |
| | | // 构造 fileLists |
| | | this.fileLists = this.imgList.map(url => ({ |
| | | url: url, |
| | | extname: 'png', |
| | | name: 'eam' |
| | | })); |
| | | } else { |
| | | console.warn('imageObjects is not an array:', imageObjects); |
| | | this.imgList = []; |
| | | this.fileLists = []; |
| | | } |
| | | } catch (e) { |
| | | console.error('Failed to parse avatar JSON:', e); |
| | | this.imgList = []; |
| | | this.fileLists = []; |
| | | } |
| | | }, |
| | | created() { |
| | | this.getEquipment(); |
| | |
| | | changeEquipmentList(e) { |
| | | this.formData.num = e; |
| | | }, |
| | | upCallback() { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | id: this.id |
| | | }, |
| | | // upCallback() { |
| | | // this.$http.get(this.url.stallList, { |
| | | // params: { |
| | | // id: this.id |
| | | // }, |
| | | |
| | | }).then(res => { |
| | | this.announcement1 = res.data.result |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data.result) |
| | | this.formData.repairCode = this.announcement1.repairCode |
| | | this.formData.num = this.announcement1.equipmentId |
| | | this.formData.faultStartTime = this.announcement1.faultStartTime |
| | | this.formData.reportStatus = this.announcement1.reportStatus_dictText |
| | | this.formData.faultName = this.announcement1.faultName |
| | | this.formData.faultDescription = this.announcement1.faultDescription |
| | | this.formData.remark = this.announcement1.remark |
| | | this.formData.avatar = this.announcement1.imageFiles |
| | | this.imgList = JSON.parse(this.formData.avatar) |
| | | const imageObjects = JSON.parse(this.formData.avatar); |
| | | // 假设 imgList 是已有的图片地址数组 |
| | | this.imgList = imageObjects.map(imageObj => { |
| | | return `${this.ipAndPort}${imageObj.filePath}`; |
| | | }); |
| | | // }).then(res => { |
| | | // this.announcement1 = res.data.result |
| | | // console.log("url", res) |
| | | // //设置列表数据 |
| | | // if (res.data.success) { |
| | | // console.log("res", res.data.result) |
| | | // this.formData.repairCode = this.announcement1.repairCode |
| | | // this.formData.installationPosition_dictText=this.announcement1.installationPosition_dictText |
| | | // this.formData.num = this.announcement1.equipmentId |
| | | // 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.reportStatus = this.announcement1.reportStatus_dictText |
| | | // this.formData.faultName = this.announcement1.faultName |
| | | // this.formData.faultDescription = this.announcement1.faultDescription |
| | | // this.formData.remark = this.announcement1.remark |
| | | // this.formData.avatar = this.announcement1.imageFiles |
| | | // this.imgList = JSON.parse(this.formData.avatar) |
| | | // const imageObjects = JSON.parse(this.formData.avatar); |
| | | // // 假设 imgList 是已有的图片地址数组 |
| | | // this.imgList = imageObjects.map(imageObj => { |
| | | // return `${this.ipAndPort}${imageObj.filePath}`; |
| | | // }); |
| | | |
| | | // 根据 imgList 构造 fileLists |
| | | this.fileLists = this.imgList.map(url => ({ |
| | | url: url, |
| | | extname: 'png', |
| | | name: 'eam' |
| | | })); |
| | | } |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | }) |
| | | }, |
| | | // // 根据 imgList 构造 fileLists |
| | | // this.fileLists = this.imgList.map(url => ({ |
| | | // url: url, |
| | | // extname: 'png', |
| | | // name: 'eam' |
| | | // })); |
| | | // } |
| | | // }).catch(() => { |
| | | // //联网失败, 结束加载 |
| | | // }) |
| | | // }, |
| | | |
| | | getEquipment() { |
| | | this.$http.get(this.url.getEquipmentList, { |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <view v-if="authIncludes('eam:reportRepair:add')" class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">新增-报修</block> |
| | |
| | | |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group top="1"> |
| | | <!-- <uni-forms-item required name="num" label="设备编号:"> |
| | | <uni-data-select v-model="formData.num" :localdata="equipmentList" @change="changeEquipmentList" |
| | | placeholder="请选择" /> |
| | | </uni-forms-item> --> |
| | | |
| | | <uni-forms-item required :label-width="100" name="num" label="设备编号:"> |
| | | <uni-easyinput v-model=" formData.numSear" placeholder="请选择" :disabled="true" suffixIcon="search" |
| | | @iconClick="OnenterpriseId()" /> |
| | |
| | | <uni-easyinput v-model="formData.faultType" :disabled='true' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item required :label-width="100" name="faultDescription" label="故障描述:"> |
| | | <uni-easyinput v-model="formData.faultDescription" :disabled='true' /> |
| | | <uni-easyinput v-model="formData.faultDescription" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item required name="name" :label-width="100" label="是否停机:"> |
| | | <uni-data-select v-model="formData.breakdownFlag" :localdata="isTrueList" @change="changeisTrueList" |
| | |
| | | |
| | | |
| | | </view> |
| | | <view v-else class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">新增-报修</block> |
| | | </cu-custom> |
| | | |
| | | <view class="padding flex flex-direction"> |
| | | 当前用户没有操作权限 |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | equipmentList: [], |
| | | isTrueList: [{ |
| | | text: "是", |
| | | value: "0" |
| | | value: 0 |
| | | }, |
| | | { |
| | | text: "否", |
| | | value: "1" |
| | | value: 1 |
| | | } |
| | | ], |
| | | type: 'top', |
| | |
| | | faultNameList: [], |
| | | faultName: '', |
| | | faultType: '', |
| | | breakdownFlag: '1', |
| | | breakdownFlag: 1, |
| | | loadTime: Date.now(), |
| | | faultDescription: '' |
| | | }, |
| | |
| | | AuthLsit:[] |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('从 store 获取的 auth:', this.$store.getters.getAuth) |
| | | }, |
| | | computed: { |
| | | authList() { |
| | | return this.$store.getters.getAuth || [] |
| | | }, |
| | | top() { |
| | | return this.CustomBar * 2 + 130 |
| | | }, |
| | |
| | | this.getfaultReasonList(); |
| | | }, |
| | | methods: { |
| | | authIncludes(code) { |
| | | return this.authList.some(auth => auth.action === code) |
| | | }, |
| | | getSera() { |
| | | //联网加载数据 |
| | | this.$http.get(this.url.part, { |
| | |
| | | }, |
| | | |
| | | changeisTrueList(e) { |
| | | console.log(e) |
| | | this.formData.breakdownFlag = e; |
| | | }, |
| | | select(e) { |
| | |
| | | console.log('删除图片', e); |
| | | }, |
| | | ProductionTask() { |
| | | if (this.formData.num == 0 || this.formData.num == undefined) { |
| | | console.log(this.formData.num) |
| | | |
| | | |
| | | if (this.formData.num === undefined || this.formData.num === null || this.formData.num === '') { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: '设备编号为空!', |
| | | duration: 2000 |
| | | }); |
| | | return false |
| | | return false; |
| | | } |
| | | |
| | | |
| | | if (this.formData.faultName == 0 || this.formData.faultName == undefined) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | |
| | | }); |
| | | return false |
| | | } |
| | | if (this.formData.breakdownFlag == 0 || this.formData.breakdownFlag == undefined) { |
| | | if (this.formData.faultDescription == 0 || this.formData.faultDescription == undefined) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: '故障描述为空!', |
| | | duration: 2000 |
| | | }); |
| | | return false |
| | | } |
| | | |
| | | if (this.formData.breakdownFlag === undefined || this.formData.breakdownFlag === null) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: '是否停机为空!', |
| | | duration: 2000 |
| | | }); |
| | | return false |
| | | return false; |
| | | } |
| | | |
| | | // 请求开始 增加遮罩层 |
| | | uni.showLoading({ |
| | | mask: true, |
| | |
| | | duration: 2000 |
| | | }); |
| | | console.log(this.equipmentId) |
| | | // uni.reLaunch({ |
| | | // url: `/pages/reportRepair/reportRepairList/reportRepairList?equipmentId=${this.equipmentId}` |
| | | // }) |
| | | uni.reLaunch({ |
| | | url: `/pages/reportRepair/reportRepairList/reportRepairList?equipmentId=${this.equipmentId}` |
| | | url: '/pages/index/index' |
| | | }) |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | icon: "error", |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; |
| | | import configService from '@/common/service/config.service.js' |
| | | import { |
| | |
| | | this.formData.breakdownFlag_dictText = this.announcement1.breakdownFlag_dictText |
| | | this.formData.reportStatus_dictText=this.announcement1.reportStatus_dictText |
| | | // this.formData.installationPosition=this.announcement1.installationPosition |
| | | this.formData.faultType=this.announcement1.faultType |
| | | this.formData.faultType=this.announcement1.faultType_dictText |
| | | this.formData.avatar = this.announcement1.imageFiles |
| | | const imageObjects = JSON.parse(this.formData.avatar); |
| | | // 提取 filePath 并拼接 IP 和端口 |
| | |
| | | <uni-data-select v-model="formData.reportStatus" :localdata="reportStatusList" |
| | | @change="changetypeList" placeholder="请选择报修状态" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="name" label="领料产品:"> |
| | | <uni-easyinput v-model="formData.partNumNameModel" placeholder="请输入领料产品" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | | <view class="flex"> |
| | |
| | | scrollLeft: 0, |
| | | formData: { |
| | | reportStatus: '' |
| | | |
| | | }, |
| | | reportStatusList: [], |
| | | NavBarColor: this.NavBarColor, |
| | |
| | | |
| | | |
| | | resetTask() { |
| | | this.formData.num = '' |
| | | this.formData.partNumNameModel = '' |
| | | this.$refs.popup.close(); |
| | | this.mescroll.resetUpScroll() |
| | | |
| | |
| | | hasNavigated: false // 标记是否已经跳转 |
| | | }; |
| | | }, |
| | | // mounted() { |
| | | // window.addEventListener('hashchange', this.handleHashChange); |
| | | // // 初始解析 hash |
| | | // this.handleHashChange(); |
| | | // }, |
| | | // beforeDestroy() { |
| | | // window.removeEventListener('hashchange', this.handleHashChange); |
| | | // }, |
| | | |
| | | |
| | | methods: { |
| | | // handleHashChange() { |
| | | // if (this.hasNavigated) { |
| | | // console.log('Already navigated, skipping hash change handling'); |
| | | // return; |
| | | // } |
| | | |
| | | // const hash = window.location.hash; |
| | | // console.log('Hash changed:', hash); // 添加日志 |
| | | // if (!hash || hash.length === 0) { |
| | | // console.warn('Hash is empty or undefined'); |
| | | // return; |
| | | // } |
| | | // const params = new URLSearchParams(hash.split('?')[1]); |
| | | // const equipmentId = params.get('equipmentId'); |
| | | // console.log('Parsed equipmentId:', equipmentId); // 添加日志 |
| | | // if (equipmentId) { |
| | | // this.navigateToDeviceDetails(equipmentId); |
| | | // } else { |
| | | // console.warn('No equipmentId found in hash'); |
| | | // } |
| | | // }, |
| | | navigateToDeviceDetails(equipmentId) { |
| | | this.hasNavigated = true; // 标记已经跳转 |
| | | uni.navigateTo({ |
| | |
| | | commit |
| | | }, param) { |
| | | return new Promise((resolve, reject) => { |
| | | api.thirdLogin(param.token, param.thirdType, param.tenantId).then(response => { |
| | | api.thirdLogin(param.token, param.thirdType).then(response => { |
| | | if (response.data.code == '200') { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |