1334 lines
52 KiB
Vue
1334 lines
52 KiB
Vue
<template>
|
|
<view>
|
|
<step-title :stepPage="stepsPage" :stepText="stepsText"></step-title>
|
|
<view>
|
|
<view class="card" v-if="stepsPage === 0">
|
|
<u--form labelWidth="auto" :model="dataModel" ref="wForm" class="demo-ruleForm">
|
|
<view style="position: relative;">
|
|
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
|
</view>
|
|
|
|
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">基本信息填写</view>
|
|
|
|
<u-form-item label="编号" prop="CODE">
|
|
<u--input v-model="dataModel.CODE" disabled disabledColor="#ffffff" placeholder="请输入编号" border="none" inputAlign="right">
|
|
</u--input>
|
|
</u-form-item>
|
|
<u-form-item label="作业名称" prop="stepName">
|
|
<u--input v-model="dataModel.Nav_OperationStep.NAME" disabled disabledColor="#ffffff" placeholder="请输入作业名称" border="none" inputAlign="right"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="作业地点" prop="JOB_LOCATION">
|
|
<u--input v-model="dataModel.JOB_LOCATION" disabledColor="#ffffff" placeholder="请输入作业地点" border="none" inputAlign="right"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="开始时间" prop="JOB_DATE">
|
|
<u--input v-model="dataModel.JOB_DATE" disabled disabledColor="#ffffff" placeholder="请输入作业时间" border="none" inputAlign="right">
|
|
</u--input>
|
|
</u-form-item>
|
|
<u-form-item label="结束时间" prop="JOB_END_DATE">
|
|
<u--input v-model="dataModel.JOB_END_DATE" disabled disabledColor="#ffffff" placeholder="请输入作业时间" border="none" inputAlign="right">
|
|
</u--input>
|
|
</u-form-item>
|
|
<u-form-item label="采取有效风险控制措施" prop="IS_EFFECTIVE_SHOW" @click="handleShowSheet({title: '控制措施', name: 'IS_EFFECTIVE'})">
|
|
<u--input :value="dataModel.IS_EFFECTIVE_SHOW" disabled disabledColor="#fff" placeholder="请选择是否" border="none" inputAlign="right"></u--input>
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="描述内容" prop="EFFECTIVE" v-if="dataModel.IS_EFFECTIVE==0" required>
|
|
</u-form-item>
|
|
<u--textarea v-model="dataModel.EFFECTIVE" placeholder="请输入描述内容" border="surround" inputAlign="left" v-if="dataModel.IS_EFFECTIVE==0" :required="dataModel.IS_EFFECTIVE==0">
|
|
</u--textarea>
|
|
<u-form-item label="人员未存在违规行为" prop="IS_EXIST_SHOW" @click="handleShowSheet({title: '违规行为', name: 'IS_EXIST'})">
|
|
<u--input v-model="dataModel.IS_EXIST_SHOW" placeholder="请选择是否" border="none" inputAlign="right">
|
|
</u--input>
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="描述内容" prop="EXIST" v-if="dataModel.IS_EXIST==0" required>
|
|
</u-form-item>
|
|
<u--textarea v-model="dataModel.EXIST" placeholder="请输入描述内容" border="surround" inputAlign="left" v-if="dataModel.IS_EXIST==0" :required="dataModel.IS_EXIST==0">
|
|
</u--textarea>
|
|
<u-form-item label="作业人员习惯合适" prop="IS_SUITABLE_SHOW" @click="handleShowSheet({title: '习惯合适', name: 'IS_SUITABLE'})">
|
|
<u--input v-model="dataModel.IS_SUITABLE_SHOW" placeholder="请选择是否" border="none" inputAlign="right">
|
|
</u--input>
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="描述内容" prop="SUITABLE" v-if="dataModel.IS_SUITABLE==0" required>
|
|
</u-form-item>
|
|
<u--textarea v-model="dataModel.SUITABLE" placeholder="请输入描述内容" border="surround" inputAlign="left" v-if="dataModel.IS_SUITABLE==0" :required="dataModel.IS_SUITABLE==0">
|
|
</u--textarea>
|
|
<u-form-item label="作业人员无需再培训" prop="IS_NEED_SHOW" @click="handleShowSheet({title: '需再培训', name: 'IS_NEED'})">
|
|
<u--input v-model="dataModel.IS_NEED_SHOW" placeholder="请选择是否" border="none" inputAlign="right">
|
|
</u--input>
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="描述内容" prop="NEED" v-if="dataModel.IS_NEED==0" required>
|
|
</u-form-item>
|
|
<u--textarea v-model="dataModel.NEED" placeholder="请输入描述内容" border="surround" inputAlign="left" v-if="dataModel.IS_NEED==0" :required="dataModel.IS_NEED==0">
|
|
</u--textarea>
|
|
<u-form-item label="操作规程无需再改进" prop="IS_REQUIRES_SHOW" @click="handleShowSheet({title: '需再改进', name: 'IS_REQUIRES'})">
|
|
<u--input v-model="dataModel.IS_REQUIRES_SHOW" placeholder="请选择是否" border="none" inputAlign="right">
|
|
</u--input>
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
|
</u-form-item>
|
|
<u-form-item label="描述内容" prop="REQUIRES" v-if="dataModel.IS_REQUIRES==0" required>
|
|
</u-form-item>
|
|
<u--textarea v-model="dataModel.REQUIRES" placeholder="请输入描述内容" border="surround" inputAlign="left" v-if="dataModel.IS_REQUIRES==0" :required="dataModel.IS_REQUIRES==0">
|
|
</u--textarea>
|
|
</u--form>
|
|
</view>
|
|
<view style="padding: 10px 16px;" v-if="stepsPage === 0" class="bottom-button">
|
|
<u-button type="primary" @click="stepAdd" color="#3d4b70">下一步</u-button>
|
|
</view>
|
|
<view class="sub-form" v-if="stepsPage === 1">
|
|
<view>
|
|
<u--form labelPosition="left" labelWidth="90px" ref="sForm" class="demo-ruleForm" size="mini">
|
|
<view class="form-sub-add" v-for="(item, index) in dataModel.Nav_JobActivityPerson" :key="index">
|
|
<view :style="{display:dataModel.isVisble}" v-if="item.Nav_User">
|
|
<view style="position: relative;" v-if="index==0">
|
|
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
|
</view>
|
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;padding-bottom: 10px;"
|
|
:style="index > 0?'border-top: #e7e6e4 1px solid;padding-top:10px':''">
|
|
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;display: flex;flex-direction: row;align-items: center;">
|
|
作业人员信息
|
|
<u-badge :value="index+1" bgColor="#3d4b70" style="margin-left: 5px;"></u-badge>
|
|
<view v-if="index>0" style="margin-left: 10px;">
|
|
<view style="display: flex;align-items: center;" v-if="thisUser.indexOf(index)!==-1" @click="handleAddUserPush(index)">
|
|
<u-icon name="arrow-down"></u-icon>
|
|
</view>
|
|
<view style="display: flex;align-items: center;" v-if="thisUser.indexOf(index)==-1" @click="handleAddUserPush(index)">
|
|
<u-icon name="arrow-up"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="font-size: 15px;align-items: center;" v-if="thisUser.indexOf(index)!==-1">
|
|
{{item['Nav_User'].NAME}}
|
|
</view>
|
|
<view v-if="index > 0" @click="handleDelRowBefore(index)" style="padding: 0px 0px 0px 20px;">
|
|
<u-icon name="trash" size="24" color="#3d4b70"></u-icon>
|
|
</view>
|
|
</view>
|
|
<view v-if="thisUser.indexOf(index)==-1">
|
|
<u-form-item label="人员姓名" prop="personName" @click="handleChangeUser(item['Nav_User'])">
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_User'].NAME" placeholder="请选择人员姓名" suffixIcon="arrow-right" suffixIconStyle="font-size:12px" fontSize="14px"
|
|
customStyle="margin:0px;display:flex;padding:3px 9px" border="none">
|
|
</u--input>
|
|
</u-icon>
|
|
</u-form-item>
|
|
<!-- <u-form-item label="人员编号" prop="personNo">
|
|
<u--input disabledColor="#fff" fontSize="14px" placeholder="请选择人员姓名" customStyle="margin:0px;display:flex;padding:3px 9px" v-model="item['Nav_User'].CODE" border="none"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="部门" prop="job" style="padding-bottom: 10px;">
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_User']['Nav_Department'].NAME" placeholder="请选择人员姓名" fontSize="14px" border="none"
|
|
customStyle="margin:0px;display:flex;padding:3px 9px;"></u--input>
|
|
</u-form-item> -->
|
|
</view>
|
|
</view>
|
|
<view :style="{display:dataModel.isVisbleOut}" v-if="item.Nav_RelatedUser">
|
|
<view style="position: relative;" v-if="index==0">
|
|
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
|
</view>
|
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;padding-bottom: 10px;"
|
|
:style="index > 0?'border-top: #e7e6e4 1px solid;padding-top:10px':''">
|
|
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;display: flex;flex-direction: row;align-items: center;">
|
|
作业人员信息
|
|
<u-badge :value="index+1" bgColor="#3d4b70" style="margin-left: 5px;"></u-badge>
|
|
<view v-if="index>0" style="margin-left: 10px;">
|
|
<view style="display: flex;align-items: center;" v-if="thisUser.indexOf(index)!==-1" @click="handleAddUserPush(index)">
|
|
<u-icon name="arrow-down"></u-icon>
|
|
</view>
|
|
<view style="display: flex;align-items: center;" v-if="thisUser.indexOf(index)==-1" @click="handleAddUserPush(index)">
|
|
<u-icon name="arrow-up"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="font-size: 15px;align-items: center;" v-if="thisUser.indexOf(index)!==-1">
|
|
{{item['Nav_RelatedUser'].NAME}}
|
|
</view>
|
|
<view v-if="index > 0" @click="handleDelRowBefore(index)" style="padding: 0px 0px 0px 20px;">
|
|
<u-icon name="trash" size="24" color="#3d4b70"></u-icon>
|
|
</view>
|
|
</view>
|
|
<view v-if="thisUser.indexOf(index)==-1">
|
|
<u-form-item label="人员姓名" prop="personName">
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_RelatedUser'].NAME" placeholder="请选择人员姓名" suffixIcon="arrow-right" suffixIconStyle="font-size:12px" fontSize="14px"
|
|
customStyle="margin:0px;display:flex;padding:3px 9px" border="none">
|
|
</u--input>
|
|
</u-icon>
|
|
</u-form-item>
|
|
<!-- <u-form-item label="人员编号" prop="personNo">
|
|
<u--input disabledColor="#fff" fontSize="14px" placeholder="请选择人员姓名" customStyle="margin:0px;display:flex;padding:3px 9px" v-model="item['Nav_User'].CODE" border="none"></u--input>
|
|
</u-form-item>
|
|
<u-form-item label="部门" prop="job" style="padding-bottom: 10px;">
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_User']['Nav_Department'].NAME" placeholder="请选择人员姓名" fontSize="14px" border="none"
|
|
customStyle="margin:0px;display:flex;padding:3px 9px;"></u--input>
|
|
</u-form-item> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;align-items: center;justify-content: center;border-top: #e7e6e4 1px solid;" @click="handleAddUser">
|
|
<view style="display: flex;align-items: center;justify-content: center;">
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_JobActivityPerson.length == 1" :style="{display:dataModel.isVisble}">添加作业人员信息</view>
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_JobActivityPerson.length !== 1" :style="{display:dataModel.isVisble}">继续添加作业人员信息</view>
|
|
</view>
|
|
</view>
|
|
</u--form>
|
|
</view>
|
|
|
|
</view>
|
|
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPage === 1" class="bottom-button">
|
|
<button type="default" @click="stepReduce" :plain="true"
|
|
style="margin-right: 5px;background-color: #fff;color: #3d4b70;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">上一步</button>
|
|
<button type="default" @click="stepAddTwo"
|
|
style="margin-left: 5px;background-color: #3d4b70;color: #fff;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">下一步</button>
|
|
<!-- <u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
|
|
<u-button type="primary" @click="stepAddTwo" color="#3d4b70" style="margin-left: 5px;">下一步</u-button> -->
|
|
</view>
|
|
<view class="sub-form" v-if="stepsPage === 2">
|
|
|
|
<u--form labelPosition="left" labelWidth="auto" ref="sForm" class="demo-ruleForm-thr" size="mini">
|
|
<view style="display: flex;flex-direction: column;">
|
|
<view class="form-sub-add" v-for="(item, index) in dataModel.Nav_Details" :key="index">
|
|
<view style="position: relative;" v-if="index==0">
|
|
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
|
</view>
|
|
<view style="font-size: 15px; font-weight: bold;white-space: nowrap;color: #3d4b70;display: flex;flex-direction: row;align-items: center;margin-bottom: 10px;" v-if="index==0">
|
|
作业前确认
|
|
</view>
|
|
<view>
|
|
<u-form-item prop="NAME" :style="index ==0?'':'border-top: 1px solid #e7e6e4;'">
|
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;width: 100%;">
|
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
|
<view style="margin-right: 10px;">
|
|
<view style="display: flex;align-items: center;" v-if="thisIndex.indexOf(index)==-1" @click="handleAddDetailPush(index)">
|
|
<u-icon name="arrow-down"></u-icon>
|
|
</view>
|
|
<view style="display: flex;align-items: center;" v-if="thisIndex.indexOf(index)!==-1" @click="handleAddDetailPush(index)">
|
|
<u-icon name="arrow-up"></u-icon>
|
|
</view>
|
|
</view>
|
|
<u-badge :value="index+1" bgColor="#3d4b70" style="margin-right: 20px;"></u-badge>
|
|
|
|
<view style="font-size: 15px;align-items: center;overflow: hidden;text-overflow: ellipsis;" v-if="thisIndex.indexOf(index)==-1">
|
|
{{item.SafeConfirmsStr}}
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;flex-direction: row;">
|
|
<view @click.stop="handleOkRowDetail(index)">
|
|
<u-icon name="checkmark-circle" size="20" color="#3C9CFF" v-if="dataModel.Nav_Details[index].IS_CONFIRM===false"></u-icon>
|
|
<u-icon name="checkmark-circle" size="20" color="#55aa00" v-if="dataModel.Nav_Details[index].IS_CONFIRM===true"></u-icon>
|
|
</view>
|
|
<view v-if="index == 0" style="padding: 0px 0px 0px 10px;">
|
|
<u-icon name="trash" size="24" color="#c4c6c9"></u-icon>
|
|
</view>
|
|
<view v-if="index > 0" @click="handleDelRowBeforeDetail(index)" style="padding: 0px 0px 0px 10px;">
|
|
<u-icon name="trash" size="24" color="#3d4b70"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<view v-if="thisIndex.indexOf(index)!==-1" style="position: relative;">
|
|
<u-form-item label="名称" prop="SafeConfirmsStr">
|
|
<u--textarea v-model="item.SafeConfirmsStr" placeholder="请输入名称" autoHeight></u--textarea>
|
|
<!-- <u--input disabledColor="#fff" v-model="item.SafeConfirmsStr" border="none" inputAlign="right" ></u--input> -->
|
|
</u-form-item>
|
|
<view style="display: flex;flex-direction: row;margin: 10px 0px;">
|
|
<view style="font-size: 14px;color: #8e8b9c;margin-right: 25px;margin-top: 5px;white-space: nowrap;">附件</view>
|
|
<view class="full-upload-border">
|
|
<full-upload v-model="item.Nav_Files"></full-upload>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;align-items: center;justify-content: center;border-top: #e7e6e4 1px solid;" @click="handleAddDetail">
|
|
<view style="display: flex;align-items: center;justify-content: center;">
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_Details.length == 1">添加作业前确认</view>
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_Details.length !== 1">继续添加作业前确认</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u--form>
|
|
|
|
</view>
|
|
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPage === 2" class="bottom-button">
|
|
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
|
|
<u-button type="primary" @click="stepAddThree" color="#3d4b70" style="margin-left: 5px;">下一步</u-button>
|
|
</view>
|
|
<view class="sub-form" v-if="stepsPage === 3">
|
|
<view>
|
|
<u--form labelPosition="left" labelWidth="auto" ref="sForm" class="demo-ruleForm-thr" size="mini">
|
|
<view style="display: flex;flex-direction: column;">
|
|
<view class="form-sub-add" v-for="(item, index) in dataModel.Nav_Flow" :key="index">
|
|
<view style="position: relative;" v-if="index==0">
|
|
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
|
</view>
|
|
<view style="font-size: 15px; font-weight: bold;white-space: nowrap;color: #3d4b70;display: flex;flex-direction: row;align-items: center;margin-bottom: 10px;" v-if="index==0">
|
|
作业流程及安全措施
|
|
</view>
|
|
<view>
|
|
<u-form-item prop="NAME" :style="index ==0?'':'border-top: 1px solid #e7e6e4;'">
|
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;width: 100%;">
|
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
|
<view style="margin-right: 10px;">
|
|
<view style="display: flex;align-items: center;" v-if="thisFluce.indexOf(index)==-1" @click="handleAddFlucePush(index)">
|
|
<u-icon name="arrow-down"></u-icon>
|
|
</view>
|
|
<view style="display: flex;align-items: center;" v-if="thisFluce.indexOf(index)!==-1" @click="handleAddFlucePush(index)">
|
|
<u-icon name="arrow-up"></u-icon>
|
|
</view>
|
|
</view>
|
|
<u-badge :value="index+1" bgColor="#3d4b70" style="margin-right: 20px;"></u-badge>
|
|
|
|
<view style="font-size: 15px;align-items: center;overflow: hidden;text-overflow: ellipsis;" v-if="thisFluce.indexOf(index)==-1">
|
|
{{item.SafeMeasuresStr}}
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;flex-direction: row;">
|
|
<view @click.stop="handleOkRowFlow(index)">
|
|
<u-icon name="checkmark-circle" size="20" color="#3C9CFF" v-if="dataModel.Nav_Flow[index].IS_CONFIRM===false"></u-icon>
|
|
<u-icon name="checkmark-circle" size="20" color="#55aa00" v-if="dataModel.Nav_Flow[index].IS_CONFIRM===true"></u-icon>
|
|
</view>
|
|
<view v-if="index == 0" style="padding: 0px 0px 0px 10px;">
|
|
<u-icon name="trash" size="24" color="#c4c6c9"></u-icon>
|
|
</view>
|
|
<view v-if="index > 0" @click="handleDelRowBeforeFlow(index)" style="padding: 0px 0px 0px 10px;">
|
|
<u-icon name="trash" size="24" color="#3d4b70"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<view v-if="thisFluce.indexOf(index)!==-1" style="position: relative;">
|
|
<u-form-item label="名称" prop="SafeMeasuresStr">
|
|
<u--textarea v-model="item.SafeMeasuresStr" placeholder="请输入名称" autoHeight></u--textarea>
|
|
<!-- <u--input disabledColor="#fff" v-model="item.SafeConfirmsStr" border="none" inputAlign="right" ></u--input> -->
|
|
</u-form-item>
|
|
<view style="display: flex;flex-direction: row;margin: 10px 0px;">
|
|
<view style="font-size: 14px;color: #8e8b9c;margin-right: 25px;margin-top: 5px;white-space: nowrap;">附件</view>
|
|
<view class="full-upload-border">
|
|
<full-upload v-model="item.Nav_Files"></full-upload>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;align-items: center;justify-content: center;border-top: #e7e6e4 1px solid;" @click="handleAddFlow">
|
|
<view style="display: flex;align-items: center;justify-content: center;">
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_Flow.length == 1">添加作业流程及安全措施</view>
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_Flow.length !== 1">继续添加作业流程及安全措施</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u--form>
|
|
</view>
|
|
</view>
|
|
<view style="padding 10px 16px;display: flex;flex-direction: row;" v-if="stepsPage === 3" class="bottom-button">
|
|
<button type="default" @click="stepReduce" :plain="true"
|
|
style="margin-right: 5px;background-color: #fff;color: #3d4b70;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">上一步</button>
|
|
<button type="default" @click="stepAddFour"
|
|
style="margin-left: 5px;background-color: #3d4b70;color: #fff;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">下一步</button>
|
|
<!-- <u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
|
|
<u-button type="primary" @click="stepAddFour" color="#3d4b70" style="margin-left: 5px;">下一步</u-button> -->
|
|
</view>
|
|
<view class="sub-form" v-if="stepsPage === 4">
|
|
<view>
|
|
<u--form labelPosition="left" labelWidth="auto" ref="sForm" class="demo-ruleForm-thr" size="mini">
|
|
<view style="display: flex;flex-direction: column;">
|
|
<view class="form-sub-add" v-for="(item, index) in dataModel.Nav_Measure" :key="index">
|
|
<view style="position: relative;" v-if="index==0">
|
|
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
|
|
</view>
|
|
<view style="font-size: 15px; font-weight: bold;white-space: nowrap;color: #3d4b70;display: flex;flex-direction: row;align-items: center;margin-bottom: 10px;" v-if="index==0">
|
|
作业后处理措施
|
|
</view>
|
|
<view>
|
|
<u-form-item prop="NAME" :style="index ==0?'':'border-top: 1px solid #e7e6e4;'">
|
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;width: 100%;">
|
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
|
<view style="margin-right: 10px;">
|
|
<view style="display: flex;align-items: center;" v-if="thisMeasure.indexOf(index)==-1" @click="handleAddMeasurePush(index)">
|
|
<u-icon name="arrow-down"></u-icon>
|
|
</view>
|
|
<view style="display: flex;align-items: center;" v-if="thisMeasure.indexOf(index)!==-1" @click="handleAddMeasurePush(index)">
|
|
<u-icon name="arrow-up"></u-icon>
|
|
</view>
|
|
</view>
|
|
<u-badge :value="index+1" bgColor="#3d4b70" style="margin-right: 20px;"></u-badge>
|
|
|
|
<view style="font-size: 15px;align-items: center;overflow: hidden;text-overflow: ellipsis;" v-if="thisMeasure.indexOf(index)==-1">
|
|
{{item.DealMeasuresStr}}
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;flex-direction: row;">
|
|
<view @click.stop="handleOkRowDeal(index)">
|
|
<u-icon name="checkmark-circle" size="20" color="#3C9CFF" v-if="dataModel.Nav_Measure[index].IS_CONFIRM===false"></u-icon>
|
|
<u-icon name="checkmark-circle" size="20" color="#55aa00" v-if="dataModel.Nav_Measure[index].IS_CONFIRM===true"></u-icon>
|
|
</view>
|
|
<view v-if="index == 0" style="padding: 0px 0px 0px 10px;">
|
|
<u-icon name="trash" size="24" color="#c4c6c9"></u-icon>
|
|
</view>
|
|
<view v-if="index > 0" @click="handleDelRowBeforeDeal(index)" style="padding: 0px 0px 0px 10px;">
|
|
<u-icon name="trash" size="24" color="#3d4b70"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-form-item>
|
|
<view v-if="thisMeasure.indexOf(index)!==-1" style="position: relative;">
|
|
<u-form-item label="名称" prop="SafeMeasuresStr">
|
|
<u--textarea v-model="item.DealMeasuresStr" placeholder="请输入名称" autoHeight></u--textarea>
|
|
<!-- <u--input disabledColor="#fff" v-model="item.SafeConfirmsStr" border="none" inputAlign="right" ></u--input> -->
|
|
</u-form-item>
|
|
<view style="display: flex;flex-direction: row;margin: 10px 0px;">
|
|
<view style="font-size: 14px;color: #8e8b9c;margin-right: 25px;margin-top: 5px;white-space: nowrap;">附件</view>
|
|
<view class="full-upload-border">
|
|
<full-upload v-model="item.Nav_Files"></full-upload>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="display: flex;align-items: center;justify-content: center;border-top: #e7e6e4 1px solid;" @click="handleAddDeal">
|
|
<view style="display: flex;align-items: center;justify-content: center;">
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_Measure.length == 1">添加作业后处理措施</view>
|
|
<view style="font-size: 16px;color: #3d4b70;font-weight: bold;padding: 15px 0px;" v-if="this.dataModel.Nav_Measure.length !== 1">继续添加作业后处理措施</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u--form>
|
|
</view>
|
|
</view>
|
|
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPage === 4" class="bottom-button">
|
|
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
|
|
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
|
|
</view>
|
|
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
|
|
<u-modal :show="showDelModalDetail >= 0" @confirm="confirmDelDetail" @cancel="cacelDelDetail" :showCancelButton="true" title="确认删除?"></u-modal>
|
|
<u-modal :show="showDelModalFlow >= 0" @confirm="confirmDelFlow" @cancel="cacelDelFlow" :showCancelButton="true" title="确认删除?"></u-modal>
|
|
<u-modal :show="showDelModalDeal >= 0" @confirm="confirmDelDeal" @cancel="cacelDelDeal" :showCancelButton="true" title="确认删除?"></u-modal>
|
|
<query-selector :show="showPopup" :total="curTotal" :lists="userLists" :defaultValue="currentOperateUser.NAME" @close="handleClosePopup" @search="handleSearchUser" @select="handleSelectedUser" />
|
|
<u-picker :show="comPickerInfo.showSheet" :columns="comPickerInfo.columns" @confirm="onConfirmPicker" @close="closePicker" @cancel="closePicker" keyName="NAME"></u-picker>
|
|
<!-- <view class="bottom-button">
|
|
<button type="primary" @click="submit">提交</button>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
mapState,
|
|
mapMutations
|
|
} from 'vuex'
|
|
import {
|
|
extendFilterGroup,
|
|
extendGroupRule,
|
|
extendInclude,
|
|
extendOrder,
|
|
extendRule,
|
|
guid,
|
|
initFilter,
|
|
initFilterGroup,
|
|
extendIgnoreDataRule
|
|
} from '../../../../utils/common'
|
|
import {
|
|
getRequest,
|
|
getUserLists,
|
|
saveJobActivityRecord
|
|
} from '../../../../services/apply/FOServices/FOServices.js'
|
|
import config from '../../../../config/common'
|
|
import stepTitle from '@/components/custom/step-title.vue'
|
|
|
|
export default {
|
|
components: {
|
|
stepTitle,
|
|
},
|
|
data() {
|
|
return {
|
|
ID: '',
|
|
TaskID: '',
|
|
curTotal: 0,
|
|
isVisble:'none',
|
|
isVisbleOut:'none',
|
|
showDelModalIndex: undefined,
|
|
showDelModalDetail: undefined,
|
|
showDelModalFlow: undefined,
|
|
showDelModalDeal: undefined,
|
|
isLoadOK: false,
|
|
tableKey: 0,
|
|
userLists: [],
|
|
stepsText: ['基本信息', '作业人员', '作业前', '作业中', '作业后'],
|
|
thisUser: [],
|
|
thisIndex: [],
|
|
thisFluce: [],
|
|
thisMeasure: [],
|
|
dataModel: {
|
|
Nav_OperationStep: {},
|
|
CODE: '',
|
|
JOB_LOCATION: '',
|
|
JOB_DATE: '',
|
|
Nav_Details: {
|
|
NUM: 0,
|
|
SafeConfirmsStr: '',
|
|
IS_CONFIRM: false,
|
|
IS_CONFIRM_SHOW: '否',
|
|
Nav_Files: []
|
|
},
|
|
Nav_Flow: {
|
|
NUM: 0,
|
|
SafeMeasuresStr: '',
|
|
IS_CONFIRM: false,
|
|
IS_CONFIRM_SHOW: '否',
|
|
Nav_Files: []
|
|
},
|
|
Nav_Measure: {
|
|
NUM: 0,
|
|
DealMeasuresStr: '',
|
|
IS_CONFIRM: false,
|
|
IS_CONFIRM_SHOW: '否',
|
|
Nav_Files: []
|
|
}
|
|
},
|
|
subDataModel: {
|
|
Nav_JobActivityPerson: {
|
|
USER_ID: null,
|
|
Nav_User: {
|
|
Nav_Department: {
|
|
NAME: ''
|
|
},
|
|
NAME: '',
|
|
CODE: '',
|
|
},
|
|
RELATED_USER_ID:null,
|
|
Nav_RelatedUser:{NAME:''}
|
|
},
|
|
Nav_Details: {
|
|
NUM: 0,
|
|
SafeConfirmsStr: '',
|
|
IS_CONFIRM: false,
|
|
IS_CONFIRM_SHOW: '否',
|
|
Nav_Files: []
|
|
},
|
|
Nav_Flow: {
|
|
NUM: 0,
|
|
SafeMeasuresStr: '',
|
|
IS_CONFIRM: false,
|
|
IS_CONFIRM_SHOW: '否',
|
|
Nav_Files: []
|
|
},
|
|
Nav_Measure: {
|
|
NUM: 0,
|
|
DealMeasuresStr: '',
|
|
IS_CONFIRM: false,
|
|
IS_CONFIRM_SHOW: '否',
|
|
Nav_Files: []
|
|
}
|
|
},
|
|
options: [{
|
|
text: '删除',
|
|
style: {
|
|
backgroundColor: '#f56c6c'
|
|
}
|
|
}],
|
|
|
|
rules: {
|
|
'JOB_LOCATION': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
'JOB_DATE': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
'EFFECTIVE': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
'EXIST': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
'SUITABLE': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
'NEED': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
'REQUIRES': {
|
|
type: 'string',
|
|
required: true,
|
|
trigger: ['blur', 'change']
|
|
},
|
|
},
|
|
|
|
comPickerInfo: {
|
|
showSheet: false,
|
|
columns: [],
|
|
title: '',
|
|
dataIndex: undefined,
|
|
formIndex: undefined,
|
|
name: ''
|
|
},
|
|
currentOperateUser: {},
|
|
showPopup: false,
|
|
stepsPage: 0,
|
|
}
|
|
},
|
|
onLoad(opt) {
|
|
this.handleGetJobActivityGet(opt)
|
|
},
|
|
methods: {
|
|
stepAdd() {
|
|
if (this.dataModel.CODE == '' || this.dataModel.Nav_OperationStep.NAME == '' || this.dataModel.JOB_LOCATION == '' || this.dataModel.JOB_DATE == '' || this.dataModel.JOB_END_DATE == '') {
|
|
uni.$showErrorInfo('请检查信息内容,不能为空')
|
|
return
|
|
}
|
|
if ((this.dataModel.IS_EFFECTIVE == 0 && !this.dataModel.EFFECTIVE) || (this.dataModel.IS_EFFECTIVE == 0 && this.dataModel.EFFECTIVE && this.dataModel.EFFECTIVE == '')) {
|
|
uni.$showErrorInfo('描述内容不能为空')
|
|
return
|
|
}
|
|
if ((this.dataModel.IS_EXIST == 0 && !this.dataModel.EXIST) || (this.dataModel.IS_EXIST == 0 && this.dataModel.EXIST && this.dataModel.EXIST == '')) {
|
|
uni.$showErrorInfo('描述内容不能为空')
|
|
return
|
|
}
|
|
if ((this.dataModel.IS_SUITABLE == 0 && !this.dataModel.SUITABLE) || (this.dataModel.IS_SUITABLE == 0 && this.dataModel.SUITABLE && this.dataModel.SUITABLE == '')) {
|
|
uni.$showErrorInfo('描述内容不能为空')
|
|
return
|
|
}
|
|
if ((this.dataModel.IS_NEED == 0 && !this.dataModel.NEED) || (this.dataModel.IS_NEED == 0 && this.dataModel.NEED && this.dataModel.NEED == '')) {
|
|
uni.$showErrorInfo('描述内容不能为空')
|
|
return
|
|
}
|
|
if ((this.dataModel.IS_REQUIRES == 0 && !this.dataModel.REQUIRES) || (this.dataModel.IS_REQUIRES == 0 && this.dataModel.REQUIRES && this.dataModel.REQUIRES == '')) {
|
|
uni.$showErrorInfo('描述内容不能为空')
|
|
return
|
|
}
|
|
// console.log(this.dataModel,'900')
|
|
this.stepsPage = this.stepsPage + 1
|
|
},
|
|
stepAddTwo() {
|
|
let numA = 0;
|
|
this.dataModel.Nav_JobActivityPerson.map((item) => {
|
|
if (item['Nav_User']) {
|
|
if(item['Nav_User'].NAME == '')
|
|
{
|
|
return
|
|
}
|
|
}
|
|
if (item['Nav_RelatedUser']) {
|
|
if(item['Nav_RelatedUser'].NAME == '')
|
|
{
|
|
return
|
|
}
|
|
}
|
|
numA = numA + 1
|
|
})
|
|
if (numA == this.dataModel.Nav_JobActivityPerson.length) {
|
|
this.stepsPage = this.stepsPage + 1
|
|
} else {
|
|
uni.$showErrorInfo('作业人员不能为空')
|
|
}
|
|
},
|
|
stepAddThree() {
|
|
let numA = 0;
|
|
let numB = 0;
|
|
this.dataModel.Nav_Details.map((item) => {
|
|
if (item.SafeConfirmsStr == '') {
|
|
return
|
|
}
|
|
numA = numA + 1
|
|
})
|
|
this.dataModel.Nav_Details.map((item) => {
|
|
if (item.IS_CONFIRM == false) {
|
|
return
|
|
}
|
|
numB = numB + 1
|
|
})
|
|
if (numA !== this.dataModel.Nav_Details.length) {
|
|
uni.$showErrorInfo('添加作业前确认信息不能为空')
|
|
} else if (numB !== this.dataModel.Nav_Details.length) {
|
|
uni.$showErrorInfo('作业前安全未全部确认')
|
|
} else {
|
|
this.stepsPage = this.stepsPage + 1
|
|
}
|
|
},
|
|
stepAddFour() {
|
|
let numA = 0;
|
|
let numB = 0;
|
|
this.dataModel.Nav_Flow.map((item) => {
|
|
if (item.SafeMeasuresStr == '') {
|
|
return
|
|
}
|
|
numA = numA + 1
|
|
})
|
|
this.dataModel.Nav_Flow.map((item) => {
|
|
if (item.IS_CONFIRM == '') {
|
|
return
|
|
}
|
|
numB = numB + 1
|
|
})
|
|
if (numA !== this.dataModel.Nav_Flow.length) {
|
|
uni.$showErrorInfo('添加作业流程及安全措施信息不能为空')
|
|
} else if (numB !== this.dataModel.Nav_Flow.length) {
|
|
uni.$showErrorInfo('作业流程及安全措施未全部确认')
|
|
} else {
|
|
this.stepsPage = this.stepsPage + 1
|
|
}
|
|
},
|
|
stepReduce() {
|
|
this.stepsPage = this.stepsPage - 1
|
|
},
|
|
stepReduceTwo() {
|
|
this.stepsPage = this.stepsPage - 1
|
|
},
|
|
handleAddDetailPush(index) {
|
|
if (this.thisIndex.indexOf(index) == -1) {
|
|
this.thisIndex.push(index)
|
|
} else {
|
|
this.thisIndex = this.thisIndex.filter(item => item != index)
|
|
}
|
|
},
|
|
handleAddUserPush(index) {
|
|
if (this.thisUser.indexOf(index) == -1) {
|
|
this.thisUser.push(index)
|
|
} else {
|
|
this.thisUser = this.thisUser.filter(item => item != index)
|
|
}
|
|
},
|
|
handleAddFlucePush(index) {
|
|
if (this.thisFluce.indexOf(index) == -1) {
|
|
this.thisFluce.push(index)
|
|
} else {
|
|
this.thisFluce = this.thisFluce.filter(item => item != index)
|
|
}
|
|
},
|
|
handleAddMeasurePush(index) {
|
|
if (this.thisMeasure.indexOf(index) == -1) {
|
|
this.thisMeasure.push(index)
|
|
} else {
|
|
this.thisMeasure = this.thisMeasure.filter(item => item != index)
|
|
}
|
|
},
|
|
handleGetJobActivityGet(opt) {
|
|
this.TaskID = opt.taskID ? opt.taskID : '';
|
|
this.ID = opt.ID ? opt.ID : '';
|
|
const orgId = uni.getStorageSync('orgId')
|
|
const json = initFilter(orgId, "", "")
|
|
extendRule(json, 'ID', 1, opt.ID)
|
|
// extendInclude(json, 'Nav_TechDisclosure');
|
|
// extendInclude(json, 'Nav_JobName');
|
|
// extendInclude(json, 'Nav_OperationStep');
|
|
// extendInclude(json, 'Nav_JobActivityPerson');
|
|
// extendInclude(json, 'Nav_JobActivityPerson.Nav_User.Nav_Department');
|
|
// extendInclude(json, 'Nav_Details.Nav_Files');
|
|
// extendInclude(json, 'Nav_Flow.Nav_Files');
|
|
// extendInclude(json, 'Nav_Measure.Nav_Files');
|
|
// TODO: id 未获取
|
|
getRequest(json, "/FO/FOJobActivityRecord/GetEdit").then(res => {
|
|
this.dataModel = res
|
|
this.dataModel.IS_EFFECTIVE == 0 ? this.dataModel.IS_EFFECTIVE_SHOW = "否" : this.dataModel
|
|
.IS_EFFECTIVE_SHOW = "是";
|
|
this.dataModel.IS_EXIST == 0 ? this.dataModel.IS_EXIST_SHOW = "否" : this.dataModel
|
|
.IS_EXIST_SHOW = "是";
|
|
this.dataModel.IS_SUITABLE == 0 ? this.dataModel.IS_SUITABLE_SHOW = "否" : this.dataModel
|
|
.IS_SUITABLE_SHOW = "是";
|
|
this.dataModel.IS_NEED == 0 ? this.dataModel.IS_NEED_SHOW = "否" : this.dataModel
|
|
.IS_NEED_SHOW = "是";
|
|
this.dataModel.IS_REQUIRES == 0 ? this.dataModel.IS_REQUIRES_SHOW = "否" : this.dataModel
|
|
.IS_REQUIRES_SHOW = "是";
|
|
if (res.JOB_DATE) {
|
|
res.JOB_DATE = uni.$u.timeFormat(res.JOB_DATE, 'yyyy-mm-dd hh:MM')
|
|
}
|
|
if (res.JOB_END_DATE) {
|
|
res.JOB_END_DATE = uni.$u.timeFormat(res.JOB_END_DATE, 'yyyy-mm-dd hh:MM')
|
|
}
|
|
|
|
//数据组装
|
|
let strUserName = ''
|
|
if (res.Nav_JobActivityPerson && res.Nav_JobActivityPerson.length > 0) {
|
|
for (let i = 0; i < res.Nav_JobActivityPerson.length; i++) {
|
|
if (res.Nav_JobActivityPerson[i].DEAL_STATUS == 0) {
|
|
let user = res.Nav_JobActivityPerson[i].USER_ID != null ? res.Nav_JobActivityPerson[i].Nav_User.NAME : (res.Nav_JobActivityPerson[i].RELATED_USER_ID!=null?res.Nav_JobActivityPerson[i].Nav_RelatedUser.NAME:'');
|
|
strUserName += (strUserName.length > 0 ? " " : "") + "<text style='color:red'>" +
|
|
user + "</text>";
|
|
} else {
|
|
let user = res.Nav_JobActivityPerson[i].USER_ID != null ? res.Nav_JobActivityPerson[i].Nav_User.NAME : (res.Nav_JobActivityPerson[i].RELATED_USER_ID!=null?res.Nav_JobActivityPerson[i].Nav_RelatedUser.NAME:'');
|
|
strUserName += (strUserName.length > 0 ? " " : "") + user;
|
|
}
|
|
|
|
}
|
|
}
|
|
//数据组装
|
|
if (res.Nav_Details && res.Nav_Details.length > 0) {
|
|
|
|
for (let i = 0; i < res.Nav_Details.length; i++) {
|
|
res.Nav_Details[i].NUM = i + 1;
|
|
if (res.Nav_Details[i].IS_CONFIRM == true) {
|
|
res.Nav_Details[i].IS_CONFIRM = true
|
|
res.Nav_Details[i].IS_CONFIRM_SHOW = "是"
|
|
} else {
|
|
res.Nav_Details[i].IS_CONFIRM = false
|
|
res.Nav_Details[i].IS_CONFIRM_SHOW = "否"
|
|
}
|
|
}
|
|
}
|
|
//数据组装
|
|
if (res.Nav_Flow && res.Nav_Flow.length > 0) {
|
|
|
|
for (let i = 0; i < res.Nav_Flow.length; i++) {
|
|
res.Nav_Flow[i].NUM = i + 1;
|
|
if (res.Nav_Flow[i].IS_CONFIRM == true) {
|
|
res.Nav_Flow[i].IS_CONFIRM = true
|
|
res.Nav_Flow[i].IS_CONFIRM_SHOW = "是"
|
|
} else {
|
|
res.Nav_Flow[i].IS_CONFIRM_SHOW = "否"
|
|
res.Nav_Flow[i].IS_CONFIRM = false
|
|
}
|
|
}
|
|
}
|
|
//数据组装
|
|
if (res.Nav_Measure && res.Nav_Measure.length > 0) {
|
|
|
|
for (let i = 0; i < res.Nav_Measure.length; i++) {
|
|
res.Nav_Measure[i].NUM = i + 1;
|
|
if (res.Nav_Measure[i].IS_CONFIRM == true) {
|
|
res.Nav_Measure[i].IS_CONFIRM = true
|
|
res.Nav_Measure[i].IS_CONFIRM_SHOW = "是"
|
|
} else {
|
|
res.Nav_Measure[i].IS_CONFIRM = false
|
|
res.Nav_Measure[i].IS_CONFIRM_SHOW = "否"
|
|
}
|
|
}
|
|
}
|
|
if(res.IS_OUTSOURCE ==true && res.RELATED_ID != null)
|
|
{
|
|
this.dataModel.isVisble='none'
|
|
this.dataModel.isVisbleOut='block'
|
|
}else
|
|
{
|
|
this.dataModel.isVisble='block'
|
|
this.dataModel.isVisbleOut='none'
|
|
}
|
|
this.dataModel.UserNames = strUserName
|
|
this.isLoadOK = true
|
|
})
|
|
},
|
|
async handleShowSheet(p) {
|
|
let column = []
|
|
if (p.name === 'IS_EFFECTIVE' || p.name === 'IS_EXIST' || p.name ===
|
|
'IS_SUITABLE' || p.name === 'IS_NEED' || p.name === 'IS_REQUIRES' ||
|
|
p.name === 'IS_CONFIRM_SAFE' || p.name === 'IS_CONFIRM_MEAS' || p.name === 'IS_CONFIRM_DEAL') {
|
|
column = [{
|
|
NAME: '否',
|
|
ID: 0
|
|
},
|
|
{
|
|
NAME: '是',
|
|
ID: 1
|
|
}
|
|
]
|
|
}
|
|
if (column.length) {
|
|
this.comPickerInfo = {
|
|
showSheet: true,
|
|
title: p.title,
|
|
name: p.name,
|
|
dataIndex: p.index,
|
|
formIndex: p.formIndex,
|
|
columns: [column]
|
|
}
|
|
} else {
|
|
// 暂无数据
|
|
}
|
|
},
|
|
valChangeDetail(e) {
|
|
// this.dataModel.Nav_Details[index].NUM=e.value;
|
|
},
|
|
valChangeFlow(e) {
|
|
// this.dataModel.Nav_Flow[index].NUM=e.value;
|
|
},
|
|
valChangeDeal(e) {
|
|
// this.dataModel.Nav_Measure[index].NUM=e.value;
|
|
},
|
|
handleOkRowDetail(index) {
|
|
this.dataModel.Nav_Details[index].IS_CONFIRM = true;
|
|
this.dataModel.Nav_Details[index].IS_CONFIRM_SHOW = "是";
|
|
let column = [{
|
|
NAME: '是',
|
|
ID: true
|
|
}]
|
|
this.comPickerInfo = {
|
|
name: "是",
|
|
dataIndex: index,
|
|
columns: [column]
|
|
}
|
|
},
|
|
handleOkRowFlow(index) {
|
|
this.dataModel.Nav_Flow[index].IS_CONFIRM = true;
|
|
this.dataModel.Nav_Flow[index].IS_CONFIRM_SHOW = "是";
|
|
let column = [{
|
|
NAME: '是',
|
|
ID: true
|
|
}]
|
|
this.comPickerInfo = {
|
|
name: "是",
|
|
dataIndex: index,
|
|
columns: [column]
|
|
}
|
|
},
|
|
handleOkRowDeal(index) {
|
|
this.dataModel.Nav_Measure[index].IS_CONFIRM_SHOW = "是";
|
|
this.dataModel.Nav_Measure[index].IS_CONFIRM = true;
|
|
let column = [{
|
|
NAME: '是',
|
|
ID: true
|
|
}]
|
|
this.comPickerInfo = {
|
|
name: "是",
|
|
dataIndex: index,
|
|
columns: [column]
|
|
}
|
|
},
|
|
handleAddUser() {
|
|
const identifyUser = JSON.parse(JSON.stringify(this.subDataModel.Nav_JobActivityPerson))
|
|
this.dataModel.Nav_JobActivityPerson.push(identifyUser)
|
|
// this.dataModel.Nav_JobActivityPerson.unshift(this.subDataModel)
|
|
},
|
|
handleAddDetail() {
|
|
const identifyUser = JSON.parse(JSON.stringify(this.subDataModel.Nav_Details))
|
|
this.dataModel.Nav_Details.push(identifyUser)
|
|
// this.dataModel.Nav_Details.unshift(this.subDataModel.Nav_Details)
|
|
},
|
|
handleAddFlow() {
|
|
const identifyUser = JSON.parse(JSON.stringify(this.subDataModel.Nav_Flow))
|
|
this.dataModel.Nav_Flow.push(identifyUser)
|
|
// this.dataModel.Nav_Flow.unshift(this.subDataModel.Nav_Flow)
|
|
},
|
|
handleAddDeal() {
|
|
const identifyUser = JSON.parse(JSON.stringify(this.subDataModel.Nav_Measure))
|
|
this.dataModel.Nav_Measure.push(identifyUser)
|
|
},
|
|
handleDelRowBefore(index) {
|
|
this.showDelModalIndex = index
|
|
},
|
|
handleDelRowBeforeDetail(index) {
|
|
this.showDelModalDetail = index
|
|
},
|
|
handleDelRowBeforeFlow(index) {
|
|
this.showDelModalFlow = index
|
|
},
|
|
handleDelRowBeforeDeal(index) {
|
|
this.showDelModalDeal = index
|
|
},
|
|
confirmDel() {
|
|
this.dataModel.Nav_JobActivityPerson.splice(this.showDelModalIndex, 1)
|
|
this.showDelModalIndex = undefined
|
|
},
|
|
confirmDelDetail() {
|
|
this.dataModel.Nav_Details.splice(this.showDelModalDetail, 1)
|
|
this.showDelModalDetail = undefined
|
|
},
|
|
confirmDelFlow() {
|
|
this.dataModel.Nav_Flow.splice(this.showDelModalFlow, 1)
|
|
this.showDelModalFlow = undefined
|
|
},
|
|
confirmDelDeal() {
|
|
this.dataModel.Nav_Measure.splice(this.showDelModalDeal, 1)
|
|
this.showDelModalDeal = undefined
|
|
},
|
|
cacelDel() {
|
|
this.showDelModalIndex = undefined
|
|
},
|
|
cacelDelDetail() {
|
|
this.showDelModalDetail = undefined
|
|
},
|
|
cacelDelFlow() {
|
|
this.showDelModalFlow = undefined
|
|
},
|
|
cacelDelDeal() {
|
|
this.showDelModalDeal = undefined
|
|
},
|
|
handleSearchUser(val, pageIndex) {
|
|
const orgId = uni.getStorageSync('orgId')
|
|
const json = initFilter(orgId, "", "NAME", '', pageIndex)
|
|
extendInclude(json, "Nav_Department")
|
|
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
|
if (val !== 'init') {
|
|
const tempGroup = initFilterGroup(false);
|
|
extendGroupRule(tempGroup, 'NAME', 9, val)
|
|
extendFilterGroup(json, tempGroup);
|
|
}
|
|
json.Limit = 20
|
|
if (pageIndex) {
|
|
json.Start = (pageIndex - 1) * 20;
|
|
}
|
|
|
|
getUserLists(json).then(res => {
|
|
if (res.IsSuccessful) {
|
|
this.userLists = res.Data.map(i => {
|
|
return {
|
|
...i,
|
|
name: i.NAME,
|
|
code: i.CODE
|
|
}
|
|
})
|
|
this.curTotal = res.TotalCount
|
|
}
|
|
})
|
|
},
|
|
handleSelectedUser(val) {
|
|
let numc = 0;
|
|
this.dataModel.Nav_JobActivityPerson.map((item) => {
|
|
if (item.USER_ID == val.ID) {
|
|
numc = numc + 1
|
|
return
|
|
}
|
|
})
|
|
if (numc == 1) {
|
|
this.showPopup = false
|
|
uni.$showErrorInfo('不能选择相同的作业人员')
|
|
return
|
|
}
|
|
this.showPopup = false
|
|
this.currentOperateUser.CODE = val.CODE
|
|
this.lists = []
|
|
const result = this.dataModel.Nav_JobActivityPerson.map((obj) => {
|
|
const {
|
|
USER_ID,
|
|
Nav_User
|
|
} = obj
|
|
if (Nav_User.CODE === this.currentOperateUser.CODE) {
|
|
return Object.assign({}, obj, {
|
|
Nav_User: val,
|
|
USER_ID: val.ID,
|
|
})
|
|
}
|
|
return obj
|
|
})
|
|
this.dataModel.Nav_JobActivityPerson = result
|
|
},
|
|
handleClosePopup() {
|
|
this.showPopup = false
|
|
},
|
|
handleChangeUser(user) {
|
|
this.currentOperateUser = user
|
|
this.showPopup = true
|
|
this.handleSearchUser('init')
|
|
},
|
|
onConfirmPicker(e) {
|
|
const {
|
|
name,
|
|
dataIndex,
|
|
formIndex
|
|
} = this.comPickerInfo
|
|
if (name === 'IS_EFFECTIVE') {
|
|
this.dataModel.IS_EFFECTIVE = e.value[0].ID
|
|
this.dataModel.IS_EFFECTIVE_SHOW = e.value[0].NAME
|
|
} else if (name === 'IS_EXIST') {
|
|
this.dataModel.IS_EXIST = e.value[0].ID
|
|
this.dataModel.IS_EXIST_SHOW = e.value[0].NAME
|
|
} else if (name === 'IS_SUITABLE') {
|
|
this.dataModel.IS_SUITABLE = e.value[0].ID
|
|
this.dataModel.IS_SUITABLE_SHOW = e.value[0].NAME
|
|
} else if (name === 'IS_NEED') {
|
|
this.dataModel.IS_NEED = e.value[0].ID
|
|
this.dataModel.IS_NEED_SHOW = e.value[0].NAME
|
|
} else if (name === 'IS_REQUIRES') {
|
|
this.dataModel.IS_REQUIRES = e.value[0].ID
|
|
this.dataModel.IS_REQUIRES_SHOW = e.value[0].NAME
|
|
} else if (name === "IS_CONFIRM_SAFE") {
|
|
this.dataModel.Nav_Details[dataIndex].IS_CONFIRM = e.value[0].ID
|
|
this.dataModel.Nav_Details[dataIndex].IS_CONFIRM_SHOW = e.value[0].NAME
|
|
} else if (name === "IS_CONFIRM_MEAS") {
|
|
this.dataModel.Nav_Flow[dataIndex].IS_CONFIRM = e.value[0].ID
|
|
this.dataModel.Nav_Flow[dataIndex].IS_CONFIRM_SHOW = e.value[0].NAME
|
|
} else if (name === "IS_CONFIRM_DEAL") {
|
|
this.dataModel.Nav_Measure[dataIndex].IS_CONFIRM = e.value[0].ID
|
|
this.dataModel.Nav_Measure[dataIndex].IS_CONFIRM_SHOW = e.value[0].NAME
|
|
}
|
|
if (formIndex === "sForm1") {
|
|
const result = this.dataModel.Nav_JobActivityPerson.map((obj, index) => {
|
|
if (index === dataIndex) {
|
|
return Object.assign({}, obj, {
|
|
// ATTEND_STATUS: e.value[0].ID,
|
|
})
|
|
}
|
|
return obj
|
|
})
|
|
this.dataModel.Nav_JobActivityPerson = result
|
|
} else {
|
|
|
|
}
|
|
this.comPickerInfo.showSheet = false
|
|
},
|
|
closePicker() {
|
|
this.comPickerInfo = {
|
|
showSheet: false,
|
|
columns: [],
|
|
title: '',
|
|
name: '',
|
|
dataIndex: undefined,
|
|
formIndex: undefined
|
|
}
|
|
},
|
|
handleDelAction({
|
|
name
|
|
}) {
|
|
uni.showModal({
|
|
title: '是否删除数据?',
|
|
success: (res) => {
|
|
if (res.confirm) {
|
|
|
|
}
|
|
}
|
|
})
|
|
},
|
|
submit() {
|
|
let numA = 0;
|
|
let numB = 0;
|
|
this.dataModel.Nav_Measure.map((item) => {
|
|
if (item.DealMeasuresStr == '') {
|
|
return
|
|
}
|
|
numA = numA + 1
|
|
})
|
|
this.dataModel.Nav_Measure.map((item) => {
|
|
if (item.IS_CONFIRM == '') {
|
|
return
|
|
}
|
|
numB = numB + 1
|
|
})
|
|
if (numA !== this.dataModel.Nav_Measure.length) {
|
|
uni.$showErrorInfo('添加作业后处理措施不能为空')
|
|
} else if (numB !== this.dataModel.Nav_Measure.length) {
|
|
uni.$showErrorInfo('作业后处理措施未全部确认')
|
|
} else {
|
|
this.dataModel.PUBLISH = "SaveAndNotify";
|
|
this.dataModel.TaskID = this.TaskID;
|
|
this.dataModel.ID = this.ID;
|
|
this.dataModel.ORG_ID = uni.getStorageSync('orgId')
|
|
const resultDetail = this.dataModel.Nav_Details.map((obj, index) => {
|
|
let navFiles = [];
|
|
obj.Nav_Files.map(item => {
|
|
navFiles.push({
|
|
IMG_FILE_ID: item.responseText?item.responseText.imgFileID:item.IMG_FILE_ID,
|
|
JOB_ACTIVITY_RECORD_ID: obj.ID,
|
|
ORG_ID: uni.getStorageSync('orgId')
|
|
})
|
|
})
|
|
// if (obj.IS_CONFIRM === "是") {
|
|
// return Object.assign({}, obj, {
|
|
// IS_CONFIRM: true,
|
|
// Nav_Files:navFiles
|
|
// })
|
|
// }
|
|
// else
|
|
// {
|
|
return Object.assign({}, obj, {
|
|
IS_CONFIRM: obj.IS_CONFIRM,
|
|
Nav_Files: navFiles
|
|
})
|
|
// }
|
|
return obj
|
|
})
|
|
this.dataModel.Nav_Details = resultDetail
|
|
const resultFlow = this.dataModel.Nav_Flow.map((obj, index) => {
|
|
let navFiles = [];
|
|
obj.Nav_Files.map(item => {
|
|
navFiles.push({
|
|
IMG_FILE_ID: item.responseText?item.responseText.imgFileID:item.IMG_FILE_ID,
|
|
JOB_ACTIVITY_RECORD_ID: obj.ID,
|
|
ORG_ID: uni.getStorageSync('orgId')
|
|
})
|
|
})
|
|
// if (obj.IS_CONFIRM === "是") {
|
|
// return Object.assign({}, obj, {
|
|
// IS_CONFIRM: true,
|
|
// Nav_Files:navFiles
|
|
// })
|
|
// }
|
|
// else
|
|
// {
|
|
return Object.assign({}, obj, {
|
|
IS_CONFIRM: obj.IS_CONFIRM,
|
|
Nav_Files: navFiles
|
|
})
|
|
// }
|
|
return obj
|
|
})
|
|
this.dataModel.Nav_Flow = resultFlow
|
|
const resultDeal = this.dataModel.Nav_Measure.map((obj, index) => {
|
|
let navFiles = [];
|
|
obj.Nav_Files.map(item => {
|
|
navFiles.push({
|
|
IMG_FILE_ID: item.responseText?item.responseText.imgFileID:item.IMG_FILE_ID,
|
|
JOB_ACTIVITY_RECORD_ID: obj.ID,
|
|
ORG_ID: uni.getStorageSync('orgId')
|
|
})
|
|
})
|
|
// if (obj.IS_CONFIRM === "是") {
|
|
// return Object.assign({}, obj, {
|
|
// IS_CONFIRM: true,
|
|
// Nav_Files:navFiles
|
|
// })
|
|
// }
|
|
// else
|
|
// {
|
|
return Object.assign({}, obj, {
|
|
IS_CONFIRM: obj.IS_CONFIRM,
|
|
Nav_Files: navFiles
|
|
})
|
|
// }
|
|
return obj
|
|
})
|
|
this.dataModel.Nav_Measure = resultDeal
|
|
saveJobActivityRecord(this.dataModel).then(res => {
|
|
uni.$showMsgFunc('操作成功!', () => {
|
|
// if (this.tableKey == null || this.tableKey == 0) {
|
|
// uni.navigateTo({
|
|
// url: 'jobActivityRecord'
|
|
// })
|
|
// } else {
|
|
uni.switchTab({
|
|
url: '/pages/index/index2'
|
|
})
|
|
// }
|
|
}, 'success', 1000)
|
|
})
|
|
}
|
|
|
|
|
|
},
|
|
uploadFilePromise(url) {
|
|
const appInfoData = uni.getStorageSync('appInfo')
|
|
const userId = appInfoData?.User?.ID || ''
|
|
const orgId = uni.getStorageSync('orgId')
|
|
const tenant = uni.getStorageSync('Tenant') || ''
|
|
const remoteUrl = config.serviceHost('/PF/File/UploadFile')
|
|
return new Promise((resolve, reject) => {
|
|
uni.uploadFile({
|
|
url: remoteUrl,
|
|
filePath: url,
|
|
fileList: url,
|
|
name: 'file',
|
|
formData: {
|
|
OrgId: orgId
|
|
},
|
|
header: {
|
|
Tenant: tenant,
|
|
userid: userId
|
|
},
|
|
success: (res) => {
|
|
if (res.statusCode === 200) {
|
|
const uploadResult = JSON.parse(res.data)
|
|
if (uploadResult.IsSuccessful) {
|
|
resolve(uploadResult.Data)
|
|
}
|
|
}
|
|
}
|
|
});
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
/* @import url("../../../../style/css/editTemplate.css"); */
|
|
|
|
.page-wrap {
|
|
/* padding: 16px 16px 166px; */
|
|
}
|
|
|
|
.card {
|
|
/* margin-bottom: 18px; */
|
|
margin: 20px 16px 10px 16px;
|
|
/* border: 1px solid #EBEEF5; */
|
|
padding: 20px 30px 10px 30px;
|
|
/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
|
|
background-color: #ffffff;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.bottom-button {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
padding: 10px 16px;
|
|
box-sizing: border-box;
|
|
background: #edf1fd;
|
|
z-index: 999;
|
|
}
|
|
|
|
.upload-title {
|
|
color: #303133;
|
|
font-size: 15px;
|
|
line-height: 22px;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
/* .demo-ruleForm-thr>>>.u-textarea {
|
|
padding: 9px 9px 25px 9px;
|
|
}
|
|
*/
|
|
.demo-ruleForm-thr>>>.u-form-item__body__left__content__label {
|
|
font-size: 14px;
|
|
color: #8e8b9c;
|
|
margin-right: 20px;
|
|
/* justify-content: flex-start; */
|
|
}
|
|
|
|
.demo-ruleForm-thr>>>.u-form-item__body__left__content__ {
|
|
left: -11px;
|
|
top: 0px
|
|
}
|
|
|
|
.demo-ruleForm-thr>>>.u-textarea__field {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.demo-ruleForm-thr>>>.u-cell__title-text {
|
|
font-size: 14px;
|
|
}
|
|
|
|
|
|
/* .page-wrap>>>.u-upload__button {
|
|
margin-bottom: 0;
|
|
} */
|
|
|
|
.demo-ruleForm>>>.u-form-item__body__left__content__label {
|
|
font-size: 14px;
|
|
color: #8e8b9c;
|
|
/* justify-content: flex-start; */
|
|
}
|
|
|
|
.demo-ruleForm>>>.u-form-item__body__left__content__ {
|
|
left: -11px;
|
|
top: 0px
|
|
}
|
|
|
|
.demo-ruleForm>>>.u-textarea__field {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.demo-ruleForm>>>.u-cell__title-text {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.full-upload-border>>>.u-line {
|
|
border-bottom: 0px !important;
|
|
}
|
|
|
|
.sub-form {
|
|
margin: 20px 16px 180px 16px;
|
|
padding: 20px 30px 10px 30px;
|
|
background-color: #ffffff;
|
|
border-radius: 10px;
|
|
}
|
|
</style> |