临时用电

pull/5/head
chenxinying 2024-02-20 10:36:03 +08:00
parent ae27ff75bc
commit 564091e81d
5 changed files with 2930 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,218 @@
<template>
<view >
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" >
<block slot="backText">返回</block>
<block slot="content">气体检测</block>
</cu-custom>
<scroll-view scroll-y="false" >
<view class="form">
<view class="wui-form-list">
<view class="cu-form-group ">
<view class="title">分析时间</view>
<ruiDatePicker fields="minute"
:value="pd.ANALYZE_TIME?pd.ANALYZE_TIME:''"
:end="currentTime"
@change="changeStartDate"
></ruiDatePicker>
</view>
<view class="cu-form-group">
<view class="title">分析点</view>
<input name="input" ref="ANALYZE_PLACE" v-model="pd.ANALYZE_PLACE" placeholder="请输入分析点"></input>
</view>
<view class="cu-form-group">
<view class="title">可燃气体检测结果</view>
<input name="input" ref="ANALYZE_RESULT" v-model="pd.ANALYZE_RESULT" placeholder="请输入可燃气体检测结果"></input>
</view>
<view class="cu-form-group">
<view>
<text class="title">分析人</text>
<text>{{pd.ANALYZE_USER}}</text>
</view>
</view>
<view>
<view class="wui-sign" >
<view class="title"></view>
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
</view>
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
<view class="sign-title">
签字照片
</view>
<view class="wui-sign-cotent">
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
<image :src="imgList[index].filePath" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
</view>
</view>
</view>
</view>
<view class="cu-bar btn-group" style="margin-top: 30upx;">
<button class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))"></button>
<button class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))"></button>
</view>
<view class="padding flex flex-direction">
</view>
</scroll-view>
</view>
</template>
<script>
import {
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
} from '@/common/tool.js';
import tkiTree from "@/components/select-tree/select-tree.vue"
import writingBoard from "@/components/writing-board/writing-board.vue"
import gcoord from '@/common/gcoord.js'
import ruiDatePicker from '@/components/rattenking-dtpicker/rattenking-dtpicker.vue';
export default {
components: {
tkiTree,ruiDatePicker,writingBoard
},
data() {
return {
imgList:[],
modalName:null,
noClick:true,
buttonloading: false,
pd:{},//
rules:[
{name:'ANALYZE_TIME',message:'请输入分析时间'},
{name:'ANALYZE_PLACE',message:'请输入分析点'},
{name:'ANALYZE_RESULT',message:'请输入分析结果'},
],
currentTime:formatDate(new Date(),'yyyy-MM-dd hh:mm')
}
},
onLoad(event){
this.pd.ELECTRICITY_ID = event.ELECTRICITY_ID;
this.pd.ANALYZE_USER = loginUser.NAME;
loginSession();
},
methods: {
uploadImgFaults(files,signtime) {
this.imgList.map((item,index) => {
var img = {}
img.name = 'file'+index
img.uri = item.filePath
files.push(img)
signtime.push(item.SIGNER_TIME)
})
},
showModal(e) {
this.modalName = e.currentTarget.dataset.target
},
hideModal(e) {
this.modalName = null
},
//
subCanvas(e) {
this.imgList.splice(0,this.imgList.length);
this.imgList.push(e);
this.pd.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
this.hideModal()
},
ViewImage(e) {
let files =[];
files.push(e.currentTarget.dataset.url)
uni.previewImage({
urls: files,
current: e.currentTarget.dataset.url
});
},
goSubmit(APPLY_STATUS){
this.buttonloading = true
var _this = this;
let required = true
if (_this.imgList.length <= 0) {
uni.showToast({
icon: 'none',
title: '请签字',
duration: 1500
});
return;
}
this.rules.map(({name,message}) => {
if (!this.pd[name]) {
uni.showToast({
icon: 'none',
title: message,
duration: 1500
});
required = false
}
})
if (!required) {
return
}
uni.showLoading({
title: '请稍候'
})
var files = [];
var signtime = [];
const formData={}
Object.keys(this.pd).map(key => {
formData[key]=this.pd[key]
})
this.uploadImgFaults(files,signtime)
formData.SIGNTIME = signtime
formData.CORPINFO_ID = loginUser.CORPINFO_ID
formData.USER_ID = loginUser.USER_ID
formData.APPLY_STATUS = APPLY_STATUS
uni.uploadFile({
url: basePath + "app/electricity/gas/save",
files: files,
formData:formData,
success: (res) => {
uni.showToast({
icon:'none',
title: '保存成功',
duration: 2000
});
this.buttonloading = false
if(APPLY_STATUS === 1){
uni.navigateBack({delta: 1});
}else{
uni.navigateBack({delta: 3});
}
// _this.goback()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
},
changeStartDate(e) {
this.pd.ANALYZE_TIME = e
this.$forceUpdate();//
},
goback(){
var pages = getCurrentPages(); //
var prePage = pages[pages.length - 2]; //
prePage.$vm.initflag = true; // A init true
uni.navigateBack({delta: 1});
uni.hideLoading();
},
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,253 @@
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
<block slot="backText">返回</block>
<block slot="content">临时用电作业气体检测</block>
<block slot="right">
<view v-if="addFlag" @click="$noMultipleClicks(goToAdd)"></view>
</block>
</cu-custom>
<scroll-view class="dy-scroll" @scrolltolower="scrolltolower" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
<view v-if="list.length>0" >
<view class="dy-list">
<view v-for="(item,index) of list" :key="index" :data-id="item.ELECTRICITYGAS_ID" class="dy-list-item p20">
<view class="dy-subtitle-flex">
<text>分析时间:{{item.ANALYZE_TIME}}</text>
<text>分析地点:{{item.ANALYZE_PLACE}}</text>
</view>
<view class="dy-subtitle-flex">
<text>可燃气体检测结果{{item.ANALYZE_RESULT}}</text>
</view>
<view class="dy-subtitle-flex" style="height: 34upx;">
<text>分析人{{item.ANALYZE_USER}}</text>
<view style="width: 100upx; height: 50upx; margin: 10upx;margin-top: 0upx;margin-bottom: 2upx;" >
<image :src="baseImgPath + item.SIGN_PATH" mode="aspectFill" @click="ViewShowImage(baseImgPath + item.SIGN_PATH)" style="height: 100%;"></image>
</view>
<text v-if="addFlag"><button class="cu-btn bg-red margin-tb-sm sm" @click="$noMultipleClicks(handleDelete,item.ELECTRICITYGAS_ID)"></button></text>
</view>
</view>
</view>
</view>
<view v-else-if="dataFlag=='noData'" class="dy-null">
<view class="dy-null-img">
<image :src="background[dataFlag].url" mode=""></image>
</view>
<view class="dy-null-title">
{{background[dataFlag].msg}}
</view>
</view>
<view class="cu-tabbar-height"></view>
</scroll-view>
</view>
</template>
<script>
import {
basePath,corpinfoId,loginSession,formatDate,loginUser,baseImgPath
} from '@/common/tool.js';
import tkiTree from "@/components/select-tree/select-tree.vue"
export default {
components: {
tkiTree
},
data() {
return {
baseImgPath:baseImgPath,
noClick:true,
showRight: false,
dataFlag:'noData',
addFlag:'',
sTop:0,
totalHeight:0,
list:[],//
ELECTRICITY_ID:''
}
},
onReady() {
let that=this;
let CustomBar = this.CustomBar;
uni.getSystemInfo({ //uni-app
success(res) { //
let titleH=uni.createSelectorQuery().select(".top-fixed"); //class/id
titleH.boundingClientRect(data=>{
that._data.sTop=data.height //=-data.top
that.totalHeight = data.height+CustomBar
}).exec()
}
})
},
onLoad(event) {//
this.ELECTRICITY_ID = event.ELECTRICITY_ID;
this.addFlag = event.addFlag;
},
onShow() {
//
var _this = this;
_this.background = require('@/common/background.json');
_this.list = [];
_this.getData();
loginSession();
},
filters: {
formatDate(time) {
let date = new Date(time)
return formatDate(date, 'yyyy-MM-dd')
}
},
methods: {
//
goToAdd(){
uni.navigateTo({
url: '/pages/application/electricity/electricity-gas/gas-detail?ELECTRICITY_ID='+this.ELECTRICITY_ID
});
},
getQuery(){ //
var _this = this;
_this.list = [];
_this.getData();
},
getData(){
var _this = this;
uni.showLoading({
title:"加载中..."
});//
uni.request({
url: basePath +'/app/electricity/gas/list' ,
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
ELECTRICITY_ID:_this.ELECTRICITY_ID,
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
uni.hideLoading();//
if (res.data != null) {
_this.list = res.data.varList;
}
}
})
},
ViewShowImage(url) {
let files = [];
files.push(url)
uni.previewImage({
urls: files,
current: 0
});
},
handleDelete(id){
var _this = this;
uni.showModal({
title: '',
content: '确定要删除这条申请?',
cancelColor:"#000000",
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
uni.showLoading({
title: '处理中'
})
uni.request({
url: basePath+'/app/electricity/gas/delete',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
ELECTRICITYGAS_ID: id,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: '删除成功',
duration: 1500
});
_this.getQuery()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
}
}
})
},
}
}
</script>
<style>
.dy-card {
background-color: #fff;
border-radius: 10upx;
margin: 30upx
}
.dy-card-title {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #eee;
min-height: 80upx;
line-height: 80upx;
padding: 0 30upx;
}
.dy-card-content {
padding: 0upx 30upx 30upx;
}
.dy-card-content-item {
margin-top: 20upx;
}
.dy-card-content-item .title {
display: flex;
align-items: center;
}
.dy-card-content-item .title .l {
width: 10upx;
height: 30upx;
border-radius: 20upx;
background-color: #666;
margin-right: 10upx;
}
.dy-card-content-item .content {
background-color: #F1F1F1;
padding: 10upx 14upx;
margin-top: 14upx;
line-height: 1.6;
}
.dy-card-content-item .name text {
background-color: #F1F1F1;
padding: 10upx 14upx;
margin-top: 14upx;
line-height: 1.6;
display: inline-block;
}
.dy-card-foot {
border-top: 1px solid #eee;
padding: 30upx;
}
</style>

View File

@ -0,0 +1,581 @@
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
<block slot="backText">返回</block>
<block slot="content">临时用电{{ flow }}</block>
<block slot="right" v-if="flow === '提交申请'">
<view @click="$noMultipleClicks(goToAdd)"></view>
</block>
</cu-custom>
<view class="select-fixed top-fixed">
<view class="cu-bar search bg-white">
<picker @change="statusChange" :value="sindex" :range="stepList" range-key="STEP_NAME">
<view class="saixuan">
<text>筛选</text>
<text class="cuIcon-triangledownfill"></text>
</view>
</picker>
<view class="search-form radius" style="margin-left: 0;">
<text class="cuIcon-search"></text>
<input v-model="KEYWORDS" placeholder="请输入关键字"></input>
</view>
<view class="action">
<button class="cu-btn bg-green shadow-blur radius" @click="getQuery"></button>
</view>
</view>
<view class="line"></view>
</view>
<scroll-view class="dy-scroll" @scrolltolower="scrolltolower" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
<view v-if="list.length>0" >
<view class="dy-list">
<view v-for="(item,index) of list" :key="index" :data-id="item.ELECTRICITY_ID" class="dy-list-item p20">
<view class="dy-title-flex align-center" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>编号:{{item.CHECK_NO}}</text>
</view>
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>申请人:{{item.APPLY_USER_NAME}}</text>
<text>分析人:{{item.ANALYZE_USER_NAME}}</text>
</view>
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>监护人{{item.GUARDIAN_USER_NAME}}</text>
<text>安全交底人{{item.CONFESS_USER_NAME}}</text>
</view>
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>接受交底人{{item.ACCEPT_CONFESS_USER_NAME}}</text>
<text>作业负责人{{item.CONFIRM_USER_NAME}}</text>
</view>
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>用电单位负责人{{item.AUDIT_USER_NAME}}</text>
<text>配送电单位负责人{{item.APPROVE_USER_NAME}}</text>
</view>
<view class="dy-subtitle-flex" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>验收部门负责人{{item.ACCEPT_USER_NAME}}</text>
</view>
<view class="dy-subtitle-flex" style="height: 34upx;" @click="$noMultipleClicks(goToDetail,item.ELECTRICITY_ID)">
<text>
审核状态
<template v-if="item.STEP_ID==0"></template>
<template v-else-if="item.STATUS==-2">气体检测打回</template>
<template v-else-if="item.STEP_ID!=-1">{{ item.NEXT_STEP_NAME }}</template>
<template v-else>{{ item.STEP_NAME }}</template>
</text>
<text v-if="item.STEP_ID<1"><button class="cu-btn bg-red margin-tb-sm sm" @click="$noMultipleClicks(handleDelete,item.ELECTRICITY_ID)"></button></text>
</view>
<view class="dy-subtitle-flex">
<text><button class="cu-btn bg-green" style="padding: 0 5px; height:24px;"
@click="showDrawer('showRight',item.ELECTRICITY_ID)">查看流程图</button></text>
</view>
</view>
</view>
</view>
<view v-else-if="dataFlag=='noData'" class="dy-null">
<view class="dy-null-img">
<image :src="background[dataFlag].url" mode=""></image>
</view>
<view class="dy-null-title">
{{background[dataFlag].msg}}
</view>
</view>
<view class="cu-tabbar-height"></view>
</scroll-view>
<!-- 右侧抽屉 -->
<uni-drawer ref="showRight" mode="right" :mask-click="true" @change="change($event,'showRight')">
<scroll-view scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
<view class="step-top ">
查看流程图
</view>
<view class="step-item-container">
<view class="step-item">
<view class="step-item-wrap" v-for="(item,key) of flowList" :key="key"
:class="getShowStatus(item)">
<view class="step-item-wrap-doter">
<view class="step-item-wrap-dot"></view>
</view>
<view class="step-item-wrap-right">
<view class="step-item-wrap-right-title">{{item.STEP_NAME}}</view>
<view class="step-item-wrap-right-title">{{item.ACT_USER_NAME || item.SIGN_USER}}</view>
<view class="step-item-wrap-right-title">{{item.ACT_TIME}}</view>
</view>
</view>
</view>
</view>
</scroll-view>
</uni-drawer>
</view>
</template>
<script>
import {
basePath,corpinfoId,loginSession,formatDate,loginUser
} from '@/common/tool.js';
import tkiTree from "@/components/select-tree/select-tree.vue"
export default {
components: {
tkiTree
},
data() {
return {
flow:"",
showRight: false,
dataFlag:'noData',
sTop:0,
totalHeight:0,
list:[],//
page:1,//--
rows:10,//--
totalCount:0,//--
isEnd:false,//
totalPage:0,//--
KEYWORDS : '',
noClick:true,
stepList:[],
sindex:-1,
STEP_ID:'',
flowList:[],
}
},
onReady() {
let that=this;
let CustomBar = this.CustomBar;
uni.getSystemInfo({ //uni-app
success(res) { //
let titleH=uni.createSelectorQuery().select(".top-fixed"); //class/id
titleH.boundingClientRect(data=>{
that._data.sTop=data.height //=-data.top
that.totalHeight = data.height+CustomBar
}).exec()
}
})
},
onLoad(e) {//
this.flow = e.flow;
},
onShow() {
//
var _this = this;
_this.background = require('@/common/background.json');
_this.showCount = -1;
_this.currentPage = 1;
_this.list = [];
_this.isEnd = false;
_this.getData();
_this.getSetps();
// _this.getDept();
loginSession();
},
filters: {
formatDate(time) {
let date = new Date(time)
return formatDate(date, 'yyyy-MM-dd')
}
},
methods: {
//
goToDetail(e) {
if(this.flow=== '提交申请'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-apply/electricity-apply-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '气体检测'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-gas/gas-list?&addFlag=1&ELECTRICITY_ID='+e
});
}else if(this.flow === '设置安全措施确认人'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-measures/electricity-measures-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '安全措施确认'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-measures-confirm/electricity-measures-confirm-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '监护人签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-guardian/electricity-guardian-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '用电人签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-user/electricity-user-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '安全交底人签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-confess/electricity-confess-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '接受安全交底人签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-acceptconfess/electricity-acceptconfess-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '作业人签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-workuser/electricity-workuser-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '作业负责人签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-confirm/electricity-confirm-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '用电单位签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-audit/electricity-audit-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '配送电单位签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-approve/electricity-approve-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '开始进行作业'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-startwork/electricity-startwork-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '结束作业'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-endwork/electricity-endwork-detail?ELECTRICITY_ID='+e
});
}else if(this.flow === '验收签字'){
uni.navigateTo({
url: '/pages/application/electricity/electricity-accept/electricity-accept-detail?ELECTRICITY_ID='+e
});
}
},
goToAdd(){
uni.navigateTo({
url: '/pages/application/electricity/electricity-apply/electricity-apply-detail'
});
},
getQuery(){ //
var _this = this;
_this.showCount = -1;
_this.currentPage = 1;
_this.list = [];
_this.isEnd = false;
_this.getData();
},
//
scrolltolower(){
var _this = this;
_this.showCount = -1;
_this.currentPage = _this.currentPage + 1;
_this.isEnd = false;
if(_this.totalPage >= _this.currentPage){
_this.getData();//
}
},
statusChange(e){
this.sindex = e.detail.value;
this.STEP_ID=this.stepList[this.sindex].STEP_ID;
this.getQuery();
},
getSetps(){
var _this = this;
uni.request({
url: basePath +'/app/eightwork/getTaskSetps',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
TASK_ID: 1,
},
success: (res) => {
if (res.data != null) {
_this.stepList = [{"STEP_NAME":"请选择","STEP_ID":""},...res.data.list,{"STEP_NAME":"验收归档","STEP_ID":"99"}];
}
}
})
},
getData(){
var _this = this;
if (_this.isEnd) {
return
}else{
this.isEnd =true;
}
uni.showLoading({
title:"加载中..."
});//
uni.request({
url: basePath +'/app/electricity/list?showCount='+_this.showCount+'&currentPage='+_this.currentPage ,
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
CREATOR:_this.flow === '提交申请'?loginUser.USER_ID : '',
GASCHECK:_this.flow === '气体检测'?loginUser.USER_ID : '',
STEP_NAME: (_this.flow === '提交申请' || _this.flow === '气体检测')?'' : _this.flow,
STEP_ID: _this.STEP_ID,
KEYWORDS : _this.KEYWORDS, //
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
uni.hideLoading();//
_this.totalPage = res.data.page.totalPage;
if(_this.list.length == 0){
_this.list = res.data.varList;
}else{
if(res.data.varList != null){
_this.list = _this.list.concat(res.data.varList);
}
}
}
})
},
handleDelete(id){
var _this = this;
uni.showModal({
title: '',
content: '确定要删除这条申请?',
cancelColor:"#000000",
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
uni.showLoading({
title: '处理中'
})
uni.request({
url: basePath+'/app/electricity/delete',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
ELECTRICITY_ID: id,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: '删除成功',
duration: 1500
});
_this.getQuery()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
}
}
})
},
//
showDrawer(e,ELECTRICITY_ID) {
uni.showLoading({
title:"加载中..."
});//
uni.request({
url: basePath +'/app/electricity/getFlowList' ,
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
ELECTRICITY_ID
},
success: (res) => {
uni.hideLoading();//
this.flowList = res.data.flowList
this.$refs[e].open()
}
})
},
getShowStatus(work) {
if(work.STATUS === 1){
return 'success'
}else if(work.STATUS < 0){
return 'erroractive'
}else if(work.CURRENT_STEP){
return 'active'
}
},
//
closeDrawer(e) {
this.$refs[e].close()
},
//
change(e, type) {
console.log((type === 'showLeft' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
this[type] = e
},
}
}
</script>
<style>
.dy-card {
background-color: #fff;
border-radius: 10upx;
margin: 30upx
}
.dy-card-title {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #eee;
min-height: 80upx;
line-height: 80upx;
padding: 0 30upx;
}
.dy-card-content {
padding: 0upx 30upx 30upx;
}
.dy-card-content-item {
margin-top: 20upx;
}
.dy-card-content-item .title {
display: flex;
align-items: center;
}
.dy-card-content-item .title .l {
width: 10upx;
height: 30upx;
border-radius: 20upx;
background-color: #666;
margin-right: 10upx;
}
.dy-card-content-item .content {
background-color: #F1F1F1;
padding: 10upx 14upx;
margin-top: 14upx;
line-height: 1.6;
}
.dy-card-content-item .name text {
background-color: #F1F1F1;
padding: 10upx 14upx;
margin-top: 14upx;
line-height: 1.6;
display: inline-block;
}
.dy-card-foot {
border-top: 1px solid #eee;
padding: 30upx;
}
.p20 {
padding: 40upx;
}
.step-top {
width: 100%;
border-bottom: 1px solid #eee;
background: #f9f9f9;
padding: 20upx;
}
.step-item-container {
width: 100%;
padding: 20upx;
}
.step-item {
width: 100%;
display: flex;
flex-direction: column;
padding: 20upx 40upx;
}
.step-item-wrap {
width: 100%;
border-left: 1px solid #ccc;
min-height: 100upx;
position: relative;
display: flex;
flex-direction: row;
}
.step-item-wrap.active .step-item-wrap-doter .step-item-wrap-dot {
background: #4cc9fb;
}
.step-item-wrap.success .step-item-wrap-doter .step-item-wrap-dot {
background: #5db174;
}
.step-item-wrap.erroractive .step-item-wrap-doter .step-item-wrap-dot {
background: red;
}
.step-item-wrap.active {
border-left: 1px solid #5db174;
}
.step-item-wrap.activeing {
border-left: 1px solid #ccc;
}
.step-item-wrap:last-child {
border: none;
}
.step-item-wrap-doter {
width: 30upx;
height: 30upx;
border-radius: 100%;
background: #fff;
position: absolute;
top: 0upx;
left: -12upx;
text-align: center;
padding-top: 5upx;
}
.step-item-wrap-dot {
width: 20upx;
height: 20upx;
background: #c0c4cc;
border-radius: 100%;
}
.step-item-wrap-right {
margin-left: 40upx;
margin-top: -5upx;
padding-bottom: 60upx;
}
.step-item-wrap-right-info {
color: #999;
margin-top: 10upx;
}
.step-item-wrap.active .step-item-wrap-right,.step-item-wrap.active .step-item-wrap-right-info {
color: #4cc9fb;
}
.step-item-wrap.success .step-item-wrap-right,.step-item-wrap.success .step-item-wrap-right-info {
color: #5db174;
}
.step-item-wrap.erroractive .step-item-wrap-right,.step-item-wrap.erroractive .step-item-wrap-right-info {
color: red;
}
</style>

