受限空间和高处作业,动火作业验收视频
parent
8a5a4b29f5
commit
ae27ff75bc
|
@ -21,6 +21,28 @@
|
|||
></ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
验收视频
|
||||
</view>
|
||||
<view class="action">
|
||||
{{videoList.length}}/1
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in videoList" :key="vindex" style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="videoList[vindex].filePath"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelVideo" data-type="0" :data-index="vindex">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap.stop="openAuthVideo('CAMERA')" v-if="videoList.length == 0">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign">
|
||||
<view class="title">验收部门负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">新增手写签字</button>
|
||||
|
@ -51,6 +73,7 @@
|
|||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
<yk-authpup ref="authpup_video" type="top" @changeAuth="chooseVideo(0)" :permissionID="permissionID"></yk-authpup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -69,6 +92,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
|
@ -83,6 +107,7 @@
|
|||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
videoList:[]
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
|
@ -101,7 +126,6 @@
|
|||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
|
@ -190,6 +214,23 @@
|
|||
});
|
||||
return;
|
||||
}
|
||||
if(!_this.videoList){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请上传验收视频',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
var fileList = [];
|
||||
for (var i = 0; i < _this.videoList.length; i++) {
|
||||
if(!_this.videoList[i].id){
|
||||
var file = {};
|
||||
file.type = 3;
|
||||
file.filePath = _this.videoList[i].filePath;
|
||||
fileList.push(file);
|
||||
}
|
||||
}
|
||||
|
||||
const formData={}
|
||||
|
@ -202,6 +243,9 @@
|
|||
formData.DESCR = _this.pd.DESCR
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.VIDEO_PATH = this.videoList.map(item => {
|
||||
return item.filePath
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/confinedspace/nextStep',
|
||||
files: files,
|
||||
|
@ -223,7 +267,88 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
uploadImg(file){
|
||||
return new Promise((resolve, reject) => {
|
||||
var _this = this;
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/imgfiles/add',
|
||||
filePath: file.filePath,
|
||||
name: 'FFILE',
|
||||
formData: {
|
||||
'TYPE': file.type,
|
||||
'FOREIGN_KEY': _this.pd.HOTWORK_ID,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
resolve();
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseVideo(e) {
|
||||
var _this = this;
|
||||
uni.chooseVideo({
|
||||
maxDuration: 60,
|
||||
count: 1, //默认9
|
||||
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
if(res.tempFilePath.substring(res.tempFilePath.lastIndexOf(".") + 1, res.tempFilePath.length) === 'mp4'){
|
||||
uni.uploadFile({
|
||||
url: basePath + '/app/eightwork/saveFile',
|
||||
filePath: res.tempFilePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: ({data}) => {
|
||||
let img = {};
|
||||
img.filePath = JSON.parse(data).FILE_PATH;
|
||||
this.videoList.push(img)
|
||||
}
|
||||
});
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "只能上传MP4格式",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
DelVideo(e){
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这个视频吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.videoList = []
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openAuthVideo(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup_video'].open();
|
||||
},200)
|
||||
},
|
||||
playVideo(e) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
this.modalShow = true
|
||||
},
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map(item => {
|
||||
var img = {}
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
<view>吊装作业</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator v-show="premission.electricity" class="apps-item" hover-class="none" url="/pages/application/electricity/home">
|
||||
<!-- v-show="premission.electricity"-->
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/electricity/home">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-805.png" mode=""></image>
|
||||
<view v-if="eight_work_count.ELECTRICITY_COUNT" class="cu-tag badge">{{eight_work_count.ELECTRICITY_COUNT}}</view>
|
||||
|
@ -143,6 +144,7 @@
|
|||
},
|
||||
onShow() {
|
||||
this.premission = Object.assign({}, premission)
|
||||
console.log(this.premission)
|
||||
this.eight_work_count = {}
|
||||
this.getRedPoint();
|
||||
},
|
||||
|
|
|
@ -21,6 +21,28 @@
|
|||
></ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
验收视频
|
||||
</view>
|
||||
<view class="action">
|
||||
{{videoList.length}}/1
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in videoList" :key="vindex" style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="videoList[vindex].filePath"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelVideo" data-type="0" :data-index="vindex">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap.stop="openAuthVideo('CAMERA')" v-if="videoList.length == 0">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign">
|
||||
<view class="title">验收部门负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">新增手写签字</button>
|
||||
|
@ -51,6 +73,7 @@
|
|||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
<yk-authpup ref="authpup_video" type="top" @changeAuth="chooseVideo(0)" :permissionID="permissionID"></yk-authpup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -69,6 +92,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
|
@ -83,6 +107,7 @@
|
|||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
videoList:[]
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
|
@ -101,7 +126,6 @@
|
|||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
|
@ -190,8 +214,24 @@
|
|||
});
|
||||
return;
|
||||
}
|
||||
if(!_this.videoList){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请上传验收视频',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
var fileList = [];
|
||||
for (var i = 0; i < _this.videoList.length; i++) {
|
||||
if(!_this.videoList[i].id){
|
||||
var file = {};
|
||||
file.type = 3;
|
||||
file.filePath = _this.videoList[i].filePath;
|
||||
fileList.push(file);
|
||||
}
|
||||
}
|
||||
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
|
@ -202,6 +242,9 @@
|
|||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.VIDEO_PATH = this.videoList.map(item => {
|
||||
return item.filePath
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/highwork/nextStep',
|
||||
files: files,
|
||||
|
@ -223,7 +266,88 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
uploadImg(file){
|
||||
return new Promise((resolve, reject) => {
|
||||
var _this = this;
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/imgfiles/add',
|
||||
filePath: file.filePath,
|
||||
name: 'FFILE',
|
||||
formData: {
|
||||
'TYPE': file.type,
|
||||
'FOREIGN_KEY': _this.pd.HOTWORK_ID,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
resolve();
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseVideo(e) {
|
||||
var _this = this;
|
||||
uni.chooseVideo({
|
||||
maxDuration: 60,
|
||||
count: 1, //默认9
|
||||
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
if(res.tempFilePath.substring(res.tempFilePath.lastIndexOf(".") + 1, res.tempFilePath.length) === 'mp4'){
|
||||
uni.uploadFile({
|
||||
url: basePath + '/app/eightwork/saveFile',
|
||||
filePath: res.tempFilePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: ({data}) => {
|
||||
let img = {};
|
||||
img.filePath = JSON.parse(data).FILE_PATH;
|
||||
this.videoList.push(img)
|
||||
}
|
||||
});
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "只能上传MP4格式",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
DelVideo(e){
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这个视频吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.videoList = []
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openAuthVideo(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup_video'].open();
|
||||
},200)
|
||||
},
|
||||
playVideo(e) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
this.modalShow = true
|
||||
},
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map(item => {
|
||||
var img = {}
|
||||
|
|
|
@ -21,6 +21,28 @@
|
|||
></ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
验收视频
|
||||
</view>
|
||||
<view class="action">
|
||||
{{videoList.length}}/1
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in videoList" :key="vindex" style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="videoList[vindex].filePath"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelVideo" data-type="0" :data-index="vindex">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap.stop="openAuthVideo('CAMERA')" v-if="videoList.length == 0">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-sign">
|
||||
<view class="title">验收部门负责人</view>
|
||||
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">新增手写签字</button>
|
||||
|
@ -51,6 +73,8 @@
|
|||
<view class="padding flex flex-direction">
|
||||
</view>
|
||||
</scroll-view>
|
||||
<yk-authpup ref="authpup_video" type="top" @changeAuth="chooseVideo(0)" :permissionID="permissionID"></yk-authpup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -69,6 +93,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
baseImgPath:baseImgPath,
|
||||
buttonloading: false,
|
||||
isUps:false,
|
||||
|
@ -83,6 +108,7 @@
|
|||
todayDate:'',
|
||||
modalName:null,
|
||||
imgList:[],
|
||||
videoList:[]
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
|
@ -101,7 +127,6 @@
|
|||
}
|
||||
// 初始化现场作业负责人
|
||||
this.getDept();
|
||||
this.getLimitSpace();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
|
@ -173,6 +198,7 @@
|
|||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(APPLY_STATUS == 1){
|
||||
if(new Date(this.pd.ACCEPT_TIME).getTime() - new Date(this.pd.WORK_END_DATE).getTime() >= 3600000){
|
||||
uni.showToast({
|
||||
|
@ -190,8 +216,25 @@
|
|||
});
|
||||
return;
|
||||
}
|
||||
if(!_this.videoList){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请上传验收视频',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var fileList = [];
|
||||
for (var i = 0; i < _this.videoList.length; i++) {
|
||||
if(!_this.videoList[i].id){
|
||||
var file = {};
|
||||
file.type = 3;
|
||||
file.filePath = _this.videoList[i].filePath;
|
||||
fileList.push(file);
|
||||
}
|
||||
}
|
||||
const formData={}
|
||||
var files = [];
|
||||
var signtime = [];
|
||||
|
@ -202,6 +245,10 @@
|
|||
formData.DESCR = _this.pd.DESCR?_this.pd.DESCR:"无"
|
||||
formData.USER_ID = loginUser.USER_ID
|
||||
formData.APPLY_STATUS = APPLY_STATUS
|
||||
formData.VIDEO_PATH = this.videoList.map(item => {
|
||||
return item.filePath
|
||||
})
|
||||
console.log(formData.VIDEO_PATH)
|
||||
uni.uploadFile({
|
||||
url: basePath+'app/hotwork/nextStep',
|
||||
files: files,
|
||||
|
@ -224,6 +271,88 @@
|
|||
})
|
||||
},
|
||||
|
||||
uploadImg(file){
|
||||
return new Promise((resolve, reject) => {
|
||||
var _this = this;
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/imgfiles/add',
|
||||
filePath: file.filePath,
|
||||
name: 'FFILE',
|
||||
formData: {
|
||||
'TYPE': file.type,
|
||||
'FOREIGN_KEY': _this.pd.HOTWORK_ID,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
resolve();
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseVideo(e) {
|
||||
var _this = this;
|
||||
uni.chooseVideo({
|
||||
maxDuration: 60,
|
||||
count: 1, //默认9
|
||||
// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
if(res.tempFilePath.substring(res.tempFilePath.lastIndexOf(".") + 1, res.tempFilePath.length) === 'mp4'){
|
||||
uni.uploadFile({
|
||||
url: basePath + '/app/eightwork/saveFile',
|
||||
filePath: res.tempFilePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
},
|
||||
success: ({data}) => {
|
||||
let img = {};
|
||||
img.filePath = JSON.parse(data).FILE_PATH;
|
||||
this.videoList.push(img)
|
||||
}
|
||||
});
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "只能上传MP4格式",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
DelVideo(e){
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '确定要删除这个视频吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.videoList = []
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openAuthVideo(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup_video'].open();
|
||||
},200)
|
||||
},
|
||||
playVideo(e) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
this.modalShow = true
|
||||
},
|
||||
uploadImgFaults(fileList,signtime) {
|
||||
this.imgList.map(item => {
|
||||
var img = {}
|
||||
|
|
|
@ -318,7 +318,7 @@
|
|||
<view class="wui-form-list" v-if="!forbidEdit">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">安全管理部门</view>
|
||||
<view v-if="pd.AUDIT_DEPARTMENT_NAME" class="cleared" @click="cancelSelect('audit')">
|
||||
<view v-if="pd.AUDIT_DEPARTMENT_NAME && pd.WORK_LEVEL == '二级'" class="cleared" @click="cancelSelect('audit')">
|
||||
清除
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
|
@ -1029,6 +1029,15 @@
|
|||
required = false
|
||||
}
|
||||
}
|
||||
|
||||
if(this.pd.SAFETY_USER_ID && !this.pd.AUDIT_USER_ID ){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请选择安全管理部门负责人',
|
||||
duration: 1500
|
||||
});
|
||||
required = false
|
||||
}
|
||||
if (!required) {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue