This commit is contained in:
wangweidong 2026-01-06 13:23:24 +08:00
parent 3c46e894bc
commit d7d79c7435
5 changed files with 442 additions and 24 deletions

View File

@ -2,8 +2,8 @@
<!-- <errorshow :show="openmessage" :font="errormessage" @close="openmessage=false" /> -->
<template>
<view>
<view class="addall" v-if="show">
<image class="addallimge" src="/static/error.png" mode="aspectFill"></image>
<view class="addall" v-if="show" :style="style">
<image class="addallimge" v-if="icons" src="/static/error.png" mode="aspectFill"></image>
<view class="addallfont">{{ font }}</view>
<view class="qd" @click="onClose">确定</view>
</view>
@ -21,6 +21,13 @@
font: {
type: String,
default: ''
},
icons:{
type: Boolean,
default: true
},
style:{
type:String
}
})

View File

@ -69,7 +69,7 @@
<view class="card-bottom">
<image class="bottom-img" src="/static/index/card/work.png" />
<view class="bottom-font">
行政
后勤
</view>
</view>
</view>
@ -117,7 +117,7 @@
</view>
</view>
<image class="big-img"
<image class="big-img" v-if="topbuttontarget==0"
:src="indexmessage?.previewFile? 'https://www.focusnu.com/media/upFiles/' + indexmessage?.previewFile: `/static/index/newindex/wendu/2.png`" mode="aspectFill"/>
<view style="display: flex;align-items: center;">
<view class="server-name" v-if="indexmessage?.startTime">
@ -138,16 +138,24 @@
</view>
</view>
<view class="left-menu" >
<view v-for="(item,index) in 3" :key="index" style="margin: 30rpx 0;">
<view class="left-ball" :style="indexmessage?.izStart=='Y'?'background-color: #fff;':'background-color:RGBA(228, 229, 231, 1);'">
<image class="left-menu-img" :src="'/static/index/newindex/leftmenu/left'+index+'.png'" />
<view class="left-menu" v-show="indexmessage?.startTime">
<view style="margin: 30rpx 0;" @click="errmsgclk(0,1)">
<view class="left-ball" :style="indexmessage?.serviceContent!=''?'background-color: #fff;':'background-color:RGBA(228, 229, 231, 1);'">
<image class="left-menu-img" :src="'/static/index/newindex/leftmenu/left'+0+'.png'" />
</view>
</view>
</view>
<view class="left-menu" v-if="indexmessage?.izStart=='Y'" >
<view v-for="(item,index) in [3,4]" :key="index" style="margin: 30rpx 0;">
<view class="left-ball">
<view style="margin: 30rpx 0;" @click="errmsgclk(1,1)">
<view class="left-ball" :style="indexmessage?.mp3File!=''?'background-color: #fff;':'background-color:RGBA(228, 229, 231, 1);'">
<image class="left-menu-img" :src="'/static/index/newindex/leftmenu/left'+1+'.png'" />
</view>
</view>
<view style="margin: 30rpx 0;" @click="errmsgclk(2,1)">
<view class="left-ball" :style="indexmessage?.mp4File!=''?'background-color: #fff;':'background-color:RGBA(228, 229, 231, 1);'">
<image class="left-menu-img" :src="'/static/index/newindex/leftmenu/left'+2+'.png'" />
</view>
</view>
<view v-for="(item,index) in [3,4]" :key="index" style="margin: 30rpx 0;" @click="errmsgclk(item,2)">
<view class="left-ball" :style="indexmessage?.izStart=='Y'?'background-color: #fff;':'background-color:RGBA(228, 229, 231, 1);'">
<image class="left-menu-img" :src="'/static/index/newindex/leftmenu/left'+item+'.png'" />
</view>
</view>
@ -179,6 +187,7 @@
@click="scrollTop > (55* rightMenu.length) ? scrollTop = (55* rightMenu.length) : scrollTop += 115 " />
</view>
</view>
<errorshow :show="openerror" :font="errmsg" @close="openerror=false" :icons="false" style="left: 44%;"/>
<view class="index-content-right" :style="transition?{opacity: `1`}:{opacity: `0`}">
<view class="right-time">
<view class="time-top">
@ -298,15 +307,283 @@
<image :style="openleft?{}:{transform: `rotate(180deg)`}" class="open-img"
src="/static/index/newindex/leftmenu/openleft.png" />
</view>
<view class="mengban" v-if="topbuttontarget>0" @click="topbuttontarget=0"></view>
<view class="photowall" v-show="topbuttontarget>0" :style="donghuaopo?{opacity:1}:{opacity:0}">
<view class="photowall-title">
<view class="photowall-name">
{{ topbuttontarget==1?`照片`:`录像` }}
</view>
</view>
<scroll-view scroll-y="true" class="photowall-other" scroll-with-animation enable-flex v-if="topbuttontarget>0">
<view class="photowall-other" >
<view class="photowall-other-one" v-for="(item,index) in ilanarr" :key="index"
@click="previewImage(item,index,ilanarr)">
<view v-if="topbuttontarget==1" style="width: 100%;height: 70%;border-radius: 30rpx;position: relative;">
<image style="width: 100%;height: 100%;border-radius: 30rpx;"
:src="item?serverUrl + item:'/static/ceshiyaoshan.png'" mode="aspectFill"
:lazy-load="true"/>
<view @click.stop="open=1;del(item,index)"
style="width: 1.6vw;
height: 1.6vw;
z-index: 20;
position: absolute;
right: -1vw;
top: -0.7vw;
background: red;
display: flex;
justify-content: center;
border-radius: 50%;
align-items: center;"
v-if="topbuttontarget>0&&(listobj.izStart=='Y'&& listobj.izFinish=='N')">
<image src="/static/index/warehouse/procurement/x.png" mode="aspectFill"
style="width: 1.4vw;
height: 1.4vw;"></image>
</view>
</view>
<view v-if="topbuttontarget==2" style="width: 100%;height: 70%;border-radius: 30rpx ;position: relative;" @click="clik(serverUrl + item)">
<video style="width: 100%;height: 100%;border-radius: 30rpx;" :id="'myVideo'+index"
:src="servervideoUrl+item"
mode="aspectFill" ></video>
<view @click.stop="ilanarr.splice(index,1)"
v-if="topbuttontarget>0&&(listobj.izStart=='Y'&& listobj.izFinish=='N')"
style="width: 1.6vw;
height: 1.6vw;
z-index: 20;
position: absolute;
right: -1vw;
top: -0.7vw;
background: red;
display: flex;
justify-content: center;
border-radius: 50%;
align-items: center;">
<image src="/static/index/warehouse/procurement/x.png" mode="aspectFill"
style="width: 1.4vw;
height: 1.4vw;"></image>
</view>
</view>
<!-- <view style="margin-top: 20rpx;">
<text style="color: #888888;">
上传时间:
</text>
<text style="margin-left: 15rpx;">
{{item.createTime.replace(/-/g, '.')}}
</text>
</view>
<view style="margin-top: 10rpx;">
<text style="color: #888888;letter-spacing: 8.9rpx;">
上传人:
</text>
<text>
{{item.createBy}}
</text>
</view> -->
</view>
<view class="photowall-other-one" v-if="topbuttontarget>0&&(listobj.izStart=='Y'&& listobj.izFinish=='N')">
<view style="width: 100%;height: 71%;display: flex;flex-direction: column;
justify-content: center;align-items: center;position: absolute;top:0vw;left: 0;
background-color:#fafdff ;border: 1rpx solid #78B1EB;border-radius: 30rpx;" @click="uplod(1)">
<image style="width: 70rpx;height: 70rpx;margin-bottom: 5rpx;"
src="/static/index/warehouse/procurement/picking/addphoto.png" />
<view style="color: #78B1EB;">
点击上传{{topbuttontarget==1?'图片':'录像'}}
</view>
</view>
</view>
<!-- <view class="noarray" v-if="!ilanarr.length">
<image class="noarray-img" src="/static/index/warehouse/procurement/picking/noarray.png"
mode="aspectFill" />
<view class="noarray-font">
暂无照片
</view>
</view> -->
</view>
</scroll-view>
<view style="position: absolute;right: 2vw;bottom: 0.8vw;height: 4vw;" v-if="topbuttontarget>0&&(listobj.izStart=='Y'&& listobj.izFinish=='N')">
<button type="primary" style="width: 9vw; position: absolute;right: 0vw;bottom: 0.vw;" @click="submit" >确定</button>
</view>
</view>
<tanchuang :show="open==1" font="是否删除此图片" @back="open = 0" @right="del1()"> </tanchuang>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch } from 'vue';
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch ,reactive} from 'vue';
import { queryPadPageList } from '@/pages/watch/api/lunpan.js'
import { queryWorkCareList } from './api.js'
import {startOrder,endOrder} from './doctorask/api/api.js'
// import {startOrder,endOrder} from './doctorask/api/api.js'
import {queryCareList,queryCareInfoList,startOrder,endOrder,editSubPicPath,editSubMp4} from '../component/doctorask/api/api.js'
const form = reactive({
pageNo: 1,
pageSize: 10,
employeeId:uni.getStorageSync('userInfo').employessId,
nuId:uni.getStorageSync('nuId')
})
const plsbuy = ref([])
const firstgetqueryCgdList = () => {
queryCareList(form).then(res => {
plsbuy.value.push(...res.result.records);
if(form.pageNo==1){
clickLeftMenu(0,plsbuy.value[0])
}
})
}
const clickLeftMenu = (index : any, item : object) => {
queryCareInfoList({ mainId: item.id }).then(res => {
indexmessage.value = res.result[0]
})
}
const open = ref(0)
const donghuaopo = ref(false);
const topbuttontarget = ref(0);
const ilanarr = ref([]);
const listobj = ref({});
const ysptp = (v,i,r) =>{
// v.manuallyPicPath
if(r == 1&&v.manuallyPicPath){
ilanarr.value = v.manuallyPicPath.split(",");
ilanarr.value = ilanarr.value.filter(item => item !== '');
}else if(r == 2&&v.manuallyMp4Path){
ilanarr.value = v.manuallyMp4Path.split(",");
ilanarr.value = ilanarr.value.filter(item => item !== '');
}else if(r == 3&&v.tplinkPath){
ilanarr.value = v.tplinkPath.split(",");
ilanarr.value = ilanarr.value.filter(item => item !== '');
}
else{
ilanarr.value = [];
}
listobj.value = v;
topbuttontarget.value = r;
donghuaopo.value = true;
}
const uplod = (v) => {
if(topbuttontarget.value==1){
uni.chooseImage({
count: 1, //9
sizeType: ['compressed'], //
sourceType: ['camera'], //
success: (e) => {
let ar = JSON.stringify(e.tempFilePaths)
uni.compressImage({
src: JSON.parse(ar)[0],
quality: 60,
success: res => {
sxdupld(res.tempFilePath)
// v.picPatharr.push(res.tempFilePath);
// console.log(v.picPatharr)
}
})
}
});
}else{
uni.chooseVideo({
sourceType: ['camera' ],
success: (e)=> {
uni.compressVideo({
src: e.tempFilePath,
quality: 60,
success: res => {
sxdupld(res.tempFilePath)
// v.picPatharr.push(res.tempFilePath);
// console.log(v.picPatharr)
}
})
// sxdupld(res.tempFilePath )
}
});
}
}
const sxdupld = (e) => {
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1;
uni.uploadFile({
url: uni.getStorageSync('serverUrl') + '/sys/common/upload',
filePath: e,
name: 'file',
fileType:topbuttontarget.value==2?'video':'image',
formData: {
biz: year + '/' + month + (topbuttontarget.value==1?'/fwxm/manuallyPicPath':'/fwxm/manuallyMp4Path')
},
header: {
'X-Access-Token': uni.getStorageSync('token')
},
success: res => {
const data = JSON.parse(res.data);
console.log(data)
ilanarr.value.push(data.message)
},
fail: () => {
uni.showToast({ title: '上传失败', icon: 'none' })
}
})
}
const submit = ()=>{
let sub = "";
ilanarr.value.forEach(item=>{
sub+=item+','
})
if(topbuttontarget.value == 1){
editSubPicPath({id:listobj.value.id,manuallyPicPath:sub}).then(res=>{
if(res.success){
topbuttontarget.value = 0;
donghuaopo.value = false;
clickLeftMenu(lefttarget.value,plsbuy.value[lefttarget.value])
}
})
}else{
editSubMp4({id:listobj.value.id,manuallyMp4Path:sub}).then(res=>{
if(res.success){
topbuttontarget.value = 0;
donghuaopo.value = false;
clickLeftMenu(lefttarget.value,plsbuy.value[lefttarget.value])
}
})
}
}
const previewImage = (v, i, arr) => {
if(topbuttontarget.value == 1){
let u = []
arr.forEach(e => {
u.push(serverUrl.value + e)
console.log(serverUrl.value + e)
})
uni.previewImage({
current: i,
urls: u,
showmenu: false,
longPressActions: {
itemList: [],
}
})
}
}
const videoContext = ref(null)
const play = (e,i)=>{
videoContext.value = uni.createVideoContext('myVideo'+i);
videoContext.value.play()
}
const pici = ref(0);
const del = (v,i) =>{
pici.value = i;
}
const del1=()=>{
ilanarr.value.splice(pici.value,1);
open.value = 0
}
//
const openerror = ref(false);
const errmsg = ref('')
const props = defineProps({
isShow: {
type: Boolean,
@ -314,6 +591,47 @@
},
});
const errmsgclk = (e,k)=>{
console.log(indexmessage.value,k)
if(k==1){
if(indexmessage.value?.izStart=='Y'){
switch (e){
case 0:
if(indexmessage.value?.serviceContent==''){return}
errmsg.value = indexmessage.value?.serviceContent
break;
case 1:
if(indexmessage.value?.mp3File==''){return}
errmsg.value = indexmessage.value?.mp3File
break;
case 2:
if(indexmessage.value?.mp4File==''){return}
errmsg.value = indexmessage.value?.mp4File
break;
default:
break;
}
openerror.value = true;
}
}else{
if(indexmessage.value?.izStart=='Y'){
switch (e){
case 3:
ysptp(indexmessage.value,0,1)
break;
case 4:
ysptp(indexmessage.value,0,2)
break;
default:
break;
}
}
}
}
const leftMenuArray = ref([]);
const openleft = ref(false)
@ -520,11 +838,12 @@
employeeId: uni.getStorageSync('userInfo').employessId,
workType: 5
}
queryWorkCareList(data).then((res : any) => {
console.log("看看图",res.result.records[0])
indexmessage.value = res.result.records[0];
console.log("看看图",'https://www.focusnu.com/media/upFiles/'+indexmessage.value.previewFile)
})
firstgetqueryCgdList()
// queryWorkCareList(data).then((res : any) => {
// console.log("",res.result.records[0])
// indexmessage.value = res.result.records[0];
// console.log("",'https://www.focusnu.com/media/upFiles/'+indexmessage.value.previewFile)
// })
}
const lanjie = ref(false);
const gotolook = () => {
@ -1264,4 +1583,96 @@
height: 3vw;
}
}
.noarray {
width: 90%;
height: 100%;
// background-color: red;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.noarray-img {
margin-top: -200rpx;
width: 350rpx;
height: 350rpx;
}
}
.noarray-font {
margin-top: -60rpx;
color: #888888;
font-size: 25rpx;
}
.mengban {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 100;
background: RGBA(239, 240, 244, 0.55);
}
.photowall {
position: fixed;
top: 54%;
left: 50%;
transform: translate(-50%, -50%);
width: 80vw;
height: 83%;
border-radius: 30rpx;
background-color: #fff;
transition: all 0.3s;
z-index: 9990;
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
padding: 0 90rpx;
.photowall-title {
margin-top: 50rpx;
display: flex;
justify-content: space-between;
width: 100%;
margin-bottom: 50rpx;
.photowall-name {
font-size: 38rpx;
// font-weight: 600;
}
.photowall-left {
color: #888888;
}
.photowall-right {
font-size: 30rpx;
font-weight: 600;
}
}
.photowall-other {
width: 76vw;
height: 62vh;
display: flex;
margin-top: 20rpx;
flex-wrap: wrap;
.photowall-other-one {
width: 22vw;
height: 430rpx;
margin-right: 3vw;
margin-bottom: 0%;
border-radius: 30rpx;
display:flex;
position: relative;
video{
width: 100%;
height: 100%;
}
}
}
}
</style>

View File

@ -66,8 +66,8 @@
}
const tabbrarr = ref([
{ name: '护嘱', url: '/static/shouye/sy/n0.png', urls: '/static/shouye/sy/n1.png' ,type:'hldy_hljz'},
{ name: '医嘱', url: '/static/shouye/sy/y0.png', urls: '/static/shouye/sy/y1.png' ,type:'hldy_yljz'},
{ name: '后勤', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'hldy_xzjz'},
{ name: '护理', url: '/static/shouye/sy/y0.png', urls: '/static/shouye/sy/y1.png' ,type:'hldy_yljz'},
{ name: '后勤矩阵', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'hldy_xzjz'},
{ name: '请领', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'hldy_ql'},
])
const navurl = (e,v) => {

View File

@ -574,7 +574,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
)
]);
}
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/camera.nvue"]]);
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/camera.nvue"]]);
export {
camera as default
};

View File

@ -578,7 +578,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
)
]);
}
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/fullcamera.nvue"]]);
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/fullcamera.nvue"]]);
export {
fullcamera as default
};