|
@@ -109,12 +109,20 @@
|
|
<div>
|
|
<div>
|
|
<div><b>{{zb.assessTargetName}}</b></div>
|
|
<div><b>{{zb.assessTargetName}}</b></div>
|
|
<!-- 点击打开拍照 -->
|
|
<!-- 点击打开拍照 -->
|
|
- <div @click="openCamera()"><a-icon type="camera" style="font-size: 30px;" /></div>
|
|
|
|
|
|
+ <div @click="openCamera(zbIndex)"><a-icon type="camera" style="font-size: 30px;" /></div>
|
|
</div>
|
|
</div>
|
|
<!-- 拍照图片 -->
|
|
<!-- 拍照图片 -->
|
|
<div class="photos">
|
|
<div class="photos">
|
|
- <div @click="previewImgs('https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png')"><a-avatar :size="40" shape="square" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" /></div>
|
|
|
|
- <div @click="previewImgs('https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png')"><a-avatar :size="40" shape="square" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" /></div>
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-for="(photo,pindex) in zb.taskTargetPhotoVOList"
|
|
|
|
+ :key="photo.id"
|
|
|
|
+ >
|
|
|
|
+ <a-avatar :size="40" shape="square" :src="photo.photoPath" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 评论 -->
|
|
|
|
+ <div class="remarks">
|
|
|
|
+ 评论:{{zb.remarks}}
|
|
</div>
|
|
</div>
|
|
<!-- 评分 -->
|
|
<!-- 评分 -->
|
|
<div>
|
|
<div>
|
|
@@ -150,7 +158,7 @@
|
|
<!-- 评论 -->
|
|
<!-- 评论 -->
|
|
<div class="pz-pinglun">
|
|
<div class="pz-pinglun">
|
|
<div class="remarks">
|
|
<div class="remarks">
|
|
- <a-textarea placeholder="请填写备注内容(选填)" :rows="4" />
|
|
|
|
|
|
+ <a-textarea placeholder="请填写备注内容(选填)" v-model="curZbItem.remarks" :rows="4" />
|
|
</div>
|
|
</div>
|
|
<div class="icons">
|
|
<div class="icons">
|
|
<a-icon class="aicon" type="camera" />
|
|
<a-icon class="aicon" type="camera" />
|
|
@@ -158,18 +166,16 @@
|
|
</div>
|
|
</div>
|
|
<!-- 图片列表 -->
|
|
<!-- 图片列表 -->
|
|
<div class="imglist">
|
|
<div class="imglist">
|
|
- <div>
|
|
|
|
- <img @click="previewImgs('https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png')" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png">
|
|
|
|
- <a-icon class="aicon" type="close" />
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <img @click="previewImgs('https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png')" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png">
|
|
|
|
- <a-icon class="aicon" type="close" />
|
|
|
|
|
|
+ <div v-for="(photo,pindex) in curZbItem.taskTargetPhotoVOList"
|
|
|
|
+ :key="photo.id"
|
|
|
|
+ >
|
|
|
|
+ <img @click="editImgs(photo.photoPath,activeZbIndex,pindex)" :src="photo.photoPath">
|
|
|
|
+ <a-icon @click.stop="delImgs(pindex)" class="aicon" type="close" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 提交 -->
|
|
<!-- 提交 -->
|
|
<div class="f-btns">
|
|
<div class="f-btns">
|
|
- <a-button size="large" type="primary" block> 提交 </a-button>
|
|
|
|
|
|
+ <a-button size="large" @click="saveZbPlImgs" type="primary" block> 提交 </a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a-drawer>
|
|
</a-drawer>
|
|
@@ -199,6 +205,9 @@
|
|
PED: null, // 图片编辑对象
|
|
PED: null, // 图片编辑对象
|
|
hsID: null, // 耗时计时器id
|
|
hsID: null, // 耗时计时器id
|
|
activeIndex:0, // 当前选择的考评项
|
|
activeIndex:0, // 当前选择的考评项
|
|
|
|
+ activeZbIndex:0,//当前编辑的指标index
|
|
|
|
+ activeZbPhoto:0, //当前编辑的指标图片index
|
|
|
|
+ curZbItem: {remarks:'',taskTargetPhotoVOList:[]},// 当前编辑的指标评论图片对象
|
|
// 考评统计
|
|
// 考评统计
|
|
kptj:{
|
|
kptj:{
|
|
haoshi: '0时0分'
|
|
haoshi: '0时0分'
|
|
@@ -311,11 +320,8 @@
|
|
},
|
|
},
|
|
// 耗时计算
|
|
// 耗时计算
|
|
haoshi(){
|
|
haoshi(){
|
|
- let _this = this
|
|
|
|
- // 耗时
|
|
|
|
let s = this.kptj.startTime
|
|
let s = this.kptj.startTime
|
|
- console.log()
|
|
|
|
- _this.kptj.haoshi = moment().diff(s,'hours') + '时' + moment().diff(s,'minutes')%60 + '分'
|
|
|
|
|
|
+ this.kptj.haoshi = moment().diff(s,'hours') + '时' + moment().diff(s,'minutes')%60 + '分'
|
|
},
|
|
},
|
|
// 发送消息给app 页面
|
|
// 发送消息给app 页面
|
|
sendMsg (action,msg) {
|
|
sendMsg (action,msg) {
|
|
@@ -336,18 +342,31 @@
|
|
this.sendMsg('kzyt','控制云台' + cmd[index - 1])
|
|
this.sendMsg('kzyt','控制云台' + cmd[index - 1])
|
|
},
|
|
},
|
|
// 打开抓拍照片弹框
|
|
// 打开抓拍照片弹框
|
|
- openCamera(){
|
|
|
|
|
|
+ openCamera(index){
|
|
this.showPz = true
|
|
this.showPz = true
|
|
|
|
+ this.activeZbIndex = index
|
|
this.sendMsg('getWinStatus',JSON.stringify({key:'showPz',val: true}))
|
|
this.sendMsg('getWinStatus',JSON.stringify({key:'showPz',val: true}))
|
|
|
|
+ // 当前查看的指标对象
|
|
|
|
+ let obj = this.zbItem[this.activeZbIndex]
|
|
|
|
+ this.curZbItem = JSON.parse(JSON.stringify(obj))
|
|
},
|
|
},
|
|
// 关闭抓拍弹框
|
|
// 关闭抓拍弹框
|
|
onClosePz(){
|
|
onClosePz(){
|
|
this.showPz = false
|
|
this.showPz = false
|
|
this.sendMsg('getWinStatus',JSON.stringify({key:'showPz',val: false}))
|
|
this.sendMsg('getWinStatus',JSON.stringify({key:'showPz',val: false}))
|
|
},
|
|
},
|
|
|
|
+ // 删除图片
|
|
|
|
+ delImgs(index){
|
|
|
|
+ this.sendMsg('delImgs',index)
|
|
|
|
+ },
|
|
|
|
+ delImgsSuccess(index){
|
|
|
|
+ this.curZbItem.taskTargetPhotoVOList.splice(index,1)
|
|
|
|
+ },
|
|
// 预览编辑图片
|
|
// 预览编辑图片
|
|
- previewImgs(url){
|
|
|
|
|
|
+ editImgs(url,index,pindex){
|
|
let _this = this
|
|
let _this = this
|
|
|
|
+ _this.activeZbIndex = index
|
|
|
|
+ _this.activeZbPhoto = pindex
|
|
_this.sendMsg('getWinStatus',JSON.stringify({key:'isEditImg',val: true}))
|
|
_this.sendMsg('getWinStatus',JSON.stringify({key:'isEditImg',val: true}))
|
|
this.PED = new window.PED.imageInfo(
|
|
this.PED = new window.PED.imageInfo(
|
|
url,
|
|
url,
|
|
@@ -366,7 +385,8 @@
|
|
},
|
|
},
|
|
// 更新编辑后的图片
|
|
// 更新编辑后的图片
|
|
updateItemImg(path){
|
|
updateItemImg(path){
|
|
- console.log(path)
|
|
|
|
|
|
+ let photoList = this.curZbItem.taskTargetPhotoVOList
|
|
|
|
+ photoList[this.activeZbPhoto].photoPath = path
|
|
},
|
|
},
|
|
// 更新已完成考评数
|
|
// 更新已完成考评数
|
|
updateKpFinish(){
|
|
updateKpFinish(){
|
|
@@ -378,8 +398,9 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
kpItem.finishedTargetCount = a
|
|
kpItem.finishedTargetCount = a
|
|
|
|
+ // 更新总进度
|
|
|
|
+ this.sendMsg('updateKpTj','')
|
|
},
|
|
},
|
|
- // -----考评项相关代码---------------
|
|
|
|
// 删除考评项
|
|
// 删除考评项
|
|
confirmDelKpx(id){
|
|
confirmDelKpx(id){
|
|
this.sendMsg('delKpItem',id)
|
|
this.sendMsg('delKpItem',id)
|
|
@@ -390,6 +411,8 @@
|
|
if(index>=0){
|
|
if(index>=0){
|
|
this.kpItem.splice(index,1)
|
|
this.kpItem.splice(index,1)
|
|
this.getKpItemZb(0)
|
|
this.getKpItemZb(0)
|
|
|
|
+ // 更新总进度
|
|
|
|
+ this.sendMsg('updateKpTj','')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 切换考评项对应的指标
|
|
// 切换考评项对应的指标
|
|
@@ -404,7 +427,7 @@
|
|
},
|
|
},
|
|
// 保存指标结果成功
|
|
// 保存指标结果成功
|
|
saveZbResultSuccess(id,result){
|
|
saveZbResultSuccess(id,result){
|
|
- console.log(id,result)
|
|
|
|
|
|
+ console.log(result)
|
|
let ret = ['bsy','bhg','hg']
|
|
let ret = ['bsy','bhg','hg']
|
|
let zb = this.zbItem.find(item=> item.id == id)
|
|
let zb = this.zbItem.find(item=> item.id == id)
|
|
if(zb){
|
|
if(zb){
|
|
@@ -412,6 +435,15 @@
|
|
// 更新考评项已完成指标数
|
|
// 更新考评项已完成指标数
|
|
this.updateKpFinish()
|
|
this.updateKpFinish()
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ // 保存指标评论及图片
|
|
|
|
+ saveZbPlImgs(){
|
|
|
|
+ this.sendMsg('saveZbPlImgs',JSON.stringify(this.curZbItem))
|
|
|
|
+ },
|
|
|
|
+ // 更新指标评论及图片成功
|
|
|
|
+ saveZbPlImgsSuccess(){
|
|
|
|
+ this.zbItem.splice(this.activeZbIndex,1,this.curZbItem)
|
|
|
|
+ this.onClosePz()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|