增加功能

This commit is contained in:
duxp 2023-08-31 10:43:26 +08:00
parent df9307abb8
commit 2224075e9b
26 changed files with 713 additions and 4 deletions

31
.eslintrc.js Normal file
View File

@ -0,0 +1,31 @@
/*
* Eslint config file
* Documentation: https://eslint.org/docs/user-guide/configuring/
* Install the Eslint extension before using this feature.
*/
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
ecmaFeatures: {
modules: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
// extends: 'eslint:recommended',
rules: {},
}

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.idea/
/node_modules/
/miniprogram/miniprogram_npm/

10
miniprogram/app.js Normal file
View File

@ -0,0 +1,10 @@
// app.js
App({
onLaunch() {
},
globalData: {
}
})

82
miniprogram/app.json Normal file
View File

@ -0,0 +1,82 @@
{
"pages": [
"pages/evaluation/evaluation",
"pages/loading/loading",
"pages/work/work",
"pages/mine/mine",
"pages/bind/bind",
"pages/queryList/queryList",
"pages/approvalWarning/approvalWarning",
"pages/taskWarning/taskWarning",
"pages/approvalWarning/approvalForm/approvalForm"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#5199FF",
"navigationBarTitleText": "",
"navigationBarTextStyle": "white"
},
"sitemapLocation": "sitemap.json",
"usingComponents": {
"van-loading": "@vant/weapp/loading/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"van-field": "@vant/weapp/field/index",
"van-button": "@vant/weapp/button/index",
"van-image": "@vant/weapp/image/index",
"van-col": "@vant/weapp/col/index",
"van-row": "@vant/weapp/row/index",
"van-toast": "@vant/weapp/toast/index",
"van-search": "@vant/weapp/search/index",
"van-icon": "@vant/weapp/icon/index",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-radio": "@vant/weapp/radio/index",
"van-switch": "@vant/weapp/switch/index",
"van-collapse": "@vant/weapp/collapse/index",
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-checkbox": "@vant/weapp/checkbox/index",
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"van-stepper": "@vant/weapp/stepper/index",
"van-empty": "@vant/weapp/empty/index",
"van-tree-select": "@vant/weapp/tree-select/index",
"van-uploader": "@vant/weapp/uploader/index"
},
"tabBar": {
"selectedColor": "#5199FF",
"list": [
{
"pagePath": "pages/evaluation/evaluation",
"text": "考评管理",
"iconPath": "/asset/img/evaluation.png",
"selectedIconPath": "/asset/img/evaluation_active.png"
},
{
"pagePath": "pages/work/work",
"text": "工作汇报",
"iconPath": "/asset/img/home.png",
"selectedIconPath": "/asset/img/home1.png"
},
{
"pagePath": "pages/mine/mine",
"text": "个人中心",
"iconPath": "/asset/img/my1.png",
"selectedIconPath": "/asset/img/my.png"
}
]
},
"plugins": {
"echarts": {
"version": "2.1.1",
"provider": "wx1db9e5ab1149ea03"
}
}
}

15
miniprogram/app.wxss Normal file
View File

@ -0,0 +1,15 @@
/**app.wxss**/
.container {
width: 100vw;
padding:15rpx;
box-sizing: border-box;
background-color: #f7f8fa;
}
.bgwhite{
background-color: white;
margin-top: 15rpx;
}
.cus-label{
padding: 20rpx;
color: #807e7e;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -5,8 +5,8 @@
<view>提交时间:{{fData.updateTime || '暂无'}}</view>
<view>提交指标:{{fData.target || '暂无'}}</view>
</view>
<view class="file_content">
<view class="file_title">附件信息</view>
<view class="public_content">
<view class="public_title">附件信息</view>
<view class="file_list">
<view
wx:for="{{fileList}}"
@ -19,4 +19,16 @@
</view>
</view>
</view>
<view class="public_content">
<view class="public_title">审批</view>
<van-cell-group>
<van-field
label="1"
value="{{ value }}"
placeholder="请输入用户名"
border="{{ false }}"
bind:change="onChange"
/>
</van-cell-group>
</view>
</view>

View File

@ -14,14 +14,14 @@
background-color: #fff;
border-radius: 8px;
}
.file_content{
.public_content{
box-sizing: border-box;
padding: 5px 10px;
background-color: #fff;
border-radius: 8px;
margin-top: 10px;
}
.file_title{
.public_title{
font-size: 34rpx;
margin-bottom: 10px;
}

View File

@ -0,0 +1,66 @@
// pages/mine/mine.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "个人中心"
}

View File

@ -0,0 +1,54 @@
<!--pages/index/mine.wxml-->
<view class="mine_wrap">
<view class="mine_item">
<view class="mine_item_title">基础信息</view>
<view class="mine_item_list">
<view class="list_item">
<span>姓名:暂无</span>
</view>
<view class="list_item">
<span>性别:暂无</span>
</view>
<view class="list_item">
<span>民族:暂无</span>
</view>
<view class="list_item">
<span>籍贯:暂无</span>
</view>
<view class="list_item">
<span>手机号:暂无</span>
</view>
<view class="list_item">
<span>邮箱:暂无</span>
</view>
</view>
</view>
<view class="mine_item">
<view class="mine_item_title">工作信息</view>
<view class="mine_item_list">
<view class="list_item">
<span>部门:暂无</span>
</view>
<view class="list_item">
<span>岗位:暂无</span>
</view>
<view class="list_item">
<span>职务:暂无</span>
</view>
</view>
</view>
<view class="mine_item">
<view class="mine_item_title">党员信息</view>
<view class="mine_item_list">
<view class="list_item">
<span>支部:暂无</span>
</view>
<view class="list_item">
<span>党员职务:暂无</span>
</view>
<view class="list_item">
<span>入党时间:暂无</span>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,40 @@
/* pages/index/mine.wxss */
.mine_wrap{
width: 100%;
height: 100vh;
box-sizing: border-box;
overflow-y: auto;
background-color: #f3f1f1;
padding: 10px;
}
.mine_item{
box-sizing: border-box;
border-radius: 4px;
background-color: #fff;
}
.mine_item_title{
width: 25%;
height: 32px;
line-height: 32px;
font-size: 32rpx;
font-weight: bold;
background-color: #5199FF;
color: #fff;
box-sizing: border-box;
padding-left: 10px;
border-bottom-right-radius: 10px;
}
.mine_item_list{
width: 100%;
box-sizing: border-box;
padding: 10px;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.list_item{
width: 30%;
margin: 10px 5px;
font-size: 30rpx;
}

View File

@ -0,0 +1,66 @@
// pages/index/work.js
const $api = require('../../utils/api').API;
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
},
"navigationBarTitleText": "工作汇报"
}

View File

@ -0,0 +1,20 @@
<view class="work_wrap">
<view class="work_content">
<view class="work_item_row">
<image class="item_img" src="/asset/img/index/dwysxt.png" />
<view class="item_label">党务意识形态汇报</view>
</view>
<view class="work_item_row">
<image class="item_img" src="/asset/img/index/dflzjs.png" />
<view class="item_label">党风廉政建设汇报</view>
</view>
<view class="work_item_row">
<image class="item_img" src="/asset/img/index/day.png" />
<view class="item_label">日常考核汇报</view>
</view>
<view class="work_item_row">
<image class="item_img" src="/asset/img/index/year.png" />
<view class="item_label">年度考核汇报</view>
</view>
</view>
</view>

View File

@ -0,0 +1,33 @@
/**work.wxss**/
.work_wrap{
width: 100%;
height: 100vh;
box-sizing: border-box;
padding: 10px;
overflow-y: auto;
}
.work_content{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.work_item_row{
width: 30%;
border: 1px solid #5199ff;
box-sizing: border-box;
border-radius: 10px;
font-size: 30rpx;
margin: 10px 5px;
padding: 10px 0;
display: flex;
flex-direction: column;
align-items: center;
}
.item_label{
margin-top: 5px;
text-align: center;
}
.item_img{
width: 50%;
height: 50px;
}

7
miniprogram/sitemap.json Normal file
View File

@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

View File

@ -0,0 +1,59 @@
//时间转换
function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time
.replace(new RegExp(/-/gm), '/')
.replace('T', ' ')
.replace(new RegExp(/\.[\d]{3}/gm), '')
}
if (typeof time === 'number' && time.toString().length === 10) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay(),
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
/**
* 时间戳/日期转换
*/
function timeChange(time){
let _date = new Date(time);
let _year = _date.getFullYear();
let _month = (_date.getMonth()+1) < 10 ? '0'+(_date.getMonth()+1) : _date.getMonth()+1;
let _day = _date.getDate();
return _year+'-'+_month+'-'+_day;
}
module.exports = {
parseTime: parseTime,
timeChange: timeChange
}

4
miniprogram/utils/su.wxs Normal file
View File

