Commit 193082a1 by pangchong

feat: 我的待办

parent c9d7df8f
...@@ -165,8 +165,8 @@ const getStyle = computed(() => { ...@@ -165,8 +165,8 @@ const getStyle = computed(() => {
let padding = typeof ps.padding == 'number' ? ps.padding + 'rpx' : ps.padding let padding = typeof ps.padding == 'number' ? ps.padding + 'rpx' : ps.padding
let margin = typeof ps.margin == 'number' ? ps.margin + 'rpx' : ps.margin let margin = typeof ps.margin == 'number' ? ps.margin + 'rpx' : ps.margin
let style = { let style = {
margin: margin, margin,
padding: padding padding
} }
return style return style
}) })
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
ref="paging" ref="paging"
v-model="dataList" v-model="dataList"
:auto="auto" :auto="auto"
:fixed="fixed"
:height="height"
:refresher-enabled="refresherEnabled" :refresher-enabled="refresherEnabled"
:refresher-threshold="refresherThreshold" :refresher-threshold="refresherThreshold"
:auto-show-back-to-top="autoShowBackToTop" :auto-show-back-to-top="autoShowBackToTop"
...@@ -75,6 +77,16 @@ const ps = defineProps({ ...@@ -75,6 +77,16 @@ const ps = defineProps({
type: [String, Number], type: [String, Number],
default: 0 default: 0
}, },
//是页面滚动还是局部滚动(默认页面滚动)
fixed: {
type: Boolean,
default: true
},
//局部滚动的高度
height: {
type: String,
default: ''
},
//是否自动加载 //是否自动加载
auto: { auto: {
type: Boolean, type: Boolean,
...@@ -202,8 +214,8 @@ const getStyle = computed(() => { ...@@ -202,8 +214,8 @@ const getStyle = computed(() => {
let padding = typeof ps.padding == 'number' ? ps.padding + 'rpx' : ps.padding let padding = typeof ps.padding == 'number' ? ps.padding + 'rpx' : ps.padding
let margin = typeof ps.margin == 'number' ? ps.margin + 'rpx' : ps.margin let margin = typeof ps.margin == 'number' ? ps.margin + 'rpx' : ps.margin
let style = { let style = {
margin: margin, margin,
padding: padding padding
} }
return style return style
}) })
......
<template> <template>
<!-- 全局下拉框控件 --> <!-- 全局下拉框控件 -->
<view class="picker" :style="style"> <view class="picker" :style="style">
<global-popup v-model="show" @close="show = false" :height="592" :customStyle="{ padding: '28rpx 32rpx' }" v-if="filter" :distance="distance"> <global-popup v-model="show" :height="592" :customStyle="{ padding: '28rpx 32rpx' }" v-if="filter" :distance="distance">
<template #top> <template #top>
<view> <view>
<up-search :placeholder="placeholder" :showAction="false" v-model="searchKey"></up-search> <up-search :placeholder="placeholder" :showAction="false" v-model="searchKey"></up-search>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script setup> <script setup>
import { computed, nextTick, ref, watch } from 'vue' import { computed, nextTick, ref, watch } from 'vue'
const es = defineEmits(['close', 'open']) const es = defineEmits(['update:modelValue', 'close', 'open'])
const ps = defineProps({ const ps = defineProps({
modelValue: { modelValue: {
type: Boolean, type: Boolean,
...@@ -117,10 +117,11 @@ watch( ...@@ -117,10 +117,11 @@ watch(
} }
) )
const close = () => { const close = () => {
es('close', false) es('update:modelValue', false)
es('close')
} }
const open = () => { const open = () => {
es('open', true) es('open')
} }
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
:itemStyle="getItemStyle" :itemStyle="getItemStyle"
:current="current" :current="current"
:keyName="keyName" :keyName="keyName"
:scrollable="scrollable"
@click="handleClick" @click="handleClick"
@change="handleChange" @change="handleChange"
> >
......
<template> <template>
<!-- 全局图片下载 --> <!-- 全局图片上传 -->
<up-upload <up-upload
:width="width + 'rpx'" :width="width + 'rpx'"
:height="height + 'rpx'" :height="height + 'rpx'"
......
<template> <template>
<!-- 全局文件下载 --> <!-- 全局文件上传 -->
<view class="upload" :style="style"> <view class="upload" :style="style">
<view class="upload-list"> <view class="upload-list">
<view class="upload-item" v-for="(item, index) in getFileList" :key="item.id"> <view class="upload-item" v-for="(item, index) in getFileList" :key="item.id">
......
import { nextTick, ref } from 'vue' import { ref } from 'vue'
// utils/message.js // 通用提示
export const showToast = (msg, options) => { export const showToast = (msg, options) => {
uni.showToast({ uni.showToast({
title: msg || '操作失败', title: msg || '操作失败',
...@@ -9,7 +9,6 @@ export const showToast = (msg, options) => { ...@@ -9,7 +9,6 @@ export const showToast = (msg, options) => {
...options ...options
}) })
} }
export const messageCount = ref(0)
// 消息提示 // 消息提示
export const toast = (message) => { export const toast = (message) => {
uni.$emit('useMessage', { type: 'default', message }) uni.$emit('useMessage', { type: 'default', message })
......
...@@ -3,7 +3,8 @@ import Day from './dayjs' ...@@ -3,7 +3,8 @@ import Day from './dayjs'
/** /**
* 时间戳格式化 * 时间戳格式化
* 1715072168340 => 2024-05-07 16:56:08 format=YYYY/MM/DD HH:mm:ss * 1715072168340 => 2024-05-07 16:56:08
* format=YYYY/MM/DD HH:mm:ss
*/ */
export const timeStampFormat = (timeStamp, opt) => { export const timeStampFormat = (timeStamp, opt) => {
if (!timeStamp || timeStamp == -1 || timeStamp == '-1' || timeStamp == 0 || timeStamp == '0') { if (!timeStamp || timeStamp == -1 || timeStamp == '-1' || timeStamp == 0 || timeStamp == '0') {
......
<template> <template>
<global-popup v-model="showPopup" mode="right" :width="580" background="#F7F8FA" title="选择责任单位" :round="32" @close="showPopup = false"> <global-popup v-model="showPopup" mode="right" :width="580" background="#F7F8FA" title="选择责任单位" :round="32">
<view class="list"> <view class="list">
<view class="item" v-for="item in arrangeWorkExtendList" :key="item.id" @tap="handleClick(item)"> <view class="item" v-for="item in arrangeWorkExtendList" :key="item.id" @tap="handleClick(item)">
{{ item.companyFullName }} {{ item.companyFullName }}
......
<template> <template>
<view class="content" :style="{ height: `calc(100vh - 344rpx - ${safeAreaInsets?.top + 'px'} - ${safeAreaInsets?.bottom + 'px'} - 50px)` }"> <view class="content" :style="{ height: `calc(100vh - 344rpx - ${safeAreaInsets?.top + 'px'} - ${safeAreaInsets?.bottom + 'px'} - 50px)` }">
<view class="tab-nav"> <view class="tab-nav">
<global-tabs :list="tabNav" @handleClick="handleClick" :scrollable="false"></global-tabs> <global-tabs :list="tabNav" @handleClick="handleClick"></global-tabs>
</view> </view>
<scroll-view class="tab-content" scroll-y="true"> <scroll-view class="tab-content" scroll-y="true">
<view class="tab-content-item" v-if="activeIndex == 0"> <view class="tab-content-item" v-if="activeIndex == 0">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment