Merge remote-tracking branch 'origin/yjl_dev' into bjxz-wz

This commit is contained in:
moleier 2024-04-21 09:45:42 +08:00
commit e1594b6262
10 changed files with 91 additions and 42 deletions

View File

@ -65,17 +65,19 @@
<view class="uni-form-item"> <view class="uni-form-item">
<view class="uni-form-label"> <view class="uni-form-label">
司机姓名 <text class="star">*</text>司机姓名
</view>
<view class="uni-form-input">
<picker @change="bindPickerChange3" :value="driverNameIndex" :range="driverNameList"
range-key="workerName">
<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>{{driverNameList[driverNameIndex].workerName}}
<image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
</picker>
</view> </view>
<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"> <!-- <view class="uni-form-input">
<input class="uni-input" placeholder-class="cl" name="driverName" :value="form.driverName" <input class="uni-input" placeholder-class="cl" name="driverName" :value="form.driverName"
placeholder="请输入" /> placeholder="请输入" />
@ -148,9 +150,9 @@
this.isAdd = false this.isAdd = false
this.pageTitle = '编辑车辆' this.pageTitle = '编辑车辆'
this.getDetails(options.id) this.getDetails(options.id)
} else {
this.getCarTypeList()
} }
this.getCarTypeList()
this.getDriverNameList();
}, },
methods: { methods: {
@ -213,17 +215,21 @@
getDriverNameList() { getDriverNameList() {
var that = this var that = this
this.sendRequest({ this.sendRequest({
url: 'xmgl/carType/list', url: 'xmgl/workerInfo/selectWorkerInfoList',
data: { data: {
projectSn: this.projectDetail.projectSn projectSn: this.projectDetail.projectSn,
inserviceType: 1,
pageNo: 1,
pageSize: -1
}, },
method: "POST", method: "POST",
success(res) { success(res) {
that.carTypeList = res.result console.log(res,'车辆数据')
that.driverNameList = res.result.records
if (!that.isAdd) { if (!that.isAdd) {
for (var i = 0; i < res.result.length; i++) { for (var i = 0; i < res.result.records.length; i++) {
if (that.form.carType == res.result[i].id) { if (that.form.driverWorkerId == res.result.records[i].id) {
that.carTypeIndex = i; that.driverNameIndex = i;
break; break;
} }
} }
@ -246,6 +252,7 @@
for (var i = 0; i < res.result.length; i++) { for (var i = 0; i < res.result.length; i++) {
if (that.form.carType == res.result[i].id) { if (that.form.carType == res.result[i].id) {
that.carTypeIndex = i; that.carTypeIndex = i;
console.log(that.carTypeIndex,12346)
break; break;
} }
} }
@ -274,7 +281,6 @@
} else { } else {
that.form.carPhotosUrl = '' that.form.carPhotosUrl = ''
} }
that.getCarTypeList()
} }
}) })
}, },
@ -285,7 +291,7 @@
this.carTypeIndex = e.target.value this.carTypeIndex = e.target.value
}, },
bindPickerChange3: function(e) { bindPickerChange3: function(e) {
this.carTypeIndex = e.target.value this.driverNameIndex = e.target.value
}, },
bindDateChange: function(e) { bindDateChange: function(e) {
this.form.eduTime = e.target.value this.form.eduTime = e.target.value
@ -309,6 +315,13 @@
}) })
return false; return false;
} }
if (this.driverNameIndex == null) {
uni.showToast({
title: '请选择司机姓名',
icon: 'none'
})
return false;
}
if (params.carNumber == '') { if (params.carNumber == '') {
uni.showToast({ uni.showToast({
title: '请输入车牌号', title: '请输入车牌号',
@ -338,7 +351,7 @@
} }
params.carColor = this.colorList[this.selectIndex] params.carColor = this.colorList[this.selectIndex]
params.carType = this.carTypeList[this.carTypeIndex].id params.carType = this.carTypeList[this.carTypeIndex].id
params.driverWorkerId = this.driverNameList[this.driverNameIndex].id
var url = 'xmgl/carInfo/edit' var url = 'xmgl/carInfo/edit'
if (this.isAdd) { if (this.isAdd) {
url = 'xmgl/carInfo/add' url = 'xmgl/carInfo/add'
@ -360,7 +373,7 @@
uni.navigateTo({ uni.navigateTo({
url: './index' url: './index'
}); });
} }
}) })
@ -406,4 +419,4 @@
top: -10px; top: -10px;
} }
} }
</style> </style>

View File

@ -16,7 +16,7 @@
<view class="sum-item" v-for="(itm,idx) in JSON.parse(item.chooseResult)" :key="idx" :style="{'color': colorList[idx]}"> <view class="sum-item" v-for="(itm,idx) in JSON.parse(item.chooseResult)" :key="idx" :style="{'color': colorList[idx]}">
{{itm.name}} {{itm.num ? itm.num:'0'}} {{itm.name}} {{itm.num ? itm.num:'0'}}
</view> </view>
<view class="sum-item">隐患 0</view> <view class="sum-item">隐患 {{item.hiddenDangerNum}}</view>
</view> </view>
</view> </view>
<uni-icons type="arrowright" style="margin-top: 4px;" size="18"></uni-icons> <uni-icons type="arrowright" style="margin-top: 4px;" size="18"></uni-icons>

View File

@ -2,7 +2,7 @@
<view class="control"> <view class="control">
<headers class="fixedheader" :themeType="true" :showBack="true"> <headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName"> <view class="headerName">
<!-- 危大验收--> <!-- 危大验收-->
{{title}} {{title}}
</view> </view>
</headers> </headers>
@ -161,6 +161,12 @@
.uni-list-cell{ .uni-list-cell{
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
height: 80rpx; height: 80rpx;
>view:nth-child(2){
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
} }
} }
} }

View File

@ -125,6 +125,19 @@
// this.listData = res.result.records // this.listData = res.result.records
// } // }
this.detailData = res.result 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) console.log(this.detailData)
} }
}) })

View File

@ -4,7 +4,7 @@
<view class="list-item" v-for="(item,index) in tableData" :key="index"> <view class="list-item" v-for="(item,index) in tableData" :key="index">
<view class="item-title" :class="{'noCheck': item.chooseType == '0'}" @click="showDetail(item)"> <view class="item-title" :class="{'noCheck': item.chooseType == '0'}" @click="showDetail(item)">
<view class="title-left"> <view class="title-left">
{{item.checkItem}} <view>{{item.checkItem}}</view>
</view> </view>
<view class="tag" v-if="item.chooseType == '0'">不检查</view> <view class="tag" v-if="item.chooseType == '0'">不检查</view>
<view v-else> <view v-else>
@ -16,7 +16,7 @@
<view class="item-children" v-for="(item2,index2) in item.children" :key="index2"> <view class="item-children" v-for="(item2,index2) in item.children" :key="index2">
<view class="item-title title2" :class="{'noCheck': item2.chooseType == '0'}"> <view class="item-title title2" :class="{'noCheck': item2.chooseType == '0'}">
<view class="title-left"> <view class="title-left">
{{item2.checkContent}} <view>{{item2.checkContent}}</view>
</view> </view>
<view class="tag" v-if="item2.chooseType == '0'">不检查</view> <view class="tag" v-if="item2.chooseType == '0'">不检查</view>
</view> </view>
@ -24,7 +24,7 @@
<view class="item-detail" v-for="(item3,index3) in item2.children" :key="index3"> <view class="item-detail" v-for="(item3,index3) in item2.children" :key="index3">
<view class="item-title title3" :class="{'noCheck': item3.chooseType == '0'}"> <view class="item-title title3" :class="{'noCheck': item3.chooseType == '0'}">
<view class="title-left"> <view class="title-left">
{{item3.checkDetailContent}} <view>{{item3.checkDetailContent}}</view>
</view> </view>
<view class="tag" v-if="item3.chooseType == '0'">不检查</view> <view class="tag" v-if="item3.chooseType == '0'">不检查</view>
</view> </view>
@ -121,6 +121,13 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
width: 100%;
>view{
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.uni-icons{ .uni-icons{
margin-right: 32rpx; margin-right: 32rpx;
} }

View File

@ -2,7 +2,7 @@
<view class="control"> <view class="control">
<headers class="fixedheader" :themeType="true" :showBack="true"> <headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName"> <view class="headerName">
危大验收 危大验收
</view> </view>
</headers> </headers>
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }"> <view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">

View File

@ -34,8 +34,8 @@
</view> </view>
<uni-icons v-if="item3.imageUrl && item3.imageUrl.split(',').length > 0 && status != 2" class="clos-btn" type="clear" color="#ff4b49" size="12" @click="removeImg(item3)"></uni-icons> <uni-icons v-if="item3.imageUrl && item3.imageUrl.split(',').length > 0 && status != 2" class="clos-btn" type="clear" color="#ff4b49" size="12" @click="removeImg(item3)"></uni-icons>
</view> </view>
<view class="upload-img" v-if="status != 2 && (!item3.imageUrl || item3.imageUrl.split(',').length<2)" @click="uploadImg(item3)"> <view class="upload-img" v-if="status != 2 && (!item3.imageUrl || item3.imageUrl.split(',').length<1)" @click="uploadImg(item3)">
<view > <view>
拍照 拍照
</view> </view>
</view> </view>
@ -209,6 +209,12 @@
let userCheckId = "" let userCheckId = ""
if(this.tableData && this.tableData.length>0){ if(this.tableData && this.tableData.length>0){
userCheckId = this.tableData[0].children[0].children[0].userCheckId userCheckId = this.tableData[0].children[0].children[0].userCheckId
} else {
uni.showToast({
title:'内容为空',
icon: 'none'
})
return;
} }
console.log(userCheckId) console.log(userCheckId)
this.sendRequest({ this.sendRequest({

View File

@ -2,7 +2,7 @@
<view class="control"> <view class="control">
<headers class="fixedheader" :themeType="true" :showBack="true"> <headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName"> <view class="headerName">
<!-- 危大验收--> <!-- 危大验收-->
{{title}} {{title}}
</view> </view>
</headers> </headers>

View File

@ -107,7 +107,7 @@
</view> </view>
<view class="uni-input uni-select" v-else> <view class="uni-input uni-select" v-else>
{{listData[subsectionIndex].subdivisionProjectName||''}} {{listData[subsectionIndex]?listData[subsectionIndex].subdivisionProjectName:''}}
<image class="icon-down" src="/static/icon-down-black.png"></image> <image class="icon-down" src="/static/icon-down-black.png"></image>
</view> </view>
</picker> </picker>
@ -118,11 +118,11 @@
<view class="name"><text class="star"></text>分项工程</view> <view class="name"><text class="star"></text>分项工程</view>
<picker @change="(e)=>checkSubListData(e,2)" :value="subentryIndex" class="picker" :range="subListData" <picker @change="(e)=>checkSubListData(e,2)" :value="subentryIndex" class="picker" :range="subListData"
range-key="subdivisionProjectName"> range-key="subdivisionProjectName">
<view class="uni-input uni-select cl" v-if="subentryIndex==-1"> <view class="uni-input uni-select cl" v-if="subentryIndex==-1 || subListData.length == 0">
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image> 请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
</view> </view>
<view class="uni-input uni-select" v-else> <view class="uni-input uni-select" v-else>
{{ subListData[subentryIndex].subdivisionProjectName || '' }} {{ subListData[subentryIndex]?subListData[subentryIndex].subdivisionProjectName : '' }}
<image class="icon-down" src="/static/icon-down-black.png"></image> <image class="icon-down" src="/static/icon-down-black.png"></image>
</view> </view>
</picker> </picker>

View File

@ -213,7 +213,7 @@
</view> </view>
</view> </view>
<view class="form-item flex f-column a-start" style="height: 100px;"> <view class="form-item flex f-column a-start">
<view class="form-lable"> <view class="form-lable">
<view v-if="addForm.status == 1" style="display: inline;">*</view><text>图片</text> <view v-if="addForm.status == 1" style="display: inline;">*</view><text>图片</text>
</view> </view>
@ -263,11 +263,14 @@
</view> </view>
</template> </template>
</dialogs> </dialogs>
<!-- 隐患区域 --> <!-- 丢到文档流外避免占空间 -->
<tki-tree ref="locationTree" @confirm="(val)=>checkPointBtn(val,1)" idKey='id' :range="checkPointList" <view>
rangeKey="regionName" confirmColor="#4e8af7" :selectParent="true" /> <!-- 隐患区域 -->
<tki-tree ref="locationTree" @confirm="(val)=>checkPointBtn(val,1)" idKey='id' :range="checkPointList"
rangeKey="regionName" confirmColor="#4e8af7" :selectParent="true" />
<canversCom v-if="openImg" @imgUrl="imgUrl" :imgList="imgList"></canversCom> <canversCom v-if="openImg" @imgUrl="imgUrl" :imgList="imgList"></canversCom>
</view>
</view> </view>
</template> </template>
@ -522,7 +525,6 @@
}) })
}, },
imgUrl(val) { imgUrl(val) {
this.openImg = false
this.imgUpload(val) this.imgUpload(val)
this.openImg = true this.openImg = true
}, },
@ -693,7 +695,7 @@
// uni.removeStorageSync('dangerData'); // uni.removeStorageSync('dangerData');
// } // }
uni.navigateTo({ uni.navigateTo({
url: './dangerLibrary?type=1&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId + '&moduleType=safeCheck' url: './dangerLibrary?type=1&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId + '&moduleType=' + this.moduleType
}) })
} }
}, },
@ -1037,6 +1039,8 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.addExamine { .addExamine {
position: relative;
overflow: hidden;
.fixedheader { .fixedheader {
position: fixed; position: fixed;
top: 0; top: 0;