@ -0,0 +1,4 @@
var sub = function(str,s){
return str.indexOf(s) != -1;
}
module.exports.sub = sub;

19
miniprogram/utils/util.js Normal file
View File

@ -0,0 +1,19 @@
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : `0${n}`
}
module.exports = {
formatTime
}

113
package-lock.json generated Normal file
View File

@ -0,0 +1,113 @@
{
"name": "demo_test",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "demo_test",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@vant/weapp": "^1.10.5",
"miniprogram-sm-crypto": "^0.3.11",
"pinyin-match": "^1.2.2"
}
},
"node_modules/@vant/weapp": {
"version": "1.10.5",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.10.5.tgz",
"integrity": "sha512-bAHp9r0ZiRsOqPOLzQHI/ZvkAlXzol1/TFhM70MyghuxkzJTjcDUd8RIfLkCN3c1MCK/PfBGw2an8/afygftCg=="
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/jsbn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
"node_modules/miniprogram-sm-crypto": {
"version": "0.3.11",
"resolved": "https://registry.npmjs.org/miniprogram-sm-crypto/-/miniprogram-sm-crypto-0.3.11.tgz",
"integrity": "sha512-PSOFkTfW4VYFUNGv9yFbkpnOezIRugAnaGgSiNhifvXqx1L3YorHRIgSQpkbyYjlMpnMLpFsP/8Dnmt6/DDJYA==",
"dependencies": {
"jsbn": "^1.1.0"
}
},
"node_modules/pinyin-match": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/pinyin-match/-/pinyin-match-1.2.2.tgz",
"integrity": "sha512-C0yOq4LkToJMkDHiQFKOY69El2GRcwdS2lVEjgWjIV8go3wE4mloGFNkVicGHFGYHDg523m2/lKzW8Hh+JR9nw==",
"dependencies": {
"rollup": "^2.44.0"
}
},
"node_modules/rollup": {
"version": "2.79.1",
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz",
"integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=10.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
}
},
"dependencies": {
"@vant/weapp": {
"version": "1.10.5",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.10.5.tgz",
"integrity": "sha512-bAHp9r0ZiRsOqPOLzQHI/ZvkAlXzol1/TFhM70MyghuxkzJTjcDUd8RIfLkCN3c1MCK/PfBGw2an8/afygftCg=="
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"optional": true
},
"jsbn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
"miniprogram-sm-crypto": {
"version": "0.3.11",
"resolved": "https://registry.npmjs.org/miniprogram-sm-crypto/-/miniprogram-sm-crypto-0.3.11.tgz",
"integrity": "sha512-PSOFkTfW4VYFUNGv9yFbkpnOezIRugAnaGgSiNhifvXqx1L3YorHRIgSQpkbyYjlMpnMLpFsP/8Dnmt6/DDJYA==",
"requires": {
"jsbn": "^1.1.0"
}
},
"pinyin-match": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/pinyin-match/-/pinyin-match-1.2.2.tgz",
"integrity": "sha512-C0yOq4LkToJMkDHiQFKOY69El2GRcwdS2lVEjgWjIV8go3wE4mloGFNkVicGHFGYHDg523m2/lKzW8Hh+JR9nw==",
"requires": {
"rollup": "^2.44.0"
}
},
"rollup": {
"version": "2.79.1",
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz",
"integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
"requires": {
"fsevents": "~2.3.2"
}
}
}
}

56
project.config.json Normal file
View File

@ -0,0 +1,56 @@
{
"description": "项目配置文件",
"miniprogramRoot": "miniprogram/",
"setting": {
"bundle": false,
"userConfirmedBundleSwitch": false,
"urlCheck": true,
"scopeDataCheck": false,
"coverView": true,
"es6": true,
"postcss": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"preloadBackgroundData": false,
"minified": true,
"autoAudits": false,
"newFeature": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"useIsolateContext": true,
"nodeModules": false,
"enhance": true,
"useMultiFrameRuntime": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": true,
"enableEngineNative": false,
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram/"
}
],
"minifyWXSS": true,
"showES6CompileOption": false,
"minifyWXML": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"ignoreUploadUnusedFiles": true,
"condition": false
},
"compileType": "miniprogram",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
},
"srcMiniprogramRoot": "miniprogram/",
"packOptions": {
"ignore": [],
"include": []
},
"appid": "wx34ec155189941298"
}

View File

@ -0,0 +1,9 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "cyx-zhmc-wxjk",
"setting": {
"compileHotReLoad": true,
"urlCheck": false
},
"libVersion": "2.30.4"
}