feat: 新增考勤排班管理页面

This commit is contained in:
admin
2026-01-24 19:07:34 +08:00
parent 8c1224999d
commit c89af4c6a3
99 changed files with 13547 additions and 14 deletions

View File

@@ -0,0 +1,10 @@
## 1.0.42024-05-08
更新域名
## 1.0.32023-08-08
修复链接引入错误
## 1.0.22023-08-07
修复引入错误
## 1.0.12023-08-07
支持自定义(包括nvue)文字与图片图标
## 1.0.02023-08-03
基于字体的图标集,包含了大多数常见场景的图标,支持自定义,支持自定义图片图标等。可自定义颜色、大小。

View File

@@ -0,0 +1,159 @@
export default {
'wuicon-level': 'e68f',
'wuicon-download': 'e670',
'wuicon-search': 'e632',
'wuicon-reload': 'e627',
'wuicon-scan': 'e631',
'wuicon-calendar': 'e65c',
'wuicon-bag': 'e647',
'wuicon-checkbox-mark': 'e659',
'wuicon-attach': 'e640',
'wuicon-wifi-off': 'e6cc',
'wuicon-woman': 'e626',
'wuicon-man': 'e675',
'wuicon-chat': 'e656',
'wuicon-chat-fill': 'e63f',
'wuicon-red-packet': 'e6c3',
'wuicon-folder': 'e694',
'wuicon-order': 'e695',
'wuicon-arrow-up-fill': 'e636',
'wuicon-arrow-down-fill': 'e638',
'wuicon-backspace': 'e64d',
'wuicon-photo': 'e60d',
'wuicon-photo-fill': 'e6b4',
'wuicon-lock': 'e69d',
'wuicon-lock-fill': 'e6a6',
'wuicon-lock-open': 'e68d',
'wuicon-lock-opened-fill': 'e6a1',
'wuicon-home': 'e67b',
'wuicon-home-fill': 'e68e',
'wuicon-star': 'e618',
'wuicon-star-fill': 'e61e',
'wuicon-share': 'e629',
'wuicon-share-fill': 'e6bb',
'wuicon-share-square': 'e6c4',
'wuicon-volume': 'e605',
'wuicon-volume-fill': 'e624',
'wuicon-volume-off': 'e6bd',
'wuicon-volume-off-fill': 'e6c8',
'wuicon-trash': 'e623',
'wuicon-trash-fill': 'e6ce',
'wuicon-shopping-cart': 'e6cb',
'wuicon-shopping-cart-fill': 'e630',
'wuicon-question-circle': 'e622',
'wuicon-question-circle-fill': 'e6bc',
'wuicon-plus': 'e625',
'wuicon-plus-circle': 'e603',
'wuicon-plus-circle-fill': 'e611',
'wuicon-tags': 'e621',
'wuicon-tags-fill': 'e613',
'wuicon-pause': 'e61c',
'wuicon-pause-circle': 'e696',
'wuicon-pause-circle-fill': 'e60c',
'wuicon-play-circle': 'e6af',
'wuicon-play-circle-fill': 'e62a',
'wuicon-map': 'e665',
'wuicon-map-fill': 'e6a8',
'wuicon-phone': 'e6ba',
'wuicon-phone-fill': 'e6ac',
'wuicon-list': 'e690',
'wuicon-list-dot': 'e6a9',
'wuicon-info-circle': 'e69f',
'wuicon-info-circle-fill': 'e6a7',
'wuicon-minus': 'e614',
'wuicon-minus-circle': 'e6a5',
'wuicon-mic': 'e66d',
'wuicon-mic-off': 'e691',
'wuicon-grid': 'e68c',
'wuicon-grid-fill': 'e698',
'wuicon-eye': 'e664',
'wuicon-eye-fill': 'e697',
'wuicon-eye-off': 'e69c',
'wuicon-eye-off-outline': 'e688',
'wuicon-file-text': 'e687',
'wuicon-file-text-fill': 'e67f',
'wuicon-edit-pen': 'e65d',
'wuicon-edit-pen-fill': 'e679',
'wuicon-email': 'e673',
'wuicon-email-fill': 'e683',
'wuicon-checkmark': 'e64a',
'wuicon-checkmark-circle': 'e643',
'wuicon-checkmark-circle-fill': 'e668',
'wuicon-clock': 'e66c',
'wuicon-clock-fill': 'e64b',
'wuicon-close': 'e65a',
'wuicon-close-circle': 'e64e',
'wuicon-close-circle-fill': 'e666',
'wuicon-car': 'e64f',
'wuicon-car-fill': 'e648',
'wuicon-bell': 'e651',
'wuicon-bell-fill': 'e604',
'wuicon-play-left': 'e6bf',
'wuicon-play-right': 'e6b3',
'wuicon-play-left-fill': 'e6ae',
'wuicon-play-right-fill': 'e6ad',
'wuicon-skip-back-left': 'e6c5',
'wuicon-skip-forward-right': 'e61f',
'wuicon-setting': 'e602',
'wuicon-setting-fill': 'e6d0',
'wuicon-more-dot-fill': 'e66f',
'wuicon-more-circle': 'e69e',
'wuicon-more-circle-fill': 'e684',
'wuicon-arrow-upward': 'e641',
'wuicon-arrow-downward': 'e634',
'wuicon-arrow-leftward': 'e63b',
'wuicon-arrow-rightward': 'e644',
'wuicon-arrow-up': 'e633',
'wuicon-arrow-down': 'e63e',
'wuicon-arrow-left': 'e646',
'wuicon-arrow-right': 'e63c',
'wuicon-thumb-up': 'e612',
'wuicon-thumb-up-fill': 'e62c',
'wuicon-thumb-down': 'e60a',
'wuicon-thumb-down-fill': 'e628',
'wuicon-coupon': 'e65f',
'wuicon-coupon-fill': 'e64c',
'wuicon-kefu-ermai': 'e660',
'wuicon-server-fill': 'e610',
'wuicon-server-man': 'e601',
'wuicon-warning': 'e6c1',
'wuicon-warning-fill': 'e6c7',
'wuicon-camera': 'e642',
'wuicon-camera-fill': 'e650',
'wuicon-pushpin': 'e6d1',
'wuicon-pushpin-fill': 'e6b6',
'wuicon-heart': 'e6a2',
'wuicon-heart-fill': 'e68b',
'wuicon-account': 'e63a',
'wuicon-account-fill': 'e653',
'wuicon-integral': 'e693',
'wuicon-integral-fill': 'e6b1',
'wuicon-gift': 'e680',
'wuicon-gift-fill': 'e6b0',
'wuicon-empty-data': 'e671',
'wuicon-empty-address': 'e68a',
'wuicon-empty-favor': 'e662',
'wuicon-empty-car': 'e656',
'wuicon-empty-order': 'e66b',
'wuicon-empty-list': 'e671',
'wuicon-empty-search': 'e677',
'wuicon-empty-permission': 'e67c',
'wuicon-empty-news': 'e67d',
'wuicon-empty-history': 'e684',
'wuicon-empty-coupon': 'e69b',
'wuicon-empty-page': 'e60e',
'wuicon-apple-fill': 'e635',
'wuicon-zhifubao-circle-fill': 'e617',
'wuicon-weixin-circle-fill': 'e6cd',
'wuicon-weixin-fill': 'e620',
'wuicon-qq-fill': 'e608',
'wuicon-qq-circle-fill': 'e6b9',
'wuicon-moments': 'e6a0',
'wuicon-moments-circel-fill': 'e6c2',
'wuicon-twitter': 'e607',
'wuicon-twitter-circle-fill': 'e6cf',
}

View File

@@ -0,0 +1,90 @@
export default {
props: {
// 图标类名
name: {
type: String,
default: ''
},
// 图标颜色,可接受主题色
color: {
type: String,
default: '#606266'
},
// 字体大小单位px
size: {
type: [String, Number],
default: '16px'
},
// 是否显示粗体
bold: {
type: Boolean,
default: false
},
// 点击图标的时候传递事件出去的index用于区分点击了哪一个
index: {
type: [String, Number],
default: null
},
// 触摸图标时的类名
hoverClass: {
type: String,
default: ''
},
// 自定义扩展前缀,方便用户扩展自己的图标库
customPrefix: {
type: String,
default: 'wuicon'
},
// 图标右边或者下面的文字
label: {
type: [String, Number],
default: ''
},
// label的位置只能右边或者下边
labelPos: {
type: String,
default: 'right'
},
// label的大小
labelSize: {
type: [String, Number],
default: '15px'
},
// label的颜色
labelColor: {
type: String,
default: '#606266'
},
// label与图标的距离
space: {
type: [String, Number],
default: '3px'
},
// 图片的mode
imgMode: {
type: String,
default: ''
},
// 用于显示图片小图标时,图片的宽度
width: {
type: [String, Number],
default: ''
},
// 用于显示图片小图标时,图片的高度
height: {
type: [String, Number],
default: ''
},
// 用于解决某些情况下,让图标垂直居中的用途
top: {
type: [String, Number],
default: 0
},
// 是否阻止事件传播
stop: {
type: Boolean,
default: false
},
...uni.$w?.props?.icon
}
}

View File

@@ -0,0 +1,225 @@
<template>
<view class="wu-icon" @tap="clickHandler" :class="['wu-icon--' + labelPos]">
<!-- 这里进行空字符串判断如果仅仅是v-if="label"可能会出现传递0的时候结果也无法显示 -->
<text v-if="label !== '' && (labelPos == 'left' || labelPos == 'top')" class="wu-icon__label" :style="labelStyle">{{ label }}</text>
<image class="wu-icon__img" v-if="isImg" :src="name" :mode="imgMode"
:style="[imgStyle, $w.addStyle(customStyle)]"></image>
<text v-else class="wu-icon__icon" :class="uClasses" :style="[iconStyle, $w.addStyle(customStyle)]"
:hover-class="hoverClass">{{icon}}</text>
<!-- 这里进行空字符串判断如果仅仅是v-if="label"可能会出现传递0的时候结果也无法显示 -->
<text v-if="label !== '' && (labelPos == 'right' || labelPos == 'bottom')" class="wu-icon__label" :style="labelStyle">{{ label }}</text>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/wu-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/wu-ui-tools/libs/mixin/mixin.js'
// #ifdef APP-NVUE
// nvue通过weex的dom模块引入字体相关文档地址如下
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
import iconUrl from './wuicons.ttf';
const domModule = weex.requireModule('dom');
domModule.addRule('fontFace', {
'fontFamily': "wuicon-iconfont",
'src': "url('" + iconUrl + "')"
})
// #endif
// 引入图标名称已经对应的unicode
import icons from './icons';
import props from './props.js';
/**
* icon 图标
* @description 基于字体的图标集,包含了大多数常见场景的图标。
* @tutorial https://wuui.cn/zh-CN/components/icon.html
* @property {String} name 图标名称,若带有 `/` 或遵循 `base64` 图片格式,会被认为是图片图标,则文字图标相关属性会失效。
* @property {String} color 图标颜色,可接受主题色 (默认 color: #606266
* @property {String | Number} size 图标字体大小单位px/rpx (默认 '16px'
* @property {Boolean} bold 是否显示粗体 (默认 false
* @property {String | Number} index 点击图标的时候传递事件出去的index用于区分点击了哪一个
* @property {String} hoverClass 图标按下去的样式类用法同uni的view组件的hoverClass参数详情见官网
* @property {String} customPrefix 自定义扩展前缀,方便用户扩展自己的图标库 (默认 'wuicon'
* @property {String | Number} label 图标右侧的label文字
* @property {String} labelPos label相对于图标的位置默认 'right'
* @value top 上方
* @value bottom 下方
* @value left 左侧
* @value right 右侧
* @property {String | Number} labelSize label字体大小单位px (默认 '15px'
* @property {String} labelColor 图标右侧的label文字颜色 默认 color['wu-content-color']
* @property {String | Number} space label与图标的距离单位px (默认 '3px'
* @property {String} imgMode image组件的mode详见[image](https://uniapp.dcloud.net.cn/component/image.html#image)
* @property {String | Number} width 显示图片小图标时的宽度
* @property {String | Number} height 显示图片小图标时的高度
* @property {String | Number} top 图标在垂直方向上的定位 用于解决某些情况下,让图标垂直居中的用途 (默认 0
* @property {Boolean} stop 是否阻止事件传播 (默认 false
* @property {Object} customStyle icon的样式对象形式
* @event {Function} click 点击图标时触发
* @event {Function} touchstart 事件触摸时触发
* @example <wu-icon name="photo" color="#2979ff" size="28"></wu-icon>
*/
export default {
name: 'wu-icon',
emits: ['click'],
mixins: [mpMixin, mixin, props],
data() {
return {
colorType: [
'primary',
'success',
'info',
'error',
'warning'
]
}
},
computed: {
uClasses() {
let classes = []
classes.push(this.customPrefix)
classes.push(this.customPrefix + '-' + this.name)
// 主题色,通过类配置
if (this.color && this.colorType.includes(this.color)) classes.push('wu-icon__icon--' + this.color)
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
// 故需将其拆成一个字符串的形式,通过空格隔开各个类名
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
classes = classes.join(' ')
//#endif
return classes
},
iconStyle() {
let style = {}
style = {
fontSize: this.$w.addUnit(this.size),
lineHeight: this.$w.addUnit(this.size),
fontWeight: this.bold ? 'bold' : 'normal',
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
top: this.$w.addUnit(this.top)
}
// 非主题色值时,才当作颜色值
if (this.color && !this.colorType.includes(this.color)) style.color = this.color
return style
},
// 判断传入的name属性是否图片路径只要带有"/"均认为是图片形式
isImg() {
const isBase64 = this.name.indexOf('data:') > -1 && this.name.indexOf('base64') > -1;
return this.name.indexOf('/') !== -1 || isBase64;
},
imgStyle() {
let style = {}
// 如果设置width和height属性则优先使用否则使用size属性
style.width = this.width ? this.$w.addUnit(this.width) : this.$w.addUnit(this.size)
style.height = this.height ? this.$w.addUnit(this.height) : this.$w.addUnit(this.size)
return style
},
// 通过图标名,查找对应的图标
icon() {
// 如果内置的图标中找不到对应的图标就直接返回name值因为用户可能传入的是unicode代码
const code = icons['wuicon-' + this.name];
if (['wuicon'].indexOf(this.customPrefix) > -1) {
return code ? unescape(`%u${code}`) : this.name;
} else {
// #ifndef APP-NVUE
return ''
// #endif
// #ifdef APP-NVUE
return unescape(`%u${this.name}`)
// #endif
}
},
// label样式
labelStyle() {
let style = {
color: this.labelColor,
fontSize: this.$w.addUnit(this.labelSize),
marginLeft: this.labelPos == 'right' ? this.$w.addUnit(this.space) : 0,
marginTop: this.labelPos == 'bottom' ? this.$w.addUnit(this.space) : 0,
marginRight: this.labelPos == 'left' ? this.$w.addUnit(this.space) : 0,
marginBottom: this.labelPos == 'top' ? this.$w.addUnit(this.space) : 0
};
return style
}
},
methods: {
clickHandler(e) {
this.$emit('click', this.index)
// 是否阻止事件冒泡
this.stop && this.preventEvent(e)
}
}
}
</script>
<style lang="scss" scoped>
@import '@/uni_modules/wu-ui-tools/libs/css/components.scss';
@import '@/uni_modules/wu-ui-tools/libs/css/color.scss';
// 变量定义
$wu-icon-primary: $wu-primary !default;
$wu-icon-success: $wu-success !default;
$wu-icon-info: $wu-info !default;
$wu-icon-warning: $wu-warning !default;
$wu-icon-error: $wu-error !default;
$wu-icon-label-line-height: 1 !default;
/* #ifndef APP-NVUE */
// 非nvue下加载字体
@font-face {
font-family: 'wuicon-iconfont';
src: url('./wuicons.ttf') format('truetype');
}
/* #endif */
.wu-icon {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
align-items: center;
&--left, &--right {
flex-direction: row;
}
&--top, &--bottom {
flex-direction: column;
}
&__icon {
font-family: wuicon-iconfont;
position: relative;
@include flex;
align-items: center;
&--primary {
color: $wu-icon-primary;
}
&--success {
color: $wu-icon-success;
}
&--error {
color: $wu-icon-error;
}
&--warning {
color: $wu-icon-warning;
}
&--info {
color: $wu-icon-info;
}
}
&__img {
/* #ifndef APP-NVUE */
height: auto;
will-change: transform;
/* #endif */
}
&__label {
/* #ifndef APP-NVUE */
line-height: $wu-icon-label-line-height;
/* #endif */
}
}
</style>

Binary file not shown.

View File

@@ -0,0 +1,87 @@
{
"id": "wu-icon",
"displayName": "wu-icon 图标 全面兼容小程序、nvue、vue2、vue3等多端",
"version": "1.0.4",
"description": "基于字体的图标集,包含了大多数常见场景的图标,支持自定义,支持自定义图片图标等。可自定义颜色、大小。",
"keywords": [
"wu-ui",
"图标",
"wu-icon",
"文字图标"
],
"repository": "",
"engines": {
"HBuilderX": "^3.4.15"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [
"wu-ui-tools"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1,10 @@
## wu-icon 图标库
> **组件名wu-icon**
基于字体的图标集,包含了大多数常见场景的图标,支持自定义(包括nvue)文字与图片图标等。
## <a href="https://wuui.cn/zh-CN/components/icon" target="_blank">查看文档</a>
## [更多插件请关注wu-ui组件库](https://ext.dcloud.net.cn/plugin?name=wuui) <small>(请不要 下载插件ZIP</small>
**如使用过程中有任何问题或者您对wu-ui有一些好的建议。<br>欢迎加入 [wu-ui 交流群](https://wuui.cn/zh-CN/components/qqFeedBack.html)**