Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # pages/application/eight-assignments.vuepull/5/head
commit
7d50f2c207
components/other-select
pages/application
break-ground
breakground
breakground-apply
breakground-detail
breakground-list
breakground-measures-confirm
breakground-measures
breakground-workuser
confinedspace
confinedspace-apply
confinedspace-detail
confinedspace-gas
confinedspace-list
confinedspace-measures-confirm
dangerous_options
electricity
electricity-accept
electricity-acceptconfess
electricity-apply
electricity-approve
electricity-audit
electricity-confess
electricity-confirm
electricity-detail
electricity-endwork
electricity-guardian
electricity-list
electricity-measures-confirm
electricity-measures
electricity-startwork
electricity-user
electricity-workuser
hidden-danger-management/hidden-danger-check
highwork
highwork-apply
highwork-detail
highwork-list
highwork-measures-confirm
hotwork
hotwork-apply
hotwork-gas
hotwork-list
hotwork-measures-confirm
key-project-management
hidden-management
index
penalty-management
positioning_management
safety-environmental-inspection
safety-environmental-inspection
inspector
safetymeeting
|
@ -94,6 +94,10 @@ export default {
|
|||
lists[i].CHECK_NO = "受限作业" + ' ' + lists[i].CHECK_NO
|
||||
}else if(lists[i].WORK_TYPE == "HIGHWORK"){
|
||||
lists[i].CHECK_NO = "高处作业" + ' ' + lists[i].CHECK_NO
|
||||
}else if(lists[i].WORK_TYPE == "ELECTRICITY"){
|
||||
lists[i].CHECK_NO = "临时用电" + ' ' + lists[i].CHECK_NO
|
||||
}else if(lists[i].WORK_TYPE == "BREAKGROUND"){
|
||||
lists[i].CHECK_NO = "动土作业" + ' ' + lists[i].CHECK_NO
|
||||
}
|
||||
console.log(lists[i].CHECK_NO)
|
||||
}
|
||||
|
|
102
pages.json
102
pages.json
|
@ -543,7 +543,102 @@
|
|||
"path": "pages/application/highwork/highwork-accept/highwork-accept-detail",
|
||||
"style": {}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/application/electricity/home",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-list/index",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-apply/electricity-apply-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-gas/gas-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-gas/gas-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-measures/electricity-measures-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-measures-confirm/electricity-measures-confirm-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-guardian/electricity-guardian-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-user/electricity-user-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-confess/electricity-confess-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-confirm/electricity-confirm-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-acceptconfess/electricity-acceptconfess-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-workuser/electricity-workuser-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-audit/electricity-audit-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-approve/electricity-approve-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-startwork/electricity-startwork-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-endwork/electricity-endwork-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/electricity/electricity-accept/electricity-accept-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/breakground/home",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/breakground/breakground-list/index",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/breakground/breakground-apply/breakground-apply-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/breakground/breakground-workuser/breakground-workuser-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/breakground/breakground-measures/breakground-measures-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/breakground/breakground-measures-confirm/breakground-measures-confirm-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hotwork/home",
|
||||
"style": {}
|
||||
|
@ -588,10 +683,7 @@
|
|||
"path": "pages/application/hotwork/hotwork-audit/hotwork-audit-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hotwork/hotwork-safety/hotwork-safety-detail",
|
||||
"style": {}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/application/hotwork/hotwork-approve/hotwork-approve-detail",
|
||||
"style": {}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,609 @@
|
|||
<template>
|
||||
<view >
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">编号:</view>
|
||||
{{pd.CHECK_NO}}
|
||||
</view>
|
||||
<view class="cu-form-group group-picker">
|
||||
<view class="title">申请部门:</view>
|
||||
{{pd.APPLY_DEPARTMENT_NAME}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">作业地点:</view>
|
||||
{{pd.WORK_PLACE}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">作业内容:</view>
|
||||
{{pd.JOB_CONTENT}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default" v-if="pd.WORK_CONTENT">
|
||||
<view class="title">作业内容、范围、方式:</view>
|
||||
{{pd.WORK_CONTENT}}
|
||||
</view>
|
||||
<view class="cu-bar" v-if="pd.CONTENT_IMG_PATH">
|
||||
<view class="action" style="font-weight: bold;">
|
||||
作业内容、范围、方式简图:
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view v-if="pd.CONTENT_IMG_PATH" style="display: flex;align-items: flex-end;padding: 0 30upx">
|
||||
<view v-for="(item,index) in pd.CONTENT_IMG_PATH" :key="index" style="margin-right:20upx">
|
||||
<view class="imgs">
|
||||
<image :src="baseImgPath + pd.CONTENT_IMG_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + pd.CONTENT_IMG_PATH[index])"
|
||||
mode="" style="width: 100upx;height: 100upx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="pd.WORK_START_DATE" class="cu-form-group bb-default">
|
||||
<view class="title">作业开始时间:</view>
|
||||
{{pd.WORK_START_DATE}}
|
||||
</view>
|
||||
<view v-if="pd.WORK_END_DATE" class="cu-form-group bb-default">
|
||||
<view class="title">作业结束时间:</view>
|
||||
{{pd.WORK_END_DATE}}
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">关联的其他特殊作业及安全作业票编号:</view>
|
||||
{{pd.SPECIAL_WORK}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">风险辨识结果:</view>
|
||||
{{pd.RISK_IDENTIFICATION}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;" v-if="showMeasures && measuresList.length > 0">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">操作</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in measuresList" :key="item.BUS_BREAKGROUND_MEASURES_ID">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.PROTECTIVE_MEASURES}}
|
||||
<view v-if="item.SIGN_PATH" class="cu-item">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + item.SIGN_PATH" :data-index="index" @click="ViewShowImage(baseImgPath + item.SIGN_PATH)"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
<text> {{item.SIGN_TIME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="item.QUESTION1">
|
||||
<view class="title">{{item.QUESTION1}}</view>
|
||||
{{item.ANSWER1?item.ANSWER1:0}}
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="item.QUESTION2">
|
||||
<view class="title">{{item.QUESTION2}}</view>
|
||||
{{item.ANSWER2?item.ANSWER2:0}}
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="item.QUESTION3">
|
||||
<view class="title">{{item.QUESTION3}}</view>
|
||||
{{item.ANSWER3?item.ANSWER3:0}}
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="item.QUESTION4">
|
||||
<view class="title">{{item.QUESTION4}}</view>
|
||||
{{item.ANSWER4?item.ANSWER4:0}}
|
||||
|
||||
</view>
|
||||
</uni-td>
|
||||
<uni-td align="center">
|
||||
<view class="group" v-if="item.STATUS=='-1'">
|
||||
<text class="wui-pl10">不涉及</text>
|
||||
</view>
|
||||
<view class="group" v-if="item.STATUS=='1'">
|
||||
<text class="wui-pl10">涉 及</text>
|
||||
</view>
|
||||
<view v-if="item.IMG_PATH">
|
||||
<view class="imgs" v-for="img in item.IMG_PATH.split(',')" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + img" :data-index="index" @click="ViewShowImage(baseImgPath + img)"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;" v-if="showMeasures && signs.MEASURES_CONFIRM">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">其他安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table border stripe emptyText="暂无更多数据" >
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
</view>
|
||||
</uni-td>
|
||||
<uni-td align="center">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + item.SIGN_PATH[0]" :data-index="index" @click="ViewShowImage(baseImgPath + item.SIGN_PATH[0])"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list">
|
||||
<view v-if="signs.WORK_USER">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业人</view>
|
||||
{{pd.WORK_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.WORK_USER[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.WORK_USER[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_USER[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.WORK_USER[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.GUARDIAN">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">监护人</view>
|
||||
{{pd.GUARDIAN_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.GUARDIAN[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.GUARDIAN[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.GUARDIAN[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.GUARDIAN[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.CONFESS">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">安全交底人</view>
|
||||
{{pd.CONFESS_USER_NAME}}
|
||||
</view>
|
||||
<view v-if="signs.CONFESS[0].IMG_PATH" style="display: flex;align-items: flex-end;padding: 0 30upx">
|
||||
<view v-for="(item,index) in signs.CONFESS[0].IMG_PATH" :key="index" style="margin-right:20upx">
|
||||
<view class="imgs">
|
||||
<image :src="baseImgPath + signs.CONFESS[0].IMG_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFESS[0].IMG_PATH[index])"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.CONFESS[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.CONFESS[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFESS[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.CONFESS[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.ACCEPT_CONFESS">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">接受交底人</view>
|
||||
{{pd.ACCEPT_CONFESS_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.ACCEPT_CONFESS[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.ACCEPT_CONFESS[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.ACCEPT_CONFESS[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.ACCEPT_CONFESS[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list">
|
||||
|
||||
<view v-if="signs.CONFIRM">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">作业负责人意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.CONFIRM[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业负责人</view>
|
||||
{{pd.CONFIRM_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.CONFIRM[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.CONFIRM[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFIRM[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.CONFIRM[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.LEADER">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">所在单位意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.LEADER[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">所在单位负责人</view>
|
||||
{{pd.LEADER_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.LEADER[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.LEADER[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.LEADER[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.LEADER[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.AUDIT">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">审核部门意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.AUDIT[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">审核部门负责人</view>
|
||||
{{pd.AUDIT_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.AUDIT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.AUDIT[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.AUDIT[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.AUDIT[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.APPROVE">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">审批人意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.APPROVE[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">审批负责人</view>
|
||||
{{pd.APPROVE_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.APPROVE[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.APPROVE[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.APPROVE[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.APPROVE[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.MONITOR">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">动火前在岗班长意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.MONITOR[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">动火前在岗班长</view>
|
||||
{{pd.MONITOR_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.MONITOR[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.MONITOR[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.MONITOR[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.MONITOR[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.WORK_START">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业开始负责人</view>
|
||||
{{pd.WORK_START_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.WORK_START[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.WORK_START[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_START[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.WORK_START[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.WORK_END">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业结束负责人</view>
|
||||
{{pd.WORK_END_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.WORK_END[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.WORK_END[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_END[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.WORK_END[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.ACCEPT">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">完工验收</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.ACCEPT[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">验收部门负责人</view>
|
||||
{{pd.ACCEPT_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.ACCEPT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.ACCEPT[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.ACCEPT[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.ACCEPT[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,OtherSelect
|
||||
},
|
||||
props: {
|
||||
breakgroundId: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
showMeasures: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
msg:'add',
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
levelList:[
|
||||
{id:'特级',name:'特级'},
|
||||
{id:'一级',name:'一级'},
|
||||
{id:'二级',name:'二级'},
|
||||
],
|
||||
levelindex:-1,
|
||||
files: [],
|
||||
files1: [],
|
||||
analyzeUserList:[],
|
||||
analyzeindex:-1,
|
||||
confirmUserList:[],
|
||||
workuserindex:-1,
|
||||
confessUserList: [],
|
||||
confessindex:-1,
|
||||
acceptconfessUserList:[],
|
||||
acceptconfessindex:-1,
|
||||
workUserList:[],
|
||||
workstartindex:-1,
|
||||
workstartUserList:[],
|
||||
workendindex:-1,
|
||||
workendUserList:[],
|
||||
confirmindex:-1,
|
||||
guardianUserList:[],
|
||||
guardianindex:-1,
|
||||
leaderUserList:[],
|
||||
leaderindex:-1,
|
||||
auditUserList:[],
|
||||
auditindex:-1,
|
||||
approveUserList:[],
|
||||
approveindex:-1,
|
||||
monitorUserList:[],
|
||||
monitorindex:-1,
|
||||
acceptUserList:[],
|
||||
acceptindex:-1,
|
||||
pd:{},// 数据
|
||||
signs:{},
|
||||
measuresList:[],
|
||||
rules:[
|
||||
// {name:'CHECK_NO',message:'请输入编号'},
|
||||
{name:'WORK_CONTENT',message:'请输入作业内容'},
|
||||
{name:'WORK_PLACE',message:'请输入动火地点及动火部位'},
|
||||
{name:'WORK_LEVEL',message:'请选择动火级别'},
|
||||
{name:'WORK_FUNCTION',message:'请输入动火方式'},
|
||||
// {name:'WORK_START_DATE',message:'请选择工作开始时间'},
|
||||
// {name:'WORK_END_DATE',message:'请选择工作结束时间'},
|
||||
// {name:'WORK_MANAGER',message:'请输入作业负责人'},
|
||||
{name:'WORK_USER',message:'请输入动火人及证书编号'},
|
||||
// {name:'SPECIAL_WORK',message:'请输入关联的其他特殊作业及安全作业票编号'},
|
||||
{name:'RISK_IDENTIFICATION',message:'请输入风险辨识结果'},
|
||||
// {name:'CONFESS_USER',message:'请输入安全交底人'},
|
||||
// {name:'EDUCATE_USER',message:'请输入安全教育人'},
|
||||
// {name:'ACCEPT_EDUCATE_USER',message:'请输入接受交底、教育人'},
|
||||
// {name:'TRIAL_USER',message:'请输入动火措施初审人'},
|
||||
{name:'ANALYZE_USER_ID',message:'请选择分析人'},
|
||||
{name:'CONFIRM_USER_ID',message:'请选择作业负责人'},
|
||||
// {name:'GUARDIAN_USER_ID',message:'请选择监护人'},
|
||||
{name:'LEADER_USER_ID',message:'请选择动火点车间负责人'},
|
||||
// {name:'AUDIT_USER_ID',message:'请选择安全管理部门负责人'},
|
||||
// {name:'APPROVE_USER_ID',message:'请选择动火审批人'},
|
||||
{name:'MONITOR_USER_ID',message:'请选择验票班长'},
|
||||
{name:'ACCEPT_USER_ID',message:'请选择验收部门负责人'},
|
||||
{name:'GUARDIAN_USER_ID',message:'请选择监护人'},
|
||||
{name:'CONFESS_USER_ID',message:'请选择安全交底人'},
|
||||
{name:'ACCEPT_CONFESS_USER_ID',message:'请选择接受交底人'},
|
||||
],
|
||||
todayDate:'',
|
||||
otherAssignments:false,
|
||||
otherIdentification:false,
|
||||
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
console.log(this.breakgroundId)
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.BREAKGROUND_ID = this.breakgroundId;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
|
||||
getCode(){
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/getCode',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
this.pd.CHECK_NO = res.data.code;
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
this.getSigns()
|
||||
this.getMeasures()
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getSigns(){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/listSignFinished',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.signs = res.data.signs; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getMeasures(){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/listSignFinishMeasures',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.measuresList = res.data.finishMeasuresList; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,579 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">动土作业{{ flow }}</block>
|
||||
<block slot="right" v-if="flow === '提交申请'">
|
||||
<view @click="$noMultipleClicks(goToAdd)">申请</view>
|
||||
</block>
|
||||
</cu-custom>
|
||||
<view class="select-fixed top-fixed">
|
||||
<view class="cu-bar search bg-white">
|
||||
<picker @change="statusChange" :value="sindex" :range="stepList" range-key="STEP_NAME">
|
||||
<view class="saixuan">
|
||||
<text>筛选</text>
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="search-form radius" style="margin-left: 0;">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input v-model="KEYWORDS" placeholder="请输入关键字"></input>
|
||||
|
||||
</view>
|
||||
<view class="action">
|
||||
<button class="cu-btn bg-green shadow-blur radius" @click="getQuery">搜索</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<scroll-view class="dy-scroll" @scrolltolower="scrolltolower" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0" >
|
||||
<view class="dy-list">
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.BREAKGROUND_ID" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text>编号:{{item.CHECK_NO}}</text>
|
||||
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text>申请人:{{item.APPLY_USER_NAME}}</text>
|
||||
<text>监护人:{{item.GUARDIAN_USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text>安全交底人:{{item.CONFESS_USER_NAME}}</text>
|
||||
<text>接受交底人:{{item.ACCEPT_CONFESS_USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text>作业负责人:{{item.CONFIRM_USER_NAME}}</text>
|
||||
<text>所在单位负责人:{{item.LEADER_USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text v-if="item.SAFETY_USER_NAME">有关水、电、汽、工艺、设备、消防安全等部门:{{item.SAFETY_USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text v-if="item.APPROVE_USER_NAME">审批部门负责人:{{item.APPROVE_USER_NAME}}</text>
|
||||
<text>验收部门负责人:{{item.ACCEPT_USER_NAME}}</text>
|
||||
</view>
|
||||
|
||||
<view class="dy-subtitle-flex" style="height: 34upx;" @click="$noMultipleClicks(goToDetail,item.BREAKGROUND_ID)">
|
||||
<text>
|
||||
审核状态:
|
||||
<template v-if="item.STEP_ID==0">暂存</template>
|
||||
<template v-else-if="item.STATUS==-2">气体检测打回</template>
|
||||
<template v-else-if="item.STEP_ID!=-1">{{ item.NEXT_STEP_NAME }}</template>
|
||||
<template v-else>{{ item.STEP_NAME }}打回</template>
|
||||
</text>
|
||||
<text v-if="item.STEP_ID<1"><button class="cu-btn bg-red margin-tb-sm sm" @click="$noMultipleClicks(handleDelete,item.BREAKGROUND_ID)">删除</button></text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<text><button class="cu-btn bg-green" style="padding: 0 5px; height:24px;"
|
||||
@click="showDrawer('showRight',item.BREAKGROUND_ID)">查看流程图</button></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 右侧抽屉 -->
|
||||
<uni-drawer ref="showRight" mode="right" :mask-click="true" @change="change($event,'showRight')">
|
||||
<scroll-view scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view class="step-top ">
|
||||
查看流程图
|
||||
</view>
|
||||
<view class="step-item-container">
|
||||
<view class="step-item">
|
||||
<view class="step-item-wrap" v-for="(item,key) of flowList" :key="key"
|
||||
:class="getShowStatus(item)">
|
||||
<view class="step-item-wrap-doter">
|
||||
<view class="step-item-wrap-dot"></view>
|
||||
</view>
|
||||
<view class="step-item-wrap-right">
|
||||
<view class="step-item-wrap-right-title">{{item.STEP_NAME}}</view>
|
||||
<view class="step-item-wrap-right-title">{{item.SIGN_USER || item.FINISHED_SIGN_USER || item.ACT_USER_NAME }}</view>
|
||||
<view class="step-item-wrap-right-title">{{item.ACT_TIME}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</uni-drawer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,loginSession,formatDate,loginUser
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
export default {
|
||||
components: {
|
||||
tkiTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flow:"",
|
||||
showRight: false,
|
||||
dataFlag:'noData',
|
||||
sTop:0,
|
||||
totalHeight:0,
|
||||
list:[],//返回数据
|
||||
page:1,//分页参数--页数
|
||||
rows:10,//分页参数--每页数据条数
|
||||
totalCount:0,//分页参数--初始化页数
|
||||
isEnd:false,//防止多次刷新
|
||||
totalPage:0,//分页参数--分页数量
|
||||
KEYWORDS : '',
|
||||
noClick:true,
|
||||
stepList:[],
|
||||
sindex:-1,
|
||||
STEP_ID:'',
|
||||
flowList:[],
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
let that=this;
|
||||
let CustomBar = this.CustomBar;
|
||||
uni.getSystemInfo({ //调用uni-app接口获取屏幕高度
|
||||
success(res) { //成功回调函数
|
||||
let titleH=uni.createSelectorQuery().select(".top-fixed"); //想要获取高度的元素名(class/id)
|
||||
titleH.boundingClientRect(data=>{
|
||||
that._data.sTop=data.height //计算高度:元素高度=窗口高度-元素距离顶部的距离(data.top)
|
||||
that.totalHeight = data.height+CustomBar
|
||||
}).exec()
|
||||
}
|
||||
})
|
||||
},
|
||||
onLoad(e) {//页面第一次加载时触发,从跳转页面返回时不能触发,可以传递参
|
||||
this.flow = e.flow;
|
||||
},
|
||||
onShow() {
|
||||
//页面显示或从后台跳回小程序时显示此页面时触发,从跳转页面返回时触发,不能传递参数
|
||||
var _this = this;
|
||||
_this.background = require('@/common/background.json');
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = 1;
|
||||
_this.list = [];
|
||||
_this.isEnd = false;
|
||||
_this.getData();
|
||||
_this.getSetps();
|
||||
// _this.getDept();
|
||||
loginSession();
|
||||
},
|
||||
|
||||
filters: {
|
||||
formatDate(time) {
|
||||
let date = new Date(time)
|
||||
return formatDate(date, 'yyyy-MM-dd')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
if(this.flow=== '提交申请'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-apply/breakground-apply-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '作业人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-workuser/breakground-workuser-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '设置安全措施确认人'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-measures/breakground-measures-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '安全措施确认'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-measures-confirm/breakground-measures-confirm-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '监护人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-guardian/breakground-guardian-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '安全交底人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-confess/breakground-confess-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '接受交底人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-acceptconfess/breakground-acceptconfess-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '作业负责人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-confirm/breakground-confirm-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '所在单位签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-leader/breakground-leader-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '有关水、电、汽、工艺、设备、消防安全等部门'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-safety/breakground-safety-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '审批人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-approve/breakground-approve-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '开始作业'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-startwork/breakground-startwork-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '结束作业'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-endwork/breakground-endwork-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}else if(this.flow === '验收签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-accept/breakground-accept-detail?BREAKGROUND_ID='+e
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
goToAdd(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-apply/breakground-apply-detail'
|
||||
});
|
||||
},
|
||||
getQuery(){ //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = 1;
|
||||
_this.list = [];
|
||||
_this.isEnd = false;
|
||||
_this.getData();
|
||||
},
|
||||
|
||||
|
||||
// 滑动到底方法
|
||||
scrolltolower(){
|
||||
var _this = this;
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = _this.currentPage + 1;
|
||||
_this.isEnd = false;
|
||||
if(_this.totalPage >= _this.currentPage){
|
||||
_this.getData();//开始分页查询
|
||||
}
|
||||
},
|
||||
|
||||
statusChange(e){
|
||||
this.sindex = e.detail.value;
|
||||
this.STEP_ID=this.stepList[this.sindex].STEP_ID;
|
||||
this.getQuery();
|
||||
},
|
||||
|
||||
getSetps(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath +'/app/eightwork/getTaskSetps',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
TASK_ID: 1,
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data != null) {
|
||||
_this.stepList = [{"STEP_NAME":"请选择","STEP_ID":""},...res.data.list,{"STEP_NAME":"验收归档","STEP_ID":"99"}];
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getData(){
|
||||
var _this = this;
|
||||
if (_this.isEnd) {
|
||||
return
|
||||
}else{
|
||||
this.isEnd =true;
|
||||
}
|
||||
uni.showLoading({
|
||||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/breakground/list?showCount='+_this.showCount+'¤tPage='+_this.currentPage ,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CREATOR:_this.flow === '提交申请'?loginUser.USER_ID : '',
|
||||
GASCHECK:_this.flow === '气体检测'?loginUser.USER_ID : '',
|
||||
STEP_NAME: (_this.flow === '提交申请' || _this.flow === '气体检测')?'' : _this.flow,
|
||||
STEP_ID: _this.STEP_ID,
|
||||
KEYWORDS : _this.KEYWORDS, //关键字模糊查询
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();//结束加载中动画
|
||||
_this.totalPage = res.data.page.totalPage;
|
||||
if(_this.list.length == 0){
|
||||
_this.list = res.data.varList;
|
||||
}else{
|
||||
if(res.data.varList != null){
|
||||
_this.list = _this.list.concat(res.data.varList);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(id){
|
||||
var _this = this;
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这条申请?',
|
||||
cancelColor:"#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.showLoading({
|
||||
title: '处理中'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath+'/app/breakground/delete',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: id,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '删除成功',
|
||||
duration: 1500
|
||||
});
|
||||
_this.getQuery()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 打开窗口
|
||||
showDrawer(e,BREAKGROUND_ID) {
|
||||
uni.showLoading({
|
||||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/breakground/getFlowList' ,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();//结束加载中动画
|
||||
this.flowList = res.data.flowList
|
||||
this.$refs[e].open()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getShowStatus(work) {
|
||||
if(work.STATUS === 1){
|
||||
return 'success'
|
||||
}else if(work.STATUS < 0){
|
||||
return 'erroractive'
|
||||
}else if(work.CURRENT_STEP){
|
||||
return 'active'
|
||||
}
|
||||
},
|
||||
// 关闭窗口
|
||||
closeDrawer(e) {
|
||||
this.$refs[e].close()
|
||||
},
|
||||
|
||||
// 抽屉状态发生变化触发
|
||||
change(e, type) {
|
||||
console.log((type === 'showLeft' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
|
||||
this[type] = e
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dy-card {
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin: 30upx
|
||||
}
|
||||
|
||||
.dy-card-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
min-height: 80upx;
|
||||
line-height: 80upx;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
|
||||
.dy-card-content {
|
||||
padding: 0upx 30upx 30upx;
|
||||
|
||||
}
|
||||
|
||||
.dy-card-content-item {
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.dy-card-content-item .title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dy-card-content-item .title .l {
|
||||
width: 10upx;
|
||||
height: 30upx;
|
||||
border-radius: 20upx;
|
||||
background-color: #666;
|
||||
margin-right: 10upx;
|
||||
}
|
||||
|
||||
.dy-card-content-item .content {
|
||||
background-color: #F1F1F1;
|
||||
padding: 10upx 14upx;
|
||||
margin-top: 14upx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.dy-card-content-item .name text {
|
||||
background-color: #F1F1F1;
|
||||
padding: 10upx 14upx;
|
||||
margin-top: 14upx;
|
||||
line-height: 1.6;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dy-card-foot {
|
||||
border-top: 1px solid #eee;
|
||||
padding: 30upx;
|
||||
}
|
||||
.p20 {
|
||||
padding: 40upx;
|
||||
}
|
||||
|
||||
.step-top {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #eee;
|
||||
background: #f9f9f9;
|
||||
padding: 20upx;
|
||||
}
|
||||
|
||||
.step-item-container {
|
||||
width: 100%;
|
||||
padding: 20upx;
|
||||
|
||||
}
|
||||
|
||||
.step-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20upx 40upx;
|
||||
}
|
||||
|
||||
|
||||
.step-item-wrap {
|
||||
width: 100%;
|
||||
border-left: 1px solid #ccc;
|
||||
min-height: 100upx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.step-item-wrap.active .step-item-wrap-doter .step-item-wrap-dot {
|
||||
background: #4cc9fb;
|
||||
}
|
||||
|
||||
.step-item-wrap.success .step-item-wrap-doter .step-item-wrap-dot {
|
||||
background: #5db174;
|
||||
}
|
||||
|
||||
.step-item-wrap.erroractive .step-item-wrap-doter .step-item-wrap-dot {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.step-item-wrap.active {
|
||||
border-left: 1px solid #5db174;
|
||||
}
|
||||
|
||||
.step-item-wrap.activeing {
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.step-item-wrap:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.step-item-wrap-doter {
|
||||
width: 30upx;
|
||||
height: 30upx;
|
||||
border-radius: 100%;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 0upx;
|
||||
left: -12upx;
|
||||
text-align: center;
|
||||
padding-top: 5upx;
|
||||
|
||||
}
|
||||
|
||||
.step-item-wrap-dot {
|
||||
width: 20upx;
|
||||
height: 20upx;
|
||||
background: #c0c4cc;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.step-item-wrap-right {
|
||||
margin-left: 40upx;
|
||||
margin-top: -5upx;
|
||||
padding-bottom: 60upx;
|
||||
}
|
||||
|
||||
|
||||
.step-item-wrap-right-info {
|
||||
color: #999;
|
||||
margin-top: 10upx;
|
||||
}
|
||||
.step-item-wrap.active .step-item-wrap-right,.step-item-wrap.active .step-item-wrap-right-info {
|
||||
color: #4cc9fb;
|
||||
}
|
||||
|
||||
.step-item-wrap.success .step-item-wrap-right,.step-item-wrap.success .step-item-wrap-right-info {
|
||||
color: #5db174;
|
||||
}
|
||||
|
||||
.step-item-wrap.erroractive .step-item-wrap-right,.step-item-wrap.erroractive .step-item-wrap-right-info {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,407 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全措施确认人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.BREAKGROUND_ID" :breakgroundId="pd.BREAKGROUND_ID" :showMeasures="false"></detail>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center">
|
||||
<view class="title" style="width: 50px">操作</view>
|
||||
</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
<uni-tr>
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.PROTECTIVE_MEASURES}}
|
||||
</view>
|
||||
|
||||
</uni-td>
|
||||
|
||||
<uni-td align="center">
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">
|
||||
{{!item.SIGN_PATH ? '签字' : '已签字'}}
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
</uni-table>
|
||||
</view>
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">其他安全措施:</view>
|
||||
<input name="input" ref="DESCR" v-model="pd.DESCR" placeholder="请输入其他安全措施"></input>
|
||||
</view>
|
||||
<view class="wui-sign" >
|
||||
<view class="title"></view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'-1')">打 回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'1')">通 过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import { setMeasures } from '@/pages/application/dangerous_options/index.js';
|
||||
import detail from '@/pages/application/breakground/breakground-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.pd.BREAKGROUND_ID = event.BREAKGROUND_ID;
|
||||
this.getData();
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getMeasures();
|
||||
loginSession();
|
||||
},
|
||||
// 监听事件
|
||||
mounted() {
|
||||
uni.$on('dangerous_options_submit', (data) => {
|
||||
this.$set(this.measuresList[data.index],'SIGN_PATH',data.signImgList[0].filePath)
|
||||
this.$set(this.measuresList[data.index],'SIGN_TIME',data.signImgList[0].SIGNER_TIME)
|
||||
this.$set(this.measuresList[data.index],'IMG_PATH',data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(","))
|
||||
this.$set(this.measuresList[data.index],'STATUS',data.STATUS)
|
||||
})
|
||||
},
|
||||
// 取消监听
|
||||
beforeDestroy() {
|
||||
uni.$off('dangerous_options_submit');
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-gas/gas-list?BREAKGROUND_ID='+e
|
||||
});
|
||||
},
|
||||
goToSign(index) {
|
||||
const measures = this.measuresList[index]
|
||||
const signImgList = []
|
||||
if (measures.SIGN_PATH) {
|
||||
signImgList.push({"filePath":measures.SIGN_PATH,"SIGNER_TIME":measures.SIGN_TIME})
|
||||
}
|
||||
const imgList = []
|
||||
if (measures.IMG_PATH) {
|
||||
measures.IMG_PATH.split(",").forEach(item => {
|
||||
imgList.push({"filePath":item})
|
||||
})
|
||||
}
|
||||
setMeasures(measures.PROTECTIVE_MEASURES)
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/dangerous_options/index?index='+index +
|
||||
'&STATUS='+(measures.STATUS || 1) + '&signImgList='+JSON.stringify(signImgList) + '&imgList='+JSON.stringify(imgList)
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
goSubmit(APPLY_STATUS) {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (APPLY_STATUS == 1) {
|
||||
if(!this.pd.DESCR){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入其他安全措施,没有请填“无”',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.SIGN_PATH){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '第'+(i+1)+'项未签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.BREAKGROUND_ID = _this.pd.BREAKGROUND_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.MEASURES = JSON.stringify(this.measuresList)
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/breakground/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
getMeasures(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/breakground/listAllMeasuresForSign?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
CONFIRM_ID:loginUser.USER_ID,
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.measuresList = res.data.measuresForSignList
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDeptTree(index) {
|
||||
this.isUps=true
|
||||
this.$refs['tkiTree'+index][0]._show();
|
||||
},
|
||||
|
||||
deptTreeConfirm(e,i) {
|
||||
this.isUps=false;
|
||||
this.measuresList[i].DEPARTMENT_ID=e[0].id;
|
||||
this.measuresList[i].DEPARTMENT_NAME=e[0].name;
|
||||
this.measuresList[i].USER_ID = ''
|
||||
this.measuresList[i].USER_NAME = ''
|
||||
this.getUserList(e[0].id,i);
|
||||
},
|
||||
|
||||
deptTreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
|
||||
pickerUser(e,i) {
|
||||
this.measuresList[i].userIndex = e.detail.value;
|
||||
this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID;
|
||||
this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
isBlankList(i) {
|
||||
if (this.measuresList[i].userList.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先选择确认单位',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//获取人员列表
|
||||
getUserList(dept,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
_this.measuresList[i].userList = res.data.userList;
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = e.currentTarget.dataset.target
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,379 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全措施确认人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.BREAKGROUND_ID" :breakgroundId="pd.BREAKGROUND_ID" :showMeasures="false"></detail>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
<uni-tr>
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.PROTECTIVE_MEASURES}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">确认单位:</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showDeptTree(index)">{{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}</view>
|
||||
</view>
|
||||
<tki-tree :ref="'tkiTree'+index"
|
||||
:selectParent=true
|
||||
:range="treeNode"
|
||||
rangeKey="name"
|
||||
@confirm="deptTreeConfirm($event,index)"
|
||||
@cancel="deptTreeCancel($event,index)"></tki-tree>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">确认人</view>
|
||||
<picker @change="pickerUser($event,index)" :value="item.userIndex" :range="item.userList" range-key="NAME" :disabled="item.userList.length == 0" @click="isBlankList(index)">
|
||||
<view class="picker">
|
||||
{{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
</uni-table>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign" >
|
||||
<view class="title"></view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'-1')">打 回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'1')">通 过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/breakground/breakground-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.pd.BREAKGROUND_ID = event.BREAKGROUND_ID;
|
||||
this.getData();
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getMeasures();
|
||||
loginSession();
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/breakground/breakground-gas/gas-list?BREAKGROUND_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(APPLY_STATUS == 1){
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.USER_ID){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '第'+(i+1)+'项未设置确认人',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const signers = this.measuresList.map(item => {
|
||||
return {
|
||||
BUS_BREAKGROUND_MEASURES_ID: item.BUS_BREAKGROUND_MEASURES_ID,
|
||||
USER_ID: item.USER_ID
|
||||
}
|
||||
})
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.BREAKGROUND_ID = _this.pd.BREAKGROUND_ID
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.PREPARERS = JSON.stringify(signers)
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/breakground/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
getMeasures(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/breakground/listAllMeasures?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.measuresList = res.data.measuresList.map((item,index)=>{
|
||||
item.userList = []
|
||||
item.userIndex = -1
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDeptTree(index) {
|
||||
this.isUps=true
|
||||
this.$refs['tkiTree'+index][0]._show();
|
||||
},
|
||||
|
||||
deptTreeConfirm(e,i) {
|
||||
this.isUps=false;
|
||||
this.measuresList[i].DEPARTMENT_ID=e[0].id;
|
||||
this.measuresList[i].DEPARTMENT_NAME=e[0].name;
|
||||
this.measuresList[i].USER_ID = ''
|
||||
this.measuresList[i].USER_NAME = ''
|
||||
this.getUserList(e[0].id,i);
|
||||
},
|
||||
|
||||
deptTreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
|
||||
pickerUser(e,i) {
|
||||
this.measuresList[i].userIndex = e.detail.value;
|
||||
this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID;
|
||||
this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
isBlankList(i) {
|
||||
if (this.measuresList[i].userList.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先选择确认单位',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//获取人员列表
|
||||
getUserList(dept,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
_this.measuresList[i].userList = res.data.userList;
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = e.currentTarget.dataset.target
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,473 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">作业人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.BREAKGROUND_ID" :breakgroundId="pd.BREAKGROUND_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-textarea">
|
||||
<view class="cu-form-title">作业内容、范围、方式:</view>
|
||||
<textarea maxlength="255" v-model="pd.WORK_CONTENT"
|
||||
placeholder="请输入动土内容、范围、方式"></textarea>
|
||||
</view>
|
||||
<view class="cu-bar">
|
||||
<view class="action" style="font-weight: bold;">
|
||||
作业内容、范围、方式简图:
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in conimgList" :key="index" @tap="viewImage(index,'conimgList')">
|
||||
<image :src="baseImgPath + item.filePath" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImgs" data-type="2" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImages()">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-form-list">
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
<view class="title">作业人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/breakground/breakground-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
files: [],
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
conimgList: [],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.BREAKGROUND_ID = event.BREAKGROUND_ID;
|
||||
if(this.pd.BREAKGROUND_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
delImgs(e) {
|
||||
var _this = this;
|
||||
uni.showModal({
|
||||
title: '秦安双控',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.request({
|
||||
url: basePath+'/app/eightwork/deleteFile',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
FILE_PATH:_this.conimgList[e.currentTarget.dataset.index].filePath
|
||||
},
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '删除成功',
|
||||
duration: 1500
|
||||
});
|
||||
this.conimgList.splice(e.currentTarget.dataset.index, 1)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showModal({
|
||||
content: "删除失败",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseImages() {
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/eightwork/saveFile',
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'file',
|
||||
formData: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: ({data}) => {
|
||||
let img = {};
|
||||
img.filePath = JSON.parse(data).FILE_PATH;
|
||||
this.conimgList.push(img)
|
||||
console.log(this.conimgList)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showModal({
|
||||
content: "图片上传失败",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/breakground/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
BREAKGROUND_ID: _this.pd.BREAKGROUND_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
previewImage(url){
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
});
|
||||
},
|
||||
ChooseImage() {
|
||||
var _this = this;
|
||||
const formData={}
|
||||
formData.CORPINFO_ID = loginUser.CORPINFO_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/breakground/uploadImg',
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'FFILE',
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
_this.pd.CONTENT_IMG_PATH = JSON.parse(res.data).path
|
||||
_this.$forceUpdate()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
_this.$set(_this.pd,'CONTENT_IMG_PATH',res.tempFilePaths[0])
|
||||
}
|
||||
});
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(_this.conimgList.length <= 0){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请上传缩略图',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.BREAKGROUND_ID = _this.pd.BREAKGROUND_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.WORK_CONTENT = _this.pd.WORK_CONTENT
|
||||
formData.CONIMG_PATH = this.conimgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(",")
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/breakground/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,314 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">动土作业</block>
|
||||
</cu-custom>
|
||||
|
||||
<view class="apps-box">
|
||||
<view class="apps-row">
|
||||
<view class="apps-title">
|
||||
<text class="apps-title-line"></text>
|
||||
<text>动土作业审批管理</text>
|
||||
</view>
|
||||
<view class="apps-warp">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=提交申请">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-1.png" mode=""></image>
|
||||
<view v-if="count.CREATE" class="cu-tag badge">{{count.CREATE}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>动土作业</view>
|
||||
<view>申请</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=作业人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-2.png" mode=""></image>
|
||||
<view v-if="count.WORK_USER" class="cu-tag badge">{{count.WORK_USER}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>作业人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=设置安全措施确认人">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yh-1.png" mode=""></image>
|
||||
<view v-if="count.MEASURES_SET" class="cu-tag badge">{{count.MEASURES_SET}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>设置安全</view>
|
||||
<view>措施确认人</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=安全措施确认">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yh-1.png" mode=""></image>
|
||||
<view v-if="count.MEASURES_CONFIRM" class="cu-tag badge">{{count.MEASURES_CONFIRM}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>安全措施确认</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=监护人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-zl-9.png" mode=""></image>
|
||||
<view v-if="count.GUARDIAN" class="cu-tag badge">{{count.GUARDIAN}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>监护人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=安全交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-807.png" mode=""></image>
|
||||
<view v-if="count.CONFESS" class="cu-tag badge">{{count.CONFESS}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>安全交底人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=接受交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
|
||||
<view v-if="count.ACCEPT_CONFESS" class="cu-tag badge">{{count.ACCEPT_CONFESS}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>接受交底人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=作业负责人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-2.png" mode=""></image>
|
||||
<view v-if="count.CONFIRM" class="cu-tag badge">{{count.CONFIRM}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>作业负责人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=所在单位签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-907.png" mode=""></image>
|
||||
<view v-if="count.LEADER" class="cu-tag badge">{{count.LEADER}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>所在单位</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=有关水、电、汽、工艺、设备、消防安全等部门">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-901.png" mode=""></image>
|
||||
<view v-if="count.SAFETY" class="cu-tag badge">{{count.SAFETY}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>有关水、电、</view>
|
||||
<view>汽、工艺、设</view>
|
||||
<view>备、消防安全等部门意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=审批人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-901.png" mode=""></image>
|
||||
<view v-if="count.APPROVE" class="cu-tag badge">{{count.APPROVE}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>审批部门</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=开始作业">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-aq-1.png" mode=""></image>
|
||||
<view v-if="count.WORK_START" class="cu-tag badge">{{count.WORK_START}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>开始作业时间</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=结束作业">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-js-1.png" mode=""></image>
|
||||
<view v-if="count.WORK_END" class="cu-tag badge">{{count.WORK_END}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>结束作业时间</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/breakground/breakground-list/index?flow=验收签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-js-1.png" mode=""></image>
|
||||
<view v-if="count.ACCEPT" class="cu-tag badge">{{count.ACCEPT}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>验收归档</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="apps-row">
|
||||
<view class="apps-title">
|
||||
<text class="apps-title-line"></text>
|
||||
<text>其他应用</text>
|
||||
</view>
|
||||
<view class="apps-warp">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/other-apps/videos/videos">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-zl-7.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">视频中心</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,
|
||||
loginUserId,
|
||||
formatDate,
|
||||
corpinfoId,
|
||||
loginUser,
|
||||
setloginUserId,
|
||||
setCorpinfoId,
|
||||
setloginUser,
|
||||
setDeptId,
|
||||
isRest
|
||||
} from '@/common/tool.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isRest :'',
|
||||
count : {}
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.isRest = isRest;
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
showRest(){
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel:false,
|
||||
content: '您处于离岗状态,无需检查清单。',
|
||||
confirmText: "返回", // 确认按钮文字
|
||||
success: (res) => {
|
||||
}
|
||||
})
|
||||
},
|
||||
getData(){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/breakground/checkWorkCount',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();//结束加载中动画
|
||||
if ("success" == res.data.result) {
|
||||
_this.count = res.data.count;
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-banner{
|
||||
width: 100%;
|
||||
height: 380upx;
|
||||
}
|
||||
.app-banner image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.apps-box {}
|
||||
|
||||
.apps-row {
|
||||
padding: 20upx 20upx 10upx 20upx;
|
||||
background-color: #fff;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
.apps-row:first-child{
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.apps-title {
|
||||
position: relative;
|
||||
padding-left: 20upx;
|
||||
color: #989898;
|
||||
padding-bottom: 20upx;
|
||||
}
|
||||
|
||||
.apps-title-line {
|
||||
display: inline-block;
|
||||
background-color: #37a6ff;
|
||||
width: 10upx;
|
||||
height: 23upx;
|
||||
position: absolute;
|
||||
left: 0upx;
|
||||
top: 11upx;
|
||||
}
|
||||
|
||||
.apps-warp {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.apps-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 25%;
|
||||
font-size: 25upx;
|
||||
margin-bottom: 20upx;
|
||||
}
|
||||
.apps-item .text-semi{
|
||||
margin-top: 6upx;
|
||||
}
|
||||
.apps-item .action{
|
||||
position: relative;
|
||||
}
|
||||
.apps-item .action .cu-tag.badge{
|
||||
right: -20upx;
|
||||
}
|
||||
.apps-item .imgs {
|
||||
width: 50upx;
|
||||
height: 50upx;
|
||||
}
|
||||
|
||||
.apps-item .imgs image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
|
@ -70,9 +70,12 @@
|
|||
</view>
|
||||
<textarea maxlength="255" auto-height :disabled="forbidEdit" v-model="pd.RISK_IDENTIFICATION" placeholder="请输入风险辨识结果"></textarea>
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<text class="title">分析人:</text>
|
||||
<text>{{pd.ANALYZE_USER_NAME}}</text>
|
||||
|
||||
<view class="cu-form-group bb-default" v-if="pd.ANALYZE_TIME">
|
||||
<view>
|
||||
<text class="title">分析人:</text>
|
||||
<text>{{pd.ANALYZE_USER_NAME}}</text>
|
||||
</view>
|
||||
<button class="cu-btn bg-green sm" @click="$noMultipleClicks(goToDetail,pd.CONFINEDSPACE_ID)">分析详情</button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -142,7 +145,7 @@
|
|||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_CONFINEDSPACE_MEASURES_ID">
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
|
@ -558,8 +561,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button v-if="!forbidEdit || !pd.STEP_ID " :loading="buttonloading" class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'1')">提交</button>
|
||||
<button v-if="!forbidEdit || !pd.STEP_ID " :loading="buttonloading" class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'0')">暂存</button>
|
||||
<button v-if="!forbidEdit || !pd.STEP_ID " class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'1')">提交</button>
|
||||
<button v-if="!forbidEdit || !pd.STEP_ID " class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'0')">暂存</button>
|
||||
<button v-if="forbidEdit && pd.STEP_ID !== 0" class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goback)">返回</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_CONFINEDSPACE_MEASURES_ID">
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">分析地点:</view>
|
||||
<input name="input" ref="ANALYZE_PLACE" v-model="pd.ANALYZE_PLACE" placeholder="请输入氧气含量"></input>
|
||||
<input name="input" ref="ANALYZE_PLACE" v-model="pd.ANALYZE_PLACE" placeholder="请输入分析地点"></input>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
|
@ -112,6 +112,7 @@
|
|||
{name:'ANALYZE_TIME',message:'请输入取样分析时间'},
|
||||
{name:'ANALYZE_PART',message:'请输入分析部位'},
|
||||
{name:'OXYGEN_CONTENT',message:'请输入氧气含量'},
|
||||
{name:'ANALYZE_PLACE',message:'请输入分析地点'},
|
||||
],
|
||||
GAS_NAME1:'',
|
||||
GAS_NAME2:'',
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/confinedspace/confinedspace-confess/confinedspace-confess-detail?CONFINEDSPACE_ID='+e
|
||||
});
|
||||
}else if(this.flow === '接受安全交底人签字'){
|
||||
}else if(this.flow === '接受交底人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/confinedspace/confinedspace-acceptconfess/confinedspace-acceptconfess-detail?CONFINEDSPACE_ID='+e
|
||||
});
|
||||
|
@ -213,7 +213,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/confinedspace/confinedspace-leader/confinedspace-leader-detail?CONFINEDSPACE_ID='+e
|
||||
});
|
||||
}else if(this.flow === '开始进行作业'){
|
||||
}else if(this.flow === '开始作业'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/confinedspace/confinedspace-startwork/confinedspace-startwork-detail?CONFINEDSPACE_ID='+e
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center">
|
||||
<view class="title">操作</view>
|
||||
<view class="title" style="width: 50px">操作</view>
|
||||
</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
|
@ -43,7 +43,9 @@
|
|||
</uni-td>
|
||||
|
||||
<uni-td align="center">
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">签字</view>
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">
|
||||
{{!item.SIGN_PATH ? '签字' : '已签字'}}
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
|
@ -106,6 +108,7 @@
|
|||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
|
@ -119,13 +122,12 @@
|
|||
// 监听事件
|
||||
mounted() {
|
||||
uni.$on('dangerous_options_submit', (data) => {
|
||||
console.log(data)
|
||||
this.measuresList[data.index].SIGN_PATH = data.signImgList[0].filePath
|
||||
this.measuresList[data.index].SIGN_TIME = data.signImgList[0].SIGNER_TIME
|
||||
this.measuresList[data.index].IMG_PATH = data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(",")
|
||||
this.measuresList[data.index].STATUS = data.STATUS
|
||||
this.$set(this.measuresList[data.index],'SIGN_PATH',data.signImgList[0].filePath)
|
||||
this.$set(this.measuresList[data.index],'SIGN_TIME',data.signImgList[0].SIGNER_TIME)
|
||||
this.$set(this.measuresList[data.index],'IMG_PATH',data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(","))
|
||||
this.$set(this.measuresList[data.index],'STATUS',data.STATUS)
|
||||
})
|
||||
},
|
||||
// 取消监听
|
||||
|
@ -201,6 +203,14 @@
|
|||
return;
|
||||
}
|
||||
if (APPLY_STATUS == 1) {
|
||||
if(!this.pd.DESCR){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入其他安全措施,没有请填“无”',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.SIGN_PATH){
|
||||
|
|
|
@ -87,13 +87,13 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/confinedspace/confinedspace-list/index?flow=接受安全交底人签字">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/confinedspace/confinedspace-list/index?flow=接受交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
|
||||
<view v-if="count.ACCEPT_CONFESS" class="cu-tag badge">{{count.ACCEPT_CONFESS}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>接受安全交底人</view>
|
||||
<view>接受交底人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
@ -128,13 +128,13 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/confinedspace/confinedspace-list/index?flow=开始进行作业">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/confinedspace/confinedspace-list/index?flow=开始作业">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-aq-1.png" mode=""></image>
|
||||
<view v-if="count.WORK_START" class="cu-tag badge">{{count.WORK_START}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>开始进行作业时间</view>
|
||||
<view>开始作业时间</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/confinedspace/confinedspace-list/index?flow=结束作业">
|
||||
|
|
|
@ -112,8 +112,6 @@ export default {
|
|||
onLoad(event) {
|
||||
this.imgList = JSON.parse(event.imgList) || [];
|
||||
this.signImgList = JSON.parse(event.signImgList) || [];
|
||||
console.log(this.signImgList)
|
||||
console.log(JSON.parse(event.signImgList) )
|
||||
this.currentIndex = event.index || 0;
|
||||
this.STATUS = event.STATUS || 1;
|
||||
},
|
||||
|
@ -212,7 +210,6 @@ export default {
|
|||
},
|
||||
goSubmit() {
|
||||
if(this.buttonloading) return;
|
||||
console.log(this.signImgList)
|
||||
if(this.signImgList.length === 0) {
|
||||
uni.showToast({
|
||||
title: '请签字',
|
||||
|
|
|
@ -0,0 +1,482 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">完工验收</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-textarea" style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-title">完工验收</view>
|
||||
<textarea maxlength="255" v-model="pd.DESCR" placeholder="请输入意见"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">验收时间</view>
|
||||
<ruiDatePicker fields="minute"
|
||||
:value="pd.ACCEPT_TIME?pd.ACCEPT_TIME:''"
|
||||
@change="changeStartDate"
|
||||
></ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
验收视频
|
||||
</view>
|
||||
<view class="action">
|
||||
{{videoList.length}}/1
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in videoList" :key="vindex" style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="videoList[vindex].filePath"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelVideo" data-type="0" :data-index="vindex">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap.stop="openAuthVideo('CAMERA')" v-if="videoList.length == 0">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign">
|
||||
<view class="title">验收部门负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">新增手写签字</button>
|
||||
</view>
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
<yk-authpup ref="authpup_video" type="top" @changeAuth="chooseVideo(0)" :permissionID="permissionID"></yk-authpup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
gasList:[],
|
||||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
videoList:[]
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
changeStartDate(e) {
|
||||
this.pd.ACCEPT_TIME = e
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!_this.pd.DESCR) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入负责人意见',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(APPLY_STATUS == 1){
|
||||
if(new Date(this.pd.ACCEPT_TIME).getTime() - new Date(this.pd.WORK_END_DATE).getTime() >= 3600000){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请在作业结束30分钟内完成验收',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!this.pd.ACCEPT_TIME){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请选择验收时间',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!_this.videoList){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请上传验收视频',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var fileList = [];
|
||||
for (var i = 0; i < _this.videoList.length; i++) {
|
||||
if(!_this.videoList[i].id){
|
||||
var file = {};
|
||||
file.type = 3;
|
||||
file.filePath = _this.videoList[i].filePath;
|
||||
fileList.push(file);
|
||||
}
|
||||
}
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ACCEPT_TIME = _this.pd.ACCEPT_TIME
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.VIDEO_PATH = this.videoList.map(item => {
|
||||
return item.filePath
|
||||
})
|
||||
console.log(formData.VIDEO_PATH)
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImg(file){
|
||||
return new Promise((resolve, reject) => {
|
||||
var _this = this;
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/imgfiles/add',
|
||||
filePath: file.filePath,
|
||||
name: 'FFILE',
|
||||
formData: {
|
||||
'TYPE': file.type,
|
||||
'FOREIGN_KEY': _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
resolve();
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseVideo(e) {
|
||||
var _this = this;
|
||||
uni.chooseVideo({
|
||||
maxDuration: 60,
|
||||
count: 1, //默认9
|
||||
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
if(res.tempFilePath.substring(res.tempFilePath.lastIndexOf(".") + 1, res.tempFilePath.length) === 'mp4'){
|
||||
uni.uploadFile({
|
||||
url: basePath + '/app/eightwork/saveFile',
|
||||
filePath: res.tempFilePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: ({data}) => {
|
||||
let img = {};
|
||||
img.filePath = JSON.parse(data).FILE_PATH;
|
||||
this.videoList.push(img)
|
||||
}
|
||||
});
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "只能上传MP4格式",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
DelVideo(e){
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这个视频吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.videoList = []
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openAuthVideo(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup_video'].open();
|
||||
},200)
|
||||
},
|
||||
playVideo(e) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
this.modalShow = true
|
||||
},
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map(item => {
|
||||
var img = {}
|
||||
img.name = 'file'+(fileList.length)
|
||||
img.uri = item.filePath
|
||||
fileList.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID : corpinfoId,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {DEPARTMENT_ID:dept,tm:new Date().getTime()},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(ISSELF) {
|
||||
this.ISSELF = ISSELF
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
|
||||
subCanvas(e) {
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.imgList.push(e);
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,327 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">接受交底人签字确认</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
<view class="title">接受交底人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var fileList = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
|
||||
this.uploadImgFaults(fileList,signtime)
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ELECTRICITY_ID = this.pd.ELECTRICITY_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: fileList,
|
||||
formData: formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map(item => {
|
||||
var img = {}
|
||||
img.name = 'file'+(fileList.length)
|
||||
img.uri = item.filePath
|
||||
fileList.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
// 获取动火列表
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(ISSELF) {
|
||||
this.ISSELF = ISSELF
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -76,10 +76,11 @@
|
|||
</view>
|
||||
<textarea maxlength="255" auto-height :disabled="forbidEdit" v-model="pd.RISK_IDENTIFICATION" placeholder="请输入风险辨识结果"></textarea>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<text class="title">分析人:</text>
|
||||
<text>{{pd.ANALYZE_USER_NAME}}</text>
|
||||
<view class="cu-form-group bb-default" v-if="pd.ANALYZE_TIME">
|
||||
<view>
|
||||
<text class="title">分析人:</text>
|
||||
<text>{{pd.ANALYZE_USER_NAME}}</text>
|
||||
</view>
|
||||
<button class="cu-btn bg-green sm" @click="$noMultipleClicks(goToDetail,pd.ELECTRICITY_ID)">分析详情</button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -138,7 +139,7 @@
|
|||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_ELECTRICITY_MEASURES_ID">
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
|
|
|
@ -0,0 +1,320 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">配送电单位意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-textarea" style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-title">配送电单位意见</view>
|
||||
<textarea maxlength="255" v-model="pd.DESCR" placeholder="请输入意见"></textarea>
|
||||
</view>
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
|
||||
<view class="title">配送电负责人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
validStr(str){
|
||||
if (str!=null && str!='' && typeof(str)!="undefined" && str!=0)
|
||||
return true
|
||||
return false
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID : corpinfoId,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {DEPARTMENT_ID:dept,tm:new Date().getTime()},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -2,22 +2,22 @@
|
|||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全副总意见</block>
|
||||
<block slot="content">用电单位意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.HOTWORK_ID" :hotworkId="pd.HOTWORK_ID"></detail>
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-textarea" style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-title">安全副总意见</view>
|
||||
<view class="cu-form-title">用电单位意见</view>
|
||||
<textarea maxlength="255" v-model="pd.DESCR" placeholder="请输入意见"></textarea>
|
||||
</view>
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
|
||||
<view class="title">安全副总</view>
|
||||
<view class="title">用电单位负责人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">手写签字</button>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -59,7 +59,7 @@
|
|||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/hotwork/hotwork-detail/index'
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
|
@ -82,8 +82,8 @@
|
|||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.HOTWORK_ID = event.HOTWORK_ID;
|
||||
if(this.pd.HOTWORK_ID){
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
|
@ -104,7 +104,7 @@
|
|||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-gas/gas-list?HOTWORK_ID='+e
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
|
@ -113,13 +113,13 @@
|
|||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/hotwork/findById',
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
HOTWORK_ID: _this.pd.HOTWORK_ID,
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
|
@ -176,13 +176,13 @@
|
|||
var signtime = [];
|
||||
const formData={}
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime
|
||||
formData.HOTWORK_ID = _this.pd.HOTWORK_ID
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/hotwork/nextStep',
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
|
@ -278,7 +278,6 @@
|
|||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
|
@ -0,0 +1,405 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全交底人签字确认</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-bar bg-white margin-top">
|
||||
<view class="action">
|
||||
上传图片
|
||||
</view>
|
||||
<view class="action">
|
||||
{{ aqimgList.length }}/2
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in aqimgList" :key="index" @tap="viewImage(index,'aqimgList')">
|
||||
<image :src="baseImgPath + item.filePath" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg" data-type="2" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImage()" v-if="aqimgList.length<2">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign" >
|
||||
<view class="title">安全交底人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
aqimgList: [],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
delImg(e) {
|
||||
var _this = this;
|
||||
uni.showModal({
|
||||
title: '秦安双控',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.request({
|
||||
url: basePath+'/app/eightwork/deleteFile',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
FILE_PATH:_this.aqimgList[e.currentTarget.dataset.index].filePath
|
||||
},
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '删除成功',
|
||||
duration: 1500
|
||||
});
|
||||
this.aqimgList.splice(e.currentTarget.dataset.index, 1)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showModal({
|
||||
content: "删除失败",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseImage() {
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/eightwork/saveFile',
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'file',
|
||||
formData: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: ({data}) => {
|
||||
let img = {};
|
||||
img.filePath = JSON.parse(data).FILE_PATH;
|
||||
this.aqimgList.push(img)
|
||||
console.log(this.aqimgList)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showModal({
|
||||
content: "图片上传失败",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime
|
||||
formData.ELECTRICITY_ID = this.pd.ELECTRICITY_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.IMG_PATH = this.aqimgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(",")
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取动火列表
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = e.currentTarget.dataset.target
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,332 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">作业负责人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-textarea" style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-title">作业负责人意见</view>
|
||||
<textarea maxlength="255" v-model="pd.DESCR" placeholder="请输入意见"></textarea>
|
||||
</view>
|
||||
<view class="wui-sign" >
|
||||
<view class="title">作业负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
files: [],
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!_this.pd.DESCR) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入负责人意见',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取动火列表
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
levelChange(e){
|
||||
this.levelindex = e.detail.value;
|
||||
this.pd.WORK_LEVEL=this.levelList[this.levelindex].name;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = e.currentTarget.dataset.target
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,594 @@
|
|||
<template>
|
||||
<view >
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-group bb-default" >
|
||||
<view class="title">申请单位:</view>
|
||||
{{pd.APPLY_DEPARTMENT_NAME}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default" >
|
||||
<view class="title">申请人:</view>
|
||||
{{pd.APPLY_USER_NAME}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">编号:</view>
|
||||
{{pd.CHECK_NO}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">作业内容:</view>
|
||||
{{pd.WORK_CONTENT}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">作业地点:</view>
|
||||
{{pd.WORK_PLACE}}
|
||||
</view>
|
||||
|
||||
<view v-if="pd.WORK_START_DATE" class="cu-form-group bb-default">
|
||||
<view class="title">作业开始时间:</view>
|
||||
{{pd.WORK_START_DATE}}
|
||||
</view>
|
||||
<view v-if="pd.WORK_END_DATE" class="cu-form-group bb-default">
|
||||
<view class="title">作业结束时间:</view>
|
||||
{{pd.WORK_END_DATE}}
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">电源接入点及许可用电功率:</view>
|
||||
{{pd.ALLOW_POWER}}
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">用电设备名称及额定功率:</view>
|
||||
{{pd.RATED_POWER}}
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">工作电压:</view>
|
||||
{{pd.WORK_VOLTAGE}}
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">电工证号:</view>
|
||||
{{pd.CARD_NO}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">负责人电工号:</view>
|
||||
{{pd.LEADER_CARD_NO}}
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">关联的其他特殊作业及安全作业票编号:</view>
|
||||
{{pd.SPECIAL_WORK}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">风险辨识结果:</view>
|
||||
{{pd.RISK_IDENTIFICATION}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group bb-default">
|
||||
<text class="title">分析人:</text>
|
||||
<text>{{pd.ANALYZE_USER_NAME}}</text>
|
||||
<button class="cu-btn bg-green sm" @click="$noMultipleClicks(goToDetail,pd.ELECTRICITY_ID)">分析详情</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;" v-if="showMeasures && measuresList.length > 0">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">操作</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in measuresList" :key="item.BUS_ELECTRICITY_MEASURES_ID">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.PROTECTIVE_MEASURES}}
|
||||
<view v-if="item.SIGN_PATH" class="cu-item">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + item.SIGN_PATH" :data-index="index" @click="ViewShowImage(baseImgPath + item.SIGN_PATH)"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
<text> {{item.SIGN_TIME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-td>
|
||||
<uni-td align="center">
|
||||
<view class="group" v-if="item.STATUS=='-1'">
|
||||
<text class="wui-pl10">不涉及</text>
|
||||
</view>
|
||||
<view class="group" v-if="item.STATUS=='1'">
|
||||
<text class="wui-pl10">涉 及</text>
|
||||
</view>
|
||||
<view v-if="item.IMG_PATH">
|
||||
<view class="imgs" v-for="img in item.IMG_PATH.split(',')" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + img" :data-index="index" @click="ViewShowImage(baseImgPath + img)"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;" v-if="showMeasures && signs.MEASURES_CONFIRM">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">其他安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table border stripe emptyText="暂无更多数据" >
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_ELECTRICITY_MEASURES_ID">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
</view>
|
||||
</uni-td>
|
||||
<uni-td align="center">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + item.SIGN_PATH[0]" :data-index="index" @click="ViewShowImage(baseImgPath + item.SIGN_PATH[0])"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list">
|
||||
<view v-if="signs.GUARDIAN">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">监护人</view>
|
||||
{{pd.GUARDIAN_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.GUARDIAN[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.GUARDIAN[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.GUARDIAN[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.GUARDIAN[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.CONFESS">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">安全交底人</view>
|
||||
{{pd.CONFESS_USER_NAME}}
|
||||
</view>
|
||||
<view v-if="signs.CONFESS[0].IMG_PATH" style="display: flex;align-items: flex-end;padding: 0 30upx">
|
||||
<view v-for="(item,index) in signs.CONFESS[0].IMG_PATH" :key="index" style="margin-right:20upx">
|
||||
<view class="imgs">
|
||||
<image :src="baseImgPath + signs.CONFESS[0].IMG_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFESS[0].IMG_PATH[index])"
|
||||
mode="" style="width: 50upx;height: 50upx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.CONFESS[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.CONFESS[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFESS[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.CONFESS[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.ACCEPT_CONFESS">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">接受交底人</view>
|
||||
{{pd.ACCEPT_CONFESS_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.ACCEPT_CONFESS[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.ACCEPT_CONFESS[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.ACCEPT_CONFESS[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.ACCEPT_CONFESS[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list">
|
||||
<view v-if="signs.CONFIRM">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">作业负责人意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.CONFIRM[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业负责人</view>
|
||||
{{pd.CONFIRM_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.CONFIRM[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.CONFIRM[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.CONFIRM[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.CONFIRM[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.LEADER">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">所在单位意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.LEADER[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">所在单位负责人</view>
|
||||
{{pd.LEADER_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.LEADER[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.LEADER[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.LEADER[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.LEADER[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.AUDIT">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">安全管理部门意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.AUDIT[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">安全管理部门负责人</view>
|
||||
{{pd.AUDIT_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.AUDIT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.AUDIT[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.AUDIT[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.AUDIT[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.APPROVE">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">动火审批人意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.APPROVE[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">动火审批人</view>
|
||||
{{pd.APPROVE_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.APPROVE[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.APPROVE[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.APPROVE[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.APPROVE[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.MONITOR">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">动火前在岗班长意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.MONITOR[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">动火前在岗班长</view>
|
||||
{{pd.MONITOR_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.MONITOR[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.MONITOR[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.MONITOR[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.MONITOR[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.WORK_START">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业开始负责人</view>
|
||||
{{pd.WORK_START_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.WORK_START[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.WORK_START[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_START[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.WORK_START[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.WORK_END">
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">作业结束负责人</view>
|
||||
{{pd.WORK_END_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.WORK_END[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.WORK_END[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.WORK_END[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.WORK_END[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="signs.ACCEPT">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">完工验收</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.ACCEPT[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">验收部门负责人</view>
|
||||
{{pd.ACCEPT_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.ACCEPT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.ACCEPT[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.ACCEPT[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.ACCEPT[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import OtherSelect from '@/components/other-select/index.vue';
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,OtherSelect
|
||||
},
|
||||
props: {
|
||||
electricityId: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
showMeasures: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
msg:'add',
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
levelList:[
|
||||
{id:'特级',name:'特级'},
|
||||
{id:'一级',name:'一级'},
|
||||
{id:'二级',name:'二级'},
|
||||
],
|
||||
levelindex:-1,
|
||||
files: [],
|
||||
files1: [],
|
||||
analyzeUserList:[],
|
||||
analyzeindex:-1,
|
||||
confirmUserList:[],
|
||||
workuserindex:-1,
|
||||
confessUserList: [],
|
||||
confessindex:-1,
|
||||
acceptconfessUserList:[],
|
||||
acceptconfessindex:-1,
|
||||
workUserList:[],
|
||||
workstartindex:-1,
|
||||
workstartUserList:[],
|
||||
workendindex:-1,
|
||||
workendUserList:[],
|
||||
confirmindex:-1,
|
||||
guardianUserList:[],
|
||||
guardianindex:-1,
|
||||
leaderUserList:[],
|
||||
leaderindex:-1,
|
||||
auditUserList:[],
|
||||
auditindex:-1,
|
||||
approveUserList:[],
|
||||
approveindex:-1,
|
||||
monitorUserList:[],
|
||||
monitorindex:-1,
|
||||
acceptUserList:[],
|
||||
acceptindex:-1,
|
||||
pd:{},// 数据
|
||||
signs:{},
|
||||
measuresList:[],
|
||||
rules:[
|
||||
// {name:'CHECK_NO',message:'请输入编号'},
|
||||
{name:'WORK_CONTENT',message:'请输入作业内容'},
|
||||
{name:'WORK_PLACE',message:'请输入动火地点及动火部位'},
|
||||
{name:'WORK_LEVEL',message:'请选择动火级别'},
|
||||
{name:'WORK_FUNCTION',message:'请输入动火方式'},
|
||||
// {name:'WORK_START_DATE',message:'请选择工作开始时间'},
|
||||
// {name:'WORK_END_DATE',message:'请选择工作结束时间'},
|
||||
// {name:'WORK_MANAGER',message:'请输入作业负责人'},
|
||||
{name:'WORK_USER',message:'请输入动火人及证书编号'},
|
||||
// {name:'SPECIAL_WORK',message:'请输入关联的其他特殊作业及安全作业票编号'},
|
||||
{name:'RISK_IDENTIFICATION',message:'请输入风险辨识结果'},
|
||||
// {name:'CONFESS_USER',message:'请输入安全交底人'},
|
||||
// {name:'EDUCATE_USER',message:'请输入安全教育人'},
|
||||
// {name:'ACCEPT_EDUCATE_USER',message:'请输入接受交底、教育人'},
|
||||
// {name:'TRIAL_USER',message:'请输入动火措施初审人'},
|
||||
{name:'ANALYZE_USER_ID',message:'请选择分析人'},
|
||||
{name:'CONFIRM_USER_ID',message:'请选择作业负责人'},
|
||||
// {name:'GUARDIAN_USER_ID',message:'请选择监护人'},
|
||||
{name:'LEADER_USER_ID',message:'请选择动火点车间负责人'},
|
||||
// {name:'AUDIT_USER_ID',message:'请选择安全管理部门负责人'},
|
||||
// {name:'APPROVE_USER_ID',message:'请选择动火审批人'},
|
||||
{name:'MONITOR_USER_ID',message:'请选择验票班长'},
|
||||
{name:'ACCEPT_USER_ID',message:'请选择验收部门负责人'},
|
||||
{name:'GUARDIAN_USER_ID',message:'请选择监护人'},
|
||||
{name:'CONFESS_USER_ID',message:'请选择安全交底人'},
|
||||
{name:'ACCEPT_CONFESS_USER_ID',message:'请选择接受交底人'},
|
||||
],
|
||||
todayDate:'',
|
||||
otherAssignments:false,
|
||||
otherIdentification:false,
|
||||
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
console.log(this.electricityId)
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = this.electricityId;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getCode(){
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/getCode',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
this.pd.CHECK_NO = res.data.code;
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
this.getSigns()
|
||||
this.getMeasures()
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getSigns(){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/listSignFinished',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.signs = res.data.signs; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getMeasures(){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/listSignFinishMeasures',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.measuresList = res.data.finishMeasuresList; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
ViewShowImage1(url) {
|
||||
let files1 = [];
|
||||
files1.push(url)
|
||||
uni.previewImage({
|
||||
urls: files1,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,358 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">作业结束时间选择</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">作业结束时间</view>
|
||||
<ruiDatePicker fields="minute"
|
||||
:value="pd.WORK_END_DATE?pd.WORK_END_DATE:''"
|
||||
@change="changeEndDate"
|
||||
></ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign">
|
||||
<view class="title">填写作业结束时间负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import moment from 'moment';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment:moment,
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
gasList:[],
|
||||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
changeEndDate(e) {
|
||||
this.pd.WORK_END_DATE = e
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if(APPLY_STATUS == 1){
|
||||
if (!this.pd.WORK_END_DATE) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请选择作业结束时间',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(new Date(this.pd.WORK_END_DATE).getTime() - new Date(this.pd.WORK_START_DATE).getTime() <=0){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '作业开始时间不能晚于或等于结束时间,请重新选择',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(this.pd.WORK_LEVEL == '特级' || this.pd.WORK_LEVEL == '一级'){
|
||||
if(new Date(this.pd.WORK_END_DATE).getTime() - new Date(this.pd.WORK_START_DATE).getTime() >= 28800000){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '动火级别为特级或一级时,动火作业开始时间与结束时间应不超过8小时,请重新选择',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(this.pd.WORK_LEVEL == '二级'){
|
||||
if(new Date(this.pd.WORK_END_DATE).getTime() - new Date(this.pd.WORK_START_DATE).getTime() >= 259200000){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '动火级别为二级时,动火作业开始时间与结束时间应不超过72小时,请重新选择',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.SIGNTIME = signtime
|
||||
formData.WORK_END_DATE = this.pd.WORK_END_DATE
|
||||
formData.ELECTRICITY_ID = this.pd.ELECTRICITY_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map(item => {
|
||||
var img = {}
|
||||
img.name = 'file'+(fileList.length)
|
||||
img.uri = item.filePath
|
||||
fileList.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID : corpinfoId,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {DEPARTMENT_ID:dept,tm:new Date().getTime()},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(ISSELF) {
|
||||
this.ISSELF = ISSELF
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,393 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">监护人签字确认</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
|
||||
<view class="wui-form-list">
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
<view class="title">监护人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
levelList:[
|
||||
{id:'特级',name:'特级'},
|
||||
{id:'一级',name:'一级'},
|
||||
{id:'二级',name:'二级'},
|
||||
],
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ELECTRICITY_ID = this.pd.ELECTRICITY_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取动火列表
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal() {
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
/*
|
||||
*分析人
|
||||
*/
|
||||
// 确定回调事件
|
||||
analyzetreeConfirm(e) {
|
||||
this.isUps=false;
|
||||
this.pd.ANALYZE_DEPARTMENT_ID=e[0].id;
|
||||
this.pd.ANALYZE_DEPARTMENT_NAME=e[0].name;
|
||||
this.$forceUpdate();//强制刷新
|
||||
this.getUserList(e[0].id,'analyzeUserList');
|
||||
},
|
||||
// 取消回调事件
|
||||
analyzetreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
// 显示树形选择器
|
||||
showAnalyzeTree() {
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree_analyze._show();
|
||||
},
|
||||
PickerAnalyze(e) {
|
||||
this.analyzeindex = e.detail.value;
|
||||
this.pd.ANALYZE_USER_ID=this.analyzeUserList[this.analyzeindex].USER_ID;
|
||||
this.pd.ANALYZE_USER_NAME=this.analyzeUserList[this.analyzeindex].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
/*
|
||||
*监护人
|
||||
*/
|
||||
// 确定回调事件
|
||||
guardiantreeConfirm(e) {
|
||||
this.isUps=false;
|
||||
this.pd.GUARDIAN_DEPARTMENT_ID=e[0].id;
|
||||
this.pd.GUARDIAN_DEPARTMENT_NAME=e[0].name;
|
||||
this.$forceUpdate();//强制刷新
|
||||
this.getUserList(e[0].id,'guardianUserList');
|
||||
},
|
||||
// 取消回调事件
|
||||
guardiantreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
// 显示树形选择器
|
||||
showGuardianTree() {
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree_guardian._show();
|
||||
},
|
||||
PickerGuardian(e) {
|
||||
this.guardianindex = e.detail.value;
|
||||
this.pd.GUARDIAN_USER_ID=this.guardianUserList[this.guardianindex].USER_ID;
|
||||
this.pd.GUARDIAN_USER_NAME=this.guardianUserList[this.guardianindex].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -35,7 +35,7 @@
|
|||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
|
||||
<text>申请人:{{item.APPLY_USER_NAME}}</text>
|
||||
<text>分析人:{{item.ANALYZE_USER_NAME}}</text>
|
||||
<text v-if="item.ANALYZE_USER_NAME">分析人:{{item.ANALYZE_USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
|
||||
<text>监护人:{{item.GUARDIAN_USER_NAME}}</text>
|
||||
|
@ -203,7 +203,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-confess/electricity-confess-detail?ELECTRICITY_ID='+e
|
||||
});
|
||||
}else if(this.flow === '接受安全交底人签字'){
|
||||
}else if(this.flow === '接受交底人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-acceptconfess/electricity-acceptconfess-detail?ELECTRICITY_ID='+e
|
||||
});
|
||||
|
@ -223,7 +223,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-approve/electricity-approve-detail?ELECTRICITY_ID='+e
|
||||
});
|
||||
}else if(this.flow === '开始进行作业'){
|
||||
}else if(this.flow === '开始作业'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-startwork/electricity-startwork-detail?ELECTRICITY_ID='+e
|
||||
});
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全措施确认人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID" :showMeasures="false"></detail>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center">
|
||||
<view class="title" style="width: 50px">操作</view>
|
||||
</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
<uni-tr>
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.PROTECTIVE_MEASURES}}
|
||||
</view>
|
||||
|
||||
</uni-td>
|
||||
|
||||
<uni-td align="center">
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">
|
||||
{{!item.SIGN_PATH ? '签字' : '已签字'}}
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
</uni-table>
|
||||
</view>
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">其他安全措施:</view>
|
||||
<input name="input" ref="DESCR" v-model="pd.DESCR" placeholder="请输入其他安全措施"></input>
|
||||
</view>
|
||||
<view class="wui-sign" >
|
||||
<view class="title"></view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'-1')">打 回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'1')">通 过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import { setMeasures } from '@/pages/application/dangerous_options/index.js';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
this.getData();
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getMeasures();
|
||||
loginSession();
|
||||
},
|
||||
// 监听事件
|
||||
mounted() {
|
||||
uni.$on('dangerous_options_submit', (data) => {
|
||||
this.$set(this.measuresList[data.index],'SIGN_PATH',data.signImgList[0].filePath)
|
||||
this.$set(this.measuresList[data.index],'SIGN_TIME',data.signImgList[0].SIGNER_TIME)
|
||||
this.$set(this.measuresList[data.index],'IMG_PATH',data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(","))
|
||||
this.$set(this.measuresList[data.index],'STATUS',data.STATUS)
|
||||
})
|
||||
},
|
||||
// 取消监听
|
||||
beforeDestroy() {
|
||||
uni.$off('dangerous_options_submit');
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
goToSign(index) {
|
||||
const measures = this.measuresList[index]
|
||||
const signImgList = []
|
||||
if (measures.SIGN_PATH) {
|
||||
signImgList.push({"filePath":measures.SIGN_PATH,"SIGNER_TIME":measures.SIGN_TIME})
|
||||
}
|
||||
const imgList = []
|
||||
if (measures.IMG_PATH) {
|
||||
measures.IMG_PATH.split(",").forEach(item => {
|
||||
imgList.push({"filePath":item})
|
||||
})
|
||||
}
|
||||
setMeasures(measures.PROTECTIVE_MEASURES)
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/dangerous_options/index?index='+index +
|
||||
'&STATUS='+(measures.STATUS || 1) + '&signImgList='+JSON.stringify(signImgList) + '&imgList='+JSON.stringify(imgList)
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
goSubmit(APPLY_STATUS) {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (APPLY_STATUS == 1) {
|
||||
|
||||
if(!this.pd.DESCR){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入其他安全措施,没有请填“无”',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.SIGN_PATH){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '第'+(i+1)+'项未签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.MEASURES = JSON.stringify(this.measuresList)
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
getMeasures(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/electricity/listAllMeasuresForSign?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
CONFIRM_ID:loginUser.USER_ID,
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.measuresList = res.data.measuresForSignList
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDeptTree(index) {
|
||||
this.isUps=true
|
||||
this.$refs['tkiTree'+index][0]._show();
|
||||
},
|
||||
|
||||
deptTreeConfirm(e,i) {
|
||||
this.isUps=false;
|
||||
this.measuresList[i].DEPARTMENT_ID=e[0].id;
|
||||
this.measuresList[i].DEPARTMENT_NAME=e[0].name;
|
||||
this.measuresList[i].USER_ID = ''
|
||||
this.measuresList[i].USER_NAME = ''
|
||||
this.getUserList(e[0].id,i);
|
||||
},
|
||||
|
||||
deptTreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
|
||||
pickerUser(e,i) {
|
||||
this.measuresList[i].userIndex = e.detail.value;
|
||||
this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID;
|
||||
this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
isBlankList(i) {
|
||||
if (this.measuresList[i].userList.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先选择确认单位',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//获取人员列表
|
||||
getUserList(dept,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
_this.measuresList[i].userList = res.data.userList;
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = e.currentTarget.dataset.target
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,379 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全措施确认人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID" :showMeasures="false"></detail>
|
||||
|
||||
<view class="wui-form-list" style="padding-top: 20upx;">
|
||||
<view class="wui-title" style="margin-left: 20upx;">
|
||||
<text class="text-semi">安全防护措施</text>
|
||||
</view>
|
||||
<view class="wui-table" style="padding: 0 20upx;">
|
||||
<uni-table name='measuresList' border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
<uni-tr>
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.PROTECTIVE_MEASURES}}
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">确认单位:</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showDeptTree(index)">{{measuresList[index].DEPARTMENT_NAME?measuresList[index].DEPARTMENT_NAME:'请选择'}}</view>
|
||||
</view>
|
||||
<tki-tree :ref="'tkiTree'+index"
|
||||
:selectParent=true
|
||||
:range="treeNode"
|
||||
rangeKey="name"
|
||||
@confirm="deptTreeConfirm($event,index)"
|
||||
@cancel="deptTreeCancel($event,index)"></tki-tree>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">确认人</view>
|
||||
<picker @change="pickerUser($event,index)" :value="item.userIndex" :range="item.userList" range-key="NAME" :disabled="item.userList.length == 0" @click="isBlankList(index)">
|
||||
<view class="picker">
|
||||
{{measuresList[index].USER_NAME?measuresList[index].USER_NAME:'请选择'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
</uni-table>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign" >
|
||||
<view class="title"></view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'-1')">打 回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit,'1')">通 过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
this.getData();
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getMeasures();
|
||||
loginSession();
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(APPLY_STATUS == 1){
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.USER_ID){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '第'+(i+1)+'项未设置确认人',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const signers = this.measuresList.map(item => {
|
||||
return {
|
||||
BUS_ELECTRICITY_MEASURES_ID: item.BUS_ELECTRICITY_MEASURES_ID,
|
||||
USER_ID: item.USER_ID
|
||||
}
|
||||
})
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.PREPARERS = JSON.stringify(signers)
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
|
||||
getMeasures(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/electricity/listAllMeasures?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.measuresList = res.data.measuresList.map((item,index)=>{
|
||||
item.userList = []
|
||||
item.userIndex = -1
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
showDeptTree(index) {
|
||||
this.isUps=true
|
||||
this.$refs['tkiTree'+index][0]._show();
|
||||
},
|
||||
|
||||
deptTreeConfirm(e,i) {
|
||||
this.isUps=false;
|
||||
this.measuresList[i].DEPARTMENT_ID=e[0].id;
|
||||
this.measuresList[i].DEPARTMENT_NAME=e[0].name;
|
||||
this.measuresList[i].USER_ID = ''
|
||||
this.measuresList[i].USER_NAME = ''
|
||||
this.getUserList(e[0].id,i);
|
||||
},
|
||||
|
||||
deptTreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
|
||||
pickerUser(e,i) {
|
||||
this.measuresList[i].userIndex = e.detail.value;
|
||||
this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID;
|
||||
this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
isBlankList(i) {
|
||||
if (this.measuresList[i].userList.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先选择确认单位',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//获取人员列表
|
||||
getUserList(dept,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
_this.measuresList[i].userList = res.data.userList;
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = e.currentTarget.dataset.target
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,337 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">作业开始时间选择</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view style="border-bottom: 1px dashed #eee;">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">作业开始时间</view>
|
||||
<ruiDatePicker fields="minute"
|
||||
:value="pd.WORK_START_DATE?pd.WORK_START_DATE:''"
|
||||
@change="changeStartDate"
|
||||
></ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign">
|
||||
<view class="title">填写作业开始时间负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
gasList:[],
|
||||
|
||||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(APPLY_STATUS == 1){
|
||||
if (!this.pd.WORK_START_DATE) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请选择作业开始时间',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(new Date(this.pd.WORK_START_DATE).getTime() - new Date(this.pd.ANALYZE_TIME).getTime() >= 3600000){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '气体分析时间与开始时间间隔超过30分钟,请重新上传气体检测结果',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.SIGNTIME = signtime
|
||||
formData.WORK_START_DATE = this.pd.WORK_START_DATE
|
||||
formData.ELECTRICITY_ID = this.pd.ELECTRICITY_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
fileList.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
changeStartDate(e) {
|
||||
this.pd.WORK_START_DATE = e
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID : corpinfoId,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {DEPARTMENT_ID:dept,tm:new Date().getTime()},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(ISSELF) {
|
||||
this.ISSELF = ISSELF
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.splice(0,this.imgList.length);
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,388 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">用电人签字确认</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
|
||||
<view class="wui-form-list">
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
<view class="title">用电人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
isUps:false,
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
files: [],
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ELECTRICITY_ID = this.pd.ELECTRICITY_ID
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取动火列表
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal() {
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
/*
|
||||
*分析人
|
||||
*/
|
||||
// 确定回调事件
|
||||
analyzetreeConfirm(e) {
|
||||
this.isUps=false;
|
||||
this.pd.ANALYZE_DEPARTMENT_ID=e[0].id;
|
||||
this.pd.ANALYZE_DEPARTMENT_NAME=e[0].name;
|
||||
this.$forceUpdate();//强制刷新
|
||||
this.getUserList(e[0].id,'analyzeUserList');
|
||||
},
|
||||
// 取消回调事件
|
||||
analyzetreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
// 显示树形选择器
|
||||
showAnalyzeTree() {
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree_analyze._show();
|
||||
},
|
||||
PickerAnalyze(e) {
|
||||
this.analyzeindex = e.detail.value;
|
||||
this.pd.ANALYZE_USER_ID=this.analyzeUserList[this.analyzeindex].USER_ID;
|
||||
this.pd.ANALYZE_USER_NAME=this.analyzeUserList[this.analyzeindex].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
/*
|
||||
*监护人
|
||||
*/
|
||||
// 确定回调事件
|
||||
guardiantreeConfirm(e) {
|
||||
this.isUps=false;
|
||||
this.pd.GUARDIAN_DEPARTMENT_ID=e[0].id;
|
||||
this.pd.GUARDIAN_DEPARTMENT_NAME=e[0].name;
|
||||
this.$forceUpdate();//强制刷新
|
||||
this.getUserList(e[0].id,'guardianUserList');
|
||||
},
|
||||
// 取消回调事件
|
||||
guardiantreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
// 显示树形选择器
|
||||
showGuardianTree() {
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree_guardian._show();
|
||||
},
|
||||
PickerGuardian(e) {
|
||||
this.guardianindex = e.detail.value;
|
||||
this.pd.GUARDIAN_USER_ID=this.guardianUserList[this.guardianindex].USER_ID;
|
||||
this.pd.GUARDIAN_USER_NAME=this.guardianUserList[this.guardianindex].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,336 @@
|
|||
<template>
|
||||
<view >
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">作业人意见</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<detail v-if="pd.ELECTRICITY_ID" :electricityId="pd.ELECTRICITY_ID"></detail>
|
||||
<view class="wui-form-list">
|
||||
<view class="wui-sign" v-if="!files.length">
|
||||
<view class="title">作业人</view>
|
||||
<view>
|
||||
<view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal">新增手写签字</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-sign-box wui-sign-box1" v-show="imgList && imgList.length > 0">
|
||||
<view class="sign-title">
|
||||
签字照片:
|
||||
</view>
|
||||
<view class="wui-sign-cotent">
|
||||
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFit"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg(index)">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
|
||||
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))">打回</button>
|
||||
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))">通过</button>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import writingBoard from "@/components/writing-board/writing-board.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
|
||||
import detail from '@/pages/application/electricity/electricity-detail/index'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ruiDatePicker,writingBoard,detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
files: [],
|
||||
forbidEdit:true,// 禁止修改
|
||||
msg:'add',
|
||||
noClick:true,
|
||||
treeNode:[],//部门下拉数据
|
||||
pd:{},// 数据
|
||||
measuresList:[],
|
||||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
|
||||
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
|
||||
if(this.pd.ELECTRICITY_ID){
|
||||
this.msg="edit";
|
||||
this.getData();
|
||||
}else {
|
||||
// 初始化作业负责人
|
||||
this.pd.APPLY_DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
this.pd.APPLY_DEPARTMENT_NAME = loginUser.DEPARTMENT_NAME;
|
||||
this.pd.APPLY_USER_ID = loginUser.USER_ID;
|
||||
this.pd.APPLY_USER_NAME = loginUser.NAME;
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/electricity/electricity-gas/gas-list?ELECTRICITY_ID='+e
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/electricity/findById',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRICITY_ID: _this.pd.ELECTRICITY_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
uploadImgFaults(files,signtime) {
|
||||
this.imgList.map((item,index) => {
|
||||
var img = {}
|
||||
img.name = 'file'+index
|
||||
img.uri = item.filePath
|
||||
files.push(img)
|
||||
signtime.push(item.SIGNER_TIME)
|
||||
})
|
||||
},
|
||||
DelImg(index){
|
||||
this.imgList.splice(index,1)
|
||||
},
|
||||
goSubmit(APPLY_STATUS){
|
||||
var _this = this;
|
||||
let required = true
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请签字',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
const formData={}
|
||||
|
||||
this.uploadImgFaults(files,signtime)
|
||||
formData.SIGNTIME = signtime.join(",")
|
||||
formData.ELECTRICITY_ID = _this.pd.ELECTRICITY_ID
|
||||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/electricity/nextStep',
|
||||
files: files,
|
||||
formData:formData,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '保存成功',
|
||||
duration: 2000
|
||||
});
|
||||
_this.goback()
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
getLimitSpace(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/app/limitspace/listAllSpace?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.limitSpaceList = res.data.varList;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree',//部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
_this.treeNode=eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员列表
|
||||
getUserList(dept,list,i){
|
||||
//发送 post 请求
|
||||
var _this=this
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:dept,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
if(i>-1) {
|
||||
_this[list][i] = [];
|
||||
_this[list][i] = res.data.userList;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else{
|
||||
_this[list]=res.data.userList;
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
*手写板
|
||||
*/
|
||||
showModal(e) {
|
||||
this.modalName = 'Modal'
|
||||
},
|
||||
hideModal(e) {
|
||||
this.modalName = null
|
||||
},
|
||||
//完成
|
||||
subCanvas(e) {
|
||||
this.imgList.push(e);
|
||||
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
this.hideModal()
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files =[];
|
||||
files.push(e.currentTarget.dataset.url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
goback(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上二级页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({delta: 1});
|
||||
uni.hideLoading();
|
||||
},
|
||||
radioType(e){
|
||||
this.HASINSTRUCTOR = e.detail.value
|
||||
},
|
||||
goToEdit(){
|
||||
this.forbidEdit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.wui-sign-box1{
|
||||
margin-top: 20upx;
|
||||
display: block;
|
||||
}
|
||||
.sign-img{
|
||||
position: relative;
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding-top: 20upx;
|
||||
}
|
||||
.cu-tag{
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -61,6 +61,15 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=用电人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
|
||||
<view v-if="count.ELECTRICITY" class="cu-tag badge">{{count.ELECTRICITY}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>用电人意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=安全交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-807.png" mode=""></image>
|
||||
|
@ -71,13 +80,13 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=接受安全交底人签字">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=接受交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
|
||||
<view v-if="count.ACCEPT_CONFESS" class="cu-tag badge">{{count.ACCEPT_CONFESS}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>接受安全交底人</view>
|
||||
<view>接受交底人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
@ -102,23 +111,33 @@
|
|||
</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=所在单位签字">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=用电单位签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-907.png" mode=""></image>
|
||||
<view v-if="count.LEADER" class="cu-tag badge">{{count.LEADER}}</view>
|
||||
<view v-if="count.AUDIT" class="cu-tag badge">{{count.AUDIT}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>所在单位</view>
|
||||
<view>用电单位</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=开始进行作业">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=配送电单位签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-907.png" mode=""></image>
|
||||
<view v-if="count.APPROVE" class="cu-tag badge">{{count.APPROVE}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>配送电单位</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=开始作业">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-aq-1.png" mode=""></image>
|
||||
<view v-if="count.WORK_START" class="cu-tag badge">{{count.WORK_START}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>开始进行作业时间</view>
|
||||
<view>开始作业时间</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=结束作业">
|
||||
|
|
|
@ -327,7 +327,7 @@
|
|||
<view class="title">
|
||||
<text>计划图片</text>
|
||||
</view>
|
||||
<view class="de-sub-content">
|
||||
<view class="cu-form-p">
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation>
|
||||
<view class="cu-item" v-for="(item,index) in files5" v-bind:key="index">
|
||||
<view class="imgs">
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_HIGHWORK_MEASURES_ID">
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key=index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_HIGHWORK_MEASURES_ID">
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
|
|
|
@ -200,7 +200,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/highwork/highwork-confess/highwork-confess-detail?HIGHWORK_ID='+e
|
||||
});
|
||||
}else if(this.flow === '接受安全交底人签字'){
|
||||
}else if(this.flow === '接受交底人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/highwork/highwork-acceptconfess/highwork-acceptconfess-detail?HIGHWORK_ID='+e
|
||||
});
|
||||
|
@ -224,7 +224,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/highwork/highwork-approve/highwork-approve-detail?HIGHWORK_ID='+e
|
||||
});
|
||||
}else if(this.flow === '开始进行作业'){
|
||||
}else if(this.flow === '开始作业'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/highwork/highwork-startwork/highwork-startwork-detail?HIGHWORK_ID='+e
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center">
|
||||
<view class="title">操作</view>
|
||||
<view class="title" style="width: 50px">操作</view>
|
||||
</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
|
@ -47,7 +47,9 @@
|
|||
</uni-td>
|
||||
|
||||
<uni-td align="center">
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">签字</view>
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">
|
||||
{{!item.SIGN_PATH ? '签字' : '已签字'}}
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
|
@ -110,6 +112,7 @@
|
|||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
|
@ -123,13 +126,12 @@
|
|||
// 监听事件
|
||||
mounted() {
|
||||
uni.$on('dangerous_options_submit', (data) => {
|
||||
console.log(data)
|
||||
this.measuresList[data.index].SIGN_PATH = data.signImgList[0].filePath
|
||||
this.measuresList[data.index].SIGN_TIME = data.signImgList[0].SIGNER_TIME
|
||||
this.measuresList[data.index].IMG_PATH = data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(",")
|
||||
this.measuresList[data.index].STATUS = data.STATUS
|
||||
this.$set(this.measuresList[data.index],'SIGN_PATH',data.signImgList[0].filePath)
|
||||
this.$set(this.measuresList[data.index],'SIGN_TIME',data.signImgList[0].SIGNER_TIME)
|
||||
this.$set(this.measuresList[data.index],'IMG_PATH',data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(","))
|
||||
this.$set(this.measuresList[data.index],'STATUS',data.STATUS)
|
||||
})
|
||||
},
|
||||
// 取消监听
|
||||
|
@ -205,6 +207,14 @@
|
|||
return;
|
||||
}
|
||||
if (APPLY_STATUS == 1) {
|
||||
if(!this.pd.DESCR){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入其他安全措施,没有请填“无”',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.SIGN_PATH){
|
||||
|
|
|
@ -62,13 +62,13 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/highwork/highwork-list/index?flow=接受安全交底人签字">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/highwork/highwork-list/index?flow=接受交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
|
||||
<view v-if="count.ACCEPT_CONFESS" class="cu-tag badge">{{count.ACCEPT_CONFESS}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>接受安全交底人</view>
|
||||
<view>接受交底人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
@ -124,13 +124,13 @@
|
|||
</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/highwork/highwork-list/index?flow=开始进行作业">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/highwork/highwork-list/index?flow=开始作业">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-aq-1.png" mode=""></image>
|
||||
<view v-if="count.WORK_START" class="cu-tag badge">{{count.WORK_START}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>开始进行作业时间</view>
|
||||
<view>开始作业时间</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/highwork/highwork-list/index?flow=结束作业">
|
||||
|
|
|
@ -70,13 +70,13 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=接受安全交底人签字">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=接受交底人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
|
||||
<view v-if="count.ACCEPT_CONFESS" class="cu-tag badge">{{count.ACCEPT_CONFESS}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>接受安全交底人</view>
|
||||
<view>接受交底人</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
@ -110,16 +110,7 @@
|
|||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=安全副总签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-901.png" mode=""></image>
|
||||
<view v-if="count.SAFETY" class="cu-tag badge">{{count.SAFETY}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>安全副总</view>
|
||||
<view>意见</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=审批人签字">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-901.png" mode=""></image>
|
||||
|
@ -140,13 +131,13 @@
|
|||
<view>当班班长验票</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=开始进行作业">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=开始作业">
|
||||
<view class="imgs action">
|
||||
<image src="../../../static/icon-apps/icon-aq-1.png" mode=""></image>
|
||||
<view v-if="count.WORK_START" class="cu-tag badge">{{count.WORK_START}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>开始进行作业时间</view>
|
||||
<view>开始作业时间</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hotwork/hotwork-list/index?flow=结束作业">
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
<uni-th align="center" style="font-weight: bold;">其他安全措施</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width: 100px">签字</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="item.BUS_HOTWORK_MEASURES_ID">
|
||||
<uni-tr v-for="(item,index) in signs.MEASURES_CONFIRM" :key="index">
|
||||
<uni-td>
|
||||
<view style="margin-bottom: 20upx;">
|
||||
{{item.DESCR}}
|
||||
|
@ -340,34 +340,13 @@
|
|||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="wui-form-list" v-if="!forbidEdit">
|
||||
<view class="cu-form-group" v-if="pd.WORK_LEVEL != '特级'">
|
||||
<view class="title">安全副总部门</view>
|
||||
<view v-if="pd.SAFETY_DEPARTMENT_NAME" class="cleared" @click="cancelSelect('safety')">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">动火审批单位</view>
|
||||
<view v-if=" (pd.WORK_LEVEL == '一级' || pd.WORK_LEVEL == '二级') && pd.APPROVE_DEPARTMENT_NAME" class="cleared" @click="cancelSelect('approve')">
|
||||
清除
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showSafetyTree">{{pd.SAFETY_DEPARTMENT_NAME?pd.SAFETY_DEPARTMENT_NAME:'请选择'}}</view>
|
||||
</view>
|
||||
<tki-tree ref="tkiTree_safety"
|
||||
:selectParent=true
|
||||
:range="treeNode"
|
||||
rangeKey="name"
|
||||
@confirm="safetytreeConfirm"
|
||||
@cancel="safetytreeCancel"></tki-tree>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="pd.WORK_LEVEL != '特级'">
|
||||
<view class="title">安全副总</view>
|
||||
<picker @change="PickerSafety" :value="safetyindex" :range="safetyUserList" range-key="NAME" :disabled="safetyUserList.length == 0">
|
||||
<view class="picker">
|
||||
{{pd.SAFETY_USER_NAME?pd.SAFETY_USER_NAME:'请选择'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-form-list" v-if="!forbidEdit">
|
||||
<view class="cu-form-group" v-if="pd.WORK_LEVEL != '二级' && pd.WORK_LEVEL != '一级'">
|
||||
<view class="title">动火审批单位</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showApproveTree">{{pd.APPROVE_DEPARTMENT_NAME?pd.APPROVE_DEPARTMENT_NAME:'请选择'}}</view>
|
||||
</view>
|
||||
|
@ -378,7 +357,7 @@
|
|||
@confirm="approvetreeConfirm"
|
||||
@cancel="approvetreeCancel"></tki-tree>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="pd.WORK_LEVEL != '二级' && pd.WORK_LEVEL != '一级'">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">动火审批负责人</view>
|
||||
<picker @change="PickerApprove" :value="approveindex" :range="approveUserList" range-key="NAME" :disabled="approveUserList.length == 0" @click="isBlankList('approve')">
|
||||
<view class="picker">
|
||||
|
@ -605,25 +584,6 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.SAFETY">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
<view class="cu-form-title">安全副总意见</view>
|
||||
<textarea maxlength="255" disabled="disabled" v-model="signs.SAFETY[0].DESCR"></textarea>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<view class="cu-form-group" >
|
||||
<view class="title">安全副总</view>
|
||||
{{pd.SAFETY_USER_NAME}}
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item,index) in signs.AUDIT[0].SIGN_TIME" :key="index" style="border-bottom: 1px solid #e3e3e3">
|
||||
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
|
||||
<image :src="baseImgPath + signs.SAFETY[0].SIGN_PATH[index]" :data-index="index" @click="ViewShowImage(baseImgPath + signs.SAFETY[0].SIGN_PATH[index])"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
<text> {{signs.SAFETY[0].SIGN_TIME[index]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="signs.APPROVE">
|
||||
<view class="cu-form-textarea" style="border: none;">
|
||||
|
@ -1357,15 +1317,15 @@
|
|||
this.$refs.tkiTree_audit._reTreeList()
|
||||
this.$refs.tkiTree_audit._initTree(this.treeNode)
|
||||
}
|
||||
if(dept == 'safety'){
|
||||
this.pd.SAFETY_DEPARTMENT_ID = ''
|
||||
this.pd.SAFETY_DEPARTMENT_NAME = ''
|
||||
this.pd.SAFETY_USER_ID = ''
|
||||
this.pd.SAFETY_USER_NAME = ''
|
||||
this.safetyUserList = []
|
||||
this.safetyindex = -1
|
||||
this.$refs.tkiTree_safety._reTreeList()
|
||||
this.$refs.tkiTree_safety._initTree(this.treeNode)
|
||||
if(dept == 'approve'){
|
||||
this.pd.APPROVE_DEPARTMENT_ID = ''
|
||||
this.pd.APPROVE_DEPARTMENT_NAME = ''
|
||||
this.pd.APPROVE_USER_ID = ''
|
||||
this.pd.APPROVE_USER_NAME = ''
|
||||
this.approveUserList = []
|
||||
this.approveindex = -1
|
||||
this.$refs.tkiTree_approve._reTreeList()
|
||||
this.$refs.tkiTree_approve._initTree(this.treeNode)
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1641,35 +1601,6 @@
|
|||
},
|
||||
|
||||
|
||||
/*
|
||||
*安全副总
|
||||
*/
|
||||
// 确定回调事件
|
||||
safetytreeConfirm(e) {
|
||||
this.isUps=false;
|
||||
this.pd.SAFETY_DEPARTMENT_ID=e[0].id;
|
||||
this.pd.SAFETY_DEPARTMENT_NAME=e[0].name;
|
||||
this.pd.SAFETY_USER_ID = ''
|
||||
this.pd.SAFETY_USER_NAME = ''
|
||||
this.$forceUpdate();//强制刷新
|
||||
this.getUserList(e[0].id,'safetyUserList');
|
||||
},
|
||||
// 取消回调事件
|
||||
safetytreeCancel(e) {
|
||||
this.isUps=false;
|
||||
},
|
||||
// 显示树形选择器
|
||||
showSafetyTree() {
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree_safety._show();
|
||||
},
|
||||
PickerSafety(e) {
|
||||
this.safetyindex = e.detail.value;
|
||||
this.pd.SAFETY_USER_ID=this.safetyUserList[this.safetyindex].USER_ID;
|
||||
this.pd.SAFETY_USER_NAME=this.safetyUserList[this.safetyindex].NAME;
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
/*
|
||||
*审批人
|
||||
*/
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
{name:'ANALYZE_TIME',message:'请输入分析时间'},
|
||||
{name:'ANALYZE_GAS',message:'请输入代表性气体'},
|
||||
{name:'ANALYZE_RESULT',message:'请输入分析结果'},
|
||||
{name:'ANALYZE_PLACE',message:'请输入分析地点'},
|
||||
],
|
||||
currentTime:formatDate(new Date(),'yyyy-MM-dd hh:mm')
|
||||
}
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
</view>
|
||||
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.HOTWORK_ID)">
|
||||
<text v-if="item.SAFETY_USER_NAME">安全副总:{{item.SAFETY_USER_NAME}}</text>
|
||||
<text v-if="item.APPROVE_USER_NAME">审批部门负责人:{{item.APPROVE_USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.HOTWORK_ID)">
|
||||
|
@ -208,7 +207,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-confess/hotwork-confess-detail?HOTWORK_ID='+e
|
||||
});
|
||||
}else if(this.flow === '接受安全交底人签字'){
|
||||
}else if(this.flow === '接受交底人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-acceptconfess/hotwork-acceptconfess-detail?HOTWORK_ID='+e
|
||||
});
|
||||
|
@ -224,10 +223,6 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-audit/hotwork-audit-detail?HOTWORK_ID='+e
|
||||
});
|
||||
}else if(this.flow === '安全副总签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-safety/hotwork-safety-detail?HOTWORK_ID='+e
|
||||
});
|
||||
}else if(this.flow === '审批人签字'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-approve/hotwork-approve-detail?HOTWORK_ID='+e
|
||||
|
@ -236,7 +231,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-monitor/hotwork-monitor-detail?HOTWORK_ID='+e
|
||||
});
|
||||
}else if(this.flow === '开始进行作业'){
|
||||
}else if(this.flow === '开始作业'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hotwork/hotwork-startwork/hotwork-startwork-detail?HOTWORK_ID='+e
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">主要安全措施</uni-th>
|
||||
<uni-th align="center">
|
||||
<view class="title">操作</view>
|
||||
<view class="title" style="width: 50px">操作</view>
|
||||
</uni-th>
|
||||
</uni-tr>
|
||||
<template v-for="(item,index) in measuresList">
|
||||
|
@ -47,7 +47,9 @@
|
|||
</uni-td>
|
||||
|
||||
<uni-td align="center">
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">签字</view>
|
||||
<view class="title" @click="$noMultipleClicks(goToSign,index)">
|
||||
{{!item.SIGN_PATH ? '签字' : '已签字'}}
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</template>
|
||||
|
@ -110,6 +112,7 @@
|
|||
measuresList:[],
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
|
@ -123,13 +126,12 @@
|
|||
// 监听事件
|
||||
mounted() {
|
||||
uni.$on('dangerous_options_submit', (data) => {
|
||||
console.log(data)
|
||||
this.measuresList[data.index].SIGN_PATH = data.signImgList[0].filePath
|
||||
this.measuresList[data.index].SIGN_TIME = data.signImgList[0].SIGNER_TIME
|
||||
this.measuresList[data.index].IMG_PATH = data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(",")
|
||||
this.measuresList[data.index].STATUS = data.STATUS
|
||||
this.$set(this.measuresList[data.index],'SIGN_PATH',data.signImgList[0].filePath)
|
||||
this.$set(this.measuresList[data.index],'SIGN_TIME',data.signImgList[0].SIGNER_TIME)
|
||||
this.$set(this.measuresList[data.index],'IMG_PATH',data.imgList.map(item => {
|
||||
return item.filePath
|
||||
}).join(","))
|
||||
this.$set(this.measuresList[data.index],'STATUS',data.STATUS)
|
||||
})
|
||||
},
|
||||
// 取消监听
|
||||
|
@ -205,6 +207,15 @@
|
|||
return;
|
||||
}
|
||||
if (APPLY_STATUS == 1) {
|
||||
|
||||
if(!this.pd.DESCR){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入其他安全措施,没有请填“无”',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < this.measuresList.length; i++) {
|
||||
const measures = this.measuresList[i]
|
||||
if(!measures.SIGN_PATH){
|
||||
|
|
|
@ -55,19 +55,23 @@
|
|||
<text></text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm"
|
||||
v-if="item.CREATOR == loginUserId || (TabCur + 1) == '2'"
|
||||
v-if="item.CREATOR == loginUserId && (TabCur + 1) == '1'"
|
||||
@click="$noMultipleClicks(goToDetail,item.HIDDEN_ID)">
|
||||
{{(TabCur + 1) == '1' ? '验收' : '查看'}}
|
||||
验收
|
||||
</button>
|
||||
<button style="margin-left: 20upx;"
|
||||
v-if="item.ISPUNISH !== '2'
|
||||
&& !item.KEYPROJECTPUNISH_ID
|
||||
<button style="margin-left: 20upx;" class="cu-btn bg-blue margin-tb-sm sm"
|
||||
@click="$noMultipleClicks(goToDetailView,item.HIDDEN_ID)">
|
||||
查看
|
||||
</button>
|
||||
<!-- <button style="margin-left: 20upx;"
|
||||
v-if="item.ISPUNISH !== '2'
|
||||
&& !item.KEYPROJECTPUNISH_ID
|
||||
&& item.PUNISH_THE_PERSON.includes(loginUserId)
|
||||
"
|
||||
class="cu-btn bg-red margin-tb-sm sm"
|
||||
class="cu-btn bg-red margin-tb-sm sm"
|
||||
@click.stop="fnModalShow(item)">
|
||||
处罚
|
||||
</button>
|
||||
</button> -->
|
||||
<!-- && item.CREATOR == loginUserId" -->
|
||||
</text>
|
||||
</view>
|
||||
|
@ -98,7 +102,7 @@
|
|||
<radio-group @change="changeRadioGroup($event)">
|
||||
<label class="radio"><radio value="1" :checked="punishForm.ISPUNISH === '1'" :disabled="TabCur == 2" />是</label>
|
||||
<label class="radio"><radio value="2" :checked="punishForm.ISPUNISH === '2'" :disabled="TabCur == 2" />否</label>
|
||||
</radio-group>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view v-if="punishForm.ISPUNISH==1">
|
||||
<view class="cu-form-group">
|
||||
|
@ -242,6 +246,12 @@
|
|||
'&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=' + (this.TabCur + 1)
|
||||
});
|
||||
},
|
||||
goToDetailView(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/key-project-management/hidden-management/detail?HIDDEN_ID=' + e +
|
||||
'&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=2'
|
||||
});
|
||||
},
|
||||
getQuery() { //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = 10;
|
||||
|
@ -338,8 +348,17 @@
|
|||
OPERATOR: loginUserId,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
|
||||
if ("success" == res.data.result) {
|
||||
_this.punishForm= {
|
||||
HIDDEN_ID: '',
|
||||
ISPUNISH: '',
|
||||
RECTIFICATIONDEPT_NAME: '',
|
||||
RECTIFICATIONOR_NAME: '',
|
||||
REASON: '',
|
||||
AMOUT: '',
|
||||
DATE: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
},
|
||||
_this.editHiddenIspunish(1)
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
@ -352,7 +371,7 @@
|
|||
}else {
|
||||
_this.editHiddenIspunish(2)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
editHiddenIspunish(Ispunish){
|
||||
// 如果不处罚 修改隐患
|
||||
|
|
|
@ -7,128 +7,176 @@
|
|||
<view class="form">
|
||||
<view class="wui-form-list">
|
||||
<view class="de-drawer">
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="action">
|
||||
隐患照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.hiddenImgs" :key="index" @tap="ViewImage"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.hiddenImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.hiddenImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="action">
|
||||
隐患视频
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in hiddenForm.hiddenVideos" :key="vindex"
|
||||
style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="hiddenForm.hiddenVideos[vindex].FILEPATH"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-textarea">
|
||||
<view class="cu-form-title text-hui">隐患描述</view>
|
||||
<textarea maxlength="-1" disabled v-model="hiddenForm.HIDDENDESCR" placeholder="请对隐患进行详细描述(必填项)"></textarea>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患部位</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENPART }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患级别</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENLEVEL_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENTYPE_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患处置:</view>
|
||||
<view>限期整改</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改期限:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONDEADLINE }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title" style="height: auto;">
|
||||
<view>整改部门:</view>
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
{{ hiddenForm.RECTIFICATIONDEPT_NAME }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改人:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONOR_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改时间:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONTIME }}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
整改照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.zgImgs" :key="index" @tap="ViewImage1"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.zgImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.zgImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">验收时间:</view>
|
||||
<ruiDatePicker v-if="TabCur == 1" :start="todayDate" fields="minute" :value="CHECKTIME || '请选择'"
|
||||
@change="changeDiscoverDate"></ruiDatePicker>
|
||||
<view v-else>{{hiddenForm.CHECKTIME}}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
验收照片
|
||||
</view>
|
||||
<view class="action">
|
||||
{{hiddenForm.ysImgs.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.ysImgs" :key="index" @tap="ViewImage2" :data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.ysImgs[index].FILEPATH">
|
||||
<image v-if="item.IMGFILES_ID" :src="baseImgPath + hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<image v-else :src="hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg" data-type="0" :data-index="index" v-if="TabCur == 1">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage(0)" v-if="hiddenForm.ysImgs.length<4 && TabCur == 1">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cu-form-group">
|
||||
<view class="title">是否进行罚款:</view>
|
||||
<radio-group @change="changeRadioGroup($event)">
|
||||
<label class="radio"><radio value="1" :checked="hiddenForm.ISPUNISH === '1'" :disabled="TabCur == 2" />是</label>
|
||||
<label class="radio"><radio value="2" :checked="hiddenForm.ISPUNISH === '2'" :disabled="TabCur == 2" />否</label>
|
||||
</radio-group>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="action">
|
||||
隐患照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.hiddenImgs" :key="index" @tap="ViewImage"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.hiddenImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.hiddenImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="action">
|
||||
隐患视频
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in hiddenForm.hiddenVideos" :key="vindex"
|
||||
style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="hiddenForm.hiddenVideos[vindex].FILEPATH"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-textarea">
|
||||
<view class="cu-form-title text-hui">隐患描述</view>
|
||||
<textarea maxlength="-1" disabled v-model="hiddenForm.HIDDENDESCR" placeholder="请对隐患进行详细描述(必填项)"></textarea>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患部位</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENPART }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患级别</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENLEVEL_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENTYPE_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患处置:</view>
|
||||
<view>限期整改</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改期限:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONDEADLINE }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title" style="height: auto;">
|
||||
<view>整改部门:</view>
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
{{ hiddenForm.RECTIFICATIONDEPT_NAME }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改人:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONOR_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='2'||hiddenForm.STATE==='4'">
|
||||
<view class="title">整改时间:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONTIME }}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-show="hiddenForm.STATE==='2'||hiddenForm.STATE==='4'">
|
||||
<view class="action">
|
||||
整改照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='2'||hiddenForm.STATE==='4'">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.zgImgs" :key="index" @tap="ViewImage1"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.zgImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.zgImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='4'||TabCur==='1'">
|
||||
<view class="title">验收时间:</view>
|
||||
<ruiDatePicker v-if="TabCur == 1" :start="todayDate" fields="minute" :value="CHECKTIME || '请选择'"
|
||||
@change="changeDiscoverDate"></ruiDatePicker>
|
||||
<view v-else>{{hiddenForm.CHECKTIME}}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-show="hiddenForm.STATE==='4'||TabCur==='1'">
|
||||
<view class="action">
|
||||
验收照片
|
||||
</view>
|
||||
<view class="action">
|
||||
{{hiddenForm.ysImgs.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='4'||TabCur==='1'">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.ysImgs" :key="index" @tap="ViewImage2" :data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.ysImgs[index].FILEPATH">
|
||||
<image v-if="item.IMGFILES_ID" :src="baseImgPath + hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<image v-else :src="hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg" data-type="0" :data-index="index" v-if="TabCur == 1">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage(0)" v-if="hiddenForm.ysImgs.length<4 && TabCur == 1">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="punishForm">
|
||||
<view class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>处罚信息</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚原因:</view>
|
||||
<view>{{ punishForm.REASON }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚金额:</view>
|
||||
<view>{{ punishForm.AMOUT }}元</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚单位:</view>
|
||||
<view>{{ punishForm.UNITS_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚人:</view>
|
||||
<view>{{ punishForm.PERSON_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">下发人:</view>
|
||||
<view>{{ punishForm.CREATOR_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">下发处罚时间:</view>
|
||||
<view>{{ punishForm.DATE }}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="punishForm.HANDLE_IMG">
|
||||
<view class="action">
|
||||
罚款缴纳单
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="punishForm.HANDLE_IMG">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" @tap="viewImagePunish">
|
||||
<image :src="baseImgPath + punishForm.HANDLE_IMG" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">是否缴纳罚款:</view>
|
||||
<view>{{punishForm.HANDLED === '1' ? '已缴' : '未缴' }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="punishForm.HANDLED === '1'">
|
||||
<view class="title">处罚处理人:</view>
|
||||
<view >{{punishForm.PERSON_NAME}}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="punishForm.HANDLED === '1'">
|
||||
<view class="title" >处罚处理时间:</view>
|
||||
<view >{{punishForm.HANLDE_TIME}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button v-if="TabCur == 1" class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(goSubmit)">验收</button>
|
||||
|
@ -175,6 +223,7 @@ export default {
|
|||
ysImgs:[],
|
||||
CHECKTIME :formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
},
|
||||
punishForm:{},
|
||||
videoSrc:'',
|
||||
modalShow:false,
|
||||
todayDate:formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
|
@ -207,10 +256,22 @@ export default {
|
|||
uni.hideLoading();//结束加载中动画
|
||||
if (res.data != null) {
|
||||
this.hiddenForm = res.data.pd
|
||||
if(res.data.pd.punishForm){
|
||||
this.punishForm = res.data.pd.punishForm
|
||||
}else{
|
||||
this.punishForm = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
viewImagePunish(e) {
|
||||
let files = [];
|
||||
files.push(this.baseImgPath + this.punishForm.HANDLE_IMG)
|
||||
uni.previewImage({
|
||||
urls: files
|
||||
});
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files = [];
|
||||
for (var i = 0; i < this.hiddenForm.hiddenImgs.length; i++) {
|
||||
|
@ -293,6 +354,17 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
fnImagePreview(list, index) {
|
||||
const urls = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
urls.push(list[i].url);
|
||||
}
|
||||
const current = urls[index];
|
||||
uni.previewImage({
|
||||
urls,
|
||||
current
|
||||
})
|
||||
},
|
||||
changeRadioGroup(e){
|
||||
if(this.TabCur == 2) return
|
||||
this.hiddenForm.ISPUNISH = e.detail.value
|
||||
|
@ -306,13 +378,13 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
if(this.hiddenForm.ysImgs.length === 0){
|
||||
uni.showToast({
|
||||
title: `请上传验收图片`,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
//if(this.hiddenForm.ysImgs.length === 0){
|
||||
// uni.showToast({
|
||||
// title: `请上传验收图片`,
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
//}
|
||||
// if(!this.hiddenForm.ISPUNISH){
|
||||
// uni.showToast({
|
||||
// title: `请选择是否进行罚款`,
|
||||
|
@ -384,5 +456,8 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.dy-title-flex{
|
||||
font-weight: bold;
|
||||
font-size: 35upx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -20,10 +20,20 @@
|
|||
<scroll-view class="dy-scroll" @scrolltolower="scrolltolower" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0" >
|
||||
<view class="dy-list">
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID"
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID"
|
||||
@click="$noMultipleClicks(goToDetail,item)" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>{{item.OUTSOURCED_NAME}}</text>
|
||||
<text>
|
||||
<view v-if="item.co>0" style="border-radius: 96px;
|
||||
font-size: 10px;
|
||||
padding: 0px 10px;
|
||||
height: 13px;
|
||||
color: #ffffff;
|
||||
background-color:#dd514c ;">
|
||||
{{item.co}}
|
||||
</view>
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
|
@ -32,7 +42,7 @@
|
|||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
监督部门:{{ item.Q_DEPARTMENT_NAME }}
|
||||
监督部门:{{ item.DEPARTMENT_NAME }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '0'" class="dy-subtitle-flex">
|
||||
|
@ -52,7 +62,7 @@
|
|||
<view class="dy-subtitle-flex" style="height: 34upx;">
|
||||
<text></text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm"
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm"
|
||||
@click="$noMultipleClicks(goToDetail,item)">查看</button>
|
||||
</text>
|
||||
</view>
|
||||
|
|
|
@ -11,15 +11,15 @@
|
|||
<text>重点工程管理</text>
|
||||
</view>
|
||||
<view class="apps-warp">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/key-project-management/positioning_management/index">
|
||||
<view class="imgs action">
|
||||
<image src="../../../../static/icon-apps/icon-yxkj-1.png" mode=""></image>
|
||||
<view v-if="count.GC_COUNT" class="cu-tag badge">{{count.GC_COUNT}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>重点工程管理</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/key-project-management/positioning_management/index">
|
||||
<view class="imgs action">
|
||||
<image src="../../../../static/icon-apps/icon-yxkj-1.png" mode=""></image>
|
||||
<view v-if="count.GC_COUNT" class="cu-tag badge">{{count.GC_COUNT}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>重点工程管理</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/key-project-management/safety-environmental-inspection/list">
|
||||
<view class="imgs action">
|
||||
<image src="../../../../static/icon-apps/icon-yxkj-1.png" mode=""></image>
|
||||
|
@ -41,7 +41,7 @@
|
|||
<navigator class="apps-item" hover-class="none" url="/pages/application/key-project-management/penalty-management/list">
|
||||
<view class="imgs action">
|
||||
<image src="../../../../static/icon-apps/icon-yxkj-1.png" mode=""></image>
|
||||
<!-- <view v-if="count.HIDDEN_COUNT" class="cu-tag badge">{{count.HIDDEN_COUNT}}</view>-->
|
||||
<view v-if="count.HIDDEN_COUNT" class="cu-tag badge">{{count.HIDDEN_COUNT}}</view>
|
||||
</view>
|
||||
<view class="text-semi" style="text-align: center;">
|
||||
<view>处罚管理</view>
|
||||
|
|
|
@ -19,24 +19,31 @@
|
|||
<view class="dy-list">
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID" @click="$noMultipleClicks(goToDetail,item.KEYPROJECTPUNISH_ID)" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>{{item.OUTSOURCED_NAME}}</text>
|
||||
<text>{{item.HIDDENDESCR}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<text>被处罚单位:{{ item.UNITS_NAME }}</text>
|
||||
<text>被处罚人:{{ item.PERSON_NAME }}</text>
|
||||
<text v-show="item.ISPUNISH==='1'&&item.HANDLED==='0'">被处罚人:{{ item.PERSON_NAME }}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<view v-show="item.ISPUNISH==='1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
处罚原因:{{ item.REASON }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<view v-show="item.ISPUNISH" class="dy-subtitle-flex">
|
||||
<text>下发人:{{ item.CREATOR_NAME }}</text>
|
||||
<text>是否处罚:{{ item.ISPUNISH == "2" ? "否":"是" }}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" style="height: 34upx;">
|
||||
<text>处罚处理状态:{{ (TabCur + 1) == "1" ? "待处理" : "已处理" }}</text>
|
||||
<text>处罚处理状态:{{ item.ISPUNISH == "2" ? "不处罚":item.HANDLED == "1" ?"已完成":item.ISPUNISH == "1" ? "待反馈" : "待处罚" }}</text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToDetail,item.KEYPROJECTPUNISH_ID)">查看</button>
|
||||
<button
|
||||
v-if="!item.ISPUNISH"
|
||||
class="cu-btn bg-red margin-tb-sm sm"
|
||||
@click.stop="fnModalShow(item)">
|
||||
处罚
|
||||
</button>
|
||||
<button style="margin-left: 20upx;" class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToDetail,item.HIDDEN_ID)">查看</button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -52,6 +59,57 @@
|
|||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
<view :class="['cu-modal',{'show':modalShow}]" v-if="modalShow">
|
||||
<view class="cu-dialog">
|
||||
<view class="cu-bar bg-white justify-end">
|
||||
<view class="content">处罚</view>
|
||||
<view class="action" @tap="modalShow = false">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">是否进行罚款:</view>
|
||||
<radio-group @change="changeRadioGroup($event)">
|
||||
<label class="radio"><radio value="1" :checked="punishForm.ISPUNISH === '1'" />是</label>
|
||||
<label class="radio"><radio value="2" :checked="punishForm.ISPUNISH === '2'" />否</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view v-if="punishForm.ISPUNISH==1">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚原因</view>
|
||||
<input v-model="punishForm.REASON" placeholder="请输入处罚原因"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚金额(元)</view>
|
||||
<input type="number" v-model="punishForm.AMOUT" placeholder="请输入处罚金额" @blur="checkNumber"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚单位</view>
|
||||
<input disabled v-model="punishForm.RECTIFICATIONDEPT_NAME" placeholder="请输入被处罚单位"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚人</view>
|
||||
<input disabled v-model="punishForm.RECTIFICATIONOR_NAME" placeholder="请输入被处罚人"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">下发处罚时间</view>
|
||||
<ruiDatePicker fields="minute" :value="punishForm.DATE || '请选择'" @change="changeStartDate">
|
||||
</ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar bg-white justify-between">
|
||||
<view class="action" style="flex-basis: 100%">
|
||||
<button class="cu-btn" style="flex-basis: 50%" @click="modalShow = false">关闭</button>
|
||||
<button class="cu-btn line-green text-green" style="flex-basis: 50%"
|
||||
@click="fnSubmit">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -84,6 +142,16 @@ export default {
|
|||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
tabNav: ['待反馈处罚', '已完成处罚'],
|
||||
modalShow: false,
|
||||
punishForm: {
|
||||
HIDDEN_ID: '',
|
||||
ISPUNISH: '',
|
||||
RECTIFICATIONDEPT_NAME: '',
|
||||
RECTIFICATIONOR_NAME: '',
|
||||
REASON: '',
|
||||
AMOUT: '',
|
||||
DATE: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
},
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
@ -119,12 +187,24 @@ export default {
|
|||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
||||
this.getQuery();
|
||||
},
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/key-project-management/penalty-management/detail?KEYPROJECTPUNISH_ID='+e + '&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=' + (this.TabCur+1)
|
||||
});
|
||||
},
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/key-project-management/hidden-management/detail?HIDDEN_ID=' + e +
|
||||
'&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=2'
|
||||
});
|
||||
},
|
||||
fnModalShow(item) {
|
||||
this.punishForm.HIDDEN_ID = item.HIDDEN_ID
|
||||
this.punishForm.RECTIFICATIONDEPT_NAME = item.UNITS_NAME
|
||||
this.punishForm.RECTIFICATIONOR_NAME = item.RECTIFICATIONOR_NAME
|
||||
this.punishForm.ISPUNISH = '2'
|
||||
this.modalShow = true
|
||||
},
|
||||
changeStartDate(e) {
|
||||
this.punishForm.DATE = e
|
||||
this.$forceUpdate(); //强制刷新
|
||||
},
|
||||
getQuery(){ //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = 10;
|
||||
|
@ -154,7 +234,7 @@ export default {
|
|||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/keyprojectpunish/list?showCount='+_this.showCount+'¤tPage='+_this.currentPage,
|
||||
url: basePath +'/app/keyprojectcheck/punishlist?showCount='+_this.showCount+'¤tPage='+_this.currentPage,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
@ -183,6 +263,91 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
fnSubmit() {
|
||||
var _this = this
|
||||
console.log(this.punishForm)
|
||||
//如果处罚,添加罚单
|
||||
if (this.punishForm.ISPUNISH === "1") {
|
||||
for (const key in this.punishRules) {
|
||||
if (!this.punishForm[key]) {
|
||||
uni.showToast({
|
||||
title: this.punishRules[key],
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
uni.request({
|
||||
url: basePath + '/app/keyprojectpunish/add',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
...this.punishForm,
|
||||
CORPINFO_ID: corpinfoId,
|
||||
CREATOR: loginUserId,
|
||||
OPERATOR: loginUserId,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if ("success" == res.data.result) {
|
||||
_this.editHiddenIspunish(1);
|
||||
_this.punishForm= {
|
||||
HIDDEN_ID: '',
|
||||
ISPUNISH: '',
|
||||
RECTIFICATIONDEPT_NAME: '',
|
||||
RECTIFICATIONOR_NAME: '',
|
||||
REASON: '',
|
||||
AMOUT: '',
|
||||
DATE: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msaesge,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
_this.editHiddenIspunish(2)
|
||||
}
|
||||
|
||||
},
|
||||
editHiddenIspunish(Ispunish){
|
||||
// 如果不处罚 修改隐患
|
||||
uni.request({
|
||||
url: basePath + '/app/keyprojectcheck/editHiddenIspunish',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
...this.punishForm,
|
||||
ISPUNISH:Ispunish,
|
||||
PUNISH_PERSON:loginUserId
|
||||
},
|
||||
success: (res) => {
|
||||
this.modalShow = false
|
||||
this.getQuery()
|
||||
}
|
||||
});
|
||||
},
|
||||
changeRadioGroup(e){
|
||||
if(this.TabCur == 2) return
|
||||
this.punishForm.ISPUNISH = e.detail.value
|
||||
},
|
||||
checkNumber(e){
|
||||
var reg = /^[0-9]+(\.[0-9]{1,2})?$/;
|
||||
if(!(reg.test(e.detail.value))){
|
||||
uni.showToast({
|
||||
title: "处罚金额只能输入整数或两位小数",
|
||||
icon: 'none'
|
||||
})
|
||||
this.punishForm.AMOUT = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -23,6 +23,16 @@
|
|||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID" @click="$noMultipleClicks(goToDetail,item.OUTSOURCED_ID)" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>{{item.OUTSOURCED_NAME}}</text>
|
||||
<text>
|
||||
<view v-if="item.cfcount>0" style="border-radius: 96px;
|
||||
font-size: 10px;
|
||||
padding: 0px 10px;
|
||||
height: 13px;
|
||||
color: #ffffff;
|
||||
background-color:#dd514c ;">
|
||||
{{item.cfcount}}
|
||||
</view>
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
|
@ -31,7 +41,7 @@
|
|||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
监督部门:{{ item.Q_DEPARTMENT_NAME }}
|
||||
监督部门:{{ item.DEPARTMENT_NAME }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '0'" class="dy-subtitle-flex">
|
||||
|
@ -161,7 +171,7 @@ export default {
|
|||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/keyProjects/listOutsourced?showCount='+_this.showCount+'¤tPage='+_this.currentPage ,
|
||||
url: basePath +'/app/keyProjects/getPUNISHlist?showCount='+_this.showCount+'¤tPage='+_this.currentPage ,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
@ -170,7 +180,7 @@ export default {
|
|||
data: {
|
||||
KEYWORDS : _this.NameLikes, //关键字模糊查询
|
||||
CORPINFO_ID:corpinfoId,
|
||||
UserId:loginUserId
|
||||
PUNISHUser:loginUserId
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();//结束加载中动画
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<text></text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToDetail,item.OUTSOURCED_ID)">查看</button>
|
||||
<button style="margin-left: 20upx;" class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToVideo,item.OUTSOURCED_ID)">播放</button>
|
||||
<!-- <button style="margin-left: 20upx;" class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToVideo,item.OUTSOURCED_ID)">播放</button> -->
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -25,19 +25,10 @@
|
|||
<view>{{form.INSPECTION_CATEGORY}}现场检查记录</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title" style="height: auto;">
|
||||
<view class="title">
|
||||
<view>被检查单位:</view>
|
||||
</view>
|
||||
<block v-if="!forbidEdit">
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showZgTree('tkiTree1', 1)">
|
||||
{{ form.UNITS_NAME || '请选择' }}
|
||||
</view>
|
||||
</view>
|
||||
<tki-tree ref="tkiTree1" :selectParent=true :range="treeNode" rangeKey="UNITS_NAME"
|
||||
@confirm="zgtreeConfirm($event,'inspectedSiteuserList')" @cancel="zgtreeCancel"></tki-tree>
|
||||
</block>
|
||||
<block v-else>{{ form.UNITS_NAME }}</block>
|
||||
<view>{{ form.UNITS_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="form.UNITS_NAME">
|
||||
<view class="title">被检查单位现场负责人:</view>
|
||||
|
@ -244,7 +235,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<!-- <view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="forbidEdit ? null : showZgTree('tkiTree5', 5)">
|
||||
|
@ -254,6 +245,19 @@
|
|||
<tki-tree ref="tkiTree5" :selectParent=false :range="hiddenTypeTreeList" rangeKey="name"
|
||||
@confirm="zgtreeConfirm($event,'hiddenTypeTreeList')" @cancel="zgtreeCancel">
|
||||
</tki-tree>
|
||||
</view> -->
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showZgTree2">{{hiddenForm.HIDDENTYPE_NAME?hiddenForm.HIDDENTYPE_NAME:'请选择'}}</view>
|
||||
</view>
|
||||
<tki-tree ref="tkiTree2"
|
||||
:selectParent="true"
|
||||
:range="hiddenTypeList"
|
||||
rangeKey="name"
|
||||
@confirm="zgtreeConfirm2"
|
||||
@cancel="zgtreeCancel2">
|
||||
</tki-tree>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患处置:</view>
|
||||
|
@ -403,6 +407,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
hiddenTypeList: [],
|
||||
// 罚单开关
|
||||
punishFormType: false,
|
||||
baseImgPath: baseImgPath,
|
||||
|
@ -600,10 +605,30 @@
|
|||
// 初始化现场作业负责人
|
||||
this.getDept()
|
||||
this.getDict()
|
||||
this.getHiddenType();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
showZgTree2(){
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree2._show();
|
||||
},
|
||||
zgtreeConfirm2(e){
|
||||
this.isUps=false;
|
||||
if(e[0]?.parents.length === 1){
|
||||
this.hiddenForm.HIDDENTYPE = [e[0]?.parents[0]?.id || '', e[0]?.id || ''];
|
||||
this.hiddenForm.HIDDENTYPE_NAME = [e[0]?.parents[0]?.name || '', e[0]?.name || ''].join('/')
|
||||
}else if(e[0]?.parents.length === 2) {
|
||||
this.hiddenForm.HIDDENTYPE = [e[0]?.parents[0]?.id || '', e[0]?.parents[1]?.id || '', e[0]?.id || ''];
|
||||
this.hiddenForm.HIDDENTYPE_NAME = [e[0]?.parents[0]?.name || '', e[0]?.parents[1]?.name || '', e[0]?.name || ''].join('/')
|
||||
}else{
|
||||
this.hiddenForm.HIDDENTYPE = [e[0]?.id || ''];
|
||||
this.hiddenForm.HIDDENTYPE_NAME = [e[0]?.name || ''].join('/');
|
||||
}
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
|
@ -1074,7 +1099,7 @@
|
|||
return;
|
||||
}
|
||||
if (this.hiddenForm.RECTIFICATIONTYPE === '2') {
|
||||
if (!this.hiddenForm.RECTIFICATIONDEADLINE) {
|
||||
if (!this.hiddenForm.RECTIFICATIONDEADLINE || this.hiddenForm.RECTIFICATIONDEADLINE === '请选择') {
|
||||
uni.showToast({
|
||||
title: '请选择整改期限',
|
||||
icon: "none"
|
||||
|
@ -1390,6 +1415,51 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
getHiddenType: function () {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/dictionaries/getLevels',
|
||||
data: {
|
||||
DICTIONARIES_ID: '3babc15144444bdc8d763d0af2bdfff8',
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function ({data}) {
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
if (data.list[i].BIANMA.indexOf(loginUser.PROVINCE) > -1) {
|
||||
_this.getTrainDicList(data.list[i].DICTIONARIES_ID)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getTrainDicList(parentId) { // trainDicList
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/dictionaries/listAllDictToParId',
|
||||
data: {
|
||||
parentId,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function ({data}) {
|
||||
let zTreeNodes = data.zTreeNodes
|
||||
zTreeNodes = zTreeNodes.replace(/"nodes":\[/g, '"children":[')
|
||||
_this.hiddenTypeList = JSON.parse(zTreeNodes)
|
||||
}
|
||||
});
|
||||
},
|
||||
playVideo(e) {
|
||||
if (e.currentTarget.dataset.src) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
|
@ -1440,9 +1510,13 @@
|
|||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
_this.treeNode = res.data.varList;
|
||||
_this.form.UNITS_NAME = _this.treeNode[0].UNITS_NAME
|
||||
_this.form.UNITS_ID = _this.treeNode[0].UNITS_ID
|
||||
_this.getUserList('inspectedSiteuserList', _this.treeNode[0].UNITS_ID)
|
||||
if(!_this.form.UNITS_NAME) {
|
||||
_this.form.UNITS_NAME = _this.treeNode[0].UNITS_NAME
|
||||
}
|
||||
if(!_this.form.UNITS_ID) {
|
||||
_this.form.UNITS_ID = _this.treeNode[0].UNITS_ID
|
||||
}
|
||||
_this.getUserList('inspectedSiteuserList', _this.form.UNITS_ID)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
|
@ -1452,7 +1526,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//获取人员列表
|
||||
getUserList(list, dept, i) {
|
||||
//发送 post 请求
|
||||
|
@ -1498,7 +1572,8 @@
|
|||
},
|
||||
success: function(res) {
|
||||
if ("success" == res.data.result) {
|
||||
console.log(res.data.pd);
|
||||
_this.form.UNITS_NAME = res.data.pd.UNITS_NAME
|
||||
_this.form.UNITS_ID = res.data.pd.UNITS_ID
|
||||
_this.form.PERSONNELMANAGEMENT_ID = res.data.pd.PERSONNELMANAGEMENT_ID;
|
||||
_this.form.PERSON_NAME = res.data.pd.NAME;
|
||||
} else {
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="de-item">
|
||||
<view class="de-item-sp">
|
||||
<view class="de-sub-title">
|
||||
<text class="text-grey">计划图片</text>
|
||||
</view>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">安全环保检查指派确认人</block>
|
||||
<block slot="content">安全环保检查指派</block>
|
||||
</cu-custom>
|
||||
<view class="form">
|
||||
<view class="wui-form-list">
|
||||
|
@ -332,7 +332,7 @@
|
|||
<view class="title">整改期限</view>
|
||||
<picker mode="date" :value="form.RECTIFICATIONDEADLINE" :start="rectifyPlanCompletionStartTime"
|
||||
@change="changeDate">
|
||||
<view class="picker">
|
||||
<view class="picker">
|
||||
{{ form.RECTIFICATIONDEADLINE ? form.RECTIFICATIONDEADLINE : '请选择' }}
|
||||
</view>
|
||||
</picker>
|
||||
|
@ -398,6 +398,7 @@
|
|||
HIDDEN_STATUS: '', // 检查ID
|
||||
principalList: [],
|
||||
form: {
|
||||
RECTIFICATIONORNAME:'',
|
||||
HIDDENDESCR: '', // 隐患描述
|
||||
CREATORNAME: '', // 隐患责任人
|
||||
HIDDENLEVELNAME: '', // 隐患级别
|
||||
|
|
|
@ -464,7 +464,7 @@
|
|||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.form = res.data.pd; //参数map
|
||||
_this.form.hiddenForm = res.data.hiddenList[0];
|
||||
_this.form.hiddenForm = res.data.pd.hiddenList[0];
|
||||
for (let i = 0; i < _this.form.inspectorList.length; i++) {
|
||||
_this.inspectorList.push([])
|
||||
_this.getUserList('inspectorList', _this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</view>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-textarea" >
|
||||
<view class="cu-form-title text-hui">核实意见</view>
|
||||
<view class="cu-form-title text-hui">反馈意见</view>
|
||||
<textarea :disabled="forbidEdit" maxlength="-1" v-model="FEED_BACK" placeholder="(必填)"></textarea>
|
||||
</view>
|
||||
<view v-if="!forbidEdit">
|
||||
|
|
Loading…
Reference in New Issue