动火工作票
This commit is contained in:
parent
449efdcb0c
commit
35333fc27e
42
pages.json
42
pages.json
@ -336,6 +336,48 @@
|
||||
"navigationBarTitleText": "安全交底表",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "jobFireEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "动火作业工作票",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
},{
|
||||
"path": "jobFireTenEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "动火作业工作票",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
},{
|
||||
"path": "jobFireTwoEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "动火作业工作票",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "jobFireShow",
|
||||
"style": {
|
||||
"navigationBarTitleText": "动火作业工作票",
|
||||
"onReachBottomDistance": 100,
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"buttons": [{
|
||||
"fontSize": "14px",
|
||||
"text": "审批详情",
|
||||
"width": "auto"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "jobFireList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "动火作业工作票",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
</view>
|
||||
<view class="bottom-button" style="padding: 10px 16px;" v-if="isLoadOK&&tableKey==1">
|
||||
<u-button type="primary" @click="onTableBtnAgree" color="#3d4b70">签到</u-button>
|
||||
<u-button type="primary" @click="onTableBtnAgree" color="#3d4b70">确认</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
</view>
|
||||
<view class="bottom-button" style="padding: 10px 16px;" v-if="isLoadOK&&tableKey==1">
|
||||
<u-button type="primary" @click="onTableBtnAgree" color="#3d4b70">签到</u-button>
|
||||
<u-button type="primary" @click="onTableBtnAgree" color="#3d4b70">确认</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
1009
pages/apply/subPages/FO/jobFireEdit.vue
Normal file
1009
pages/apply/subPages/FO/jobFireEdit.vue
Normal file
File diff suppressed because it is too large
Load Diff
351
pages/apply/subPages/FO/jobFireList.vue
Normal file
351
pages/apply/subPages/FO/jobFireList.vue
Normal file
@ -0,0 +1,351 @@
|
||||
<template>
|
||||
<view class="risk-record-page">
|
||||
<u-sticky>
|
||||
<view class="filter-bar">
|
||||
<view class="filter filter-date-range" @click="handleShowPicker({title: '时间区间', name: 'dateRange'})">
|
||||
<text>{{dateFilterTxt}}</text>
|
||||
<u-icon size="14" style="margin-left: 4px;" name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<uni-search-bar class="search-bar" radius="100" :value="keyword" @confirm="handleSearch"
|
||||
@cancel="handleCancelSearch" @clear="handleCancelSearch" placeholder="搜索"></uni-search-bar>
|
||||
<view class="filter filter-status" @click="handleShowPicker({title: '状态', name: 'status'})">
|
||||
<text>{{statusFilterTxt}}</text>
|
||||
<u-icon size="14" style="margin-left: 4px;" name="arrow-down"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<view class="main">
|
||||
<view class="content-list">
|
||||
<common-card
|
||||
:dataSource="item"
|
||||
v-for="item in lists"
|
||||
class="content"
|
||||
@click="handleToEdit"
|
||||
>
|
||||
<view>
|
||||
<!-- <view class="field">
|
||||
<text class="label">开始时间:</text>
|
||||
<text class="value">{{$u.timeFormat(item.JOB_DATE,'yyyy-mm-dd')}}</text>
|
||||
</view> -->
|
||||
<!-- <view class="field">
|
||||
<text class="label">结束时间:</text>
|
||||
<text class="value">{{$u.timeFormat(item.JOB_END_DATE,'yyyy-mm-dd')}}</text>
|
||||
</view> -->
|
||||
<view class="field">
|
||||
<text class="label">作业申请人:</text>
|
||||
<text class="value">{{item.Nav_ApplyUser ? item.Nav_ApplyUser.NAME : ''}}</text>
|
||||
</view>
|
||||
<view class="field">
|
||||
<text class="label">创建时间:</text>
|
||||
<text class="value">{{$u.timeFormat(item.CREATE_TIME,'yyyy-mm-dd')}}</text>
|
||||
</view>
|
||||
<view class="field">
|
||||
<text class="label">状态:</text>
|
||||
<text class="status">{{item.IS_PUBLISH}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</common-card>
|
||||
</view>
|
||||
<view v-if="!lists.length" class="empty-wrap">
|
||||
<u-empty text="暂无数据" icon="/static/empty@2x.png">
|
||||
</u-empty>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker
|
||||
:show="comPickerInfo.showPicker"
|
||||
:columns="comPickerInfo.columns"
|
||||
@confirm="onConfirmPicker"
|
||||
:defaultIndex="[0]"
|
||||
@cancel="closePicker"
|
||||
></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getRequestOrderPage
|
||||
// getJobData
|
||||
} from '../../../../services/apply/FOServices/FOServices.js'
|
||||
import {
|
||||
extendInclude, extendRule,
|
||||
initFilter
|
||||
} from '../../../../utils/common'
|
||||
import UniSearchBar from '../../../../uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue'
|
||||
|
||||
export default {
|
||||
components: { UniSearchBar },
|
||||
data() {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
total: 0,
|
||||
lists: [],
|
||||
keyword: '',
|
||||
searchStartTime: '',
|
||||
filterStatus: null,
|
||||
dateFilterTxt: '时间区间',
|
||||
statusFilterTxt: '状态筛选',
|
||||
comPickerInfo: {
|
||||
showPicker: false,
|
||||
columns: [],
|
||||
title: '',
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
handleSearch(obj) {
|
||||
this.keyword = obj.value
|
||||
},
|
||||
handleToEdit(obj) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/apply/subPages/FO2/jobShow?ID=' + obj.ID
|
||||
})
|
||||
},
|
||||
handleCancelSearch() {
|
||||
this.keyword = ''
|
||||
},
|
||||
loadData() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "CREATE_TIME", 1, this.pageIndex)
|
||||
extendInclude(json, 'Nav_OperationStep');
|
||||
extendInclude(json, 'Nav_ApplyUser');
|
||||
extendInclude(json, 'Nav_MonitorUser');
|
||||
if (this.keyword) {
|
||||
extendRule(json, 'Nav_OperationStep.NAME', 9, this.keyword)
|
||||
}
|
||||
if (this.searchStartTime) {
|
||||
extendRule(json, 'CREATE_TIME', 6, this.searchStartTime)
|
||||
}
|
||||
if (this.filterStatus !== null) {
|
||||
extendRule(json, 'IS_PUBLISH', 1, this.filterStatus)
|
||||
}
|
||||
getRequestOrderPage(json,"/FO/CrucialLicenseJob/OrderPaged").then(res => {
|
||||
this.total = res.TotalCount
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
if (res.Data[i].IS_PUBLISH == 0) {
|
||||
res.Data[i].IS_PUBLISH = "草稿";
|
||||
}else if(res.Data[i].IS_PUBLISH == 1) {
|
||||
res.Data[i].IS_PUBLISH = "分析中";
|
||||
}else if(res.Data[i].IS_PUBLISH == 2) {
|
||||
res.Data[i].IS_PUBLISH = "签到中";
|
||||
}else if(res.Data[i].IS_PUBLISH == 4) {
|
||||
res.Data[i].IS_PUBLISH = "审核中";
|
||||
}
|
||||
else if(res.Data[i].IS_PUBLISH == 5) {
|
||||
res.Data[i].IS_PUBLISH = "归档";
|
||||
}
|
||||
else if(res.Data[i].IS_PUBLISH == 9) {
|
||||
res.Data[i].IS_PUBLISH = "审批拒绝";
|
||||
}
|
||||
}
|
||||
const newRes = (res.Data || []).map(i => {
|
||||
return {
|
||||
...i,
|
||||
title: i.Nav_OperationStep?.NAME,
|
||||
}
|
||||
})
|
||||
if (this.pageIndex !== 1) {
|
||||
this.lists = this.lists.concat(newRes)
|
||||
} else {
|
||||
this.lists = newRes
|
||||
}
|
||||
})
|
||||
},
|
||||
handleShowPicker(p) {
|
||||
let column = []
|
||||
if (p.name === 'dateRange') {
|
||||
column = ['全部', '当天', '最近三天', '最近一周', '最近一月']
|
||||
}
|
||||
if (p.name === 'status') {
|
||||
column = ['全部', '草稿', '分析中','签到中','审核中','审批拒绝', '归档']
|
||||
}
|
||||
this.comPickerInfo = {
|
||||
showPicker: true,
|
||||
title: p.title,
|
||||
name: p.name,
|
||||
columns: [column]
|
||||
}
|
||||
},
|
||||
onConfirmPicker(e) {
|
||||
if (this.comPickerInfo.name === 'dateRange') {
|
||||
let currentDate = new Date();
|
||||
if (e.indexs[0] === 2) {
|
||||
currentDate.setDate(currentDate.getDate() - 3);
|
||||
} else if (e.indexs[0] === 3) {
|
||||
currentDate.setDate(currentDate.getDate() - 7);
|
||||
} else if (e.indexs[0] === 4) {
|
||||
currentDate.setDate(currentDate.getMonth());
|
||||
}
|
||||
if (e.indexs[0] === 0) {
|
||||
this.searchStartTime = ''
|
||||
this.dateFilterTxt = '时间区间'
|
||||
} else {
|
||||
this.dateFilterTxt = e.value[0]
|
||||
this.searchStartTime = uni.$u.timeFormat(currentDate, 'yyyy-mm-dd 00:00:00');
|
||||
}
|
||||
}
|
||||
if (this.comPickerInfo.name === 'status') {
|
||||
if (e.indexs[0] === 1) {
|
||||
// 草稿 0
|
||||
this.filterStatus = 0
|
||||
} else if (e.indexs[0] === 2) {
|
||||
// 分析中 1
|
||||
this.filterStatus = 1
|
||||
} else if (e.indexs[0] === 3) {
|
||||
// 签到中 2
|
||||
this.filterStatus = 2
|
||||
}else if (e.indexs[0] === 4) {
|
||||
// 审核中 4
|
||||
this.filterStatus = 4
|
||||
}else if (e.indexs[0] === 5) {
|
||||
// 审批拒绝 9
|
||||
this.filterStatus = 9
|
||||
}
|
||||
else if (e.indexs[0] === 6) {
|
||||
// 归档 5
|
||||
this.filterStatus = 5
|
||||
}
|
||||
|
||||
if (e.indexs[0] === 0) {
|
||||
// 全部
|
||||
this.filterStatus = null
|
||||
this.statusFilterTxt = '状态筛选'
|
||||
} else {
|
||||
this.statusFilterTxt = e.value[0]
|
||||
}
|
||||
}
|
||||
this.closePicker()
|
||||
},
|
||||
closePicker() {
|
||||
this.comPickerInfo = {
|
||||
showPicker: false,
|
||||
columns: [],
|
||||
title: '',
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
// 页码 +1
|
||||
if (this.total > 10 * this.pageIndex)
|
||||
this.pageIndex++
|
||||
// 重新获取列表数据
|
||||
},
|
||||
watch: {
|
||||
pageIndex(n, o) {
|
||||
this.loadData()
|
||||
},
|
||||
keyword(n, o) {
|
||||
this.pageIndex = 1
|
||||
this.keyword = n
|
||||
this.loadData()
|
||||
},
|
||||
searchStartTime(n, o) {
|
||||
this.pageIndex = 1
|
||||
this.searchStartTime = n
|
||||
this.loadData()
|
||||
},
|
||||
filterStatus(n, o) {
|
||||
this.pageIndex = 1
|
||||
this.filterStatus = n
|
||||
this.loadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.risk-record-page {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.risk-record-page .main {
|
||||
padding: 0px 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.risk-record-page>>>.uni-searchbar {
|
||||
padding: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
|
||||
.uni-searchbar__box {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.uni-searchbar__box-icon-clear {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-input-placeholder {}
|
||||
|
||||
.uni-searchbar__box-search-input {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uni-searchbar__text-placeholder {
|
||||
font-size: 12px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.uni-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-bar .search-bar {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.filter-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #ffffff;
|
||||
padding: 10px 16px 10px 16px;
|
||||
box-shadow: 0px 0px 5px 0px #eaedf4;
|
||||
}
|
||||
|
||||
.filter-bar .filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.content-list {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.content .field {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.content .field .label {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.content .field .value {
|
||||
color: #333333;
|
||||
}
|
||||
.status {
|
||||
background-color: rgba(5, 109, 232, 0.1);
|
||||
color: #056DE8;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
482
pages/apply/subPages/FO/jobFireShow.vue
Normal file
482
pages/apply/subPages/FO/jobFireShow.vue
Normal file
@ -0,0 +1,482 @@
|
||||
<template>
|
||||
<view style="padding-bottom: 80px;">
|
||||
<view class="card">
|
||||
<view class="background"></view>
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model" 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="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_Company||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="生产单元:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_ProductionUnit||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="发起时间:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.CREATE_TIME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="发起部门:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_ApplyDepartment||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="发起人:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_ApplyUser||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="工作票编号:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.CODE" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业名称:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_OperationStep||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="审批层级:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.AUDIT_LEVELName" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业风险等级:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.EVALUATE_LEVELName" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="动火部门:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_FireDepartment||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火部门负责人:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_FireUser||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="安全生产管理人员:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_SafeUser||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火区域:" prop="Product_Unit" borderBottom>
|
||||
<u--input v-model="(model.Nav_Area||{}).NAME" disabled disabledColor="#ffffff" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火地点" prop="LOCATION" borderBottom>
|
||||
<u--input disabled disabledColor="#ffffff" v-model="model.JOB_LOCATION" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火方式:" prop="Nav_Type" borderBottom>
|
||||
<u--input v-model="(model.Nav_Type||{}).NAME" disabled disabledColor="#ffffff" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火具体事项" prop="LOCATION" borderBottom>
|
||||
<u--input disabled disabledColor="#ffffff" v-model="model.JOB_CONTENT" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火计划开始时间" prop="CHECKDATETIME" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="model.JOB_DATE" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="动火计划结束时间" prop="ENDTIME" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="model.JOB_END_DATE" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="存在的风险">
|
||||
<!-- <u-icon name="arrow-down" size="12" slot="right"></u-icon> -->
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_Risks">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_Risks.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.RISK_NAME" type="primary" />
|
||||
</view>
|
||||
<view class="upload-title">附件:</view>
|
||||
<full-upload v-model="model.Nav_Files" :isShowBtn='false'></full-upload>
|
||||
</u--form>
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" errorType="border-bottom" ref="sForm" class="sub-form" style="margin-top: 20px;" v-if="model.Nav_Details.length>0">
|
||||
<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>
|
||||
<uni-collapse :border="false" accordion>
|
||||
<view v-for="(item, index) in model.Nav_Users" :key="index">
|
||||
<uni-collapse-item title-border="none" :border="false">
|
||||
<template v-slot:title>
|
||||
<view class="uni-collapse-item__title-box">
|
||||
<view class="uni-collapse-item__title-text">
|
||||
{{item.Nav_User?index+1+'.'+item.Nav_User.NAME:index+1+'.'}}
|
||||
</view>
|
||||
<view @click.stop style="margin-right: 10px;">
|
||||
<!-- <u-icon @click="handleDelRowBefore(index)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon> -->
|
||||
<!-- <u-icon name="arrow-down" size="12"></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<u-form-item label="作业人员类别" prop="CERTIFICATE_TYPE_SHOW" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="(item.Nav_UserType||{}).NAME" inputAlign="right" fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 9px"
|
||||
border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="姓名" prop="personName" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="(item.Nav_User||{}).NAME" inputAlign="right" fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 9px" border="none">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="证件名称" prop="certificateName" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="(item.Nav_Train||{}).CERTIFICATE_NAME" inputAlign="right" fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 9px" border="none"></u--input>
|
||||
</u-form-item> -->
|
||||
<u-form-item label="证书编号" prop="CertificateCode" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" inputAlign="right" v-model="item.CERTIFICATE_CODE" fontSize="14px" border="none"
|
||||
customStyle="margin:0px;display:flex;padding:3px 9px;"></u--input>
|
||||
</u-form-item>
|
||||
<view class="upload-title">附件:</view>
|
||||
<full-upload v-model="item.Nav_UserFiles" :isShowBtn='false'></full-upload>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</uni-collapse-item>
|
||||
</view>
|
||||
</uni-collapse>
|
||||
</u--form>
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" errorType="border-bottom" ref="sForm" class="sub-form" style="margin-top: 20px;" v-if="model.Nav_Details.length>0">
|
||||
<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>
|
||||
<uni-collapse :border="false" accordion>
|
||||
<view v-for="(item, index) in model.Nav_Details" :key="index">
|
||||
<uni-collapse-item title-border="none" :border="false">
|
||||
<template v-slot:title>
|
||||
<view class="uni-collapse-item__title-box">
|
||||
<view class="uni-collapse-item__title-text">
|
||||
{{item.CONTENT?index+1+'.'+item.JOB_STEPName+'--'+item.CONTENT:index+1+'.'}}
|
||||
</view>
|
||||
<view @click.stop style="margin-right: 10px;">
|
||||
<!-- <u-icon @click="handleDelRowBefore(index)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon> -->
|
||||
<!-- <u-icon name="arrow-down" size="12"></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<u-form-item label="顺序:" prop="Nav_User.NAME" @ borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="item.NUM" type="number" fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业阶段:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="item.JOB_STEPName" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业流程及安全措施:">
|
||||
|
||||
</u-form-item>
|
||||
<u--textarea disabled v-model="item.CONTENT" border="surround"></u--textarea>
|
||||
<view v-if="model.STATUS==30">
|
||||
<u-form-item label="是否确认:" prop="Nav_User.NAME" borderBottom>
|
||||
<u-switch v-model="item.IS_CONFIRM_NEW" size="18" disabled slot="right"></u-switch>
|
||||
</u-form-item>
|
||||
<view class="upload-title">附件:</view>
|
||||
<full-upload v-model="item.Nav_DetailFiles" :isShowBtn='false'></full-upload>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</uni-collapse-item>
|
||||
</view>
|
||||
</uni-collapse>
|
||||
</u--form>
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model" class="demo-ruleForm" style="margin-top: 20px;">
|
||||
<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>
|
||||
|
||||
|
||||
<view v-if="model.STATUS==30">
|
||||
<u-form-item label="动火作业现场条件验收情况:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.COMPLETED_CONDITION" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="是否可以动火:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.IS_FIREName" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火实际开始时间:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.ACT_DATE" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<view class="upload-title">现场条件验收附件:</view>
|
||||
<full-upload v-model="model.Nav_FireFiles" :isShowBtn='false'></full-upload>
|
||||
<u-form-item label="矿调度室人员:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_DispatchUser||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火部门负责人签名">
|
||||
</u-form-item>
|
||||
<image style="width: 150px;height: 60px;" :src="imgurl+model.Nav_FireUser.FILE_PATH" v-if='model.USER_DEAL_STATUS== 1'>
|
||||
</image>
|
||||
<u-form-item label="安全管理人员签名">
|
||||
</u-form-item>
|
||||
<image style="width: 150px;height: 60px;" :src="imgurl+model.Nav_SafeUser.FILE_PATH" v-if='model.SAFE_DEAL_STATUS== 1'>
|
||||
</image>
|
||||
<u-form-item label="矿调度人员签名">
|
||||
</u-form-item>
|
||||
<image style="width: 150px;height: 60px;" :src="imgurl+model.Nav_DispatchUser.FILE_PATH" v-if='model.DISPATCH_DEAL_STATUS== 1'>
|
||||
</image>
|
||||
|
||||
</view>
|
||||
<view v-if="model.FIRE_STATUS>15">
|
||||
<u-form-item label="动火作业完工验收情况:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.COMPLETED_CONTENT" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="是否可以撤离:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.IS_LEAVEName" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火实际结束时间:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.ACT_END_DATE" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="离开现场时间:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.LEAVE_DATE" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<view class="upload-title">完工验收附件:</view>
|
||||
<full-upload v-model="model.Nav_MonitorFiles" :isShowBtn='false'></full-upload>
|
||||
<u-form-item label="动火部门负责人签字">
|
||||
</u-form-item>
|
||||
<image style="width: 150px;height: 60px;" :src="imgurl+model.Nav_FireUser.FILE_PATH" v-if='model.USER_DEAL_FINISH_STATUS== 1'>
|
||||
</image>
|
||||
<u-form-item label="安全生产管理人员签字">
|
||||
</u-form-item>
|
||||
<image style="width: 150px;height: 60px;" :src="imgurl+model.Nav_SafeUser.FILE_PATH" v-if='model.SAFE_DEAL_FINISH_STATUS== 1'>
|
||||
</image>
|
||||
|
||||
</view>
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
<audit-process :show="showAudit" @close="handleCloseAudit" :dataSource="auditData" />
|
||||
<check-action v-if="isLoadOK && tableKey === '1'&&isAudit==='true' " :okApi="okApi" :refuseApi="refuseApi" :dataSource="$store.state.auditModel"></check-action>
|
||||
<view class="bottom-button">
|
||||
<u-button type="primary" class="bottom" v-if="isLoadOK&&tableKey==='1'&&!isAudit" @click="onTableBtnAgree" color="#3d4b70" >审阅</u-button>
|
||||
<!-- <button type="primary" class="bottom" v-if='isLoadOK&&tableKey==1' @click="onTableBtnAgree">签到</button> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
initFilter,
|
||||
extendRule,
|
||||
extendInclude
|
||||
} from '../../../../utils/common'
|
||||
|
||||
import {
|
||||
getRequest,
|
||||
} from '../../../../services/apply/FOServices/FOServices'
|
||||
|
||||
import '../../../../utils/showMsg.js'
|
||||
import color from '../../../../uni_modules/uview-ui/libs/config/color'
|
||||
import config from '../../../../config/common'
|
||||
import {
|
||||
getEnum
|
||||
} from '../../../../services/common';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
imgurl: config.uni_app_web_api_url + ':5199',
|
||||
model: {
|
||||
Nav_ApplyUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_ApplyDepartment: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_ProductionUnit: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_OperationStep: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_FireDepartment: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_FireUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_SafeUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Area: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Type: {
|
||||
NAME: ''
|
||||
},
|
||||
IS_HOLIDAY: false,
|
||||
IS_HOLIDAYName: '否',
|
||||
EVALUATE_LEVEL: '',
|
||||
EVALUATE_LEVELName: '',
|
||||
JOB_LOCATION: '',
|
||||
JOB_CONTENT: '',
|
||||
JOB_DATE: '',
|
||||
JOB_END_DATE: '',
|
||||
Nav_Users: [],
|
||||
Nav_Risks: [],
|
||||
Nav_Details: [],
|
||||
Nav_Files: [],
|
||||
Nav_FireFiles:[],
|
||||
Nav_MonitorFiles:[],
|
||||
Nav_DispatchUser:{
|
||||
NAME: ''
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
listPropUpload: ['PRE_SHIFT_MEETING_RECORD_ID'],
|
||||
listPropValUpload: [],
|
||||
TaskID: "",
|
||||
tableKey: '0',
|
||||
okApi: '',
|
||||
refuseApi: '',
|
||||
isAudit: false,
|
||||
isLoadOK: false,
|
||||
showAudit: false,
|
||||
auditData: [],
|
||||
ID: '',
|
||||
enumsData: {}, // 存储所有枚举数据(键:枚举名称,值:处理后的枚举列表)
|
||||
enumsText: {} // 存储枚举文本列表(用于下拉选择等场景)
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.ID = option.ID;
|
||||
this.TaskID = option.taskID;
|
||||
this.tableKey = option.tableKey ? option.tableKey : '0'
|
||||
this.okApi = option.okApi
|
||||
this.refuseApi = option.refuseApi
|
||||
this.ApproveID = option.ApproveID
|
||||
this.isAudit = option.isAudit
|
||||
this.auditModel = {
|
||||
...this.$store.state.auditModel,
|
||||
TaskID: option.taskID ? option.taskID : ''
|
||||
}
|
||||
this.fetchEnums(['HMOperationTaskAuditEnum', 'SKEvaluateLevelEnum', 'FOJobStepEnum','FOYesOrNoEnum']);
|
||||
},
|
||||
methods: {
|
||||
async fetchEnums(enumNames) {
|
||||
try {
|
||||
// 存储所有枚举请求的Promise
|
||||
const enumPromises = enumNames.map(name => {
|
||||
return getEnum({
|
||||
name
|
||||
}).then(res => {
|
||||
// 统一处理枚举格式:添加name/code字段,便于后续映射
|
||||
return {
|
||||
enumName: name,
|
||||
data: res.map(item => ({
|
||||
...item,
|
||||
name: item.NAME, // 统一显示名称字段
|
||||
code: item.ID // 统一值字段
|
||||
}))
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
// 等待所有枚举请求完成
|
||||
const results = await Promise.all(enumPromises);
|
||||
// 存储枚举结果到data中(键为枚举名称,值为处理后的数据)
|
||||
results.forEach(({
|
||||
enumName,
|
||||
data
|
||||
}) => {
|
||||
this.enumsData[enumName] = data;
|
||||
// 生成文本列表(如需要)
|
||||
this.enumsText[enumName] = data.map(item => item.name);
|
||||
});
|
||||
// 所有枚举获取完成后,执行loadData
|
||||
this.loadData();
|
||||
this.loadAuditData()
|
||||
} catch (error) {
|
||||
console.error('枚举请求失败:', error);
|
||||
uni.showToast({
|
||||
title: '枚举数据加载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "CODE", 1)
|
||||
extendRule(json, 'ID', 1, this.ID);
|
||||
getRequest(json, "/FO/FOFireJob/GetEdit").then(res => {
|
||||
this.model = res
|
||||
this.model.EVALUATE_LEVELName = res.EVALUATE_LEVEL !== '' && res.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item => item.code === res.EVALUATE_LEVEL).name : ''
|
||||
this.model.AUDIT_LEVELName = res.AUDIT_LEVEL !== '' && res.AUDIT_LEVEL !== undefined ? this.enumsData['HMOperationTaskAuditEnum'].find(item => item.code === res.AUDIT_LEVEL).name : ''
|
||||
this.model.IS_FIREName = res.IS_FIRE !== '' && res.IS_FIRE !== undefined ? this.enumsData['FOYesOrNoEnum'].find(item => item.code === res.IS_FIRE).name : ''
|
||||
this.model.IS_LEAVEName = res.IS_LEAVE !== '' && res.IS_LEAVE !== undefined ? this.enumsData['FOYesOrNoEnum'].find(item => item.code === res.IS_LEAVE).name : ''
|
||||
if (this.model.Nav_Details && this.model.Nav_Details.length > 0) {
|
||||
this.model.Nav_Details.map(item => {
|
||||
item.JOB_STEPName = item.JOB_STEP !== '' && item.JOB_STEP !== undefined ? this.enumsData['FOJobStepEnum'].find(item1 => item1.code === item.JOB_STEP).name : ''
|
||||
})
|
||||
}
|
||||
this.isLoadOK = true;
|
||||
})
|
||||
},
|
||||
onTableBtnAgree() {
|
||||
let json = {};
|
||||
json.ID = this.ID;
|
||||
json.TaskID = this.TaskID;
|
||||
getRequest(json, "/FO/FOFireJob/IdentityUpdate").then(res => {
|
||||
if (res) {
|
||||
uni.$showMsgFunc('操作成功!', () => {
|
||||
uni.navigateBack()
|
||||
}, 'success', 1000)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
loadAuditData() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, this.ID, "CODE", 1)
|
||||
return new Promise((resolve, reject) => {
|
||||
getRequest(json, "/PF/Approve/GetApproveInfo").then(res => {
|
||||
if (res) {
|
||||
if (res && res[0].Nav_ApproveDetails.length > 0) {
|
||||
res[0].Nav_ApproveDetails.sort((a, b) => a.NUM - b.NUM)
|
||||
resolve(res)
|
||||
}
|
||||
this.auditData = res
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无审批数据',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleCloseAudit() {
|
||||
this.showAudit = false
|
||||
},
|
||||
async onNavigationBarButtonTap() {
|
||||
// const res = await this.loadAuditData()
|
||||
// if (res) {
|
||||
// this.auditData = res
|
||||
this.showAudit = true
|
||||
// }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("../../../../style/css/newTemplate.css");
|
||||
</style>
|
||||
856
pages/apply/subPages/FO/jobFireTenEdit.vue
Normal file
856
pages/apply/subPages/FO/jobFireTenEdit.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<view class="todo-page">
|
||||
<view class="background"></view>
|
||||
<view class="allview">
|
||||
<view class="card" v-if="stepsPageList === 0">
|
||||
<u--form labelWidth="auto" :model="model" 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="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_OperationStep||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火区域:" prop="Product_Unit" borderBottom>
|
||||
<u--input v-model="(model.Nav_Area||{}).NAME" disabled disabledColor="#ffffff" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火地点" prop="LOCATION" borderBottom>
|
||||
<u--input disabled disabledColor="#ffffff" v-model="model.JOB_LOCATION" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火方式:" prop="Nav_Type" borderBottom>
|
||||
<u--input v-model="(model.Nav_Type||{}).NAME" disabled disabledColor="#ffffff" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="动火计划开始时间" prop="CHECKDATETIME" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="model.JOB_DATE" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="动火计划结束时间" prop="ENDTIME" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="model.JOB_END_DATE" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="动火具体事项" prop="LOCATION" borderBottom>
|
||||
<u--input disabled disabledColor="#ffffff" v-model="model.JOB_CONTENT" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="存在的风险">
|
||||
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_Risks">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_Risks.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.RISK_NAME" type="primary" />
|
||||
</view>
|
||||
<view class="upload-title">附件:</view>
|
||||
<full-upload v-model="model.Nav_Files" :isShowBtn='false'></full-upload>
|
||||
<u-form-item required label="动火作业现场条件验收情况" prop="LOCATION">
|
||||
|
||||
</u-form-item>
|
||||
<u--textarea v-model="model.COMPLETED_CONDITION" placeholder="请输入动火作业现场条件验收情况" border="surround"></u--textarea>
|
||||
<u-form-item required label="是否可以动火:" prop="Nav_User.NAME" @click="handleChange('FOYesOrNoEnum')" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.IS_FIREName" disabled placeholder="请选择是否可以动火" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
|
||||
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item required label="动火实际开始时间" prop="CHECKDATETIME" borderBottom @click="showCheckDate(1)">
|
||||
<u--input disabled disabledColor="#fff" v-model="model.ACT_DATE" placeholder="请选择时间" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item required label="矿调度人员:" prop="Nav_User.NAME" @click="handleChangeMonitor('Nav_DispatchUser')" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_DispatchUser||{}).NAME" disabled placeholder="请选择矿调度人员" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
|
||||
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<view class="upload-title">现场条件验收附件:</view>
|
||||
<full-upload v-model="model.Nav_FireFiles"></full-upload>
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="padding: 10px 16px;" v-if="stepsPageList === 0" class="bottom-button">
|
||||
<u-button type="primary" @click="stepAdd" color="#3d4b70" :loading="stepLoad">下一步</u-button>
|
||||
</view>
|
||||
<view class="card" v-if="stepsPageList === 1">
|
||||
<u--form labelWidth="auto" :model="model" ref="wForm" class="sub-form">
|
||||
|
||||
|
||||
<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;margin-top: 20px;">作业流程及安全措施</view>
|
||||
<uni-collapse :border="false" accordion>
|
||||
<view v-for="(item, index) in model.Nav_Details.filter(i => !i.IS_DELETED)" :key="index">
|
||||
<uni-collapse-item title-border="none" :border="false">
|
||||
<template v-slot:title>
|
||||
<view class="uni-collapse-item__title-box">
|
||||
<view class="uni-collapse-item__title-text">
|
||||
{{item.CONTENT?index+1+'.'+item.JOB_STEPName+'--'+item.CONTENT:index+1+'.'}}
|
||||
</view>
|
||||
<view @click.stop style="display: flex;flex-direction: row;align-items: center;">
|
||||
<u-switch v-model="item.IS_CONFIRM_NEW" @change="changeConfirm($event,item)" size="18" style="margin-right: 10px;"></u-switch>
|
||||
<u-icon @click="handleDelRowBefore(item)" name="trash" color="#ff4d4f" size="21" style="margin-right: 10px;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content" style="padding: 0px 0px 0px 10px;">
|
||||
<u-form-item label="顺序:" prop="Nav_User.NAME" @ borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="item.NUM" placeholder="请输入顺序" type="number" fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none"
|
||||
inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业阶段:" prop="Nav_User.NAME" @click="handleChange('FOJobStepEnum',item)" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="item.JOB_STEPName" disabled placeholder="请选择作业阶段" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
|
||||
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业流程及安全措施:">
|
||||
|
||||
</u-form-item>
|
||||
<u--textarea v-model="item.CONTENT" placeholder="请输入作业流程及安全措施" border="surround"></u--textarea>
|
||||
</view>
|
||||
|
||||
|
||||
</uni-collapse-item>
|
||||
</view>
|
||||
</uni-collapse>
|
||||
<view style="padding: 10px 16px;display: flex;flex-direction: row;">
|
||||
<u-button type="primary" @click="handleNewCheckArea" color="#3d4b70">新增</u-button>
|
||||
<!-- <u-button type="primary" @click="handleNewCheckList" color="#3d4b70" style="margin-left: 5px;">检查清单</u-button> -->
|
||||
</view>
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPageList === 1" 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>
|
||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
|
||||
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
|
||||
<u-picker :show="comPickerInfo.showSheet" :columns="comPickerInfo.columns" @confirm="onConfirmPicker" @close="comPickerInfo.showSheet=false" @cancel="comPickerInfo.showSheet=false" keyName="NAME"></u-picker>
|
||||
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
|
||||
<people-selector :defaultChecked="peopleSelectOption.defaultChecked" :show="peopleSelectOption.showSelector" @select="handleSelectorPeople" @close="peopleSelectOption.showSelector = false">
|
||||
</people-selector>
|
||||
<u-datetime-picker :show="dateTimePickerInfo.showCheckDate" v-model='dateTimePickerInfo.defaultDateTime' @confirm="handleCheckDate" @close="dateTimePickerInfo.showCheckDate = false"
|
||||
@cancel="dateTimePickerInfo.showCheckDate = false" :mode="dateTimePickerInfo.mode"></u-datetime-picker>
|
||||
<query-selector :show="showPopupMonitor" :total="curTotalMonitor" :lists="monitorLists" :defaultValue="currentOperateMonitor.NAME" @close="handleClosePopupMonitor" @search="handleSearchMonitor"
|
||||
@select="handleSelectedMonitor" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
extendFilterGroup,
|
||||
extendGroupRule,
|
||||
extendInclude,
|
||||
extendOrder,
|
||||
extendRule,
|
||||
extendIgnoreDataRule,
|
||||
guid,
|
||||
initFilter,
|
||||
initFilterGroup
|
||||
} from '../../../../utils/common'
|
||||
import {
|
||||
FMProductionUnit,
|
||||
CheckPeriods,
|
||||
CheckLevels,
|
||||
MineTypeIndex,
|
||||
MineTypeName
|
||||
} from '../../../../utils/enums.js'
|
||||
import {
|
||||
getUserLists,
|
||||
getDepartmentLists,
|
||||
getProductionUnitLists,
|
||||
getClassLists,
|
||||
} from '../../../../services/safe';
|
||||
import {
|
||||
getUser,
|
||||
getFOFireJob,
|
||||
fullFOFireJob,
|
||||
getRiskArea,
|
||||
getWorkLists,
|
||||
getFireType,
|
||||
getSafeUser,
|
||||
getSKEnterpriseLibrary,
|
||||
getRelatedUserType,
|
||||
getRenewalTrain,
|
||||
getAnalyzeDetail
|
||||
} from '../../../../services/apply/FOServices/FOServices.js'
|
||||
import stepTitle from '@/components/custom/step-title.vue'
|
||||
import swipeActionItem from '../../../../uni_modules/uview-ui/libs/config/props/swipeActionItem';
|
||||
import {
|
||||
getEnum
|
||||
} from '../../../../services/common';
|
||||
export default {
|
||||
components: {
|
||||
stepTitle,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showDelModalIndex: undefined,
|
||||
showDelModalIndex1: undefined,
|
||||
subsectionList: ['无隐患', '有隐患', '不涉及'],
|
||||
isMultiple: false,
|
||||
defaultChecked: [],
|
||||
RiskLevel: ['一般', '重大'],
|
||||
showPopupUnit: false,
|
||||
UnitDefaultIndex: [0],
|
||||
RiskLevelDefaultIndex: [0],
|
||||
UnitLists: [],
|
||||
showPopupRiskLevel: false,
|
||||
TypeLists: [],
|
||||
showPopupType: false,
|
||||
TypeDefaultIndex: [0],
|
||||
PeriodLists: [],
|
||||
showPopupPeriod: false,
|
||||
PeriodDefaultIndex: [0],
|
||||
LevelLists: [],
|
||||
showPopupStep: false,
|
||||
showPopupLevel: false,
|
||||
curTotalStep: 0,
|
||||
stepLists: [],
|
||||
LevelDefaultIndex: [0],
|
||||
showPopupDate: false,
|
||||
listPropUpload: ['NOTIFY_ID'],
|
||||
listPropValUpload: [],
|
||||
ORG_ID: uni.getStorageSync('orgId'),
|
||||
checkListData: {},
|
||||
monitorLists: [],
|
||||
currentOperateMonitor: {},
|
||||
showPopupMonitor: false,
|
||||
curTotalMonitor: 0,
|
||||
model: {
|
||||
Nav_ApplyUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_ApplyDepartment: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_ProductionUnit: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_OperationStep: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_FireDepartment: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_FireUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_SafeUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Area: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Type: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_DispatchUser: {
|
||||
NAME: ''
|
||||
},
|
||||
IS_HOLIDAY: false,
|
||||
IS_HOLIDAYName: '否',
|
||||
EVALUATE_LEVEL: '',
|
||||
EVALUATE_LEVELName: '',
|
||||
JOB_LOCATION: '',
|
||||
JOB_CONTENT: '',
|
||||
JOB_DATE: '',
|
||||
JOB_END_DATE: '',
|
||||
Nav_Users: [],
|
||||
Nav_Risks: [],
|
||||
Nav_Details: [],
|
||||
Nav_Files: []
|
||||
},
|
||||
peopleSelectOption: {
|
||||
showSelector: false,
|
||||
value: null,
|
||||
index: 0,
|
||||
defaultChecked: []
|
||||
},
|
||||
dateTimePickerInfo: {
|
||||
showCheckDate: false,
|
||||
dataIndex: undefined,
|
||||
defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
|
||||
value: '',
|
||||
name: '',
|
||||
mode: ''
|
||||
},
|
||||
selectorInfo: {
|
||||
name: 'user',
|
||||
isMultiple: false,
|
||||
showPopup: false,
|
||||
totalCount: 0,
|
||||
title: '考核结果选择',
|
||||
itemData: {},
|
||||
dataItem: {},
|
||||
index: 0,
|
||||
columns: [],
|
||||
dataLists: [],
|
||||
defaultText: '',
|
||||
defaultChecked: []
|
||||
},
|
||||
comPickerInfo: {
|
||||
showSheet: false,
|
||||
dataItem: {},
|
||||
columns: [],
|
||||
title: '',
|
||||
dataIndex: undefined,
|
||||
formIndex: undefined,
|
||||
name: ''
|
||||
},
|
||||
dateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM'),
|
||||
stepsText: ['发起', '归档'],
|
||||
stepsPage: 0,
|
||||
stepsPageList: 0,
|
||||
Pu: '',
|
||||
Check_Type_ID: '',
|
||||
TypeListres: {},
|
||||
TaskID: '',
|
||||
poparr: '',
|
||||
currentOperateStep: {},
|
||||
chooseCheckContent: '',
|
||||
chooseCheckArea: '',
|
||||
currentOperateArea: {},
|
||||
areaLists: [],
|
||||
curTotalArea: 0,
|
||||
showPopupArea: false,
|
||||
nowIndex: {},
|
||||
nowName: '',
|
||||
newCheckList: false,
|
||||
stepLoad: true,
|
||||
enumsData: {}, // 存储所有枚举数据(键:枚举名称,值:处理后的枚举列表)
|
||||
enumsText: {} // 存储枚举文本列表(用于下拉选择等场景)
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.TaskID = option.taskID ? option.taskID : '';
|
||||
this.model.ID = option.ID ? option.ID : '';
|
||||
this.ID = option.ID ? option.ID : '';
|
||||
// this.loadData();
|
||||
this.fetchEnums(['FOYesOrNoEnum', 'FOJobStepEnum']);
|
||||
},
|
||||
methods: {
|
||||
async fetchEnums(enumNames) {
|
||||
try {
|
||||
// 存储所有枚举请求的Promise
|
||||
const enumPromises = enumNames.map(name => {
|
||||
return getEnum({
|
||||
name
|
||||
}).then(res => {
|
||||
// 统一处理枚举格式:添加name/code字段,便于后续映射
|
||||
return {
|
||||
enumName: name,
|
||||
data: res.map(item => ({
|
||||
...item,
|
||||
name: item.NAME, // 统一显示名称字段
|
||||
code: item.ID // 统一值字段
|
||||
}))
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
// 等待所有枚举请求完成
|
||||
const results = await Promise.all(enumPromises);
|
||||
// 存储枚举结果到data中(键为枚举名称,值为处理后的数据)
|
||||
results.forEach(({
|
||||
enumName,
|
||||
data
|
||||
}) => {
|
||||
this.enumsData[enumName] = data;
|
||||
// 生成文本列表(如需要)
|
||||
this.enumsText[enumName] = data.map(item => item.name);
|
||||
});
|
||||
// 所有枚举获取完成后,执行loadData
|
||||
this.loadData();
|
||||
} catch (error) {
|
||||
console.error('枚举请求失败:', error);
|
||||
uni.showToast({
|
||||
title: '枚举数据加载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
if (this.ID == undefined || this.ID == '') {
|
||||
this.stepLoad = false
|
||||
this.model.Nav_Details = []
|
||||
if (this.ID == undefined || this.ID == '')
|
||||
this.ID = guid()
|
||||
this.model.ID = this.ID
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "")
|
||||
let userid = uni.getStorageSync('appInfo').User.ID
|
||||
extendRule(json, 'ID', 1, userid);
|
||||
extendInclude(json, 'Nav_Department.Nav_Unit');
|
||||
extendIgnoreDataRule(json)
|
||||
// extendInclude(json, 'Nav_Details.Nav_DetailContents.Nav_Question');
|
||||
getUser(json).then(res => {
|
||||
this.stepLoad = false
|
||||
this.model.Nav_ApplyUser.NAME = res.NAME
|
||||
this.model.APPLY_USER_ID = res.ID
|
||||
this.model.Nav_ApplyDepartment.NAME = res.Nav_Department.NAME
|
||||
this.model.APPLY_DEPARTMENT_ID = res.DEPARTMENT_ID
|
||||
this.model.Nav_ProductionUnit.NAME = res.Nav_Department.Nav_Unit.NAME
|
||||
this.model.PRODUCTION_UNIT_ID = res.Nav_Department.PRODUCTION_UNIT_ID
|
||||
|
||||
})
|
||||
} else {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "")
|
||||
extendRule(json, 'ID', 1, this.ID);
|
||||
extendInclude(json, 'Nav_OperationStep');
|
||||
extendInclude(json, 'Nav_Area');
|
||||
extendInclude(json, 'Nav_Type');
|
||||
extendInclude(json, 'Nav_Risks');
|
||||
extendInclude(json, 'Nav_Files.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_DispatchUser');
|
||||
extendInclude(json, 'Nav_FireFiles.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_Details');
|
||||
extendInclude(json, 'Nav_Details.Nav_DetailFiles.Nav_ImgFile');
|
||||
extendIgnoreDataRule(json)
|
||||
// extendInclude(json, 'Nav_Details.Nav_DetailContents.Nav_Question');
|
||||
getFOFireJob(json).then(res => {
|
||||
this.stepLoad = false
|
||||
this.model = res;
|
||||
this.model.ID = this.ID
|
||||
if (this.model.Nav_Details && this.model.Nav_Details.length > 0) {
|
||||
this.model.Nav_Details.map(item => {
|
||||
item.JOB_STEPName = item.JOB_STEP !== '' && item.JOB_STEP !== undefined ? this.enumsData['FOJobStepEnum'].find(item1 => item1.code === item.JOB_STEP).name : ''
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
changeConfirm(e,item){
|
||||
item.IS_CONFIRM_NEW =e
|
||||
},
|
||||
stepAdd() {
|
||||
|
||||
const isBlank = (value) => {
|
||||
return typeof value !== 'string' || value.trim() === '';
|
||||
};
|
||||
if (isBlank(this.model.COMPLETED_CONDITION) ||
|
||||
isBlank(this.model.IS_FIREName) ||
|
||||
isBlank(this.model.ACT_DATE) ||
|
||||
isBlank(this.model.DISPATCH_USER_ID)
|
||||
) {
|
||||
uni.$showErrorInfo('请检查必填项,必填项不能为空')
|
||||
} else {
|
||||
this.stepsPageList = this.stepsPageList + 1
|
||||
}
|
||||
|
||||
},
|
||||
stepReduce() {
|
||||
this.stepsPageList = this.stepsPageList - 1
|
||||
},
|
||||
stepAddTwo() {
|
||||
this.stepsPageList = this.stepsPageList + 1
|
||||
},
|
||||
handleChange(name, item) {
|
||||
this.comPickerInfo = {
|
||||
showSheet: true,
|
||||
columns: [this.enumsData[name]],
|
||||
name: name,
|
||||
itemData: item
|
||||
}
|
||||
},
|
||||
onConfirmPicker(e) {
|
||||
if (this.comPickerInfo.name == 'FOYesOrNoEnum') {
|
||||
this.model.IS_FIREName = e.value[0].name
|
||||
this.model.IS_FIRE = e.value[0].ID
|
||||
} else if (this.comPickerInfo.name == 'FOJobStepEnum') {
|
||||
this.comPickerInfo.itemData.JOB_STEPName = e.value[0].name
|
||||
this.comPickerInfo.itemData.JOB_STEP = e.value[0].ID
|
||||
}
|
||||
|
||||
this.comPickerInfo = {
|
||||
showSheet: false,
|
||||
columns: [],
|
||||
title: '',
|
||||
formIndex: undefined
|
||||
}
|
||||
},
|
||||
handleClosePopupMonitor() {
|
||||
this.showPopupMonitor = false
|
||||
},
|
||||
handleChangeMonitor(name) {
|
||||
this.currentOperateMonitor = name
|
||||
this.showPopupMonitor = true
|
||||
this.handleSearchMonitor('init')
|
||||
},
|
||||
handleSearchMonitor(val, pageIndex) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "NAME", '', pageIndex)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (this.currentOperateMonitor == 'Nav_DispatchUser') {
|
||||
getUserLists(json).then(res => {
|
||||
if (res.IsSuccessful) {
|
||||
this.monitorLists = res.Data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
name: i.NAME,
|
||||
code: i.CODE
|
||||
}
|
||||
})
|
||||
this.curTotalMonitor = res.TotalCount
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
handleSelectedMonitor(val) {
|
||||
this.showPopupMonitor = false
|
||||
if (this.currentOperateMonitor == 'Nav_DispatchUser') {
|
||||
this.model.Nav_DispatchUser = val
|
||||
this.model.DISPATCH_USER_ID = val.ID
|
||||
|
||||
}
|
||||
this.currentOperateMonitor = val
|
||||
},
|
||||
getDetail() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, this.model.OPERATION_STEP_ID)
|
||||
getAnalyzeDetail(json).then(res => {
|
||||
|
||||
if (res) {
|
||||
this.model.Nav_Details = res.Nav_Details
|
||||
this.model.EVALUATE_LEVEL = res.EVALUATE_LEVEL
|
||||
this.model.AUDIT_LEVEL = res.AUDIT_LEVEL
|
||||
this.model.EVALUATE_LEVELName = this.enumsData['SKEvaluateLevelEnum'].find(item => item.code === res.EVALUATE_LEVEL).name
|
||||
if (this.model.Nav_Details && this.model.Nav_Details.length > 0) {
|
||||
this.model.Nav_Details.map(item1 => {
|
||||
item1.JOB_STEPName = this.enumsData['FOJobStepEnum'].find(item => item.code === item1.JOB_STEP).name
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
getGetSafeUser() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, this.model.FIRE_DEPARTMENT_ID)
|
||||
getSafeUser(json).then(res => {
|
||||
|
||||
if (res) {
|
||||
this.model.Nav_SafeUser = res
|
||||
this.model.SAFE_USER_ID = res.ID
|
||||
} else {
|
||||
this.model.Nav_SafeUser = {
|
||||
NAME: ''
|
||||
}
|
||||
this.model.SAFE_USER_ID = ''
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
handleAddUser() {
|
||||
this.model.Nav_Users.push({
|
||||
ID: guid(),
|
||||
FIRE_JOB_ID: this.model.ID,
|
||||
ORG_ID: uni.getStorageSync('orgId'),
|
||||
Nav_UserType: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_User: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Train: {
|
||||
CERTIFICATE_NAME: ''
|
||||
},
|
||||
CERTIFICATE_CODE: '',
|
||||
USER_TYPE_ID: '',
|
||||
USER_ID: '',
|
||||
TRAIN_ID: '',
|
||||
Nav_UserFiles: []
|
||||
|
||||
})
|
||||
},
|
||||
handleNewCheckArea() {
|
||||
this.model.Nav_Details.push({
|
||||
ID: guid(),
|
||||
FIRE_JOB_ID: this.model.ID,
|
||||
ORG_ID: uni.getStorageSync('orgId'),
|
||||
NUM: 1,
|
||||
JOB_STEP: '',
|
||||
CONTENT: '',
|
||||
|
||||
})
|
||||
},
|
||||
handleDelRowBefore(item) {
|
||||
this.nowIndex = item
|
||||
this.showDelModalIndex = 1
|
||||
|
||||
},
|
||||
confirmDel() {
|
||||
this.nowIndex.IS_DELETED = true
|
||||
this.showDelModalIndex = undefined
|
||||
},
|
||||
cacelDel() {
|
||||
this.showDelModalIndex = undefined
|
||||
},
|
||||
async handleShowSheet(p) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
|
||||
// const json = initFilter(this.ORG_ID, "", "", 0, p.pageIndex ?? 1)
|
||||
let dataSelect = []
|
||||
var defaultChecked = []
|
||||
this.selectorInfo.isMultiple = false
|
||||
|
||||
if (p.val) {
|
||||
extendRule(json, 'NAME', 9, p.val);
|
||||
}
|
||||
|
||||
|
||||
json.Limit = 20
|
||||
if (p.pageIndex) {
|
||||
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||
}
|
||||
json.Sort = 'NAME'
|
||||
// json.SelectField = ["ID", "NAME", "NAME", "CODE"]
|
||||
// json.Sort = "NAME"
|
||||
// json.Order = 1
|
||||
if (p.name == 'Nav_Risks') {
|
||||
if (p.val) {
|
||||
extendRule(json, 'RISK_NAME', 9, p.val);
|
||||
}
|
||||
json.Sort = 'RISK_NAME'
|
||||
this.selectorInfo.isMultiple = true
|
||||
|
||||
|
||||
// extendRule(json, 'DEVICE_STATUS', 1, '1');
|
||||
if (this.model.AREA_ID !== '' && this.model.AREA_ID !== undefined) {
|
||||
extendRule(json, 'AREA_ID', 1, this.model.AREA_ID)
|
||||
}
|
||||
|
||||
dataSelect = await getSKEnterpriseLibrary(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].NAME = res.Data[i].RISK_NAME
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
if (this.model.Nav_Risks && this.model.Nav_Risks.length > 0 && this.model.Nav_Risks[0]
|
||||
.Nav_Risk != null) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.model.Nav_Risks.forEach(e => {
|
||||
defaultChecked.push(e.Nav_Risk)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
} else if (p.name == 'Nav_UserType') {
|
||||
dataSelect = await getRelatedUserType(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
} else if (p.name == 'Nav_User') {
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
dataSelect = await getUserLists(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
} else if (p.name == 'Nav_Train') {
|
||||
if (p.val) {
|
||||
extendRule(json, 'CERTIFICATE_NAME', 9, p.val);
|
||||
}
|
||||
json.Sort = 'CERTIFICATE_NAME'
|
||||
if (p.itemData.USER_ID !== '' && p.itemData.USER_ID !== undefined) {
|
||||
extendRule(json, 'USER_ID', 1, p.itemData.USER_ID)
|
||||
}
|
||||
|
||||
extendInclude(json, 'Nav_Files.Nav_ImgFile')
|
||||
dataSelect = await getRenewalTrain(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].CERTIFICATE_NAME
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
}
|
||||
if (defaultChecked == null)
|
||||
defaultChecked = []
|
||||
if (dataSelect.length) {
|
||||
this.selectorInfo = {
|
||||
itemData: p.itemData != undefined ? p.itemData : this.selectorInfo
|
||||
.itemData, //itemData: p.itemData, 搜索的时候 p.itemData为空 赋值修改 为 她自己本身 this.selectorInfo.itemData
|
||||
isMultiple: this.selectorInfo.isMultiple,
|
||||
totalCount: this.selectorInfo.totalCount,
|
||||
showPopup: true,
|
||||
title: p.title,
|
||||
name: p.name,
|
||||
dataLists: dataSelect,
|
||||
defaultChecked: defaultChecked,
|
||||
index: p.index
|
||||
}
|
||||
} else {
|
||||
// 暂无数据
|
||||
}
|
||||
},
|
||||
//数据加载
|
||||
handleSearch(val, pageIndex) {
|
||||
var p = {
|
||||
name: this.selectorInfo.name,
|
||||
title: this.selectorInfo.title,
|
||||
val: val,
|
||||
pageIndex: pageIndex,
|
||||
itemData: this.selectorInfo.itemData
|
||||
}
|
||||
this.handleShowSheet(p)
|
||||
},
|
||||
|
||||
handleSelected(e) {
|
||||
this.selectorInfo.showPopup = false
|
||||
if (this.selectorInfo.name == 'Nav_Risks') {
|
||||
let listArea = []
|
||||
if (e.length > 0) {
|
||||
e.forEach((item, i) => {
|
||||
if (item.name != null || item.NAME != null) {
|
||||
listArea.push({
|
||||
ID: guid(),
|
||||
FIRE_JOB_ID: this.model.ID,
|
||||
ENTERPRISE_LIBRARY_ID: item.ID,
|
||||
ORG_ID: item.ORG_ID,
|
||||
RISK_NAME: item.RISK_NAME,
|
||||
Nav_Risk: item
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.model.Nav_Risks = listArea
|
||||
// this.model.RiskAreaNAME = areaShow
|
||||
} else if (this.selectorInfo.name == 'Nav_UserType') {
|
||||
this.selectorInfo.itemData.Nav_UserType = e
|
||||
this.selectorInfo.itemData.USER_TYPE_ID = e.ID
|
||||
} else if (this.selectorInfo.name == 'Nav_User') {
|
||||
this.selectorInfo.itemData.Nav_User = e
|
||||
this.selectorInfo.itemData.USER_ID = e.ID
|
||||
} else if (this.selectorInfo.name == 'Nav_Train') {
|
||||
this.selectorInfo.itemData.Nav_Train = e
|
||||
this.selectorInfo.itemData.TRAIN_ID = e.ID
|
||||
this.selectorInfo.itemData.CERTIFICATE_CODE = e.CERTIFICATE_CODE
|
||||
if (e.Nav_Files && e.Nav_Files.length > 0) {
|
||||
e.Nav_Files.map(item => {
|
||||
this.selectorInfo.itemData.Nav_UserFiles.push(item)
|
||||
})
|
||||
}
|
||||
// this.selectorInfo.itemData.Nav_UserFiles =this.selectorInfo.itemData.Nav_UserFiles.push(e.Nav_Files)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
showCheckDate(dataIndex, item) {
|
||||
this.dateTimePickerInfo = {
|
||||
showCheckDate: true,
|
||||
defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
|
||||
dataIndex: dataIndex,
|
||||
item: item,
|
||||
mode: 'datetime'
|
||||
}
|
||||
},
|
||||
//隐藏控件 显示时间
|
||||
handleCheckDate(e) {
|
||||
if (this.dateTimePickerInfo.dataIndex == 1) {
|
||||
this.model.ACT_DATE = uni.$u.timeFormat(e.value,
|
||||
'yyyy-mm-dd hh:MM:ss')
|
||||
}
|
||||
this.dateTimePickerInfo.showCheckDate = false
|
||||
|
||||
},
|
||||
submit() {
|
||||
this.modelEdit = JSON.parse(JSON.stringify(this.model))
|
||||
delete this.modelEdit.Nav_ApplyDepartment
|
||||
delete this.modelEdit.Nav_ApplyUser
|
||||
delete this.modelEdit.Nav_Area
|
||||
delete this.modelEdit.Nav_FireDepartment
|
||||
delete this.modelEdit.Nav_FireUser
|
||||
delete this.modelEdit.Nav_OperationStep
|
||||
delete this.modelEdit.Nav_ProductionUnit
|
||||
delete this.modelEdit.Nav_SafeUser
|
||||
delete this.modelEdit.Nav_Type
|
||||
delete this.modelEdit.Nav_DispatchUser
|
||||
if (this.model.Nav_Risks && this.model.Nav_Risks.length > 0) {
|
||||
this.model.Nav_Risks.map(item => {
|
||||
delete item.Nav_Risk
|
||||
})
|
||||
}
|
||||
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
|
||||
this.modelEdit.Nav_Users.map(item => {
|
||||
item.PUBLISH = 'SaveAndNotify'
|
||||
delete item.Nav_Train
|
||||
delete item.Nav_User
|
||||
delete item.Nav_UserType
|
||||
if (item.Nav_UserFiles && item.Nav_UserFiles.length > 0) {
|
||||
item.Nav_UserFiles.map(item1 => {
|
||||
item1.FIRE_JOB_USER_ID = item.ID
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (this.TaskID == null || this.TaskID == '') {
|
||||
this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000'
|
||||
} else {
|
||||
this.modelEdit.TaskID = this.TaskID
|
||||
}
|
||||
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
|
||||
this.modelEdit.ORG_ID = this.ORG_ID
|
||||
|
||||
this.modelEdit.PUBLISH = 'SaveAndNotify'
|
||||
fullFOFireJob(this.modelEdit).then(res => {
|
||||
if (res) {
|
||||
uni.$showMsgFunc('操作成功!', () => {
|
||||
uni.navigateBack()
|
||||
}, 'success', 1000)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import url("../../../../style/css/newTemplate.css");
|
||||
</style>
|
||||
910
pages/apply/subPages/FO/jobFireTwoEdit.vue
Normal file
910
pages/apply/subPages/FO/jobFireTwoEdit.vue
Normal file
@ -0,0 +1,910 @@
|
||||
<template>
|
||||
<view class="todo-page">
|
||||
<view class="background"></view>
|
||||
<view class="allview">
|
||||
<view class="card">
|
||||
<u--form labelWidth="auto" :model="model" 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="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.CODE" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业名称:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_OperationStep||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="是否节假日:" prop="Nav_User.NAME" borderBottom>
|
||||
<u-switch v-model="model.IS_HOLIDAY" disabled slot="right"></u-switch>
|
||||
</u-form-item>
|
||||
<u-form-item label="作业风险等级:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.EVALUATE_LEVELName" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="施工单位负责人:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_FireUser||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="安全生产管理人员:" prop="Nav_User.NAME" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="(model.Nav_SafeUser||{}).NAME" disabled fontSize="14px" customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火区域:" prop="Product_Unit" borderBottom>
|
||||
<u--input v-model="(model.Nav_Area||{}).NAME" disabled disabledColor="#ffffff" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="动火地点" prop="LOCATION" borderBottom>
|
||||
<u--input disabledColor="#ffffff" disabled v-model="model.JOB_LOCATION" border="none" inputAlign="right" fontSize="14px" placeholder="请输入地点"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火方式:" prop="Nav_Type" borderBottom>
|
||||
<u--input v-model="(model.Nav_Type||{}).NAME" disabled disabledColor="#ffffff" border="none" inputAlign="right" fontSize="14px">
|
||||
</u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="动火具体事项" prop="LOCATION" borderBottom>
|
||||
<u--input disabledColor="#ffffff" disabled v-model="model.JOB_CONTENT" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="动火计划开始时间" prop="CHECKDATETIME" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="model.JOB_DATE" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="动火计划结束时间" prop="ENDTIME" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="model.JOB_END_DATE" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="存在的风险">
|
||||
</u-form-item>
|
||||
<view class="tag-view" v-if="model.Nav_Risks">
|
||||
<uni-tag class="tag" v-for="(i, k) in model.Nav_Risks.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.RISK_NAME" type="primary" />
|
||||
</view>
|
||||
<view class="upload-title">附件:</view>
|
||||
<full-upload v-model="model.Nav_Files" :isShowBtn='false'></full-upload>
|
||||
<u-form-item required label="动火作业完工验收情况" prop="LOCATION">
|
||||
|
||||
</u-form-item>
|
||||
<u--textarea v-model="model.COMPLETED_CONTENT" placeholder="请输入动火作业完工验收情况" border="surround"></u--textarea>
|
||||
<u-form-item label="是否可以撤离:" prop="Nav_User.NAME" @click="handleChange('FOYesOrNoEnum')" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.IS_LEAVEName" disabled placeholder="请选择是否可以撤离" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
|
||||
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item required label="动火实际结束时间" prop="CHECKDATETIME" borderBottom @click="showCheckDate(1)">
|
||||
<u--input disabled disabledColor="#fff" v-model="model.ACT_END_DATE" placeholder="请选择时间" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item required label="离开现场时间" prop="CHECKDATETIME" borderBottom @click="showCheckDate(2)">
|
||||
<u--input disabled disabledColor="#fff" v-model="model.LEAVE_DATE" placeholder="请选择时间" border="none" inputAlign="right" fontSize="14px"></u--input>
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
|
||||
</u-form-item>
|
||||
<view class="upload-title">完工验收附件:</view>
|
||||
<full-upload v-model="model.Nav_MonitorFiles"></full-upload>
|
||||
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="padding: 10px 16px;" class="bottom-button">
|
||||
<u-button type="primary" @click="submit" color="#3d4b70" :loading="stepLoad">提交</u-button>
|
||||
</view>
|
||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
|
||||
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
|
||||
<u-picker :show="comPickerInfo.showSheet" :columns="comPickerInfo.columns" @confirm="onConfirmPicker" @close="comPickerInfo.showSheet=false" @cancel="comPickerInfo.showSheet=false" keyName="NAME"></u-picker>
|
||||
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
|
||||
<people-selector :defaultChecked="peopleSelectOption.defaultChecked" :show="peopleSelectOption.showSelector" @select="handleSelectorPeople" @close="peopleSelectOption.showSelector = false">
|
||||
</people-selector>
|
||||
<u-datetime-picker :show="dateTimePickerInfo.showCheckDate" v-model='dateTimePickerInfo.defaultDateTime' @confirm="handleCheckDate" @close="dateTimePickerInfo.showCheckDate = false"
|
||||
@cancel="dateTimePickerInfo.showCheckDate = false" :mode="dateTimePickerInfo.mode"></u-datetime-picker>
|
||||
<query-selector :show="showPopupMonitor" :total="curTotalMonitor" :lists="monitorLists" :defaultValue="currentOperateMonitor.NAME" @close="handleClosePopupMonitor" @search="handleSearchMonitor"
|
||||
@select="handleSelectedMonitor" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
extendFilterGroup,
|
||||
extendGroupRule,
|
||||
extendInclude,
|
||||
extendOrder,
|
||||
extendRule,
|
||||
extendIgnoreDataRule,
|
||||
guid,
|
||||
initFilter,
|
||||
initFilterGroup
|
||||
} from '../../../../utils/common'
|
||||
import {
|
||||
FMProductionUnit,
|
||||
CheckPeriods,
|
||||
CheckLevels,
|
||||
MineTypeIndex,
|
||||
MineTypeName
|
||||
} from '../../../../utils/enums.js'
|
||||
import {
|
||||
getUserLists,
|
||||
getDepartmentLists,
|
||||
getProductionUnitLists,
|
||||
getClassLists,
|
||||
} from '../../../../services/safe';
|
||||
import {
|
||||
getUser,
|
||||
getFOFireJob,
|
||||
fullFOFireJob,
|
||||
getRiskArea,
|
||||
getWorkLists,
|
||||
getFireType,
|
||||
getSafeUser,
|
||||
getSKEnterpriseLibrary,
|
||||
getRelatedUserType,
|
||||
getRenewalTrain,
|
||||
getAnalyzeDetail
|
||||
} from '../../../../services/apply/FOServices/FOServices.js'
|
||||
import stepTitle from '@/components/custom/step-title.vue'
|
||||
import swipeActionItem from '../../../../uni_modules/uview-ui/libs/config/props/swipeActionItem';
|
||||
import {
|
||||
getEnum
|
||||
} from '../../../../services/common';
|
||||
export default {
|
||||
components: {
|
||||
stepTitle,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showDelModalIndex: undefined,
|
||||
showDelModalIndex1: undefined,
|
||||
subsectionList: ['无隐患', '有隐患', '不涉及'],
|
||||
isMultiple: false,
|
||||
defaultChecked: [],
|
||||
RiskLevel: ['一般', '重大'],
|
||||
showPopupUnit: false,
|
||||
UnitDefaultIndex: [0],
|
||||
RiskLevelDefaultIndex: [0],
|
||||
UnitLists: [],
|
||||
showPopupRiskLevel: false,
|
||||
TypeLists: [],
|
||||
showPopupType: false,
|
||||
TypeDefaultIndex: [0],
|
||||
PeriodLists: [],
|
||||
showPopupPeriod: false,
|
||||
PeriodDefaultIndex: [0],
|
||||
LevelLists: [],
|
||||
showPopupStep: false,
|
||||
showPopupLevel: false,
|
||||
curTotalStep: 0,
|
||||
stepLists: [],
|
||||
LevelDefaultIndex: [0],
|
||||
showPopupDate: false,
|
||||
listPropUpload: ['NOTIFY_ID'],
|
||||
listPropValUpload: [],
|
||||
ORG_ID: uni.getStorageSync('orgId'),
|
||||
checkListData: {},
|
||||
monitorLists: [],
|
||||
currentOperateMonitor: {},
|
||||
showPopupMonitor: false,
|
||||
curTotalMonitor: 0,
|
||||
model: {
|
||||
Nav_ApplyUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_ApplyDepartment: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_ProductionUnit: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_OperationStep: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_FireDepartment: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_FireUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_SafeUser: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Area: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Type: {
|
||||
NAME: ''
|
||||
},
|
||||
IS_HOLIDAY: false,
|
||||
IS_HOLIDAYName: '否',
|
||||
EVALUATE_LEVEL: '',
|
||||
EVALUATE_LEVELName: '',
|
||||
JOB_LOCATION: '',
|
||||
JOB_CONTENT: '',
|
||||
JOB_DATE: '',
|
||||
JOB_END_DATE: '',
|
||||
Nav_Users: [],
|
||||
Nav_Risks: [],
|
||||
Nav_Details: [],
|
||||
Nav_Files: []
|
||||
},
|
||||
peopleSelectOption: {
|
||||
showSelector: false,
|
||||
value: null,
|
||||
index: 0,
|
||||
defaultChecked: []
|
||||
},
|
||||
dateTimePickerInfo: {
|
||||
showCheckDate: false,
|
||||
dataIndex: undefined,
|
||||
defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
|
||||
value: '',
|
||||
name: '',
|
||||
mode: ''
|
||||
},
|
||||
selectorInfo: {
|
||||
name: 'user',
|
||||
isMultiple: false,
|
||||
showPopup: false,
|
||||
totalCount: 0,
|
||||
title: '考核结果选择',
|
||||
itemData: {},
|
||||
dataItem: {},
|
||||
index: 0,
|
||||
columns: [],
|
||||
dataLists: [],
|
||||
defaultText: '',
|
||||
defaultChecked: []
|
||||
},
|
||||
comPickerInfo: {
|
||||
showSheet: false,
|
||||
dataItem: {},
|
||||
columns: [],
|
||||
title: '',
|
||||
dataIndex: undefined,
|
||||
formIndex: undefined,
|
||||
name: ''
|
||||
},
|
||||
dateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM'),
|
||||
stepsText: ['发起', '归档'],
|
||||
stepsPage: 0,
|
||||
stepsPageList: 0,
|
||||
Pu: '',
|
||||
Check_Type_ID: '',
|
||||
TypeListres: {},
|
||||
TaskID: '',
|
||||
poparr: '',
|
||||
currentOperateStep: {},
|
||||
chooseCheckContent: '',
|
||||
chooseCheckArea: '',
|
||||
currentOperateArea: {},
|
||||
areaLists: [],
|
||||
curTotalArea: 0,
|
||||
showPopupArea: false,
|
||||
nowIndex: {},
|
||||
nowName: '',
|
||||
newCheckList: false,
|
||||
stepLoad: true,
|
||||
enumsData: {}, // 存储所有枚举数据(键:枚举名称,值:处理后的枚举列表)
|
||||
enumsText: {} // 存储枚举文本列表(用于下拉选择等场景)
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.TaskID = option.taskID ? option.taskID : '';
|
||||
this.model.ID = option.ID ? option.ID : '';
|
||||
this.ID = option.ID ? option.ID : '';
|
||||
// this.loadData();
|
||||
this.fetchEnums(['SKEvaluateLevelEnum', 'FOJobStepEnum', 'FOYesOrNoEnum']);
|
||||
},
|
||||
methods: {
|
||||
async fetchEnums(enumNames) {
|
||||
try {
|
||||
// 存储所有枚举请求的Promise
|
||||
const enumPromises = enumNames.map(name => {
|
||||
return getEnum({
|
||||
name
|
||||
}).then(res => {
|
||||
// 统一处理枚举格式:添加name/code字段,便于后续映射
|
||||
return {
|
||||
enumName: name,
|
||||
data: res.map(item => ({
|
||||
...item,
|
||||
name: item.NAME, // 统一显示名称字段
|
||||
code: item.ID // 统一值字段
|
||||
}))
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
// 等待所有枚举请求完成
|
||||
const results = await Promise.all(enumPromises);
|
||||
// 存储枚举结果到data中(键为枚举名称,值为处理后的数据)
|
||||
results.forEach(({
|
||||
enumName,
|
||||
data
|
||||
}) => {
|
||||
this.enumsData[enumName] = data;
|
||||
// 生成文本列表(如需要)
|
||||
this.enumsText[enumName] = data.map(item => item.name);
|
||||
});
|
||||
// 所有枚举获取完成后,执行loadData
|
||||
this.loadData();
|
||||
} catch (error) {
|
||||
console.error('枚举请求失败:', error);
|
||||
uni.showToast({
|
||||
title: '枚举数据加载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
if (this.ID == undefined || this.ID == '') {
|
||||
// this.stepLoad = false
|
||||
this.model.Nav_Details = []
|
||||
if (this.ID == undefined || this.ID == '')
|
||||
this.ID = guid()
|
||||
this.model.ID = this.ID
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "")
|
||||
let userid = uni.getStorageSync('appInfo').User.ID
|
||||
extendRule(json, 'ID', 1, userid);
|
||||
extendInclude(json, 'Nav_Department.Nav_Unit');
|
||||
extendIgnoreDataRule(json)
|
||||
// extendInclude(json, 'Nav_Details.Nav_DetailContents.Nav_Question');
|
||||
getUser(json).then(res => {
|
||||
this.stepLoad = false
|
||||
this.model.Nav_ApplyUser.NAME = res.NAME
|
||||
this.model.APPLY_USER_ID = res.ID
|
||||
this.model.Nav_ApplyDepartment.NAME = res.Nav_Department.NAME
|
||||
this.model.APPLY_DEPARTMENT_ID = res.DEPARTMENT_ID
|
||||
this.model.Nav_ProductionUnit.NAME = res.Nav_Department.Nav_Unit.NAME
|
||||
this.model.PRODUCTION_UNIT_ID = res.Nav_Department.PRODUCTION_UNIT_ID
|
||||
|
||||
})
|
||||
} else {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "")
|
||||
extendRule(json, 'ID', 1, this.ID);
|
||||
extendInclude(json, 'Nav_ApplyUser');
|
||||
extendInclude(json, 'Nav_ApplyDepartment');
|
||||
extendInclude(json, 'Nav_Company');
|
||||
extendInclude(json, 'Nav_ProductionUnit');
|
||||
extendInclude(json, 'Nav_Class');
|
||||
extendInclude(json, 'Nav_Users');
|
||||
extendInclude(json, 'Nav_Users.Nav_User');
|
||||
extendInclude(json, 'Nav_Files.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_AfterUsers');
|
||||
extendInclude(json, 'Nav_AfterUsers.Nav_AfterUser');
|
||||
extendInclude(json, 'Nav_Details');
|
||||
extendInclude(json, 'Nav_Details.Nav_User');
|
||||
extendInclude(json, 'Nav_Details.Nav_DetailFiles.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_Details.Nav_DetailAreas.Nav_Area');
|
||||
|
||||
extendIgnoreDataRule(json)
|
||||
// extendInclude(json, 'Nav_Details.Nav_DetailContents.Nav_Question');
|
||||
getFOFireJob(json).then(res => {
|
||||
this.stepLoad = false
|
||||
this.model = res;
|
||||
this.model.ID = this.ID
|
||||
this.model.EVALUATE_LEVELName = res.EVALUATE_LEVEL !== '' && res.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item => item.code === res.EVALUATE_LEVEL).name : ''
|
||||
this.model.ACT_END_DATE = uni.$u.timeFormat(this.model.ACT_END_DATE,
|
||||
'yyyy-mm-dd')
|
||||
this.model.LEAVE_DATE = uni.$u.timeFormat(this.model.LEAVE_DATE,
|
||||
'yyyy-mm-dd')
|
||||
this.model.IS_LEAVEName = res.IS_LEAVE !== '' && res.IS_LEAVE !== undefined ? this.enumsData['FOYesOrNoEnum'].find(item => item.code === res.IS_LEAVE).name : ''
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
stepAdd() {
|
||||
const isBlank = (value) => {
|
||||
return typeof value !== 'string' || value.trim() === '';
|
||||
};
|
||||
if (isBlank(this.model.Nav_OperationStep.NAME) ||
|
||||
isBlank(this.model.Nav_FireDepartment.NAME) ||
|
||||
isBlank(this.model.Nav_FireUser.NAME) ||
|
||||
isBlank(this.model.Nav_SafeUser.NAME) ||
|
||||
isBlank(this.model.JOB_DATE) ||
|
||||
isBlank(this.model.JOB_END_DATE)) {
|
||||
uni.$showErrorInfo('请检查必填项,必填项不能为空')
|
||||
} else {
|
||||
this.stepsPageList = this.stepsPageList + 1
|
||||
}
|
||||
|
||||
},
|
||||
stepReduce() {
|
||||
this.stepsPageList = this.stepsPageList - 1
|
||||
},
|
||||
stepAddTwo() {
|
||||
this.stepsPageList = this.stepsPageList + 1
|
||||
},
|
||||
handleChange(name, item) {
|
||||
this.comPickerInfo = {
|
||||
showSheet: true,
|
||||
columns: [this.enumsData[name]],
|
||||
name: name,
|
||||
itemData: item
|
||||
}
|
||||
},
|
||||
onConfirmPicker(e) {
|
||||
if (this.comPickerInfo.name == 'FOYesOrNoEnum') {
|
||||
this.model.IS_LEAVEName = e.value[0].name
|
||||
this.model.IS_LEAVE = e.value[0].ID
|
||||
}
|
||||
|
||||
this.comPickerInfo = {
|
||||
showSheet: false,
|
||||
columns: [],
|
||||
title: '',
|
||||
formIndex: undefined
|
||||
}
|
||||
},
|
||||
handleClosePopupMonitor() {
|
||||
this.showPopupMonitor = false
|
||||
},
|
||||
handleChangeMonitor(name) {
|
||||
this.currentOperateMonitor = name
|
||||
this.showPopupMonitor = true
|
||||
this.handleSearchMonitor('init')
|
||||
},
|
||||
handleSearchMonitor(val, pageIndex) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "NAME", '', pageIndex)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (this.currentOperateMonitor == 'Nav_OperationStep') {
|
||||
extendRule(json, 'TASK_LEVEL', 2, '1')
|
||||
extendInclude(json, 'Nav_OperationStep');
|
||||
getWorkLists(json).then(res => {
|
||||
if (res.IsSuccessful) {
|
||||
this.monitorLists = res.Data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
name: i.Nav_OperationStep.NAME,
|
||||
// code: i.CODE
|
||||
}
|
||||
})
|
||||
this.curTotalMonitor = res.TotalCount
|
||||
}
|
||||
})
|
||||
} else if (this.currentOperateMonitor == 'Nav_FireUser' || this.currentOperateMonitor == 'Nav_SafeUser') {
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
getUserLists(json).then(res => {
|
||||
if (res.IsSuccessful) {
|
||||
this.monitorLists = res.Data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
name: i.NAME,
|
||||
code: i.CODE
|
||||
}
|
||||
})
|
||||
this.curTotalMonitor = res.TotalCount
|
||||
}
|
||||
})
|
||||
} else if (this.currentOperateMonitor == 'Nav_FireDepartment') {
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
extendInclude(json, 'Nav_User');
|
||||
getDepartmentLists(json).then(res => {
|
||||
if (res.IsSuccessful) {
|
||||
this.monitorLists = res.Data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
name: i.NAME,
|
||||
code: i.CODE
|
||||
}
|
||||
})
|
||||
this.curTotalMonitor = res.TotalCount
|
||||
}
|
||||
})
|
||||
} else if (this.currentOperateMonitor == 'Nav_Type') {
|
||||
getFireType(json).then(res => {
|
||||
if (res.IsSuccessful) {
|
||||
this.monitorLists = res.Data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
name: i.NAME,
|
||||
code: i.CODE
|
||||
}
|
||||
})
|
||||
this.curTotalMonitor = res.TotalCount
|
||||
}
|
||||
})
|
||||
} else if (this.currentOperateMonitor == 'Nav_Area') {
|
||||
getRiskArea(json).then(res => {
|
||||
if (res.IsSuccessful) {
|
||||
this.monitorLists = res.Data.map(i => {
|
||||
return {
|
||||
...i,
|
||||
name: i.NAME,
|
||||
code: i.CODE
|
||||
}
|
||||
})
|
||||
this.curTotalMonitor = res.TotalCount
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
handleSelectedMonitor(val) {
|
||||
this.showPopupMonitor = false
|
||||
if (this.currentOperateMonitor == 'Nav_OperationStep') {
|
||||
this.model.Nav_OperationStep = val.Nav_OperationStep
|
||||
this.model.OPERATION_STEP_ID = val.Nav_OperationStep.ID
|
||||
|
||||
this.getDetail()
|
||||
// this.enumsData.filter
|
||||
} else if (this.currentOperateMonitor == 'Nav_FireDepartment') {
|
||||
this.model.Nav_FireDepartment = val
|
||||
this.model.FIRE_DEPARTMENT_ID = val.ID
|
||||
this.model.Nav_FireUser = val.Nav_User
|
||||
this.model.FIRE_USER_ID = val.Nav_User.ID
|
||||
this.getGetSafeUser()
|
||||
|
||||
} else if (this.currentOperateMonitor == 'Nav_FireUser') {
|
||||
this.model.Nav_FireUser = val
|
||||
this.model.FIRE_USER_ID = val.ID
|
||||
|
||||
} else if (this.currentOperateMonitor == 'Nav_SafeUser') {
|
||||
this.model.Nav_SafeUser = val
|
||||
this.model.SAFE_USER_ID = val.ID
|
||||
} else if (this.currentOperateMonitor == 'Nav_Area') {
|
||||
this.model.Nav_Area = val
|
||||
this.model.AREA_ID = val.ID
|
||||
} else if (this.currentOperateMonitor == 'Nav_Type') {
|
||||
this.model.Nav_Type = val
|
||||
this.model.TYPE_ID = val.ID
|
||||
}
|
||||
this.currentOperateMonitor = val
|
||||
},
|
||||
getDetail() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, this.model.OPERATION_STEP_ID)
|
||||
getAnalyzeDetail(json).then(res => {
|
||||
|
||||
if (res) {
|
||||
this.model.Nav_Details = res.Nav_Details
|
||||
this.model.EVALUATE_LEVEL = res.EVALUATE_LEVEL
|
||||
this.model.AUDIT_LEVEL = res.AUDIT_LEVEL
|
||||
this.model.EVALUATE_LEVELName = this.enumsData['SKEvaluateLevelEnum'].find(item => item.code === res.EVALUATE_LEVEL).name
|
||||
if (this.model.Nav_Details && this.model.Nav_Details.length > 0) {
|
||||
this.model.Nav_Details.map(item1 => {
|
||||
item1.JOB_STEPName = this.enumsData['FOJobStepEnum'].find(item => item.code === item1.JOB_STEP).name
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
getGetSafeUser() {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, this.model.FIRE_DEPARTMENT_ID)
|
||||
getSafeUser(json).then(res => {
|
||||
|
||||
if (res) {
|
||||
this.model.Nav_SafeUser = res
|
||||
this.model.SAFE_USER_ID = res.ID
|
||||
} else {
|
||||
this.model.Nav_SafeUser = {
|
||||
NAME: ''
|
||||
}
|
||||
this.model.SAFE_USER_ID = ''
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
handleAddUser() {
|
||||
this.model.Nav_Users.push({
|
||||
ID: guid(),
|
||||
FIRE_JOB_ID: this.model.ID,
|
||||
ORG_ID: uni.getStorageSync('orgId'),
|
||||
Nav_UserType: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_User: {
|
||||
NAME: ''
|
||||
},
|
||||
Nav_Train: {
|
||||
CERTIFICATE_NAME: ''
|
||||
},
|
||||
CERTIFICATE_CODE: '',
|
||||
USER_TYPE_ID: '',
|
||||
USER_ID: '',
|
||||
TRAIN_ID: '',
|
||||
Nav_UserFiles: []
|
||||
|
||||
})
|
||||
},
|
||||
handleNewCheckArea() {
|
||||
this.model.Nav_Details.push({
|
||||
ID: guid(),
|
||||
FIRE_JOB_ID: this.model.ID,
|
||||
ORG_ID: uni.getStorageSync('orgId'),
|
||||
NUM: 1,
|
||||
JOB_STEP: '',
|
||||
CONTENT: '',
|
||||
|
||||
})
|
||||
},
|
||||
handleDelRowBefore(item) {
|
||||
this.nowIndex = item
|
||||
this.showDelModalIndex = 1
|
||||
|
||||
},
|
||||
confirmDel() {
|
||||
this.nowIndex.IS_DELETED = true
|
||||
this.showDelModalIndex = undefined
|
||||
},
|
||||
cacelDel() {
|
||||
this.showDelModalIndex = undefined
|
||||
},
|
||||
async handleShowSheet(p) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
|
||||
// const json = initFilter(this.ORG_ID, "", "", 0, p.pageIndex ?? 1)
|
||||
let dataSelect = []
|
||||
var defaultChecked = []
|
||||
this.selectorInfo.isMultiple = false
|
||||
|
||||
if (p.val) {
|
||||
extendRule(json, 'NAME', 9, p.val);
|
||||
}
|
||||
|
||||
|
||||
json.Limit = 20
|
||||
if (p.pageIndex) {
|
||||
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||
}
|
||||
json.Sort = 'NAME'
|
||||
// json.SelectField = ["ID", "NAME", "NAME", "CODE"]
|
||||
// json.Sort = "NAME"
|
||||
// json.Order = 1
|
||||
if (p.name == 'Nav_Risks') {
|
||||
if (p.val) {
|
||||
extendRule(json, 'RISK_NAME', 9, p.val);
|
||||
}
|
||||
json.Sort = 'RISK_NAME'
|
||||
this.selectorInfo.isMultiple = true
|
||||
|
||||
|
||||
// extendRule(json, 'DEVICE_STATUS', 1, '1');
|
||||
if (this.model.AREA_ID !== '' && this.model.AREA_ID !== undefined) {
|
||||
extendRule(json, 'AREA_ID', 1, this.model.AREA_ID)
|
||||
}
|
||||
|
||||
dataSelect = await getSKEnterpriseLibrary(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].NAME = res.Data[i].RISK_NAME
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
if (this.model.Nav_Risks && this.model.Nav_Risks.length > 0 && this.model.Nav_Risks[0]
|
||||
.Nav_Risk != null) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.model.Nav_Risks.forEach(e => {
|
||||
defaultChecked.push({
|
||||
ID: e.ENTERPRISE_LIBRARY_ID,
|
||||
NAME: e.RISK_NAME
|
||||
})
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
} else if (p.name == 'Nav_UserType') {
|
||||
dataSelect = await getRelatedUserType(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
} else if (p.name == 'Nav_User') {
|
||||
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
||||
dataSelect = await getUserLists(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].NAME
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
} else if (p.name == 'Nav_Train') {
|
||||
if (p.val) {
|
||||
extendRule(json, 'CERTIFICATE_NAME', 9, p.val);
|
||||
}
|
||||
json.Sort = 'CERTIFICATE_NAME'
|
||||
if (p.itemData.USER_ID !== '' && p.itemData.USER_ID !== undefined) {
|
||||
extendRule(json, 'USER_ID', 1, p.itemData.USER_ID)
|
||||
}
|
||||
|
||||
extendInclude(json, 'Nav_Files.Nav_ImgFile')
|
||||
dataSelect = await getRenewalTrain(json).then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.Data.length; i++) {
|
||||
res.Data[i].name = res.Data[i].CERTIFICATE_NAME
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
}
|
||||
if (defaultChecked == null)
|
||||
defaultChecked = []
|
||||
if (dataSelect.length) {
|
||||
this.selectorInfo = {
|
||||
itemData: p.itemData != undefined ? p.itemData : this.selectorInfo
|
||||
.itemData, //itemData: p.itemData, 搜索的时候 p.itemData为空 赋值修改 为 她自己本身 this.selectorInfo.itemData
|
||||
isMultiple: this.selectorInfo.isMultiple,
|
||||
totalCount: this.selectorInfo.totalCount,
|
||||
showPopup: true,
|
||||
title: p.title,
|
||||
name: p.name,
|
||||
dataLists: dataSelect,
|
||||
defaultChecked: defaultChecked,
|
||||
index: p.index
|
||||
}
|
||||
} else {
|
||||
// 暂无数据
|
||||
}
|
||||
},
|
||||
//数据加载
|
||||
handleSearch(val, pageIndex) {
|
||||
var p = {
|
||||
name: this.selectorInfo.name,
|
||||
title: this.selectorInfo.title,
|
||||
val: val,
|
||||
pageIndex: pageIndex,
|
||||
itemData: this.selectorInfo.itemData
|
||||
}
|
||||
this.handleShowSheet(p)
|
||||
},
|
||||
|
||||
handleSelected(e) {
|
||||
this.selectorInfo.showPopup = false
|
||||
if (this.selectorInfo.name == 'Nav_Risks') {
|
||||
let listArea = []
|
||||
if (e.length > 0) {
|
||||
e.forEach((item, i) => {
|
||||
if (item.name != null || item.NAME != null) {
|
||||
listArea.push({
|
||||
ID: guid(),
|
||||
FIRE_JOB_ID: this.model.ID,
|
||||
ENTERPRISE_LIBRARY_ID: item.ID,
|
||||
ORG_ID: item.ORG_ID,
|
||||
RISK_NAME: item.RISK_NAME,
|
||||
Nav_Risk: item
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.model.Nav_Risks = listArea
|
||||
// this.model.RiskAreaNAME = areaShow
|
||||
} else if (this.selectorInfo.name == 'Nav_UserType') {
|
||||
this.selectorInfo.itemData.Nav_UserType = e
|
||||
this.selectorInfo.itemData.USER_TYPE_ID = e.ID
|
||||
} else if (this.selectorInfo.name == 'Nav_User') {
|
||||
this.selectorInfo.itemData.Nav_User = e
|
||||
this.selectorInfo.itemData.USER_ID = e.ID
|
||||
} else if (this.selectorInfo.name == 'Nav_Train') {
|
||||
this.selectorInfo.itemData.Nav_Train = e
|
||||
this.selectorInfo.itemData.TRAIN_ID = e.ID
|
||||
this.selectorInfo.itemData.CERTIFICATE_CODE = e.CERTIFICATE_CODE
|
||||
if (e.Nav_Files && e.Nav_Files.length > 0) {
|
||||
e.Nav_Files.map(item => {
|
||||
this.selectorInfo.itemData.Nav_UserFiles.push(item)
|
||||
})
|
||||
}
|
||||
// this.selectorInfo.itemData.Nav_UserFiles =this.selectorInfo.itemData.Nav_UserFiles.push(e.Nav_Files)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
showCheckDate(dataIndex, item) {
|
||||
this.dateTimePickerInfo = {
|
||||
showCheckDate: true,
|
||||
defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
|
||||
dataIndex: dataIndex,
|
||||
item: item,
|
||||
mode: 'date'
|
||||
}
|
||||
},
|
||||
//隐藏控件 显示时间
|
||||
handleCheckDate(e) {
|
||||
if (this.dateTimePickerInfo.dataIndex == 1) {
|
||||
this.model.ACT_END_DATE = uni.$u.timeFormat(e.value,
|
||||
'yyyy-mm-dd')
|
||||
} else if (this.dateTimePickerInfo.dataIndex == 2) {
|
||||
this.model.LEAVE_DATE = uni.$u.timeFormat(e.value,
|
||||
'yyyy-mm-dd')
|
||||
}
|
||||
this.dateTimePickerInfo.showCheckDate = false
|
||||
|
||||
},
|
||||
submit() {
|
||||
const isBlank = (value) => {
|
||||
return typeof value !== 'string' || value.trim() === '';
|
||||
};
|
||||
if (isBlank(this.model.COMPLETED_CONTENT) ||
|
||||
isBlank(this.model.ACT_END_DATE) ||
|
||||
isBlank(this.model.LEAVE_DATE)) {
|
||||
uni.$showErrorInfo('请检查必填项,必填项不能为空')
|
||||
} else {
|
||||
this.modelEdit = JSON.parse(JSON.stringify(this.model))
|
||||
delete this.modelEdit.Nav_ApplyDepartment
|
||||
delete this.modelEdit.Nav_ApplyUser
|
||||
delete this.modelEdit.Nav_Area
|
||||
delete this.modelEdit.Nav_FireDepartment
|
||||
delete this.modelEdit.Nav_FireUser
|
||||
delete this.modelEdit.Nav_OperationStep
|
||||
delete this.modelEdit.Nav_ProductionUnit
|
||||
delete this.modelEdit.Nav_SafeUser
|
||||
delete this.modelEdit.Nav_Type
|
||||
if (this.model.Nav_Risks && this.model.Nav_Risks.length > 0) {
|
||||
this.model.Nav_Risks.map(item => {
|
||||
delete item.Nav_Risk
|
||||
})
|
||||
}
|
||||
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
|
||||
this.modelEdit.Nav_Users.map(item => {
|
||||
item.PUBLISH = 'SaveAndNotify'
|
||||
delete item.Nav_Train
|
||||
delete item.Nav_User
|
||||
delete item.Nav_UserType
|
||||
if (item.Nav_UserFiles && item.Nav_UserFiles.length > 0) {
|
||||
item.Nav_UserFiles.map(item1 => {
|
||||
item1.FIRE_JOB_USER_ID = item.ID
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (this.TaskID == null || this.TaskID == '') {
|
||||
this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000'
|
||||
} else {
|
||||
this.modelEdit.TaskID = this.TaskID
|
||||
}
|
||||
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
|
||||
this.modelEdit.ORG_ID = this.ORG_ID
|
||||
|
||||
this.modelEdit.PUBLISH = 'SaveAndNotify'
|
||||
fullFOFireJob(this.modelEdit).then(res => {
|
||||
if (res) {
|
||||
uni.$showMsgFunc('操作成功!', () => {
|
||||
uni.navigateBack()
|
||||
}, 'success', 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import url("../../../../style/css/newTemplate.css");
|
||||
</style>
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class='base-info'>
|
||||
<view class="form-user">
|
||||
<u--form labelPosition="left" labelWidth="80px" labelAlign="left" :model="dataModel" :rules="rules" ref="form" errorType="border-bottom" class='info-form'>
|
||||
<u--form labelWidth="auto" labelAlign="left" :model="dataModel" :rules="rules" ref="form" errorType="border-bottom" class='info-form'>
|
||||
<u-form-item label="姓名" prop="name" border-bottom>
|
||||
<text>{{userInfo.UserName}}</text>
|
||||
</u-form-item>
|
||||
@ -21,7 +21,7 @@
|
||||
</u-form-item> -->
|
||||
<u-form-item label="组织结构" prop="job" @click="handleChange(userInfo.Nav_Department.NAME)">
|
||||
<!-- @click="handleShowSheet({title: '作业名称', name: 'stepName'})" -->
|
||||
<u--input disabledColor="#fff" v-model="userInfo.Nav_Department.NAME" disabled placeholder="请选择组织" suffixIcon="arrow-right" suffixIconStyle="font-size:12px" fontSize="14px"
|
||||
<u--input disabledColor="#fff" v-model="(userInfo.Nav_Department||[]).NAME" disabled placeholder="请选择组织" suffixIcon="arrow-right" suffixIconStyle="font-size:12px" fontSize="14px"
|
||||
customStyle="margin:0px;display:flex;padding:3px 9px" border="none" inputAlign="right">
|
||||
</u--input>
|
||||
|
||||
@ -39,6 +39,10 @@
|
||||
</u--input>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="是否接收短信" >
|
||||
<u-switch v-model="userInfo.ISGETMSG" @change="changeSwitch"></u-switch>
|
||||
</u-form-item>
|
||||
|
||||
<!-- <u-form-item label="角色" prop="role">
|
||||
<text>{{userInfo.RoleName}}</text>
|
||||
</u-form-item> -->
|
||||
@ -190,6 +194,9 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeSwitch(e){
|
||||
this.userInfo.ISGETMSG = e
|
||||
},
|
||||
formSubmit() {
|
||||
saveUser(this.userInfo).then(res => {
|
||||
uni.$showMsgFunc('操作成功!', () => {
|
||||
|
||||
@ -63,6 +63,62 @@ export function getUserLists(params) {
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getRenewalTrain(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/SE/RenewalTrain/OrderPaged", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getAnalyzeDetail(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/FOFireJob/GetAnalyzeDetail", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result.Data);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export function getWorkLists(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/HM/OperationLink/OrderPaged", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getFireType(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/FireType/OrderPaged", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getSafeUser(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/FOFireJob/GetSafeUser", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result.Data);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
//人员列表
|
||||
export function getPersonLists(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -110,6 +166,28 @@ export function getRiskArea(params) {
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getSKEnterpriseLibrary(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/SK/SKEnterpriseLibrary/OrderPaged", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getRelatedUserType(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/OG/RelatedUserType/OrderPaged", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
//工作票选人不分页
|
||||
export function getAllLists(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -367,6 +445,17 @@ export function getLeaderWellRecord(params) {
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getFOFireJob(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/FOFireJob/GetEdit", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result.Data);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
export function getTechDisclosure(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/TechDisclosureFromTech/Get", params).then((result) => {
|
||||
@ -400,6 +489,17 @@ export function fullFOLeaderWellRecord(params) {
|
||||
})
|
||||
})
|
||||
}
|
||||
export function fullFOFireJob(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/FOFireJob/FullUpdate", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
reject(error);
|
||||
})
|
||||
})
|
||||
}
|
||||
export function fullFOTechDisclosure(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/FO/FOTechDisclosureFromTech/FullUpdate", params).then((result) => {
|
||||
|
||||
@ -1431,6 +1431,9 @@ export function ApproveCode(json) {
|
||||
case 'FO025_SHOWPRINT': //工作票审批外包
|
||||
linkToUrl = '/pages/apply/subPages/FO2/jobOutsourceShow'
|
||||
break;
|
||||
case 'FO043_SHOWPRINT': //工作票审批外包
|
||||
linkToUrl = '/pages/apply/subPages/FO/jobFireShow'
|
||||
break;
|
||||
case 'HM104_SHOWPRINT': //作业任务识别审批
|
||||
linkToUrl = '../apply/subPages/HM2/jobTaskIdentityShow'
|
||||
break;
|
||||
@ -1693,6 +1696,18 @@ export function SourceFormcode(json) {
|
||||
case 'FO041_SHOWPRINT': //班组安全活动编辑
|
||||
linkToUrl = '../apply/subPages/FO/FO041Show'
|
||||
break;
|
||||
case 'FO043': //班组安全活动编辑
|
||||
linkToUrl = '../apply/subPages/FO/jobFireEdit'
|
||||
break;
|
||||
case 'FO043_1': //班组安全活动编辑
|
||||
linkToUrl = '../apply/subPages/FO/jobFireTenEdit'
|
||||
break;
|
||||
case 'FO043_2': //班组安全活动编辑
|
||||
linkToUrl = '../apply/subPages/FO/jobFireTwoEdit'
|
||||
break;
|
||||
case 'FO043_SHOWPRINT': //班组安全活动编辑
|
||||
linkToUrl = '../apply/subPages/FO/jobFireShow'
|
||||
break;
|
||||
case 'FO035': //班组安全活动编辑
|
||||
linkToUrl = '../apply/subPages/FO/FO035Edit'
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user