oplsChange
This commit is contained in:
parent
d0826deb65
commit
5231ed2349
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "曲阳金隅EHS",
|
||||
"appid" : "__UNI__B00D419",
|
||||
"description" : "曲阳金隅EHS",
|
||||
"versionName" : "1.01.00",
|
||||
"versionCode" : 10100,
|
||||
"versionName" : "1.01.01",
|
||||
"versionCode" : 10101,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -323,6 +323,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/opls/space",
|
||||
"style": {
|
||||
"navigationBarTitleText": "有限空间作业许可证",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/visit/vpeopleList",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="ticket-handle">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="加签"
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" :leftText="leftText"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="ticket-info">
|
||||
<view class="form-item border-bottom" v-if="ticketType === 'add'">
|
||||
|
|
@ -8,9 +8,13 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">加签给</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="toadd_user" :localdata="range" label="加签给">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<!-- <uni-data-select v-model="toadd_user" :localdata="range" label="加签给">
|
||||
</uni-data-select> -->
|
||||
<ba-tree-picker ref="to_Picker" :multiple='false' @select-change="select_Change" title="加签给"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{toadd_user_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom" v-else>
|
||||
|
|
@ -18,9 +22,13 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">转交给</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="target_user" :localdata="range" label="转交给">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<!-- <uni-data-select v-model="target_user" :localdata="range" label="转交给">
|
||||
</uni-data-select> -->
|
||||
<ba-tree-picker ref="target_Picker" :multiple='false' @select-change="select_target_Change" title="转交给"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{target_user_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showTargetPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" style="height: 300rpx;">
|
||||
|
|
@ -39,34 +47,59 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
|
||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||
export default {
|
||||
name: "addNode",
|
||||
components: {
|
||||
baTreePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ticketId: "",
|
||||
ticketType: "",
|
||||
labelText: '加签原因',
|
||||
leftText:'加签',
|
||||
form:{
|
||||
suggestion:'',
|
||||
toadd_user:'',
|
||||
target_user:''
|
||||
},
|
||||
toadd_user:'',
|
||||
target_user:'',
|
||||
target_user_name:'转交给',
|
||||
toadd_user_name:'加签给'
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
// debugger;
|
||||
debugger;
|
||||
console.log(params)
|
||||
this.ticketId = params.ticketId;
|
||||
this.ticketType = params.type;
|
||||
},
|
||||
onShow() {
|
||||
if (this.ticketType === 'add') {
|
||||
this.labelText = '加签原因'
|
||||
this.labelText = '加签原因';
|
||||
this.leftText = '加签';
|
||||
} else {
|
||||
this.leftText = '转交';
|
||||
this.labelText = '转交原因'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPicker() {
|
||||
this.$refs.to_Picker._show();
|
||||
},
|
||||
select_Change(ids, names){
|
||||
this.formData.toadd_user = ids[0];
|
||||
this.toadd_user_name = names;
|
||||
},
|
||||
showTargetPicker() {
|
||||
this.$refs.target_Picker._show();
|
||||
},
|
||||
select_target_Change(ids, names){
|
||||
this.formData.target_user = ids[0];
|
||||
this.target_user_name = names;
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
|
|
@ -74,12 +107,11 @@
|
|||
},
|
||||
handleClick(){
|
||||
if (this.ticketType === 'add') {
|
||||
this.form.toadd_user = this.toadd_user;
|
||||
this.$u.api.getTicketItem(this.form).then((res) => {
|
||||
this.ticketDetail = res;
|
||||
});
|
||||
} else {
|
||||
this.form.target_user = this.target_user;
|
||||
// this.form.target_user = this.target_user;
|
||||
this.$u.api.getTicketItem(this.form).then((res) => {
|
||||
this.ticketDetail = res;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -671,12 +671,17 @@
|
|||
|
||||
//加签
|
||||
addNode() {
|
||||
const params = `?ticketId=${this.ticketId}&type='add'`;
|
||||
const params = `?ticketId=${this.ticketId}&type=add`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/addNode' + params,
|
||||
})
|
||||
},
|
||||
deliverNode(){
|
||||
let params = `?ticketId=${this.ticketId}&type=deliver`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/addNode' + params,
|
||||
})
|
||||
},
|
||||
|
||||
operationSubmit(id) {
|
||||
let params = new Object();
|
||||
params.transition = id;
|
||||
|
|
|
|||
|
|
@ -438,9 +438,46 @@
|
|||
arr.push(obj)
|
||||
})
|
||||
let userRange0 = that.resetData(arr);
|
||||
let useArr = userRange0[0].children;
|
||||
var useArr = userRange0[0].children;
|
||||
|
||||
for (let i=0;i<useArr.length;i++){
|
||||
let requestList = []
|
||||
requestList.push(that.$u.api.userList({page: 0,belong_dept:useArr[i].id}))
|
||||
Promise.all(requestList).then(res=>{
|
||||
res.forEach(item=>{
|
||||
item.forEach(item0=>{
|
||||
useArr[i].children.push(item0);
|
||||
if(useArr[i].children.length>0){
|
||||
let childrenArr = useArr[i].children;
|
||||
for(let j = 0;j<childrenArr.length;j++){
|
||||
let requestList2= []
|
||||
if(childrenArr[j].children){
|
||||
requestList2.push(that.$u.api.userList({page: 0,belong_dept:childrenArr[j].id}))
|
||||
Promise.all(requestList2).then(res2=>{
|
||||
res2.forEach(item=>{
|
||||
item.forEach(item1=>{
|
||||
useArr[i].children[j].children.push(item1);
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
that.$u.vuex('vuex_userRange', useArr)
|
||||
})
|
||||
},
|
||||
getUser1(id) {
|
||||
that.$u.api.userList({page: 0,belong_dept:id}).then(res0 => {
|
||||
res0.forEach(item0=>{
|
||||
useArr[i].children.push(item0);
|
||||
that.$u.vuex('vuex_userRange', useArr);
|
||||
if(useArr[i].children.length>0){
|
||||
let childrenArr = useArr[i].children;
|
||||
for(let j = 0;j<childrenArr.length;j++){
|
||||
|
|
@ -455,18 +492,7 @@
|
|||
|
||||
}
|
||||
}
|
||||
that.$u.api.userList({page: 0,belong_dept:useArr[i].id}).then(res0 => {
|
||||
res0.forEach(item0=>{
|
||||
useArr[i].children.push(item0);
|
||||
that.$u.vuex('vuex_userRange', useArr)
|
||||
})
|
||||
})
|
||||
}
|
||||
setTimeout(function(){
|
||||
// debugger;
|
||||
console.log(useArr);
|
||||
that.$u.vuex('vuex_userRange', useArr)
|
||||
},3000)
|
||||
})
|
||||
})
|
||||
},
|
||||
resetData(params) {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
debugger;
|
||||
// debugger;
|
||||
console.log(params)
|
||||
this.operationId = params.operationId;
|
||||
},
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
this.$u.api.oplCate({
|
||||
page: 0
|
||||
}).then(res => {
|
||||
debugger;
|
||||
// debugger;
|
||||
console.log(res)
|
||||
this.oplCateList = res;
|
||||
})
|
||||
|
|
@ -90,13 +90,13 @@
|
|||
this.$u.api.oplLists({
|
||||
operation: this.operationId
|
||||
}).then(res => {
|
||||
debugger;
|
||||
// debugger;
|
||||
console.log(res)
|
||||
this.oplList = res.results;
|
||||
})
|
||||
},
|
||||
addCate(row,type) {
|
||||
debugger;
|
||||
// debugger;
|
||||
let params=null,oplCateCode = null;
|
||||
if(type==='edit'){
|
||||
oplCateCode = row.cate_code;
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@
|
|||
</view>
|
||||
<view class="form-info">
|
||||
<view class="form-item " style="height: fit-content;">
|
||||
<!-- <view class="title">照片</view> -->
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">照片</text>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<text class="form-left-text">许可证类型</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view>动火</view>
|
||||
<view>篦冷机清大块</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -201,9 +201,9 @@
|
|||
text: "二级动火"
|
||||
},
|
||||
],
|
||||
dept_do_name:'',
|
||||
charger_name:'',
|
||||
monitor_name:'',
|
||||
dept_do_name:'请选择作业部门',
|
||||
charger_name:'请选择作业负责人',
|
||||
monitor_name:'请选择作业监护人',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -257,6 +257,9 @@
|
|||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -275,6 +278,15 @@
|
|||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
|
|
@ -407,7 +419,16 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -66,8 +66,11 @@
|
|||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="deptDoPicker" :multiple='false' @select-change="deptDoChange" title="选择作业部门"
|
||||
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children"/>
|
||||
<text type="text">{{dept_do_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
|
||||
<view @click="showDeptDoPicker" style="position: relative;display: flex;">
|
||||
<text type="text" @click="showDeptDoPicker">{{dept_do_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -79,7 +82,7 @@
|
|||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{charger_name}}</text>
|
||||
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -91,7 +94,7 @@
|
|||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{monitor_name}}</text>
|
||||
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -268,6 +271,9 @@
|
|||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -286,6 +292,15 @@
|
|||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
|
|
@ -418,7 +433,16 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<text class="form-left-text">许可证类型</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view>动火</view>
|
||||
<view>高处</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -63,21 +63,24 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
|
||||
v-model="formData.dept_do">
|
||||
</uni-data-picker>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="deptDoPicker" :multiple='false' @select-change="deptDoChange" title="选择作业部门"
|
||||
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children"/>
|
||||
<text type="text">{{dept_do_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业负责人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.charger" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{charger_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
|
|
@ -85,9 +88,11 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业监护人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.monitor" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{monitor_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom" style="height: fit-content;">
|
||||
|
|
@ -157,8 +162,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
|
||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||
import resetData from '../../../utils/common.js';
|
||||
export default {
|
||||
name: "fire",
|
||||
name: "high",
|
||||
components: {
|
||||
baTreePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
|
|
@ -204,6 +215,9 @@
|
|||
text: "一级:1.8-5米"
|
||||
},
|
||||
],
|
||||
dept_do_name:'',
|
||||
charger_name:'',
|
||||
monitor_name:'',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -215,6 +229,7 @@
|
|||
if (params.oplId) {
|
||||
this.oplId = params.oplId;
|
||||
this.formData.id = params.oplId;
|
||||
this.getOplDetail();
|
||||
}else{
|
||||
console.log('s', this.vuex_user.belong_dept)
|
||||
this.formData.dept_do = this.vuex_user.belong_dept
|
||||
|
|
@ -232,11 +247,35 @@
|
|||
this.getHeader();
|
||||
},
|
||||
methods: {
|
||||
showDeptDoPicker() {
|
||||
this.$refs.deptDoPicker._show();
|
||||
},
|
||||
showChargerPicker() {
|
||||
this.$refs.charger_Picker._show();
|
||||
},
|
||||
showMonitorPicker() {
|
||||
this.$refs.monitor_Picker._show();
|
||||
},
|
||||
deptDoChange(ids, names) {
|
||||
this.formData.dept_do = ids[0];
|
||||
this.dept_do_name = names;
|
||||
},
|
||||
select_charger_Change(ids, names) {
|
||||
this.formData.charger = ids[0];
|
||||
this.charger_name = names;
|
||||
},
|
||||
select_monitor_Change(ids, names) {
|
||||
this.formData.monitor = ids[0];
|
||||
this.monitor_name = names;
|
||||
},
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -247,14 +286,27 @@
|
|||
console.log(res);
|
||||
});
|
||||
},
|
||||
// getOplDetail(){
|
||||
// let that = this;
|
||||
// that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
// that.formData = res; //作业开始时间
|
||||
// debugger;
|
||||
// console.log(res);
|
||||
// });
|
||||
// },
|
||||
getOplDetail(){
|
||||
let that = this;
|
||||
that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
that.formData = res; //作业开始时间
|
||||
that.operationName = res.operation_.name;
|
||||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
},
|
||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
getOplcates() {
|
||||
let that = this;
|
||||
|
|
@ -416,7 +468,16 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<text class="form-left-text">许可证类型</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view>动火</view>
|
||||
<view>吊装</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -268,6 +268,9 @@
|
|||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -286,6 +289,15 @@
|
|||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
|
|
@ -418,7 +430,16 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<text class="form-left-text">许可证类型</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view>动火</view>
|
||||
<view>预热器清堵</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -201,9 +201,9 @@
|
|||
text: "二级动火"
|
||||
},
|
||||
],
|
||||
dept_do_name:'',
|
||||
charger_name:'',
|
||||
monitor_name:'',
|
||||
dept_do_name:'请选择作业部门',
|
||||
charger_name:'请选择作业负责人',
|
||||
monitor_name:'请选择作业监护人',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -257,6 +257,9 @@
|
|||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -275,6 +278,15 @@
|
|||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
|
|
@ -407,7 +419,16 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -63,21 +63,24 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
|
||||
v-model="formData.dept_do">
|
||||
</uni-data-picker>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="deptDoPicker" :multiple='false' @select-change="deptDoChange" title="选择作业部门"
|
||||
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children"/>
|
||||
<text type="text">{{dept_do_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业负责人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.charger" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{charger_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
|
|
@ -85,9 +88,11 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业监护人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.monitor" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{monitor_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom" style="height: fit-content;">
|
||||
|
|
@ -157,8 +162,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
|
||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||
import resetData from '../../../utils/common.js';
|
||||
export default {
|
||||
name: "fire",
|
||||
components: {
|
||||
baTreePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
|
|
@ -196,6 +207,9 @@
|
|||
text: "次干道"
|
||||
},
|
||||
],
|
||||
dept_do_name:'',
|
||||
charger_name:'',
|
||||
monitor_name:'',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -207,6 +221,7 @@
|
|||
if (params.oplId) {
|
||||
this.oplId = params.oplId;
|
||||
this.formData.id = params.oplId;
|
||||
this.getOplDetail();
|
||||
}else{
|
||||
console.log('s', this.vuex_user.belong_dept)
|
||||
this.formData.dept_do = this.vuex_user.belong_dept
|
||||
|
|
@ -215,7 +230,7 @@
|
|||
this.formData.operation = this.operationId;
|
||||
},
|
||||
onShow() {
|
||||
debugger;
|
||||
// debugger;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
this.getdept();
|
||||
|
|
@ -224,11 +239,36 @@
|
|||
this.getHeader();
|
||||
},
|
||||
methods: {
|
||||
showDeptDoPicker() {
|
||||
this.$refs.deptDoPicker._show();
|
||||
},
|
||||
showChargerPicker() {
|
||||
this.$refs.charger_Picker._show();
|
||||
},
|
||||
showMonitorPicker() {
|
||||
this.$refs.monitor_Picker._show();
|
||||
},
|
||||
deptDoChange(ids, names) {
|
||||
this.formData.dept_do = ids[0];
|
||||
this.dept_do_name = names;
|
||||
},
|
||||
select_charger_Change(ids, names) {
|
||||
this.formData.charger = ids[0];
|
||||
this.charger_name = names;
|
||||
},
|
||||
select_monitor_Change(ids, names) {
|
||||
this.formData.monitor = ids[0];
|
||||
this.monitor_name = names;
|
||||
},
|
||||
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -239,14 +279,27 @@
|
|||
console.log(res);
|
||||
});
|
||||
},
|
||||
// getOplDetail(){
|
||||
// let that = this;
|
||||
// that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
// that.formData = res; //作业开始时间
|
||||
// debugger;
|
||||
// console.log(res);
|
||||
// });
|
||||
// },
|
||||
getOplDetail(){
|
||||
let that = this;
|
||||
that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
that.formData = res; //作业开始时间
|
||||
that.operationName = res.operation_.name;
|
||||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
},
|
||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
getOplcates() {
|
||||
let that = this;
|
||||
|
|
@ -408,7 +461,16 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -63,21 +63,24 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
|
||||
v-model="formData.dept_do">
|
||||
</uni-data-picker>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="deptDoPicker" :multiple='false' @select-change="deptDoChange" title="选择作业部门"
|
||||
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children"/>
|
||||
<text type="text">{{dept_do_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业负责人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.charger" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{charger_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
|
|
@ -85,12 +88,13 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业监护人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.monitor" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{monitor_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom" style="height: fit-content;">
|
||||
</view><view class="form-item border-bottom" style="height: fit-content;">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">风险选择</text>
|
||||
|
|
@ -157,8 +161,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
|
||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||
import resetData from '../../../utils/common.js';
|
||||
export default {
|
||||
name: "fire",
|
||||
name: "space",
|
||||
components: {
|
||||
baTreePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
|
|
@ -200,6 +210,9 @@
|
|||
text: "二级"
|
||||
},
|
||||
],
|
||||
dept_do_name:'',
|
||||
charger_name:'',
|
||||
monitor_name:'',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -211,6 +224,7 @@
|
|||
if (params.oplId) {
|
||||
this.oplId = params.oplId;
|
||||
this.formData.id = params.oplId;
|
||||
this.getOplDetail()
|
||||
}else{
|
||||
console.log('s', this.vuex_user.belong_dept)
|
||||
this.formData.dept_do = this.vuex_user.belong_dept
|
||||
|
|
@ -219,7 +233,7 @@
|
|||
this.formData.operation = this.operationId;
|
||||
},
|
||||
onShow() {
|
||||
debugger;
|
||||
// debugger;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
this.getdept();
|
||||
|
|
@ -228,11 +242,35 @@
|
|||
this.getHeader();
|
||||
},
|
||||
methods: {
|
||||
showDeptDoPicker() {
|
||||
this.$refs.deptDoPicker._show();
|
||||
},
|
||||
showChargerPicker() {
|
||||
this.$refs.charger_Picker._show();
|
||||
},
|
||||
showMonitorPicker() {
|
||||
this.$refs.monitor_Picker._show();
|
||||
},
|
||||
deptDoChange(ids, names) {
|
||||
this.formData.dept_do = ids[0];
|
||||
this.dept_do_name = names;
|
||||
},
|
||||
select_charger_Change(ids, names) {
|
||||
this.formData.charger = ids[0];
|
||||
this.charger_name = names;
|
||||
},
|
||||
select_monitor_Change(ids, names) {
|
||||
this.formData.monitor = ids[0];
|
||||
this.monitor_name = names;
|
||||
},
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -243,14 +281,27 @@
|
|||
console.log(res);
|
||||
});
|
||||
},
|
||||
// getOplDetail(){
|
||||
// let that = this;
|
||||
// that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
// that.formData = res; //作业开始时间
|
||||
// debugger;
|
||||
// console.log(res);
|
||||
// });
|
||||
// },
|
||||
getOplDetail(){
|
||||
let that = this;
|
||||
that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
that.formData = res; //作业开始时间
|
||||
that.operationName = res.operation_.name;
|
||||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
},
|
||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
getOplcates() {
|
||||
let that = this;
|
||||
|
|
@ -412,7 +463,18 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.start_time = that.formData.start_time+':00';
|
||||
that.formData.end_time = that.formData.end_time+':00';
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<text class="form-left-text">许可证类型</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view>动火</view>
|
||||
<view>临时用电</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -53,21 +53,24 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
|
||||
v-model="formData.dept_do">
|
||||
</uni-data-picker>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="deptDoPicker" :multiple='false' @select-change="deptDoChange" title="选择作业部门"
|
||||
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children"/>
|
||||
<text type="text">{{dept_do_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业负责人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.charger" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{charger_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
|
|
@ -75,9 +78,11 @@
|
|||
<text class="star">*</text>
|
||||
<text class="form-left-text">作业监护人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.monitor" :localdata="userRange">
|
||||
</uni-data-select>
|
||||
<view class="form-right" style="position: relative;">
|
||||
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
|
||||
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
|
||||
<text type="text">{{monitor_name}}</text>
|
||||
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
|
|
@ -249,14 +254,24 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
|
||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||
import resetData from '../../../utils/common.js';
|
||||
export default {
|
||||
name: "fire",
|
||||
name: "usecl",
|
||||
components: {
|
||||
baTreePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
power_start_time:null,
|
||||
power_end_time:null,
|
||||
work_time:null,
|
||||
accept_time:null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
level: '',
|
||||
|
|
@ -301,7 +316,10 @@
|
|||
value: "拆除",
|
||||
text: "拆除"
|
||||
}
|
||||
]
|
||||
],
|
||||
dept_do_name:'',
|
||||
charger_name:'',
|
||||
monitor_name:'',
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
|
|
@ -313,6 +331,7 @@
|
|||
if (params.oplId) {
|
||||
this.oplId = params.oplId;
|
||||
this.formData.id = params.oplId;
|
||||
this.getOplDetail();
|
||||
}else{
|
||||
console.log('s', this.vuex_user.belong_dept)
|
||||
this.formData.dept_do = this.vuex_user.belong_dept
|
||||
|
|
@ -330,11 +349,35 @@
|
|||
this.getHeader();
|
||||
},
|
||||
methods: {
|
||||
showDeptDoPicker() {
|
||||
this.$refs.deptDoPicker._show();
|
||||
},
|
||||
showChargerPicker() {
|
||||
this.$refs.charger_Picker._show();
|
||||
},
|
||||
showMonitorPicker() {
|
||||
this.$refs.monitor_Picker._show();
|
||||
},
|
||||
deptDoChange(ids, names) {
|
||||
this.formData.dept_do = ids[0];
|
||||
this.dept_do_name = names;
|
||||
},
|
||||
select_charger_Change(ids, names) {
|
||||
this.formData.charger = ids[0];
|
||||
this.charger_name = names;
|
||||
},
|
||||
select_monitor_Change(ids, names) {
|
||||
this.formData.monitor = ids[0];
|
||||
this.monitor_name = names;
|
||||
},
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
imgUpSuccess(data,index,lists){
|
||||
this.fileList=lists;
|
||||
},
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
let that = this;
|
||||
|
|
@ -345,14 +388,27 @@
|
|||
console.log(res);
|
||||
});
|
||||
},
|
||||
// getOplDetail(){
|
||||
// let that = this;
|
||||
// that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
// that.formData = res; //作业开始时间
|
||||
// debugger;
|
||||
// console.log(res);
|
||||
// });
|
||||
// },
|
||||
getOplDetail(){
|
||||
let that = this;
|
||||
that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
that.formData = res; //作业开始时间
|
||||
that.operationName = res.operation_.name;
|
||||
that.dept_do_name = res.dept_do_.name;
|
||||
that.charger_name = res.charger_.name;
|
||||
that.monitor_name = res.monitor_.name;
|
||||
res.create_imgs_.forEach(item=>{
|
||||
that.fileList.push({
|
||||
url: that.vuex_host+item.path,
|
||||
progress: 0,
|
||||
id:item.id,
|
||||
error: false,
|
||||
file: item
|
||||
})
|
||||
})
|
||||
this.getOplcates()
|
||||
});
|
||||
|
||||
},
|
||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||
getOplcates() {
|
||||
let that = this;
|
||||
|
|
@ -514,7 +570,21 @@
|
|||
});
|
||||
let that = this;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
that.formData.start_time = that.formData.start_time;
|
||||
that.formData.end_time = that.formData.end_time+':00';
|
||||
that.formData.power_start_time = that.formData.power_start_time+':00';
|
||||
that.formData.power_end_time = that.formData.power_end_time+':00';
|
||||
that.formData.work_time = that.formData.work_time+':00';
|
||||
that.formData.create_imgs = [];
|
||||
that.fileList.forEach(item=>{
|
||||
if(item.id){
|
||||
console.log(item.id);
|
||||
that.formData.create_imgs.push(item.id)
|
||||
}else{
|
||||
console.log(item.response.id)
|
||||
that.formData.create_imgs.push(item.response.id)
|
||||
}
|
||||
})
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
|
|
@ -332,15 +332,13 @@
|
|||
}
|
||||
|
||||
.dialogCont {
|
||||
width: 80vw;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin: auto;
|
||||
background-color: #ffffff;
|
||||
left: 10vw;
|
||||
transform: translateY(-50%);
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
background-color: #ffffff;
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
padding: 130rpx 20rpx;
|
||||
}
|
||||
|
||||
.dialogTitle {
|
||||
|
|
@ -354,6 +352,7 @@
|
|||
.uni-form-item {
|
||||
height: 160rpx;
|
||||
display: flex;
|
||||
margin: 16rpx;
|
||||
}
|
||||
|
||||
.uni-form-item>.title {
|
||||
|
|
|
|||
|
|
@ -68,24 +68,27 @@
|
|||
<view class="item item_bottom_border" style="height: fit-content;">
|
||||
<view class="title">健康码</view>
|
||||
<view style="flex: 3;">
|
||||
<imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataHealth" :list="healthFileList"></imgUpload>
|
||||
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" max-count="1" @on-success="imgUpdataHealth"></u-upload>
|
||||
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataHealth" :list="healthFileList"></imgUpload> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border" style="height: fit-content;">
|
||||
<view class="title">行程码</view>
|
||||
<view style="flex: 3;">
|
||||
<imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataTravel" :list="travelFileList"></imgUpload>
|
||||
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" max-count="1" @on-success="imgUpdataTravel"></u-upload>
|
||||
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataTravel" :list="travelFileList"></imgUpload> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border" style="height: fit-content;">
|
||||
<view class="title">核酸报告</view>
|
||||
<view style="flex: 3;">
|
||||
<imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataReport" :list="reportFileList"></imgUpload>
|
||||
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" max-count="1" @on-success="imgUpdataReport"></u-upload>
|
||||
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataReport" :list="reportFileList"></imgUpload> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="default" class="save-btn" @click="formSubmit">保存</button>
|
||||
<button type="default" class="save-btn" @click="formSubmit">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -154,16 +157,17 @@
|
|||
}
|
||||
},
|
||||
imgUpdataHealth(data){
|
||||
// debugger;
|
||||
console.log(data)
|
||||
this.formData.health_code = data[0];
|
||||
this.formData.health_code = data.path;
|
||||
},
|
||||
imgUpdataTravel(data){
|
||||
this.formData.travel_code = data[0];
|
||||
this.formData.travel_code = data.path;
|
||||
},
|
||||
imgUpdataReport(data){
|
||||
this.formData.test_report = data[0];
|
||||
this.formData.test_report = data.path;
|
||||
},
|
||||
/* imgUpdataReport(data){
|
||||
this.formData.test_report = data[0];
|
||||
}, */
|
||||
//获取所有已注册游客
|
||||
getUserRange() {
|
||||
let that = this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue