|
@@ -133,6 +133,14 @@
|
|
v-model="item.hazardDescribe">
|
|
v-model="item.hazardDescribe">
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="语音备注:" label-width="123px" class="el-form-item-bottom" v-if="item.voiceRemark[0]">
|
|
|
|
+ <div class="audio-box">
|
|
|
|
+ <div class="audio-box-li" v-for="(voiceItem,voiceIndex) in item.voiceRemark" :key="voiceIndex">
|
|
|
|
+ <div class="audio-box-li-l" @click="voicePlay(voiceItem.url)">{{voiceItem.times}}″</div>
|
|
|
|
+ <img class="audio-box-li-r" @click="voiceDele('',index,voiceIndex)" src="@/assets/ZDimages/safetyCheck/icon_delete.png">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="隐患照片" :prop="'checkHazardDtoList.'+index+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
|
|
<el-form-item label="隐患照片" :prop="'checkHazardDtoList.'+index+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
|
|
<div class="for-img-box" v-for="(img,imgIndex) in item.uploadDtoList" :key="imgIndex">
|
|
<div class="for-img-box" v-for="(img,imgIndex) in item.uploadDtoList" :key="imgIndex">
|
|
<img class="for-img" :src="img.fileUrl" @click="lookImg(item.uploadDtoList,imgIndex)">
|
|
<img class="for-img" :src="img.fileUrl" @click="lookImg(item.uploadDtoList,imgIndex)">
|
|
@@ -214,6 +222,14 @@
|
|
v-model="item2.hazardDescribe">
|
|
v-model="item2.hazardDescribe">
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="语音备注:" label-width="123px" class="el-form-item-bottom" v-if="item2.voiceRemark[0]">
|
|
|
|
+ <div class="audio-box">
|
|
|
|
+ <div class="audio-box-li" v-for="(voiceItem,voiceIndex) in item2.voiceRemark" :key="voiceIndex">
|
|
|
|
+ <div class="audio-box-li-l" @click="voicePlay(voiceItem.url)">{{voiceItem.times}}″</div>
|
|
|
|
+ <img class="audio-box-li-r" @click="voiceDele(item2,index2,voiceIndex)" src="@/assets/ZDimages/safetyCheck/icon_delete.png">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item v-if="item2.checkFlag==0" label="隐患照片" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
|
|
<el-form-item v-if="item2.checkFlag==0" label="隐患照片" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
|
|
<div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
|
|
<div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
|
|
<img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
|
|
<img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
|
|
@@ -255,6 +271,7 @@
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
|
|
import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
|
|
import { findCheckManage,checkOptionList,checkManageUpdate,countHazardNum } from '@/api/safetyCheck/index'
|
|
import { findCheckManage,checkOptionList,checkManageUpdate,countHazardNum } from '@/api/safetyCheck/index'
|
|
|
|
+ import { delUserHaikang } from '@/api/laboratory/subject'
|
|
export default {
|
|
export default {
|
|
name: 'addPage',
|
|
name: 'addPage',
|
|
props:{
|
|
props:{
|
|
@@ -318,6 +335,29 @@
|
|
},
|
|
},
|
|
mounted(){},
|
|
mounted(){},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ //语音备忘播放
|
|
|
|
+ voicePlay(item){
|
|
|
|
+ let myaudio = new Audio();
|
|
|
|
+ myaudio.src = item;
|
|
|
|
+ myaudio.play();
|
|
|
|
+ },
|
|
|
|
+ //语音备忘删除
|
|
|
|
+ async voiceDele(item,index,voiceIndex){
|
|
|
|
+ let self = this;
|
|
|
|
+ this.$confirm('确定删除此语音吗?', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function() {
|
|
|
|
+ if(self.addForm.checkCategory==1){//综合检查
|
|
|
|
+ self.addForm.checkHazardDtoList[index].voiceRemark.splice(voiceIndex,1);
|
|
|
|
+ }else if(self.addForm.checkCategory==2){//专项检查
|
|
|
|
+ item.voiceRemark.splice(voiceIndex,1);
|
|
|
|
+ }
|
|
|
|
+ }).then(() => {
|
|
|
|
+
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ },
|
|
//保存/提交按钮
|
|
//保存/提交按钮
|
|
upDataButton(type){
|
|
upDataButton(type){
|
|
this.$refs["addForm"].validate(valid => {
|
|
this.$refs["addForm"].validate(valid => {
|
|
@@ -325,6 +365,12 @@
|
|
let obj = JSON.parse(JSON.stringify(this.addForm));
|
|
let obj = JSON.parse(JSON.stringify(this.addForm));
|
|
obj.manageStatus = type
|
|
obj.manageStatus = type
|
|
if(this.addForm.checkCategory==1){//综合检查
|
|
if(this.addForm.checkCategory==1){//综合检查
|
|
|
|
+ //语音备注JSON对象转字符串
|
|
|
|
+ for(let i=0;i<obj.checkHazardDtoList.length;i++){
|
|
|
|
+ if(obj.checkHazardDtoList[i].voiceRemark){
|
|
|
|
+ obj.checkHazardDtoList[i].voiceRemark=JSON.stringify(obj.checkHazardDtoList[i].voiceRemark)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(obj.checkResult === 0){
|
|
if(obj.checkResult === 0){
|
|
if(!obj.checkHazardDtoList[0]){
|
|
if(!obj.checkHazardDtoList[0]){
|
|
this.msgError('请添加隐患检查项')
|
|
this.msgError('请添加隐患检查项')
|
|
@@ -339,11 +385,16 @@
|
|
obj.checkHazardDtoList = [];
|
|
obj.checkHazardDtoList = [];
|
|
}
|
|
}
|
|
}else if(this.addForm.checkCategory==2){//专项检查
|
|
}else if(this.addForm.checkCategory==2){//专项检查
|
|
|
|
+
|
|
let list=[]
|
|
let list=[]
|
|
let checkFlagList=[];
|
|
let checkFlagList=[];
|
|
for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
|
|
for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
|
|
for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
|
|
for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
|
|
checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
|
|
checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
|
|
|
|
+ //语音备注JSON对象转字符串
|
|
|
|
+ if(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark){
|
|
|
|
+ this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark=JSON.stringify(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark)
|
|
|
|
+ }
|
|
let obj={
|
|
let obj={
|
|
checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
|
|
checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
|
|
checkCategory:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkCategory,
|
|
checkCategory:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkCategory,
|
|
@@ -353,6 +404,7 @@
|
|
hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
|
|
hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
|
|
hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
|
|
hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
|
|
uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
|
|
uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
|
|
|
|
+ voiceRemark:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark,
|
|
code:this.addForm.checkHazardInfoVoList[i].code,
|
|
code:this.addForm.checkHazardInfoVoList[i].code,
|
|
hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
|
|
hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
|
|
hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
|
|
hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
|
|
@@ -370,6 +422,7 @@
|
|
}
|
|
}
|
|
obj.checkHazardDtoList=list;
|
|
obj.checkHazardDtoList=list;
|
|
}
|
|
}
|
|
|
|
+
|
|
checkManageUpdate(obj).then(response => {
|
|
checkManageUpdate(obj).then(response => {
|
|
this.msgSuccess(response.msg);
|
|
this.msgSuccess(response.msg);
|
|
this.$parent.goAddPage(4);
|
|
this.$parent.goAddPage(4);
|
|
@@ -386,6 +439,7 @@
|
|
response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
|
|
response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
|
|
for(let i=0;i<response.data.checkHazardDtoList.length;i++){
|
|
for(let i=0;i<response.data.checkHazardDtoList.length;i++){
|
|
response.data.checkHazardDtoList[i].lookType = true;
|
|
response.data.checkHazardDtoList[i].lookType = true;
|
|
|
|
+ response.data.checkHazardDtoList[i].voiceRemark = JSON.parse(response.data.checkHazardDtoList[i].voiceRemark);
|
|
}
|
|
}
|
|
}else if(response.data.checkCategory==2){//专项检查
|
|
}else if(response.data.checkCategory==2){//专项检查
|
|
response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
|
|
response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
|
|
@@ -395,6 +449,7 @@
|
|
item.lookType = true;
|
|
item.lookType = true;
|
|
item.checkHazardDtoList.forEach(function(item2) {
|
|
item.checkHazardDtoList.forEach(function(item2) {
|
|
item2.hazardCheckCode=item2.code
|
|
item2.hazardCheckCode=item2.code
|
|
|
|
+ item2.voiceRemark=JSON.parse(item2.voiceRemark)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -823,6 +878,45 @@
|
|
.for-big-box-special:last-of-type{
|
|
.for-big-box-special:last-of-type{
|
|
border-bottom: none;
|
|
border-bottom: none;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ /*语音备注*/
|
|
|
|
+ .audio-box{
|
|
|
|
+ padding: 16px 0 6px 16px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ width: 898px;
|
|
|
|
+ min-height: 20px;
|
|
|
|
+ background: #F5F5F5;
|
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
|
+ .audio-box-li{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ .audio-box-li-l{
|
|
|
|
+ width: 278px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ background: #0183FA;
|
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ font-style: normal;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ padding-right: 26px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ .audio-box-li-r{
|
|
|
|
+ width: 16px;
|
|
|
|
+ height: 16px;
|
|
|
|
+ margin-left: 6px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.bottom-button-max-box{
|
|
.bottom-button-max-box{
|
|
height:80px;
|
|
height:80px;
|