821 lines
25 KiB
Vue
Executable File
821 lines
25 KiB
Vue
Executable File
<template>
|
||
<view class="page">
|
||
<view class="detail-top-class">
|
||
<view class="detail-top-title-class">点检项目</view>
|
||
<view :class="[currentIndex==0?'view-next-disable-class':'view-next-class']" @tap="preBtnClick()">上一项</view>
|
||
<view style="flex-grow: 0; flex-shrink: 0; width: 20px; text-align: center; color: #E5E5E5;">|</view>
|
||
<view :class="[currentIndex==(taskItem.SubItem.length-1)?'view-next-disable-class':'view-next-class']" @tap="nextBtnClick()">下一项</view>
|
||
</view>
|
||
<view class="info-body">
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">单据编号:</text>
|
||
<text class="detail-row-context-class">{{taskItem.FBILLNO}}</text>
|
||
</view>
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">设备名称:</text>
|
||
<text class="detail-row-context-class">{{taskItem.SubItem[currentIndex].FEQUIPNAME}}</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">部件名称:</text>
|
||
<text class="detail-row-context-class">{{taskItem.SubItem[currentIndex].FPARTNAME}}</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">点检内容:</text>
|
||
<text class="detail-row-context-class">{{taskItem.SubItem[currentIndex].FCONTENT}}</text>
|
||
</view>
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">参数范围:</text>
|
||
<text class="detail-row-context-class">{{taskItem.SubItem[currentIndex].FRANGE}}</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class" style="margin-bottom: 0;">
|
||
<text class="detail-row-title-class">分析方法:</text>
|
||
<!-- <xfl-select :list="analysisArray" :clearable="false" :isCanInput="false" v-if="taskItem.isEditable"
|
||
@change="analysisChange" :defaultSelectText="FAnalysisWayNameDefaultSelectText"
|
||
class="detail-row-xfl-class" ref="analysisArrayRef" :style_Container="xlfStyleContainer"/> -->
|
||
<text class="detail-row-context-class">
|
||
{{taskItem.SubItem[currentIndex].FANALYSISWAY==1?'定性分析':'定量分析'}}
|
||
</text>
|
||
</view>
|
||
</view>
|
||
<view class="info-title">检测结果</view>
|
||
<view class="info-body">
|
||
<view class="detail-row-class" v-if="taskItem.SubItem[currentIndex].FANALYSISWAY==1">
|
||
<text class="detail-row-title-class">检验值</text>
|
||
<input class="detail-row-input-class" type="number" v-if="taskItem.isEditable"
|
||
v-model="taskItem.SubItem[currentIndex].FTESTVALUE" @input="onKeyInput"/>
|
||
<text class="detail-row-context-class" v-if="!taskItem.isEditable">
|
||
{{taskItem.SubItem[currentIndex].FTESTVALUE}}
|
||
</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class" v-if="taskItem.SubItem[currentIndex].FANALYSISWAY==2">
|
||
<text class="detail-row-title-class">检验值</text>
|
||
<input class="detail-row-input-class" type="number" v-if="taskItem.isEditable"
|
||
v-model="taskItem.SubItem[currentIndex].FTESTVALUE" @input="onKeyInput"/>
|
||
<text class="detail-row-context-class" v-if="!taskItem.isEditable">
|
||
{{taskItem.SubItem[currentIndex].FTESTVALUE}}
|
||
</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class" v-if="taskItem.SubItem[currentIndex].FANALYSISWAY==2">
|
||
<text class="detail-row-title-class">目 标 值:</text>
|
||
<!-- <input class="detail-row-input-class" type="number" v-if="taskItem.isEditable"
|
||
v-model="taskItem.SubItem[currentIndex].FValue" @input="onKeyInput"/> -->
|
||
<text class="detail-row-context-class">
|
||
{{taskItem.SubItem[currentIndex].FVALUE}}
|
||
</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class" v-if="taskItem.SubItem[currentIndex].FANALYSISWAY==2 && taskItem.FISSHOWLIMIT">
|
||
<text class="detail-row-title-class">下 限 值:</text>
|
||
<!-- <input class="detail-row-input-class" type="number" v-if="taskItem.isEditable"
|
||
v-model="taskItem.SubItem[currentIndex].FLwerLimit" @input="onKeyInput"/> -->
|
||
<text class="detail-row-context-class">
|
||
{{taskItem.SubItem[currentIndex].FLWERLIMIT}}
|
||
</text>
|
||
</view>
|
||
|
||
<view class="detail-row-class" v-if="taskItem.SubItem[currentIndex].FANALYSISWAY==2 && taskItem.FISSHOWLIMIT">
|
||
<text class="detail-row-title-class">上 限 值:</text>
|
||
<!-- <input class="detail-row-input-class" type="number" v-if="taskItem.isEditable"
|
||
v-model="taskItem.SubItem[currentIndex].FUpperLimit" @input="onKeyInput"/> -->
|
||
<text class="detail-row-context-class">
|
||
{{taskItem.SubItem[currentIndex].FUPPERLIMIT}}
|
||
</text>
|
||
</view>
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">是否停机</text>
|
||
<view class="detail-row-check-class">
|
||
<checkbox value="cb" :disabled="!taskItem.isEditable" :checked="taskItem.SubItem[currentIndex].FISSTOPMACHINE" @click="cbStopMachine"
|
||
style="transform:scale(0.7);"/>是
|
||
<checkbox value="cb" :disabled="!taskItem.isEditable" :checked="!taskItem.SubItem[currentIndex].FISSTOPMACHINE" @click="cbNoneStopMachine"
|
||
style="margin-left: 160rpx;transform:scale(0.7);"/>否
|
||
</view>
|
||
</view>
|
||
<view class="detail-row-class">
|
||
<text class="detail-row-title-class">检测结果</text>
|
||
<view class="detail-row-check-class">
|
||
<checkbox value="cb" :disabled="!taskItem.isEditable" :checked="taskItem.SubItem[currentIndex].FTESTRESULT == 1" @click="cbClickQualified"
|
||
style="transform:scale(0.7);"/>合格
|
||
<checkbox value="cb" :disabled="!taskItem.isEditable" :checked="taskItem.SubItem[currentIndex].FTESTRESULT == 2" @click="cbClickUnqualified"
|
||
style="margin-left: 132rpx;transform:scale(0.7);"/>不合格
|
||
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="info-title">异常信息</view>
|
||
<view class="info-body" style="padding: 0 0;">
|
||
<textarea placeholder="输入异常信息" placeholder-class="text-area-holder" class="text-area"
|
||
v-model="taskItem.SubItem[currentIndex].FNOTE" @input="onKeyInput" :disabled="!taskItem.isEditable"></textarea>
|
||
</view>
|
||
<view class="info-title">图片上传<span>仅限jpg、png格式</span></view>
|
||
<view class="info-body">
|
||
|
||
<view class="detail-row-class">
|
||
<imgUpload :imgArr="imgArray" imgCount="1" ref="imgUpload" :clickEnable="clickEnable" @del="updateImag" :controlCarmalFlag="cameraType"></imgUpload>
|
||
</view>
|
||
</view>
|
||
|
||
<view style="height: 80rpx; flex-shrink: 0; flex-grow: 0;"></view>
|
||
<view class="detail-btn-row-class">
|
||
<button @tap="saveBtnClick()" v-show="taskItem.isEditable">保存</button>
|
||
</view>
|
||
<opsoft-dialog-notice
|
||
:dialogNoticeShow="showDialog"
|
||
:dialogNoticeType="dialogNoticeType"
|
||
:dialogNoticeTitle="dialogNoticeTitle"
|
||
:dialogNoticeContent="dialogNoticeContent"
|
||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||
>
|
||
</opsoft-dialog-notice>
|
||
<opsoft-dialog
|
||
@dialogCancelClick="dialogCancelClick"
|
||
@dialogConfirmClick="dialogConfirmClick"
|
||
:dialogContent="dialogContent"
|
||
:dialogTitle="dialogTitle"
|
||
:dialogShow="dialogShow"
|
||
></opsoft-dialog>
|
||
</view>
|
||
</template>
|
||
<script>
|
||
import xflSelect from '../../../components/xfl-select/xfl-select.vue';
|
||
import imgUpload from '@/components/poiuy-uImgUpload/imgUpload.vue';
|
||
import { pathToBase64, base64ToPath } from '@/js_sdk/mmmm-image-tools/index.js';
|
||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||
import opsoftDialog from '@/components/opsoft-dialog/opsoft-dialog.vue'
|
||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||
import Vue from 'vue';
|
||
import {
|
||
mapState,
|
||
mapMutations
|
||
} from 'vuex';
|
||
var _self;
|
||
|
||
export default {
|
||
data() {
|
||
return {
|
||
dialogNoticeContent:'',
|
||
dialogNoticeTitle:'',
|
||
dialogNoticeType:'',
|
||
showDialog:false,
|
||
|
||
dialogShow:false,
|
||
dialogTitle:'',
|
||
dialogContent:'',
|
||
dialogType:'',
|
||
dialogParams:new Object,
|
||
|
||
FIsShowLimit:false,
|
||
imgArray:new Array(),
|
||
defultInfo:'',
|
||
scrollTop: 0,
|
||
old: {
|
||
scrollTop: 0
|
||
},
|
||
|
||
taskItem: new Object(),
|
||
currentIndex:0,
|
||
backFlag:true,
|
||
analysisArray:[{value:"定性分析", key:1}, {value:"定量分析", key:2}],
|
||
checkArray:[{value:"合格", key:1}, {value:"不合格", key:2}],
|
||
defaultKey:"defaultKey",
|
||
FAnalysisWayNameDefaultSelectText:"",
|
||
FTestResultNameDefaultSelectText:"",
|
||
xlfStyleContainer:"height: 60rpx; line-height: 60rpx",
|
||
clickEnable:false,
|
||
cameraType:0
|
||
}
|
||
},
|
||
|
||
components: {
|
||
xflSelect,
|
||
imgUpload,
|
||
opsoftDialogNotice,
|
||
opsoftDialog
|
||
},
|
||
|
||
onLoad(options) {
|
||
_self = this;
|
||
if (options.item) {
|
||
let item = JSON.parse(options.item);
|
||
_self.taskItem = item;
|
||
_self.taskItem.saveFlag = false;
|
||
_self.clickEnable = _self.taskItem.isEditable;
|
||
_self.currentIndex = _self.taskItem.currentdIndex;
|
||
_self.FIsShowLimit = _self.taskItem.FISSHOWLIMIT;
|
||
let dataKey = _self.defaultKey;
|
||
if (_self.taskItem.FINTERID) {
|
||
dataKey = _self.taskItem.FINTERID;
|
||
}
|
||
if (!_self.taskItem.SubItem) {
|
||
_self.taskItem.SubItem = new Array();
|
||
}
|
||
if (_self.taskItem.isEditable) {
|
||
uni.setStorage({
|
||
key: dataKey,
|
||
data: _self.taskItem,
|
||
success: function (res) {
|
||
},
|
||
});
|
||
}
|
||
|
||
_self.updataPage();
|
||
}
|
||
|
||
let sysParameterCameraType = uni.getStorageSync('getSysParameterCameraType');
|
||
_self.cameraType = parseInt(sysParameterCameraType);
|
||
},
|
||
|
||
onReady() {
|
||
if (!this.taskItem.SubItem[this.currentIndex].FTestResultName || this.taskItem.SubItem[this.currentIndex].FTestResultName.length==0) {
|
||
if(this.$refs.checkArrayRef) {
|
||
this.$refs.checkArrayRef.selectText = "请选择";
|
||
}
|
||
}
|
||
else {
|
||
if (this.$refs.checkArrayRef) {
|
||
this.$refs.checkArrayRef.selectText = this.taskItem.SubItem[this.currentIndex].FTestResultName;
|
||
}
|
||
}
|
||
|
||
if (!this.taskItem.SubItem[this.currentIndex].FAnalysisWayName || this.taskItem.SubItem[this.currentIndex].FAnalysisWayName.length==0) {
|
||
if (this.$refs.analysisArrayRef) {
|
||
this.$refs.analysisArrayRef.selectText = "请选择";
|
||
}
|
||
}
|
||
else {
|
||
if (this.$refs.analysisArrayRef) {
|
||
this.$refs.analysisArrayRef.selectText = this.taskItem.SubItem[this.currentIndex].FAnalysisWayName;
|
||
}
|
||
}
|
||
},
|
||
|
||
onBackPress() {
|
||
if (!_self.taskItem.isEditable) {
|
||
return false;
|
||
}
|
||
|
||
if (!_self.backFlag) {
|
||
return false;
|
||
}
|
||
|
||
if (_self.taskItem.saveFlag) {
|
||
this.dialogProps("请确认是否暂存检验项目数据","tempStorage",'none');
|
||
} else {
|
||
this.backFlag = this.uploadImageCurrent();
|
||
}
|
||
|
||
return this.backFlag;
|
||
},
|
||
|
||
|
||
computed: {
|
||
...mapState(['userInfo']),
|
||
},
|
||
|
||
methods: {
|
||
dialogProps(dialogContent,type,params){
|
||
this.dialogShow = true;
|
||
this.dialogTitle = '提示';
|
||
this.dialogContent = dialogContent;
|
||
this.dialogType = type
|
||
this.dialogParams.params = params
|
||
},
|
||
dialogConfirmClick:function() {
|
||
let _self = this;
|
||
console.log("dialogConfirmClick");
|
||
if(this.dialogType=='tempStorage'){
|
||
_self.backFlag = false;
|
||
_self.taskItem.saveFlag = false;
|
||
|
||
let dataKey = _self.defaultKey;
|
||
if (_self.taskItem.FINTERID) {
|
||
dataKey = _self.taskItem.FINTERID;
|
||
}
|
||
|
||
uni.setStorage({
|
||
key: dataKey,
|
||
data: _self.taskItem,
|
||
success: function (res) {
|
||
uni.showToast({
|
||
title:"保存成功",
|
||
});
|
||
},
|
||
});
|
||
|
||
setTimeout(function(){
|
||
uni.navigateBack({
|
||
delta:1
|
||
});
|
||
}, 2000);
|
||
}
|
||
},
|
||
dialogCancelClick:function() {
|
||
console.log("dialogCancelClick");
|
||
this.dialogShow=false
|
||
if(this.dialogType=='tempStorage'){
|
||
_self.backFlag = false;
|
||
|
||
let dataKey = _self.defaultKey;
|
||
if (_self.taskItem.FINTERID) {
|
||
dataKey = _self.taskItem.FINTERID;
|
||
}
|
||
|
||
uni.removeStorage({
|
||
key:dataKey
|
||
});
|
||
|
||
uni.navigateBack({
|
||
delta:1
|
||
});
|
||
}
|
||
},
|
||
upper: function(e) {
|
||
console.log(e)
|
||
},
|
||
|
||
lower: function(e) {
|
||
console.log(e)
|
||
},
|
||
|
||
scroll: function(e) {
|
||
console.log(e)
|
||
this.old.scrollTop = e.detail.scrollTop
|
||
},
|
||
|
||
goTop: function(e) {
|
||
// 解决view层不同步的问题
|
||
this.scrollTop = this.old.scrollTop
|
||
this.$nextTick(function() {
|
||
this.scrollTop = 0
|
||
});
|
||
|
||
uni.showToast({
|
||
icon:"none",
|
||
title:"纵向滚动 scrollTop 值已被修改为 0"
|
||
});
|
||
},
|
||
|
||
updataPage: function(){
|
||
if(!this.taskItem.SubItem[this.currentIndex]) {
|
||
this.taskItem.SubItem[this.currentIndex] = new Object();
|
||
}
|
||
if(!this.taskItem.SubItem[this.currentIndex].FTESTRESULT ||
|
||
this.taskItem.SubItem[this.currentIndex].FTESTRESULT == 0){
|
||
this.taskItem.SubItem[this.currentIndex].FTESTRESULT = 0;
|
||
this.taskItem.SubItem[this.currentIndex].FTestResultName = "";
|
||
this.FTestResultNameDefaultSelectText = "请选择";
|
||
if(this.$refs.checkArrayRef) {
|
||
this.$refs.checkArrayRef.selectText = "请选择";
|
||
}
|
||
}
|
||
if(this.taskItem.SubItem[this.currentIndex].FTESTRESULT == 1){
|
||
this.taskItem.SubItem[this.currentIndex].FTestResultName = "合格";
|
||
this.FTestResultNameDefaultSelectText = "合格";
|
||
if(this.$refs.checkArrayRef) {
|
||
this.$refs.checkArrayRef.selectText = "合格";
|
||
}
|
||
}
|
||
if(this.taskItem.SubItem[this.currentIndex].FTESTRESULT == 2){
|
||
this.taskItem.SubItem[this.currentIndex].FTestResultName = "不合格";
|
||
this.FTestResultNameDefaultSelectText = "不合格";
|
||
if(this.$refs.checkArrayRef) {
|
||
this.$refs.checkArrayRef.selectText = "不合格";
|
||
}
|
||
}
|
||
|
||
if(!this.taskItem.SubItem[this.currentIndex].FAnalysisWay ||
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWay == 0) {
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWay = 0;
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWayName = "";
|
||
this.FAnalysisWayNameDefaultSelectText = "请选择";
|
||
if(this.$refs.analysisArrayRef) {
|
||
this.$refs.analysisArrayRef.selectText = "请选择";
|
||
}
|
||
}
|
||
if(this.taskItem.SubItem[this.currentIndex].FAnalysisWay == 1) {
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWay = 1;
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWayName = "定性分析";
|
||
this.FAnalysisWayNameDefaultSelectText = "定性分析";
|
||
if(this.$refs.analysisArrayRef) {
|
||
this.$refs.analysisArrayRef.selectText = "定性分析";
|
||
}
|
||
}
|
||
if(this.taskItem.SubItem[this.currentIndex].FAnalysisWay == 2) {
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWay = 2;
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWayName = "定量分析";
|
||
this.FAnalysisWayNameDefaultSelectText = "定量分析";
|
||
if(this.$refs.analysisArrayRef) {
|
||
this.$refs.analysisArrayRef.selectText = "定量分析";
|
||
}
|
||
}
|
||
|
||
this.imgArray = new Array();
|
||
if (this.taskItem.SubItem[this.currentIndex].FIMAGE) {
|
||
this.imgArray.push(this.taskItem.SubItem[this.currentIndex].FIMAGE);
|
||
}
|
||
this.$forceUpdate();
|
||
},
|
||
|
||
nextBtnClick: function(){
|
||
if(this.currentIndex==(this.taskItem.SubItem.length-1)) {
|
||
return false;
|
||
}
|
||
|
||
let imagecheck = _self.uploadImageCurrent();
|
||
if(imagecheck) {
|
||
return ;
|
||
}
|
||
_self.currentIndex++;
|
||
_self.updataPage();
|
||
},
|
||
|
||
preBtnClick: function(){
|
||
if(this.currentIndex==0) {
|
||
return false;
|
||
}
|
||
|
||
let imagecheck = _self.uploadImageCurrent();
|
||
if(imagecheck) {
|
||
return ;
|
||
}
|
||
_self.currentIndex--;
|
||
_self.updataPage();
|
||
},
|
||
|
||
analysisChange:function({newVal, oldVal, index, orignItem}) {
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWay = orignItem.key;
|
||
this.taskItem.SubItem[this.currentIndex].FAnalysisWayName = orignItem.value;
|
||
this.FAnalysisWayNameDefaultSelectText = orignItem.value;
|
||
this.$refs.analysisArrayRef.selectText = orignItem.value;
|
||
this.taskItem.SubItem[this.currentIndex].updateFlag = "Y";
|
||
this.taskItem.saveFlag = true;
|
||
this.$forceUpdate();
|
||
},
|
||
|
||
checkChange: function({newVal, oldVal, index, orignItem}) {
|
||
this.taskItem.SubItem[this.currentIndex].FTestResultName = orignItem.value;
|
||
this.taskItem.SubItem[this.currentIndex].FTESTRESULT = orignItem.key;
|
||
this.FTestResultNameDefaultSelectText = orignItem.value;
|
||
this.$refs.checkArrayRef.selectText = orignItem.value;
|
||
this.taskItem.SubItem[this.currentIndex].updateFlag = "Y";
|
||
this.taskItem.saveFlag = true;
|
||
this.$forceUpdate();
|
||
},
|
||
|
||
onKeyInput: function(e){
|
||
if(!_self.taskItem.isEditable) {
|
||
return;
|
||
}
|
||
console.log(e.target.value);
|
||
let checkValue = e.target.value;
|
||
let upperLimit = this.taskItem.SubItem[this.currentIndex].FUpperLimit;
|
||
let lowerLimit = this.taskItem.SubItem[this.currentIndex].FLwerLimit;
|
||
let check = parseFloat(parseFloat(checkValue).toFixed(6));
|
||
let upper = parseFloat(parseFloat(upperLimit).toFixed(6));
|
||
let lower = parseFloat(parseFloat(lowerLimit).toFixed(6));
|
||
if(this.taskItem.SubItem[this.currentIndex].FAnalysisWay==2){
|
||
if((check>=lower) && (check<=upper)){
|
||
_self.taskItem.SubItem[this.currentIndex].FTESTRESULT = "1";
|
||
|
||
}else{
|
||
_self.taskItem.SubItem[this.currentIndex].FTESTRESULT = "2";
|
||
}
|
||
}
|
||
|
||
|
||
this.taskItem.SubItem[this.currentIndex].updateFlag = "Y";
|
||
this.taskItem.saveFlag = true;
|
||
},
|
||
|
||
saveBtnClick: function(){
|
||
_self = this;
|
||
|
||
let dataKey = _self.defaultKey;
|
||
if (_self.taskItem.FINTERID) {
|
||
dataKey = _self.taskItem.FINTERID;
|
||
}
|
||
let imagecheck = _self.uploadImageCurrent();
|
||
|
||
if (imagecheck) {
|
||
return ;
|
||
}
|
||
|
||
_self.taskItem.saveFlag = false;
|
||
|
||
uni.setStorage({
|
||
key: dataKey,
|
||
data: _self.taskItem,
|
||
success: function (res) {
|
||
uni.showToast({
|
||
title:"保存成功",
|
||
});
|
||
},
|
||
});
|
||
},
|
||
|
||
uploadImageCurrent() {
|
||
let imgCheck = false;
|
||
if (_self.$refs.imgUpload.imgArray.length > 0) {
|
||
let imgIndex = _self.$refs.imgUpload.imgArray[0].indexOf("blob:http");
|
||
if(imgIndex > -1) {
|
||
imgCheck = true;
|
||
}
|
||
}
|
||
if (imgCheck) {
|
||
console.log(_self.$global.globalData,'')
|
||
let url = _self.$global.globalData.requestUrl;
|
||
let fileName = _self.taskItem.SubItem[_self.currentIndex].FDETAILID +"-"+ Date.parse(new Date());
|
||
_self.taskItem.SubItem[_self.currentIndex].imgArray = _self.$refs.imgUpload.imgArray;
|
||
_self.$refs.imgUpload.upload(
|
||
res=>{
|
||
let data = res[0];
|
||
if(data.StatusCode == "200") {
|
||
let imageUrl = data.Data;
|
||
// imageUrl = imageUrl + data.data;
|
||
// imageUrl = imageUrl.replace('"', '');
|
||
// imageUrl = imageUrl.replace('"', '');
|
||
// imageUrl = imageUrl.replace('\\', '');
|
||
// imageUrl = imageUrl.replace('\\', '/');
|
||
this.handleSubmit(imageUrl);
|
||
_self.taskItem.SubItem[_self.currentIndex].imgArray[0] = imageUrl;
|
||
_self.taskItem.SubItem[_self.currentIndex].FPicture = imageUrl;
|
||
_self.taskItem.SubItem[_self.currentIndex].FIMAGE = imageUrl;
|
||
|
||
uni.showToast({
|
||
icon: 'success',
|
||
title: "图片上传成功"
|
||
});
|
||
|
||
_self.taskItem.saveFlag = false;
|
||
_self.taskItem.SubItem[_self.currentIndex].updateFlag = "Y";
|
||
uni.setStorage({
|
||
key: _self.taskItem.FINTERID,
|
||
data: _self.taskItem,
|
||
success: function (res) {
|
||
},
|
||
});
|
||
_self.imgArray = _self.taskItem.SubItem[_self.currentIndex].imgArray;
|
||
_self.updataPage();
|
||
}
|
||
else {
|
||
//用户没有上传图片的返回 code码为400
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: "图片上传失败"
|
||
});
|
||
}
|
||
},
|
||
_self.userInfo, fileName, url);
|
||
}
|
||
return imgCheck;
|
||
},
|
||
|
||
updateImag(imageArray){
|
||
_self.taskItem.SubItem[_self.currentIndex].FPicture = imageArray[0];
|
||
_self.taskItem.SubItem[_self.currentIndex].FIMAGE = imageArray[0];
|
||
_self.taskItem.SubItem[_self.currentIndex].imgArray = imageArray;
|
||
_self.taskItem.saveFlag = true;
|
||
_self.taskItem.SubItem[_self.currentIndex].updateFlag = "Y";
|
||
},
|
||
|
||
cbClickUnqualified(){
|
||
if(!_self.taskItem.isEditable) {
|
||
return;
|
||
}
|
||
|
||
_self.taskItem.SubItem[_self.currentIndex].FTESTRESULT = "2";
|
||
_self.taskItem.SubItem[_self.currentIndex].updateFlag = "Y";
|
||
_self.taskItem.saveFlag = true;
|
||
_self.$forceUpdate();
|
||
},
|
||
|
||
cbClickQualified(){
|
||
if(!_self.taskItem.isEditable) {
|
||
return;
|
||
}
|
||
|
||
_self.taskItem.SubItem[_self.currentIndex].FTESTRESULT = "1";
|
||
_self.taskItem.SubItem[_self.currentIndex].updateFlag = "Y";
|
||
|
||
_self.taskItem.saveFlag = true;
|
||
_self.$forceUpdate();
|
||
},
|
||
cbStopMachine(){
|
||
if(!_self.taskItem.isEditable) {
|
||
return;
|
||
}
|
||
_self.taskItem.SubItem[_self.currentIndex].FISSTOPMACHINE = true;
|
||
if(_self.taskItem.SubItem[_self.currentIndex].FISSTOPMACHINE){
|
||
_self.taskItem.SubItem[_self.currentIndex].FTESTRESULT = "1"
|
||
}
|
||
_self.taskItem.SubItem[_self.currentIndex].updateFlag = "Y";
|
||
_self.taskItem.saveFlag = true;
|
||
_self.$forceUpdate();
|
||
},
|
||
|
||
cbNoneStopMachine(){
|
||
if(!_self.taskItem.isEditable) {
|
||
return;
|
||
}
|
||
_self.taskItem.SubItem[_self.currentIndex].FISSTOPMACHINE = false;
|
||
_self.taskItem.SubItem[_self.currentIndex].updateFlag = "Y";
|
||
_self.taskItem.saveFlag = true;
|
||
_self.$forceUpdate();
|
||
},
|
||
|
||
|
||
},
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
page{background-color: #F9F9F9;}
|
||
.page{
|
||
width: 100%;
|
||
// background-color: #FFFFFF;
|
||
display: flex;
|
||
flex-direction:column;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
.content{
|
||
width: 100%;
|
||
height: 60%;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
}
|
||
.info-title{padding: 20rpx 32rpx;font-size: 28rpx;font-family: PingFangSC, PingFangSC-Regular;font-weight: 400;color: #59595f;}
|
||
span{font-size: 24rpx;font-family: PingFangSC, PingFangSC-Regular;font-weight: 400;color: #cacaca;margin-left: 16rpx;}
|
||
.info-body{margin: 0 32rpx;padding: 32rpx 32rpx;background-color: #FFFFFF;}
|
||
.detail-row-class{
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
margin-bottom: 16rpx;
|
||
}
|
||
.detail-row-title-class{
|
||
width: 140rpx;
|
||
height: 40rpx;
|
||
opacity: 1;
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: rgba(60,60,67,0.60);
|
||
line-height: 40rpx;
|
||
flex-shrink: 0;
|
||
}
|
||
.detail-row-title-class-img{
|
||
width: 140rpx;
|
||
height: 40rpx;
|
||
opacity: 1;
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: #59595f;
|
||
line-height: 40rpx;
|
||
flex-shrink: 0;
|
||
margin-bottom: 32rpx;
|
||
}
|
||
.detail-row-context-class{
|
||
height: 40rpx;
|
||
opacity: 1;
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: rgba(60,60,67,0.85);
|
||
line-height: 40rpx;
|
||
}
|
||
.detail-item-row-title-class{
|
||
font-size: 26rpx;
|
||
font-style: auto;
|
||
color: #707070;
|
||
font-weight: 600;
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
color: #28282B;
|
||
line-height: 70rpx;
|
||
width: 100%;
|
||
word-break: break-all;
|
||
}
|
||
|
||
|
||
.text-area{
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
color: #666666;
|
||
height: 200rpx;
|
||
width: 100%;
|
||
border-radius: 10rpx;
|
||
padding: 20rpx 32rpx;
|
||
}
|
||
.text-area-holder{
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: #cacaca;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
|
||
.detail-row-xfl-class{
|
||
height: 60rpx; line-height: 60rpx; font-size: 26rpx;
|
||
color: #333333;
|
||
margin-top: 10rpx;
|
||
margin-bottom: 10rpx;
|
||
}
|
||
|
||
.detail-row-input-class{
|
||
font-size: 26rpx;
|
||
color: #6B6B6B;
|
||
line-height: 50rpx;
|
||
height: 50rpx;
|
||
width: 100%;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
margin-top: 10rpx;
|
||
margin-bottom: 10rpx;
|
||
padding: 5rpx 20rpx;
|
||
border-radius: 5px;
|
||
border: 1px solid #D8D8D8;
|
||
text-align: end;
|
||
}
|
||
|
||
button{
|
||
bottom: 0px;
|
||
position: fixed;
|
||
width: 100%;
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
background-color: #5778FF;
|
||
font-size: 35rpx;
|
||
font-style: auto;
|
||
color: #FFFFFF;
|
||
border-radius: 0px
|
||
}
|
||
|
||
button::after{
|
||
border: 0px;
|
||
border-radius: 0px
|
||
}
|
||
|
||
.detail-placeholder-class{
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
width: 5rem;
|
||
}
|
||
|
||
.detail-top-title-class {
|
||
width: 140rpx;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
font-size: 32rpx;
|
||
font-family: PingFangSC, PingFangSC-Semibold;
|
||
font-weight: 600;
|
||
text-align: left;
|
||
color: #000000;
|
||
}
|
||
|
||
.detail-top-class {
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
margin: 32rpx 32rpx;
|
||
}
|
||
|
||
.view-next-class{
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
text-align: right;
|
||
color: #0184ff;
|
||
}
|
||
|
||
.view-next-disable-class{
|
||
font-size: 28rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
text-align: right;
|
||
color: #8a8a8e;
|
||
}
|
||
|
||
.detail-row-check-class{
|
||
font-size: 28rpx;
|
||
font-weight: 400;
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
flex-wrap: nowrap;
|
||
align-items: center;
|
||
margin-left: -10rpx;
|
||
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
color: rgba(60,60,67,0.85);
|
||
}
|
||
</style> |