Merge branch 'bjxz-dev' into bjxz-wz

This commit is contained in:
moleier 2024-04-19 09:01:27 +08:00
commit 1f096408d1
9 changed files with 96 additions and 32 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
uni_modules
node_modules
dist
html

View File

@ -67,10 +67,19 @@
<view class="uni-form-label">
司机姓名
</view>
<view class="uni-form-input">
<picker @change="bindPickerChange3" :value="driverNameIndex" :range="colorList"
range-key="locationName">
<view class="uni-input uni-select cl" v-if="driverNameIndex==null">
请选择 <image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
<view class="uni-input uni-select" v-else>{{colorList[driverNameIndex]}}
<image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
</picker>
<!-- <view class="uni-form-input">
<input class="uni-input" placeholder-class="cl" name="driverName" :value="form.driverName"
placeholder="请输入" />
</view>
</view> -->
</view>
<view class="uni-form-item">
<view class="uni-form-label">
@ -112,6 +121,8 @@
colorList: ['蓝色', '绿色', '黄色', '白色', '黑色'],
carTypeList: [],
carTypeIndex: null,
driverNameList: [],
driverNameIndex: null,
form: {
carColor: "",
carNumber: "",
@ -198,6 +209,28 @@
radioChange(e) {
this.form.isBlack = e.target.value
},
//
getDriverNameList() {
var that = this
this.sendRequest({
url: 'xmgl/carType/list',
data: {
projectSn: this.projectDetail.projectSn
},
method: "POST",
success(res) {
that.carTypeList = res.result
if (!that.isAdd) {
for (var i = 0; i < res.result.length; i++) {
if (that.form.carType == res.result[i].id) {
that.carTypeIndex = i;
break;
}
}
}
}
})
},
//
getCarTypeList() {
var that = this
@ -251,6 +284,9 @@
bindPickerChange2: function(e) {
this.carTypeIndex = e.target.value
},
bindPickerChange3: function(e) {
this.carTypeIndex = e.target.value
},
bindDateChange: function(e) {
this.form.eduTime = e.target.value
},

View File

@ -19,7 +19,7 @@
<view class="form-item f-column">
<view class="form-lable">现场照片</view>
<view class="uni-form-input imgBox_wrap">
<view class="addImgBox" @click="uploadImg">
<view class="addImgBox" @click="uploadImg" v-show="formData.imgFileList.length == 0">
<image src="/static/safeMange/upload_image.png" class="icon-add" color="#F56C6C"></image>
</view>
<view class="imgBox" v-show="formData.imgFileList.length>0" v-for="(item,index) in formData.imgFileList" :key="index">

View File

@ -37,7 +37,7 @@
<view class="form-item f-column a-none">
<view class="form-lable">现场照片</view>
<view class="uni-form-input imgBox_wrap">
<view class="addImgBox" @click="uploadImg">
<view class="addImgBox" @click="uploadImg" v-show="formData.imgFileList.length == 0">
<image src="/static/safeMange/upload_image.png" class="icon-add" color="#F56C6C"></image>
</view>
<view class="imgBox" v-show="formData.imgFileList.length>0" v-for="(item,index) in formData.imgFileList" :key="index">

View File

@ -9,7 +9,7 @@
<view class="plan-form">
<view class="form-item b-bottom">
<view class="form-lable"><text class="tag">*</text>责任区域</view>
<input class="from-input" type="text" :value="formData.dutyRegion" @blur="bindInputBlur" placeholder="请输入责任区域" />
<input class="from-input" :maxlength="22" type="text" :value="formData.dutyRegion" @blur="bindInputBlur" placeholder="请输入责任区域" />
</view>
<view class="form-item f-column b-bottom">
<view class="form-lable">进度描述</view>
@ -19,7 +19,7 @@
<view class="form-item f-column">
<view class="form-lable">现场照片</view>
<view class="uni-form-input imgBox_wrap">
<view class="addImgBox" @click="uploadImg">
<view class="addImgBox" @click="uploadImg" v-show="formData.imgFileList.length == 0">
<image src="/static/safeMange/upload_image.png" class="icon-add" color="#F56C6C"></image>
</view>
<view class="imgBox" v-show="formData.imgFileList.length>0" v-for="(item,index) in formData.imgFileList" :key="index">
@ -276,6 +276,7 @@
}
}
.from-input{
width: 57%;
text-align: right;
}
}

View File

@ -155,6 +155,19 @@
// this.listData = res.result.records
// }
this.detailData = res.result
let str = '';
if(res.result.chooseTypeDescribeList){
this.detailData.describeName
res.result.chooseTypeDescribeList.map((item,index) => {
if(index == res.result.chooseTypeDescribeList.length - 1){
str = str + item.describeName
} else {
str = str + item.describeName + ','
}
})
console.log(str,123456789)
this.detailData.describeName = str;
}
console.log(this.detailData)
}
})
@ -198,7 +211,7 @@
uni.removeStorageSync('detailData');
}
uni.navigateTo({
url:'../safeManage/addExamine?type=1&engineeringId='+this.detailId
url:'../safeManage/addExamine?type=1&engineeringId='+this.detailId + '&moduleType=safeCheck'
})
} else if(this.activeIndex == 6){
uni.navigateTo({

View File

@ -97,27 +97,28 @@
uni.previewImage({
urls: [url]
})
}
//#ifdef H5
uni.showToast({
title: '暂不支持预览!',
icon: "none",
duration: 2000
} else{
uni.downloadFile({
url: url,
success: function (res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功');
}
});
}
});
return;
//#endif
uni.downloadFile({
url: url,
success: function (res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功');
}
});
}
});
}
// //#ifdef H5
// uni.showToast({
// title: '',
// icon: "none",
// duration: 2000
// });
// return;
// //#endif
}
}
}

View File

@ -348,6 +348,7 @@
taskId: "",
itemId: "",
base64Image: '',
moduleType: ''
}
},
computed: {
@ -465,6 +466,9 @@
this.taskId = val.taskId
this.itemId = val.itemId
}
if(val.moduleType){
this.moduleType = val.moduleType;
}
console.log(val, '----页面类型')
},
methods: {
@ -689,7 +693,7 @@
// uni.removeStorageSync('dangerData');
// }
uni.navigateTo({
url: './dangerLibrary?type=1&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId
url: './dangerLibrary?type=1&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId + '&moduleType=safeCheck'
})
}
},
@ -947,9 +951,15 @@
uni.showToast({
title: '保存成功'
})
uni.navigateTo({
url: "./safeIndex"
})
if(this.moduleType == 'safeCheck'){
uni.navigateBack({
delta: 3
})
} else {
uni.navigateTo({
url: "./safeIndex"
})
}
}
console.log(res.result)
}

View File

@ -130,6 +130,7 @@
taskId:"",
itemId:"",
engineeringId: "",
moduleType: "",
statusBarHeight: 0,
navList: [],
leftIndex: 0,
@ -174,6 +175,7 @@
this.taskId = val.taskId
this.itemId = val.itemId
this.engineeringId = val.engineeringId
this.moduleType = val.moduleType
},
onShow(val){
@ -248,7 +250,7 @@
val.title = this.navList[this.leftIndex].hiddenDangerName
uni.setStorageSync('dangerData', val);
uni.navigateTo({
url: './addExamine?type='+this.type+'&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId
url: './addExamine?type='+this.type+'&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId + '&moduleType=' + this.moduleType
})
},
previewRule(e){