View File

@ -0,0 +1,286 @@
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
<block slot="backText">返回</block>
<block slot="content">临时用电</block>
</cu-custom>
<view class="apps-box">
<view class="apps-row">
<view class="apps-title">
<text class="apps-title-line"></text>
<text>临时用电审批管理</text>
</view>
<view class="apps-warp">
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=提交申请">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-yxkj-1.png" mode=""></image>
<view v-if="count.CREATE" class="cu-tag badge">{{count.CREATE}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>临时用电</view>
<view>申请</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=气体检测">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-zl-8.png" mode=""></image>
<view v-if="count.ANALYZE" class="cu-tag badge">{{count.ANALYZE}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>气体分析</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=设置安全措施确认人">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-yh-1.png" mode=""></image>
<view v-if="count.MEASURES_SET" class="cu-tag badge">{{count.MEASURES_SET}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>设置安全</view>
<view>措施确认人</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=安全措施确认">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-yh-1.png" mode=""></image>
<view v-if="count.MEASURES_CONFIRM" class="cu-tag badge">{{count.MEASURES_CONFIRM}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>安全措施确认</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=监护人签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-zl-9.png" mode=""></image>
<view v-if="count.GUARDIAN" class="cu-tag badge">{{count.GUARDIAN}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>监护人</view>
<view>意见</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=安全交底人签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-807.png" mode=""></image>
<view v-if="count.CONFESS" class="cu-tag badge">{{count.CONFESS}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>安全交底人</view>
<view>意见</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=接受安全交底人签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-yxkj-4.png" mode=""></image>
<view v-if="count.ACCEPT_CONFESS" class="cu-tag badge">{{count.ACCEPT_CONFESS}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>接受安全交底人</view>
<view>意见</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=作业人签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-yxkj-2.png" mode=""></image>
<view v-if="count.WORK_USER" class="cu-tag badge">{{count.WORK_USER}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>作业人</view>
<view>意见</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=作业负责人签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-yxkj-2.png" mode=""></image>
<view v-if="count.CONFIRM" class="cu-tag badge">{{count.CONFIRM}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>作业负责人</view>
<view>意见</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=所在单位签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-907.png" mode=""></image>
<view v-if="count.LEADER" class="cu-tag badge">{{count.LEADER}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>所在单位</view>
<view>意见</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=开始进行作业">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-aq-1.png" mode=""></image>
<view v-if="count.WORK_START" class="cu-tag badge">{{count.WORK_START}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>开始进行作业时间</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=结束作业">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-js-1.png" mode=""></image>
<view v-if="count.WORK_END" class="cu-tag badge">{{count.WORK_END}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>结束作业时间</view>
</view>
</navigator>
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/electricity-list/index?flow=验收签字">
<view class="imgs action">
<image src="../../../static/icon-apps/icon-js-1.png" mode=""></image>
<view v-if="count.ACCEPT" class="cu-tag badge">{{count.ACCEPT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>验收归档</view>
</view>
</navigator>
</view>
</view>
<view class="cu-tabbar-height"></view>
</view>
</view>
</template>
<script>
import {
basePath,
loginUserId,
formatDate,
corpinfoId,
loginUser,
setloginUserId,
setCorpinfoId,
setloginUser,
setDeptId,
isRest
} from '@/common/tool.js';
export default {
data() {
return {
isRest :'',
count : {}
};
},
mounted(){
this.isRest = isRest;
},
onShow() {
this.getData();
},
methods: {
showRest(){
uni.showModal({
title: '提示',
showCancel:false,
content: '您处于离岗状态,无需检查清单。',
confirmText: "返回", //
success: (res) => {
}
})
},
getData(){
var _this = this;
uni.showLoading({
title:"加载中..."
});//
uni.request({
url: basePath +'/app/electricity/checkWorkCount',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
uni.hideLoading();//
if ("success" == res.data.result) {
_this.count = res.data.count;
}
}
})
},
}
}
</script>
<style>
.app-banner{
width: 100%;
height: 380upx;
}
.app-banner image{
width: 100%;
height: 100%;
}
.apps-box {}
.apps-row {
padding: 20upx 20upx 10upx 20upx;
background-color: #fff;
margin-top: 20upx;
}
.apps-row:first-child{
margin-top: 0;
}
.apps-title {
position: relative;
padding-left: 20upx;
color: #989898;
padding-bottom: 20upx;
}
.apps-title-line {
display: inline-block;
background-color: #37a6ff;
width: 10upx;
height: 23upx;
position: absolute;
left: 0upx;
top: 11upx;
}
.apps-warp {
display: flex;
flex-wrap: wrap;
}
.apps-item {
display: flex;
flex-direction: column;
align-items: center;
width: 25%;
font-size: 25upx;
margin-bottom: 20upx;
}
.apps-item .text-semi{
margin-top: 6upx;
}
.apps-item .action{
position: relative;
}
.apps-item .action .cu-tag.badge{
right: -20upx;
}
.apps-item .imgs {
width: 50upx;
height: 50upx;
}
.apps-item .imgs image {
width: 100%;
height: 100%;
}
</style>