This commit is contained in:
wangweidong 2025-12-08 09:29:38 +08:00
commit 04fce9951c
7 changed files with 67 additions and 223 deletions

View File

@ -1,112 +1,86 @@
<!-- 使用示例 已经全局暴露了直接用-->
<!-- <errorshow :show="openerror" font="确定将本次请领清单中的所有物料都移除吗?" @close="openerror=false" /> -->
<template>
<view>
<view class="addall" v-if="show">
<view>温馨提示1111</view>
<view>
<image src="/static/index/procurement/ddj.png" mode="aspectFill"></image>
</view>
<view style="text-align: center;">{{ font }}</view>
<view>
<view @click="$emit('back')">取消</view>
<view class="qd" @click="$emit('right')">确定</view>
</view>
<image class="addallimge" src="/static/error.png" mode="aspectFill"></image>
<view class="addallfont">{{ font }}</view>
<view class="qd" @click="onClose">确定</view>
</view>
<view class="mengban" v-if="show" @click="$emit('back')"></view>
<view class="mengban" v-if="show" @click="onClose"></view>
</view>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false
},
font: {
type: String,
default: ''
},
<script setup>
const props = defineProps({
show: {
type: Boolean,
default: false
},
methods: {
font: {
type: String,
default: ''
}
})
const emit = defineEmits(['close'])
function onClose() {
emit('close')
}
</script>
<style scoped lang="less">
.addall {
width: 42.4vw;
height: 26vw;
width: 30vw;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163, 167, 182, 0.16);
border-radius: 1.6vw;
border-radius: 1.9vw;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
padding: 2.8vw;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 3vw 4vw;
z-index: 9120;
display: flex;
flex-direction: column;
>view {
&:nth-child(4) {
width: 22vw;
display: flex;
justify-content: space-around;
margin: 1.8vw auto 0;
.addallimge {
width: 4.3vw;
height: 4.3vw;
margin: 1vw auto 1.5vw auto;
}
view {
width: 8.2vw;
height: 3.3vw;
background: #EDEDEF;
border-radius: 1.6vw;
font-weight: 400;
font-size: 1.6vw;
color: #888888;
display: flex;
justify-content: center;
align-items: center;
border: 1px solid #EDEDEF;
}
.addallfont {
width: 23vw;
font-weight: 400;
font-size: 1.3vw;
color: #888888;
line-height: 1.7vw;
flex-wrap: wrap;
margin-bottom: 4vw;
}
.qd {
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3, 133, 250, 0.34);
color: #0385FA;
}
}
&:nth-child(3) {
width: 33vw;
height: 3.4vw;
font-weight: 400;
font-size: 1.3vw;
color: #888888;
line-height: 1.7vw;
margin: 0.4vw auto 0;
}
&:nth-child(2) {
width: 7.6vw;
height: 7.6vw;
margin: 1.1vw auto 0;
image {
width: 100%;
height: 100%;
}
}
&:nth-child(1) {
font-weight: 400;
font-size: 1.6vw;
color: #333333;
}
.qd {
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3, 133, 250, 0.34);
color: #0385FA;
position: absolute;
right: 3vw;
bottom: 2vw;
width: 6.3vw;
height: 3vw;
border-radius: 1.6vw;
font-weight: 400;
font-size: 1.4vw;
display: flex;
justify-content: center;
align-items: center;
}
}
.mengban {
width: 100vw;
height: 100vh;
@ -114,6 +88,6 @@
top: 0;
left: 0;
z-index: 9100;
background: RGBA(239, 240, 244, 0.55);
background: rgba(239, 240, 244, 0.55);
}
</style>

View File

@ -1,127 +0,0 @@
// // src/plugins/toastPlugin.js
// import { createApp, reactive, h } from 'vue'
// import ToastHost from './errorshow.vue' // 路径按项目调整
// const defaultOpt = {
// title: '',
// duration: 1500,
// type: 'text', // 'text' | 'dialog'
// mask: true,
// maskClosable: true,
// success: null,
// complete: null
// }
// function createToastService() {
// const state = reactive({
// show: false,
// title: '',
// duration: defaultOpt.duration,
// type: defaultOpt.type,
// mask: defaultOpt.mask,
// maskClosable: defaultOpt.maskClosable,
// success: null,
// complete: null,
// _timer: null,
// // dialog 专用(可扩展)
// confirmText: '确定',
// cancelText: '取消'
// })
// function clearTimer() {
// if (state._timer) {
// clearTimeout(state._timer)
// state._timer = null
// }
// }
// function showToast(options = {}) {
// const opt = Object.assign({}, defaultOpt, options)
// clearTimer()
// state.title = opt.title == null ? '' : String(opt.title)
// state.duration = Number(opt.duration) || defaultOpt.duration
// state.type = opt.type
// state.mask = !!opt.mask
// state.maskClosable = opt.maskClosable !== undefined ? !!opt.maskClosable : true
// state.success = typeof opt.success === 'function' ? opt.success : null
// state.complete = typeof opt.complete === 'function' ? opt.complete : null
// state.confirmText = opt.confirmText || '确定'
// state.cancelText = opt.cancelText || '取消'
// state.show = true
// return new Promise((resolve) => {
// if (state.type === 'text') {
// state._timer = setTimeout(() => {
// hideToast()
// if (state.complete) try { state.complete() } catch(e){/*ignore*/}
// resolve()
// }, state.duration)
// } else {
// // dialog 不自动关闭,等待按键或 maskClosable
// // 但为了安全可以选择不自动超时
// // resolve 将在按钮或 mask 关闭时调用
// }
// })
// }
// function hideToast(by = 'complete') {
// clearTimer()
// state.show = false
// // 执行回调
// if (by === 'success' && state.success) {
// try { state.success() } catch(e) {}
// }
// if (state.complete) {
// try { state.complete() } catch(e) {}
// }
// // 清理
// state.success = null
// state.complete = null
// state.title = ''
// state.type = defaultOpt.type
// }
// // dialog 按钮触发
// function onConfirm() {
// hideToast('success')
// }
// function onCancel() {
// hideToast('complete')
// }
// return {
// state,
// showToast,
// hideToast,
// onConfirm,
// onCancel
// }
// }
// // 插件安装函数
// export default {
// install: (app, options = {}) => {
// const service = createToastService()
// // programmatically mount the host component once
// const container = document.createElement('div')
// document.body.appendChild(container)
// const toastApp = createApp({
// render() {
// return h(ToastHost, { service })
// }
// })
// toastApp.mount(container)
// // 全局方法
// app.config.globalProperties.$errorshow = service.showToast
// // 兼容直接使用 window.uni.showToast
// if (typeof window !== 'undefined') {
// window.uni = window.uni || {}
// window.uni.$errorshow = service.showToast
// }
// // 可选:返回 service 以便调试
// app.provide('toastService', service)
// }
// }

View File

@ -19,7 +19,7 @@ import {
createSSRApp
} from 'vue'
import donghua from '@/component/public/donghua.vue'
// import errorshow from '@/component/public/toastPlugin.js'
import errorshow from '@/component/public/errorshow.vue'
import tanchuang from '@/pages/procurement/components/tanchuang.vue';
// import arrowkeys from '@/component/public/newgame/arrowkeys.vue'
export function createApp() {
@ -29,6 +29,8 @@ export function createApp() {
app.use(uView)
app.component('donghua', donghua)
app.component('tanchuang', tanchuang)
app.component('errorshow', errorshow)
// app.component('arrowkeys', arrowkeys)
return {

View File

@ -96,6 +96,7 @@
<view :style="moverStyle">
<image style="width: 100%;height: 100%;" :src="cararray[cartarget]" mode="widthFix"></image>
</view>
</view>
</template>

View File

@ -23,7 +23,7 @@
<view class="more-one" @click="share">
分享
</view>
<view class="more-one" v-if="Number(v.status)<=1" @click="bebad(v)">
<view class="more-one" v-if="Number(v.status)<=0" @click="bebad(v)">
作废
</view>
</view>

View File

@ -225,6 +225,7 @@
</specialDrawerVue> -->
<!-- <arrowkeys @movecard="movecard" :getblue="getblue" :moveleft="5" /> -->
<joysticknew @movecard="movecamera" v-show="!cameratarget.includes(5)" />
</view>
</template>
@ -232,19 +233,12 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, reactive } from 'vue';
import { onShow, onLoad, onHide } from "@dcloudio/uni-app"
// import specialDrawerVue from '../../component/public/specialDrawer.vue';
// import bigroll from './drawer/index.vue';
import { movedirection, queryPadPageList } from './api/lunpan.js'
import joysticknew from '@/component/public/newgame/joysticknew.vue';
const cameraArray = ref([])
onLoad(() => {
cameraArray.value = cameraSmall;
// const info = uni.getSystemInfoSync()
// console.log('', info.screenWidth)
// console.log('', info.screenHeight)
// console.log('', info.windowWidth)
// console.log('', info.windowHeight)
})
const zyupgrade = ref(null);
const menuIndex = ref(-1);

BIN
static/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB