|
@@ -6,7 +6,7 @@
|
|
<view class="basics_li">
|
|
<view class="basics_li">
|
|
<view class="basics_li_l">实验室</view>
|
|
<view class="basics_li_l">实验室</view>
|
|
<view class="basics_li_r lab_r" :class="addDisabledType?'addDisabled':''">
|
|
<view class="basics_li_r lab_r" :class="addDisabledType?'addDisabled':''">
|
|
- <input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.subjectName"
|
|
|
|
|
|
+ <input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.subjectName"
|
|
placeholder="请选择实验室" placeholder-style="font-size: 30rpx;color:#333;">
|
|
placeholder="请选择实验室" placeholder-style="font-size: 30rpx;color:#333;">
|
|
<view class="img-box" @click.stop="saoCode" v-if="!addDisabledType">
|
|
<view class="img-box" @click.stop="saoCode" v-if="!addDisabledType">
|
|
<img src="@/pages_safetyExamine/images/icon_aqjc_sm.png">
|
|
<img src="@/pages_safetyExamine/images/icon_aqjc_sm.png">
|
|
@@ -24,9 +24,9 @@
|
|
</view>
|
|
</view>
|
|
<view class="basics_li">
|
|
<view class="basics_li">
|
|
<view class="basics_li_l">楼栋</view>
|
|
<view class="basics_li_l">楼栋</view>
|
|
- <picker @change="buildingChange" :disabled='addDisabledType' :value="collegeIndex" :range="buildingArray" class="scope_r">
|
|
|
|
- <view class="basics_li_r college_r" :class="addDisabledType?'addDisabled':''">
|
|
|
|
- <view>{{form.buildName?form.buildName:'选择楼栋'}}</view>
|
|
|
|
|
|
+ <picker @change="buildingChange" disabled="" :value="collegeIndex" :range="buildingArray" class="scope_r">
|
|
|
|
+ <view class="basics_li_r college_r" style="background-color: #F5F5F5 ;">
|
|
|
|
+ <view>{{form.buildName?form.buildName:'未选择实验室'}}</view>
|
|
<img src="@/pages_safetyExamine/images/icon_06.png">
|
|
<img src="@/pages_safetyExamine/images/icon_06.png">
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
@@ -40,18 +40,27 @@
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
<view v-if="!isCustom" class="basics_li_r college_r">
|
|
<view v-if="!isCustom" class="basics_li_r college_r">
|
|
- <input type="text" v-model="form.title" placeholder="输入计划标题">
|
|
|
|
|
|
+ <input type="text" v-model="form.title" maxlength="30" placeholder="输入计划标题">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="basics_li" style="justify-content: flex-end;" v-if='planArray[0]&&!addDisabledType'>
|
|
<view class="basics_li" style="justify-content: flex-end;" v-if='planArray[0]&&!addDisabledType'>
|
|
<view class="custom" @click="customFun">{{isCustom?'自定义输入':'选择计划'}}</view>
|
|
<view class="custom" @click="customFun">{{isCustom?'自定义输入':'选择计划'}}</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view class="basics_li">
|
|
<view class="basics_li">
|
|
- <view class="basics_li_l">检查类型</view>
|
|
|
|
|
|
+ <view class="basics_li_l">检查组织</view>
|
|
<picker @change="categoryChange" :value="categoryIndex" disabled :range="categoryArray" class="scope_r">
|
|
<picker @change="categoryChange" :value="categoryIndex" disabled :range="categoryArray" class="scope_r">
|
|
<view class="basics_li_r college_r" style="background-color: #F5F5F5 ;">
|
|
<view class="basics_li_r college_r" style="background-color: #F5F5F5 ;">
|
|
- <view>{{form.checkType?(form.checkType==1?'校院巡查':'实验室自查'):'选择检查类型'}}</view>
|
|
|
|
|
|
+ <view>{{form.checkType?(form.checkType==1?'校院巡查':'实验室自查'):'选择检查组织'}}</view>
|
|
|
|
+ <img src="@/pages_safetyExamine/images/icon_06.png">
|
|
|
|
+ </view>
|
|
|
|
+ </picker>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="basics_li">
|
|
|
|
+ <view class="basics_li_l">检查类型</view>
|
|
|
|
+ <picker @change="specialChange" :value="specialIndex" :range="specialArray" :disabled="isCustom" class="scope_r">
|
|
|
|
+ <view class="basics_li_r college_r" :class="isCustom?'addDisabled':''">
|
|
|
|
+ <view>{{form.checkCategory?(form.checkCategory==1?'综合检查':'专项检查'):'选择检查类型'}}</view>
|
|
<img src="@/pages_safetyExamine/images/icon_06.png">
|
|
<img src="@/pages_safetyExamine/images/icon_06.png">
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
@@ -63,15 +72,25 @@
|
|
<input class="picker-text" disabled type="text" v-model="form.cycleStartTime" placeholder="开始时间">
|
|
<input class="picker-text" disabled type="text" v-model="form.cycleStartTime" placeholder="开始时间">
|
|
</picker>
|
|
</picker>
|
|
<view>至</view>
|
|
<view>至</view>
|
|
- <picker mode="date" @change="endChange(form,$event)" :disabled="isCustom">
|
|
|
|
|
|
+ <picker mode="date" @change="endChange(form,$event)" :disabled="isCustom">
|
|
<input class="picker-text2" disabled type="text" v-model="form.cycleEndTime" placeholder="结束时间">
|
|
<input class="picker-text2" disabled type="text" v-model="form.cycleEndTime" placeholder="结束时间">
|
|
</picker>
|
|
</picker>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ </view>
|
|
|
|
+ <view class="attachment" v-if="form.isAttachment==1">
|
|
|
|
+ <view class="attachment_t">
|
|
|
|
+ <text>材料附件</text>
|
|
|
|
+ <text>点击文件标题查看</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="attachment_li" v-for="item in attachmentList">
|
|
|
|
+ <img src="@/pages_safetyExamine/images/icon_djc_wj.png"/>
|
|
|
|
+ <text @click="attachmentPreview(item)">{{item.fileName}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="inspect">
|
|
|
|
- <view class="inspect_li">
|
|
|
|
|
|
+ <view class="inspect" v-if='form.checkCategory==1 || (form.checkResult==0 || form.checkCategory==2)'>
|
|
|
|
+ <view class="inspect_li" v-if='form.checkCategory==1'>
|
|
<view class="inspect_li_l">检查结果</view>
|
|
<view class="inspect_li_l">检查结果</view>
|
|
<picker @change="resultChange" :value="resultIndex" :range="resultArray" class="scope_r">
|
|
<picker @change="resultChange" :value="resultIndex" :range="resultArray" class="scope_r">
|
|
<view class="inspect_li_r college_r">
|
|
<view class="inspect_li_r college_r">
|
|
@@ -80,7 +99,7 @@
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
</view>
|
|
</view>
|
|
- <view class="inspect_li" v-if="form.checkResult==0">
|
|
|
|
|
|
+ <view class="inspect_li" v-if="form.checkResult==0 || form.checkCategory==2">
|
|
<view class="inspect_li_l">整改日期</view>
|
|
<view class="inspect_li_l">整改日期</view>
|
|
<picker mode="date" @change="rectifyDeadline(form,$event)" :start="currentDate">
|
|
<picker mode="date" @change="rectifyDeadline(form,$event)" :start="currentDate">
|
|
<view class="inspect_li_r date_r">
|
|
<view class="inspect_li_r date_r">
|
|
@@ -89,9 +108,9 @@
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
</view>
|
|
</view>
|
|
- <view class="inspect_li" v-if="form.checkResult==0">
|
|
|
|
|
|
+ <view class="inspect_li" v-if="form.checkResult==0 || form.checkCategory==2">
|
|
<view class="inspect_li_l">整改通知</view>
|
|
<view class="inspect_li_l">整改通知</view>
|
|
- <view class="inform_r">
|
|
|
|
|
|
+ <view class="inform_r">
|
|
<view v-for="(item,index) in informArray" :key="index" @click="tabClick(index)"><text :class="informIndex==index?'checked':'inform_r_l' "></text><text class="inform_r_r">{{item}}</text></view>
|
|
<view v-for="(item,index) in informArray" :key="index" @click="tabClick(index)"><text :class="informIndex==index?'checked':'inform_r_l' "></text><text class="inform_r_r">{{item}}</text></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -118,28 +137,31 @@
|
|
<uni-popup ref="popup" class="inspect_name" type="bottom">
|
|
<uni-popup ref="popup" class="inspect_name" type="bottom">
|
|
<view class="popup-content">
|
|
<view class="popup-content">
|
|
<view class="inspect_name_t">
|
|
<view class="inspect_name_t">
|
|
- <input type="text" v-model="customTitle" maxlength="20" placeholder="请输入计划标题"/>
|
|
|
|
|
|
+ <input type="text" v-model="customTitle" maxlength="30" placeholder="请输入计划标题"/>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="inspect_name_b">
|
|
<view class="inspect_name_b">
|
|
<text @click="titleCancel()">取消</text>
|
|
<text @click="titleCancel()">取消</text>
|
|
<text @click="titleConfirm()">确定</text>
|
|
<text @click="titleConfirm()">确定</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
- <view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0">下一步</view>
|
|
|
|
- <view class="bottom_btn" @click="handleClick('submitForm')" v-if="form.checkResult==1">提交</view>
|
|
|
|
|
|
+ <view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0 || form.checkCategory==2">下一步</view>
|
|
|
|
+ <view class="bottom_btn" @click="handleClick('submitForm')" v-if="form.checkResult==1 && form.checkCategory==1">提交</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { config } from '@/api/request/config.js'
|
|
import { config } from '@/api/request/config.js'
|
|
-import { buildBySub,listDepartments,subjectList,getCheckPlanBySubId,checkManageUpdate,checkManageAdd,findCheckManage,buildFloorGetlist,buildBySubList} from '@/api/index.js'
|
|
|
|
|
|
+import { buildBySub,listDepartments,
|
|
|
|
+subjectList,getCheckPlanBySubId,
|
|
|
|
+checkManageUpdate,checkManageAdd,
|
|
|
|
+findCheckManage,buildFloorGetlist,
|
|
|
|
+buildBySubList,findByPlanIdAttachment,subjectFindSubjectInfo} from '@/api/index.js'
|
|
export default {
|
|
export default {
|
|
name: "rectifyList",
|
|
name: "rectifyList",
|
|
components: {
|
|
components: {
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -150,6 +172,7 @@ export default {
|
|
pageSize:20,
|
|
pageSize:20,
|
|
},
|
|
},
|
|
customTitle:'',
|
|
customTitle:'',
|
|
|
|
+ attachmentList:[],//材料附件
|
|
form:{
|
|
form:{
|
|
id:'',
|
|
id:'',
|
|
checkPlanId:'',
|
|
checkPlanId:'',
|
|
@@ -162,39 +185,43 @@ export default {
|
|
buildId:'',//楼栋
|
|
buildId:'',//楼栋
|
|
buildName:'',
|
|
buildName:'',
|
|
roomNumber:'',//房间号
|
|
roomNumber:'',//房间号
|
|
- checkType:2,// 检查类型(1校院巡查 2实验室自查)
|
|
|
|
- checkResult:1,// 检查结果 0不符合 1符合
|
|
|
|
|
|
+ checkType:2,// 检查组织(1校院巡查 2实验室自查)
|
|
|
|
+ checkResult:1,// 检查结果 0不符合 1符合
|
|
rectifyDeadline:'',//整改期限
|
|
rectifyDeadline:'',//整改期限
|
|
rectifyNotice:'1',//整改通知(1整改告知书 2整改通知书)
|
|
rectifyNotice:'1',//整改通知(1整改告知书 2整改通知书)
|
|
cycleStartTime:'',
|
|
cycleStartTime:'',
|
|
cycleEndTime:'',
|
|
cycleEndTime:'',
|
|
|
|
+ checkCategory:'',//检查类型 1综合检查 2专项检查
|
|
checkHazardDtoList:[
|
|
checkHazardDtoList:[
|
|
{
|
|
{
|
|
voiceRemark:[],//语音备忘存储
|
|
voiceRemark:[],//语音备忘存储
|
|
hazardLevel:2,//隐患等级
|
|
hazardLevel:2,//隐患等级
|
|
hazardLevelName:'一般隐患',//隐患等级
|
|
hazardLevelName:'一般隐患',//隐患等级
|
|
- hazardCheckCode:'', //检查项目code序号
|
|
|
|
- hazardCheckName:'', //检查项目名称
|
|
|
|
- hazardCheckPro:'', //最后一级的id
|
|
|
|
- hazardCheckPoint:'',// 检查要点
|
|
|
|
- hazardDescribe:'', //隐患描述
|
|
|
|
|
|
+ hazardCheckCode:'', //检查项目code序号
|
|
|
|
+ hazardCheckName:'', //检查项目名称
|
|
|
|
+ hazardCheckPro:'', //最后一级的id
|
|
|
|
+ hazardCheckPoint:'',// 检查要点
|
|
|
|
+ hazardDescribe:'', //隐患描述
|
|
uploadDtoList:[],//隐患照片
|
|
uploadDtoList:[],//隐患照片
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ checkHazardInfoVoList:[],
|
|
},
|
|
},
|
|
collegeIndex :0,
|
|
collegeIndex :0,
|
|
collegeArray:[],
|
|
collegeArray:[],
|
|
categoryIndex :0,
|
|
categoryIndex :0,
|
|
categoryArray:['校院巡查','实验室自查'],
|
|
categoryArray:['校院巡查','实验室自查'],
|
|
planIndex :0,
|
|
planIndex :0,
|
|
|
|
+ specialIndex:0,
|
|
|
|
+ specialArray:['综合检查','专项检查'],
|
|
planArray:[],
|
|
planArray:[],
|
|
planList:[],
|
|
planList:[],
|
|
resultIndex :0,
|
|
resultIndex :0,
|
|
resultArray:['符合','不符合'],
|
|
resultArray:['符合','不符合'],
|
|
informIndex:0,
|
|
informIndex:0,
|
|
informArray:['整改告知书','整改通知书'],
|
|
informArray:['整改告知书','整改通知书'],
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
//房间弹层 状态
|
|
//房间弹层 状态
|
|
popupType:false,
|
|
popupType:false,
|
|
//房间搜索字段
|
|
//房间搜索字段
|
|
@@ -216,7 +243,6 @@ export default {
|
|
if(option.q){
|
|
if(option.q){
|
|
console.log('外部扫一扫')
|
|
console.log('外部扫一扫')
|
|
let text = decodeURIComponent(option.q)
|
|
let text = decodeURIComponent(option.q)
|
|
- console.log('text',text)
|
|
|
|
let codeId = "";
|
|
let codeId = "";
|
|
let newList = text.split("?")[1].split("&")
|
|
let newList = text.split("?")[1].split("&")
|
|
let list = newList[0].split("=")[1].split("-")
|
|
let list = newList[0].split("=")[1].split("-")
|
|
@@ -237,7 +263,11 @@ export default {
|
|
}
|
|
}
|
|
if(option.form){
|
|
if(option.form){
|
|
console.log('子页面返回')
|
|
console.log('子页面返回')
|
|
- this.form=JSON.parse(decodeURIComponent(option.form));
|
|
|
|
|
|
+ this.form=JSON.parse(decodeURIComponent(option.form));
|
|
|
|
+ this.isCustom=this.form.isCustom;
|
|
|
|
+ if(this.form.isAttachment==1){//0没有附件 1有附件
|
|
|
|
+ this.findByPlanIdAttachment()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//通过实验室id查询计划
|
|
//通过实验室id查询计划
|
|
if(option.subId){
|
|
if(option.subId){
|
|
@@ -246,7 +276,7 @@ export default {
|
|
this.getCheckPlanBySubId(option.subId)
|
|
this.getCheckPlanBySubId(option.subId)
|
|
this.getByIdLaboratoryList();
|
|
this.getByIdLaboratoryList();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.buildFloorGetlist()
|
|
this.buildFloorGetlist()
|
|
@@ -255,11 +285,13 @@ export default {
|
|
//获取当前日期
|
|
//获取当前日期
|
|
this.currentDate = this.getNowFormatDate()
|
|
this.currentDate = this.getNowFormatDate()
|
|
this.listDepartments();
|
|
this.listDepartments();
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//滚动事件
|
|
//滚动事件
|
|
scrollGet(){},
|
|
scrollGet(){},
|
|
|
|
+
|
|
|
|
+
|
|
handleClick(doType){
|
|
handleClick(doType){
|
|
let self=this;
|
|
let self=this;
|
|
if(!this.form.subIds){
|
|
if(!this.form.subIds){
|
|
@@ -305,7 +337,7 @@ export default {
|
|
duration: 2000
|
|
duration: 2000
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if(!this.form.cycleStartTime || !this.form.cycleEndTime){
|
|
if(!this.form.cycleStartTime || !this.form.cycleEndTime){
|
|
@@ -326,23 +358,40 @@ export default {
|
|
});
|
|
});
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if( doType=='nextStep'){//下一步
|
|
|
|
- if(!this.form.rectifyDeadline){
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '整改日期不能为空!',
|
|
|
|
- icon:"none",
|
|
|
|
- mask:true,
|
|
|
|
- duration: 2000
|
|
|
|
- });
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
|
|
|
|
- });
|
|
|
|
|
|
+ if( doType=='nextStep'){//下一步
|
|
|
|
+ // 打开扫描页面
|
|
|
|
+ if(!this.form.rectifyDeadline){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '整改日期不能为空!',
|
|
|
|
+ icon:"none",
|
|
|
|
+ mask:true,
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.form.isCustom=this.isCustom;
|
|
|
|
+ if(this.form.checkCategory==1){//综合检查
|
|
|
|
+
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
|
|
|
|
+ });
|
|
|
|
+ }else if(this.form.checkCategory==2){//专项检查
|
|
|
|
+ if(this.form.checkHazardInfoVoList[0]){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: '/pages/saoCode/scan?form='+encodeURIComponent(JSON.stringify(this.form))
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}else if(doType=='submitForm'){
|
|
}else if(doType=='submitForm'){
|
|
self.submitForm()
|
|
self.submitForm()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
customFun(){
|
|
customFun(){
|
|
let self=this;
|
|
let self=this;
|
|
@@ -354,7 +403,10 @@ export default {
|
|
self.form.cycleEndTime='';
|
|
self.form.cycleEndTime='';
|
|
self.isCustom=!self.isCustom
|
|
self.isCustom=!self.isCustom
|
|
}else{//选择计划
|
|
}else{//选择计划
|
|
- this.$set(this,'customTitle','');
|
|
|
|
|
|
+
|
|
|
|
+ this.$set(this.form,'isAttachment',0);
|
|
|
|
+ this.$set(this,'customTitle','');
|
|
|
|
+ self.form.checkHazardInfoVoList=[];
|
|
self.$refs.popup.open()
|
|
self.$refs.popup.open()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -377,11 +429,11 @@ export default {
|
|
voiceRemark:[],//语音备忘存储
|
|
voiceRemark:[],//语音备忘存储
|
|
hazardLevel:2,//隐患等级
|
|
hazardLevel:2,//隐患等级
|
|
hazardLevelName:'一般隐患',//隐患等级
|
|
hazardLevelName:'一般隐患',//隐患等级
|
|
- hazardCheckCode:'', //检查项目code序号
|
|
|
|
- hazardCheckName:'', //检查项目名称
|
|
|
|
- hazardCheckPro:'', //最后一级的id
|
|
|
|
- hazardCheckPoint:'',// 检查要点
|
|
|
|
- hazardDescribe:'', //隐患描述
|
|
|
|
|
|
+ hazardCheckCode:'', //检查项目code序号
|
|
|
|
+ hazardCheckName:'', //检查项目名称
|
|
|
|
+ hazardCheckPro:'', //最后一级的id
|
|
|
|
+ hazardCheckPoint:'',// 检查要点
|
|
|
|
+ hazardDescribe:'', //隐患描述
|
|
uploadDtoList:[],//隐患照片
|
|
uploadDtoList:[],//隐患照片
|
|
}]);
|
|
}]);
|
|
self.$refs.popup.close()
|
|
self.$refs.popup.close()
|
|
@@ -420,42 +472,76 @@ export default {
|
|
strDate = date.getDate() // 获取当前日(1-31)
|
|
strDate = date.getDate() // 获取当前日(1-31)
|
|
if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
|
|
if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
|
|
if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
|
|
if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
|
|
-
|
|
|
|
|
|
+
|
|
return `${year}-${month}-${strDate}`
|
|
return `${year}-${month}-${strDate}`
|
|
},
|
|
},
|
|
|
|
+ //根据计划id查询附件列表
|
|
|
|
+ async findByPlanIdAttachment(){
|
|
|
|
+ let _this = this;
|
|
|
|
+ const {data} = await findByPlanIdAttachment({checkPlanId:this.form.checkPlanId});
|
|
|
|
+ if(data.code == 200){
|
|
|
|
+ _this.attachmentList=data.data;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//详情
|
|
//详情
|
|
async findCheckManage(type,id){
|
|
async findCheckManage(type,id){
|
|
let _this = this;
|
|
let _this = this;
|
|
const {data} = await findCheckManage({id:id});
|
|
const {data} = await findCheckManage({id:id});
|
|
if(data.code == 200){
|
|
if(data.code == 200){
|
|
|
|
+
|
|
if(type == 'add'){
|
|
if(type == 'add'){
|
|
this.$set(this,'isCustom',true);
|
|
this.$set(this,'isCustom',true);
|
|
this.$set(this,'addDisabledType',true);
|
|
this.$set(this,'addDisabledType',true);
|
|
}
|
|
}
|
|
this.$set(this,'form',data.data);
|
|
this.$set(this,'form',data.data);
|
|
this.$set(this.form,'subIds',data.data.subId);
|
|
this.$set(this.form,'subIds',data.data.subId);
|
|
- this.form.checkResult=data.data.checkResult==null?'1':data.data.checkResult;
|
|
|
|
this.form.rectifyNotice=data.data.rectifyNotice==null?'1':data.data.rectifyNotice;
|
|
this.form.rectifyNotice=data.data.rectifyNotice==null?'1':data.data.rectifyNotice;
|
|
this.informIndex=this.form.rectifyNotice==1?0:1;
|
|
this.informIndex=this.form.rectifyNotice==1?0:1;
|
|
-
|
|
|
|
- if(data.data.checkHazardDtoList.length>0){//隐患项
|
|
|
|
- this.form.checkHazardDtoList=data.data.checkHazardDtoList;
|
|
|
|
- //语音备注
|
|
|
|
- for(let i=0;i<this.form.checkHazardDtoList.length;i++){
|
|
|
|
- if(this.form.checkHazardDtoList[i].voiceRemark){
|
|
|
|
- this.form.checkHazardDtoList[i].voiceRemark=JSON.parse(this.form.checkHazardDtoList[i].voiceRemark)
|
|
|
|
- }else{
|
|
|
|
- this.form.checkHazardDtoList[i].voiceRemark=[];
|
|
|
|
|
|
+ if(data.data.checkCategory==1){//综合检查
|
|
|
|
+ this.form.checkResult=data.data.checkResult==null?'1':data.data.checkResult;
|
|
|
|
+ if(data.data.checkHazardDtoList[0]){//隐患项
|
|
|
|
+ this.form.checkHazardDtoList=data.data.checkHazardDtoList;
|
|
|
|
+ //语音备注
|
|
|
|
+ for(let i=0;i<this.form.checkHazardDtoList.length;i++){
|
|
|
|
+ if(this.form.checkHazardDtoList[i].voiceRemark){
|
|
|
|
+ this.form.checkHazardDtoList[i].voiceRemark=JSON.parse(this.form.checkHazardDtoList[i].voiceRemark)
|
|
|
|
+ }else{
|
|
|
|
+ this.form.checkHazardDtoList[i].voiceRemark=[];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- this.form.checkHazardDtoList[0].voiceRemark=[];
|
|
|
|
|
|
+ }else if(data.data.checkCategory==2){//专项检查
|
|
|
|
+ if(_this.form.checkHazardInfoVoList[0]){
|
|
|
|
+ _this.form.checkHazardInfoVoList.forEach(function(item) {
|
|
|
|
+ item.switch = true;
|
|
|
|
+ item.checkHazardDtoList.forEach(function(item2) {
|
|
|
|
+ item2.hazardCheckCode=item2.code
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if(_this.form.checkHazardInfoVoList[0]){//隐患项
|
|
|
|
+ //语音备注
|
|
|
|
+ for(let k=0;k<_this.form.checkHazardInfoVoList.length;k++){
|
|
|
|
+
|
|
|
|
+ for(let i=0;i<_this.form.checkHazardInfoVoList[k].checkHazardDtoList.length;i++){
|
|
|
|
+ if(_this.form.checkHazardInfoVoList[k].checkHazardDtoList[i].voiceRemark){
|
|
|
|
+ _this.form.checkHazardInfoVoList[k].checkHazardDtoList[i].voiceRemark=JSON.parse(_this.form.checkHazardInfoVoList[k].checkHazardDtoList[i].voiceRemark)
|
|
|
|
+ }else{
|
|
|
|
+ _this.form.checkHazardInfoVoList[k].checkHazardDtoList[i].voiceRemark=[];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//根据实验室id查询实验室计划
|
|
//根据实验室id查询实验室计划
|
|
if(data.data.subId){
|
|
if(data.data.subId){
|
|
this.form.cycleStartTime=data.data.cycleStartTime;
|
|
this.form.cycleStartTime=data.data.cycleStartTime;
|
|
this.form.cycleEndTime=data.data.cycleEndTime;
|
|
this.form.cycleEndTime=data.data.cycleEndTime;
|
|
}
|
|
}
|
|
|
|
+ if(data.data.isAttachment==1){//0没有附件 1有附件
|
|
|
|
+ this.findByPlanIdAttachment()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//查询学院列表
|
|
//查询学院列表
|
|
@@ -463,7 +549,7 @@ export default {
|
|
let _this = this;
|
|
let _this = this;
|
|
const {data} = await listDepartments();
|
|
const {data} = await listDepartments();
|
|
if(data.code == 200){
|
|
if(data.code == 200){
|
|
-
|
|
|
|
|
|
+
|
|
for(let i=0;i<data.data.length;i++){
|
|
for(let i=0;i<data.data.length;i++){
|
|
_this.collegeArray.push(data.data[i].deptName)
|
|
_this.collegeArray.push(data.data[i].deptName)
|
|
}
|
|
}
|
|
@@ -496,7 +582,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
//查询楼栋
|
|
//查询楼栋
|
|
async buildFloorGetlist(){
|
|
async buildFloorGetlist(){
|
|
let _this = this;
|
|
let _this = this;
|
|
@@ -534,28 +620,34 @@ export default {
|
|
this.collegeIndex = e.target.value;
|
|
this.collegeIndex = e.target.value;
|
|
this.form.deptId=this.collegeList[e.target.value].deptId
|
|
this.form.deptId=this.collegeList[e.target.value].deptId
|
|
this.form.collegeName=this.collegeList[e.target.value].deptName
|
|
this.form.collegeName=this.collegeList[e.target.value].deptName
|
|
- console.log()
|
|
|
|
this.buildFloorGetlist(this.form.deptId)
|
|
this.buildFloorGetlist(this.form.deptId)
|
|
},
|
|
},
|
|
- //检查类型
|
|
|
|
|
|
+ //检查组织
|
|
categoryChange(e){
|
|
categoryChange(e){
|
|
this.categoryIndex = e.target.value;
|
|
this.categoryIndex = e.target.value;
|
|
if(e.target.value==0){
|
|
if(e.target.value==0){
|
|
this.form.checkType=1
|
|
this.form.checkType=1
|
|
}else if(e.target.value==1){
|
|
}else if(e.target.value==1){
|
|
this.form.checkType=2
|
|
this.form.checkType=2
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //检查类型
|
|
|
|
+ specialChange(e){
|
|
|
|
+ this.specialIndex = e.target.value;
|
|
|
|
+ if(e.target.value==0){
|
|
|
|
+ this.form.checkCategory=1
|
|
|
|
+ }else if(e.target.value==1){
|
|
|
|
+ this.form.checkCategory=2
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//计划
|
|
//计划
|
|
planChange(e){
|
|
planChange(e){
|
|
this.planIndex = e.target.value;
|
|
this.planIndex = e.target.value;
|
|
this.form.id=this.planList[e.target.value].id
|
|
this.form.id=this.planList[e.target.value].id
|
|
- console.log('e',this.planList[e.target.value].id);
|
|
|
|
- console.log('this.planList[e.target.value].id',this.planList[e.target.value].id);
|
|
|
|
this.findCheckManage('check',this.planList[e.target.value].id);
|
|
this.findCheckManage('check',this.planList[e.target.value].id);
|
|
// this.form.title=this.planList[e.target.value].title
|
|
// this.form.title=this.planList[e.target.value].title
|
|
// this.form.checkPlanId=this.planList[e.target.value].checkPlanId
|
|
// this.form.checkPlanId=this.planList[e.target.value].checkPlanId
|
|
-
|
|
|
|
|
|
+
|
|
// this.form.subIds=this.planList[e.target.value].subId;
|
|
// this.form.subIds=this.planList[e.target.value].subId;
|
|
// this.form.subjectName=this.planList[e.target.value].subjectName;
|
|
// this.form.subjectName=this.planList[e.target.value].subjectName;
|
|
// this.form.deptId=this.planList[e.target.value].deptId;
|
|
// this.form.deptId=this.planList[e.target.value].deptId;
|
|
@@ -565,10 +657,10 @@ export default {
|
|
// this.form.checkType=this.planList[e.target.value].checkType;
|
|
// this.form.checkType=this.planList[e.target.value].checkType;
|
|
// this.form.cycleStartTime=this.planList[e.target.value].cycleStartTime;
|
|
// this.form.cycleStartTime=this.planList[e.target.value].cycleStartTime;
|
|
// this.form.cycleEndTime=this.planList[e.target.value].cycleEndTime;
|
|
// this.form.cycleEndTime=this.planList[e.target.value].cycleEndTime;
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
resultChange(e){
|
|
resultChange(e){
|
|
this.resultIndex = e.target.value;
|
|
this.resultIndex = e.target.value;
|
|
@@ -577,12 +669,12 @@ export default {
|
|
}else if(e.target.value==1){
|
|
}else if(e.target.value==1){
|
|
this.form.checkResult=0;
|
|
this.form.checkResult=0;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//开始时间选中事件
|
|
//开始时间选中事件
|
|
rectifyDeadline(form,e){
|
|
rectifyDeadline(form,e){
|
|
form.rectifyDeadline=e.target.value
|
|
form.rectifyDeadline=e.target.value
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//整改通知
|
|
//整改通知
|
|
tabClick(index) {
|
|
tabClick(index) {
|
|
@@ -592,7 +684,7 @@ export default {
|
|
}else if(index==1){
|
|
}else if(index==1){
|
|
this.form.rectifyNotice='2';
|
|
this.form.rectifyNotice='2';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//搜索房间弹层开关
|
|
//搜索房间弹层开关
|
|
popupClick(type){
|
|
popupClick(type){
|
|
@@ -608,27 +700,15 @@ export default {
|
|
//扫一扫进入通过id查询实验室列表
|
|
//扫一扫进入通过id查询实验室列表
|
|
async getByIdLaboratoryList(){
|
|
async getByIdLaboratoryList(){
|
|
let self = this;
|
|
let self = this;
|
|
- const {data} = await buildBySub({'searchValue':this.room});
|
|
|
|
|
|
+ const {data} = await subjectFindSubjectInfo({subIds:this.form.subIds});
|
|
if(data.code==200){
|
|
if(data.code==200){
|
|
- if(data.data[0]){
|
|
|
|
- this.laboratoryList = data.data;
|
|
|
|
- data.data.forEach(function(item){
|
|
|
|
- if(self.form.subIds==item.id){
|
|
|
|
- self.form.subjectName=item.name;
|
|
|
|
- self.form.deptId=item.deptId;
|
|
|
|
- self.form.buildId=item.buildId;
|
|
|
|
- self.form.roomNumber=item.room;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- //获取学院名称
|
|
|
|
- for(let i=0;i<this.collegeList.length;i++){
|
|
|
|
- if(this.collegeList[i].deptId==self.form.deptId){
|
|
|
|
- this.$set(this.form,"collegeName",this.collegeList[i].deptName)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //请求楼栋数据
|
|
|
|
- this.buildFloorGetlist(self.form.deptId)
|
|
|
|
|
|
+ if(data.data){
|
|
|
|
+ self.form.subjectName=data.data.subjectName;
|
|
|
|
+ self.form.deptId=data.data.deptId;
|
|
|
|
+ self.form.collegeName=data.data.collegeName;
|
|
|
|
+ self.form.buildId=data.data.buildId;
|
|
|
|
+ self.form.buildName=data.data.buildName;
|
|
|
|
+ self.form.roomNumber=data.data.roomNumber;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -660,7 +740,6 @@ export default {
|
|
},
|
|
},
|
|
//确认搜索房间
|
|
//确认搜索房间
|
|
popupClickItem(item){
|
|
popupClickItem(item){
|
|
- console.log('item',item)
|
|
|
|
this.$set(this.form,"subIds",item.id)
|
|
this.$set(this.form,"subIds",item.id)
|
|
this.$set(this.form,"subjectName",item.name)
|
|
this.$set(this.form,"subjectName",item.name)
|
|
this.$set(this.form,"deptId",item.deptId)
|
|
this.$set(this.form,"deptId",item.deptId)
|
|
@@ -678,11 +757,11 @@ export default {
|
|
voiceRemark:[],//语音备忘存储
|
|
voiceRemark:[],//语音备忘存储
|
|
hazardLevel:2,//隐患等级
|
|
hazardLevel:2,//隐患等级
|
|
hazardLevelName:'一般隐患',//隐患等级
|
|
hazardLevelName:'一般隐患',//隐患等级
|
|
- hazardCheckCode:'', //检查项目code序号
|
|
|
|
- hazardCheckName:'', //检查项目名称
|
|
|
|
- hazardCheckPro:'', //最后一级的id
|
|
|
|
- hazardCheckPoint:'',// 检查要点
|
|
|
|
- hazardDescribe:'', //隐患描述
|
|
|
|
|
|
+ hazardCheckCode:'', //检查项目code序号
|
|
|
|
+ hazardCheckName:'', //检查项目名称
|
|
|
|
+ hazardCheckPro:'', //最后一级的id
|
|
|
|
+ hazardCheckPoint:'',// 检查要点
|
|
|
|
+ hazardDescribe:'', //隐患描述
|
|
uploadDtoList:[],//隐患照片
|
|
uploadDtoList:[],//隐患照片
|
|
}]);
|
|
}]);
|
|
//匹配学院名称
|
|
//匹配学院名称
|
|
@@ -735,6 +814,37 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //附件查看
|
|
|
|
+ attachmentPreview(item){
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '下载中'
|
|
|
|
+ });
|
|
|
|
+ wx.downloadFile({
|
|
|
|
+ url: config.base_url+item.fileUrl,
|
|
|
|
+ header: {
|
|
|
|
+ Authorization: uni.getStorageSync('token')
|
|
|
|
+ },
|
|
|
|
+ success: function (res) {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ const filePath = res.tempFilePath
|
|
|
|
+ wx.openDocument({
|
|
|
|
+ filePath: filePath,
|
|
|
|
+ success: function (res) {
|
|
|
|
+ console.log('打开文档成功')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ fail: function (res){
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '下载失败',
|
|
|
|
+ icon:"none",
|
|
|
|
+ mask:true,
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//提交
|
|
//提交
|
|
async submitForm(){
|
|
async submitForm(){
|
|
let self = this;
|
|
let self = this;
|
|
@@ -769,7 +879,7 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -792,10 +902,10 @@ export default {
|
|
.basics{
|
|
.basics{
|
|
margin: 0 30rpx;
|
|
margin: 0 30rpx;
|
|
width: 690rpx;
|
|
width: 690rpx;
|
|
- height: 740rpx;
|
|
|
|
|
|
+ height:auto;
|
|
background: #FFFFFF;
|
|
background: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
- padding: 30rpx 28rpx 0;
|
|
|
|
|
|
+ padding: 30rpx 28rpx 30rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
.basics_li{
|
|
.basics_li{
|
|
display: flex;
|
|
display: flex;
|
|
@@ -818,8 +928,8 @@ export default {
|
|
border: 1rpx solid #E0E0E0;
|
|
border: 1rpx solid #E0E0E0;
|
|
padding-left: 20rpx;
|
|
padding-left: 20rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
/* 学院 */
|
|
/* 学院 */
|
|
.college_r{
|
|
.college_r{
|
|
@@ -999,7 +1109,7 @@ export default {
|
|
height: auto;
|
|
height: auto;
|
|
background: #FFFFFF;
|
|
background: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
- padding: 40rpx 28rpx 20rpx;
|
|
|
|
|
|
+ padding: 40rpx 28rpx 20rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
.inspect_li{
|
|
.inspect_li{
|
|
display: flex;
|
|
display: flex;
|
|
@@ -1022,7 +1132,7 @@ export default {
|
|
border: 1rpx solid #E0E0E0;
|
|
border: 1rpx solid #E0E0E0;
|
|
padding-left: 20rpx;
|
|
padding-left: 20rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
.college_r{
|
|
.college_r{
|
|
width: 486rpx;
|
|
width: 486rpx;
|
|
@@ -1182,7 +1292,7 @@ export default {
|
|
}
|
|
}
|
|
/* 计划标题 */
|
|
/* 计划标题 */
|
|
.inspect_name{
|
|
.inspect_name{
|
|
-
|
|
|
|
|
|
+
|
|
.popup-content{
|
|
.popup-content{
|
|
width: 750rpx;
|
|
width: 750rpx;
|
|
height: 350rpx;
|
|
height: 350rpx;
|
|
@@ -1236,12 +1346,12 @@ export default {
|
|
line-height: 60rpx;
|
|
line-height: 60rpx;
|
|
text-align :center;
|
|
text-align :center;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
.bottom_btn{
|
|
.bottom_btn{
|
|
position: fixed;
|
|
position: fixed;
|
|
@@ -1257,7 +1367,7 @@ export default {
|
|
background: #0183FA;
|
|
background: #0183FA;
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
text-align: center;
|
|
text-align: center;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|