增加功能

This commit is contained in:
duxp 2023-08-31 10:38:54 +08:00
commit df9307abb8
47 changed files with 2288 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,110 @@
// pages/approvalWarning/approvalForm/approvalForm.js
import {base_url} from '../../../utils/http'
Page({
/**
* 页面的初始数据
*/
data: {
//父组件数据
fData:null,
fileList:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options && JSON.parse(options.data)){
let _data = JSON.parse(options.data);
let _fileData = _data.files?_data.files.split(","):[];
let _newFileData = [];
_fileData.forEach(item => {
let _lastNum = item.lastIndexOf('/')+1;
_newFileData.push({
name:item.substr(_lastNum,item.length-1),
url:base_url+item
})
})
this.setData({
fData:_data,
fileList:_newFileData
})
}
},
//预览图片或文件
handlePreView(e){
let _url = e.currentTarget.dataset.url;
console.log(_url,'ddd');
if(_url.indexOf('.jpg') > -1 || _url.indexOf('.png') > -1){ //预览图片
wx.previewImage({
urls:[_url],
current:_url
})
}else{ //下载文件
wx.downloadFile({
url: _url, //仅为示例,并非真实的资源
success (res) {
if(res.statusCode === 200){
wx.openDocument({
filePath: res.tempFilePath,
success: function (res) {
console.log(res,'打开文档成功')
}
})
}
}
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "审批"
}

View File

@ -0,0 +1,22 @@
<!--pages/approvalWarning/approvalForm/approvalForm.wxml-->
<view class="approval_form_wrap">
<view class="form_one">
<view>提交人:{{fData.head || '暂无'}}</view>
<view>提交时间:{{fData.updateTime || '暂无'}}</view>
<view>提交指标:{{fData.target || '暂无'}}</view>
</view>
<view class="file_content">
<view class="file_title">附件信息</view>
<view class="file_list">
<view
wx:for="{{fileList}}"
wx:key="id"
class="file_list_item"
data-url="{{item.url}}"
bindtap="handlePreView"
>
({{index+1}})、{{item.name}}
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,38 @@
/* pages/approvalWarning/approvalForm/approvalForm.wxss */
.approval_form_wrap{
width: 100%;
height: 100vh;
box-sizing: border-box;
padding: 10px;
background-color: #e8e8e8;
}
.form_one{
color: #8d8d8d;
font-size: 30rpx;
box-sizing: border-box;
padding: 5px 10px;
background-color: #fff;
border-radius: 8px;
}
.file_content{
box-sizing: border-box;
padding: 5px 10px;
background-color: #fff;
border-radius: 8px;
margin-top: 10px;
}
.file_title{
font-size: 34rpx;
margin-bottom: 10px;
}
.file_list{
width: 100%;
}
.file_list_item{
width: 100%;
margin: 10px 0;
word-break: break-all;
text-decoration: underline;
color: #5199ff;
font-size: 30rpx;
}

View File

@ -0,0 +1,181 @@
// pages/approvalWarning/approvalWarning.js
const {API: $api} = require("../../utils/api");
Page({
/**
* 页面的初始数据
*/
data: {
pageNum: 1,
pageSize: 10,
//所有数据
list: [],
isRefreshing:false,//下拉刷新
isFinish:false,//下拉加载,
searchForm:{
reviewed:''
},
reviewedOpt:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.loadListData();
this.loadPersonData();
},
//人员查询
handleSearchReviewed(e){
this.setData({
"searchForm.reviewed":e.detail,
})
this.loadListData();
},
//跳转页面
handleSwitchItem(e){
let _data = e.currentTarget.dataset.item;
wx.navigateTo({
url:'./approvalForm/approvalForm?data='+JSON.stringify(_data)
})
},
//上拉加载
onLoadMore(){
let _num = this.data.pageNum+1;
this.setData({
pageNum:_num
});
this.loadListData();
},
//下拉刷新
onRefresh(){
this.setData({
list:[],
pageNum:1,
isFinish:false
});
this.loadListData();
},
/**
* 列表接口
*/
loadListData() {
var that = this; // //防止this指向问题
wx.showLoading({
title: '加载中',
});
let _param = {
pageSize:that.data.pageSize,
pageNum:that.data.pageNum,
reviewed:that.data.searchForm.reviewed
}
$api.approveList(_param).then(res => {
if(res.code === 0){
wx.hideLoading();
let _data = res.rows;
_data.forEach(item => {
item.statusName = that.statusFn(item.status)
})
if(that.data.pageNum > 1){ //上拉加载的逻辑
if(_data.length == 0){
that.setData({
isFinish:true
})
}
_data = that.data.list.concat(_data); //数据合并
that.setData({
list:_data
})
}else{
if(_data.length < that.data.pageSize){
that.setData({
list:_data,
isRefreshing:false,
isFinish:true
})
}else{
that.setData({
list:_data,
isRefreshing:false,
})
}
}
}
});
},
//加载人员
loadPersonData(){
let _this = this;
$api.personList({}).then(res => {
if(res.code === 0){
let _newData = [{text:'请选择人员',value:''}];
res.data.forEach(item => {
_newData.push({
text:item.name,
value:item.id
})
})
_this.setData({
reviewedOpt:_newData
})
}
})
},
//状态值
statusFn(_num){
let statusArr = ['待提交','待审批','已驳回','已审批'];
return statusArr[Number(_num)-1];
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"pullRefreshView":"../component/pullRefreshView/pullRefreshView"
},
"navigationBarTitleText": "审批预警"
}

View File

@ -0,0 +1,39 @@
<!--pages/approvalWarning/approvalWarning.wxml-->
<view class="query_list_wrap">
<view class="search_title">
<van-dropdown-menu active-color="#5199ff">
<van-dropdown-item
value="{{ searchForm.reviewed }}"
options="{{ reviewedOpt }}"
bind:change="handleSearchReviewed"
/>
</van-dropdown-menu>
</view>
<pullRefreshView
height="86vh"
bindonrefresh="onRefresh"
refreshing="{{isRefreshing}}"
bindloadmore="onLoadMore"
nomore="{{isFinish}}"
pullText="下拉刷新"
loadmoreText="加载中..."
>
<view
class="list_row"
wx:for="{{list}}"
wx:key="id"
wx:for-item="item"
>
<view class="list_row_right">
<view>提交人:{{item.head?item.head:'暂无'}}</view>
<view>提交时间:{{item.updateTime?item.updateTime:'暂无'}}</view>
<view>提交指标:{{item.target?item.target:'暂无'}}</view>
<view>审批人:{{item.reviewer?item.reviewer:'暂无'}}</view>
<view>审批状态:{{item.statusName}}</view>
</view>
<view style="width:100%;text-align:center;margin-top:20px">
<van-button data-item="{{item}}" custom-style="width:80%;" type="info" bindtap="handleSwitchItem">审批</van-button>
</view>
</view>
</pullRefreshView>
</view>

View File

@ -0,0 +1,20 @@
/* pages/approvalWarning/approvalWarning.wxss */
.query_list_wrap{
width: 100%;
box-sizing: border-box;
padding: 10rpx;
}
.search_title{
width: 100%;
height: 12vh;
}
.list_row{
box-sizing: border-box;
padding: 20rpx;
border-bottom: 1rpx solid silver;
}
.list_row_right{
margin-left: 10rpx;
font-size: 32rpx;
color: #575656;
}

View File

@ -0,0 +1,212 @@
// pages/bind/bind.js
const $api = require("../../utils/api").API;
import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog';
Page({
/**
* 页面的初始数据
*/
data: {
sms: "",
phone: "",
phoneErr: "",
sendMsgBtn: true,
sendMsgBtnText: "发送验证码",
verificationCode: "",
//用户协议
personShow:false,
//隐私政策
privacyShow:false,
privacy:false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
checkPhone() {
let regs = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
console.log(this.data.phone)
if (regs.test(this.data.phone)) {
this.setData({
phoneErr: "",
sendMsgBtn: false
});
} else {
this.setData({
phoneErr: "手机号码有误"
});
}
},
sendMsg() {
let that = this;
$api.getMsgCode({
"phone": this.data.phone
}).then(obj => {
if (obj.code == 200) {
//保存校验code至页面变量
//改变按钮为不可用用状态
that.setData({
verificationCode: obj.data.verificationCode,
sendMsgBtn: true
});
//生成倒计时文本
// 启动以1s为步长的倒计时
let seconds = 60;
let interval = setInterval(() => {
seconds--;
that.setData({
sendMsgBtnText: seconds + "秒后重发"
})
}, 1000);
// 停止倒计时
setTimeout(function () {
clearInterval(interval);
that.setData({
sendMsgBtnText: "发送验证码",
sendMsgBtn: false
})
}, seconds * 1000);
}
}).catch(err => {
console.log(err);
})
},
wxBind() {
let that = this;
if(!that.data.phone){
wx.showToast({
title:'请输入手机号!',
duration:1500,
icon:"none"
});
return false;
}
if(!that.data.sms){
wx.showToast({
title:'请输入手机号验证码!',
duration:1500,
icon:"none"
});
return false;
}
if(!that.data.privacy){
wx.showToast({
title:'请勾选阅读用户协议!',
duration:1500,
icon:"none"
});
return false;
}
if (that.data.sms === that.data.verificationCode) {
$api.saveBind({
"phone": that.data.phone,
"openId": wx.getStorageSync("openId")
}).then(res => {
if (res.code == 200) {
wx.reLaunch({
url: "/pages/loading/loading"
})
} else {
Dialog.alert({
message: res.msg,
}).then(() => {
// on close
});
}
}).catch(err => {
console.log(err);
})
} else {
wx.showToast({
title:'验证码不一致!',
duration:1500,
icon:"none"
});
}
},
//选中隐私
handleCheckbox(e){
let _arr = e.detail.value;
let _isShow = false;
if(_arr.length > 0){
_isShow = true;
}
this.setData({
privacy:_isShow
})
},
//点击隐私政策·
handlePrivacyOpen(){
this.setData({
privacyShow:true
})
},
handlePrivacyClose(){
this.setData({
privacyShow:false
})
},
//用户协议事件
handlePersonOpen(){
this.setData({
personShow:true
})
},
handlePersonClose(){
this.setData({
personShow:false
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,164 @@
<!--pages/bind/bind.wxml-->
<view class="container">
<van-dialog id="van-dialog" />
<van-cell-group>
<van-image width="100%" height="180" fit="cover" src="https://ss2.meipian.me/users/3185213/53f5a46e83624917ba07ddb197723d9f.jpg?imageView2/2/w/750/h/1400/q/80" />
<van-field model:value="{{phone}}" label="手机号" placeholder="请输入手机号" model:error-message="{{phoneErr}}" bind:change="checkPhone" border="{{ false }}" />
<van-field model:value="{{ sms }}" center clearable label="验证码" placeholder="请输入验证码" border="{{ false }}" use-button-slot>
<van-button slot="button" disabled="{{ sendMsgBtn }}" size="small" type="info" bind:click="sendMsg">
{{sendMsgBtnText}}
</van-button>
</van-field>
</van-cell-group>
<view class="submit_btn">
<van-button style="width: 100%;" type="info" block bindtap="wxBind">绑定</van-button>
</view>
<view class="privacy_data">
<checkbox-group bind:change="handleCheckbox">
<checkbox color="#5199ff" value="privacy" />
我已阅读并同意<label class="privacy_color" bindtap="handlePersonOpen">《用户协议》</label>和
<label class="privacy_color" bindtap="handlePrivacyOpen">《隐私政策》</label>
</checkbox-group>
</view>
</view>
<!--用户协议-->
<van-popup
bind:close="handlePersonClose"
closeable
position="bottom"
round
show="{{ personShow }}"
>
<view class="privacy_wrap">
<view class="privacy_title">用户协议</view>
<view class="privacy_content">
<view class="fontWeight">一、总则</view>
<view class="fontWeight">1. 用户在注册及使用前请认真阅读本协议,确保充分理解本协议中所有条款。除非您接受本协议所有条款,
否则您无权注册、登录或使用本协议所涉服务。您的注册、登录、使用等行为将视为无条件接受本协议所有条款的约束。</view>
<view class="fontWeight">2. 除非另有明确规定,本产品所推出的新功能、新服务,均无条件的使用本协议。</view>
<view class="fontWeight">3. 我公司保留在任何时候修改本协议条款的权利,且无需另行通知。在我公司修改协议条款后,如果您不接受修改后的条款,
请立即停止使用本产品提供的服务,继续使用本产品提供的服务将被视为接受修改后的协议。</view>
<view class="brView"></view>
<view class="fontS">二、用户注册</view>
<view class="fontS">1. 用户应当同意本协议的全部条款并按照页面提示完成全部注册程序(未成年人应与法定监护人共同完成)。用户在注册过程中点击“绑定”按钮即表示完全接受本协议全部条款。</view>
<view class="fontS">2. 用户在使用本服务前需要注册一个本产品账号。本产品账号应当使用手机号码绑定注册,请用户使用尚未与本产品账号绑定且未被本产品根据本协议封禁的手机号码注册账号。
本产品可以根据用户需求或产品需求对账号注册和绑定的方式进行更改,而无须事先通知用户。</view>
<view class="fontS">3. 用户在使用本产品服务过程中应保证各项服务业务所需信息的真实性,如果因信息不真实而引起的问题,以及问题发生所带来的后果,本公司不负任何责任。</view>
<view class="fontS">4. 在用户注册及使用本产品时,要搜集能识别用户身份的个人信息以便系统可以在必要时联系用户,或为用户提供更好的使用体验。
系统搜集的信息包括但不限于用户的性别、年龄、出生日期、所在城市;系统同意对这些信息的使用将受限于用户个人隐私信息保护的约束。</view>
<view class="brView"></view>
<view class="fontS">三、服务内容</view>
<view class="fontS">1. 本服务的具体内容由本产品根据实际情况提供,包括但不限于用户使用本产品等。本产品可以对提供的服务予以变更,且本产品提供的服务内容可能随时变更,用户将会收到关于服务变更的通知。</view>
<view class="fontS">2.除非本协议另有其他明示规定,本公司所推出的新产品、新功能、新服务,均受到本协议条款之规范。 </view>
<view class="brView"></view>
<view class="fontS">四、服务变更、中断或终止</view>
<view class="fontS">1. 鉴于网络服务的特殊性(包括但不限于服务器的稳定性问题、恶意的网络攻击等行为的存在及其他无法控制的情形),用户同意我公司有权随时中断或终止部分或全部的服务。</view>
<view class="fontS">2. 我公司需要定期或不定期地对提供服务的系统或相关设备进行检修或维护,如因此类情况而造成服务在合理时间内的中断,我公司无需为此承担任何责任</view>
<view class="fontS">3. 如发生下列任何一种情形,我公司有权随时变更、中断或终止向用户提供本协议项下的服务而无需对用户或任何第三方承担任何责任:
(1)根据法律规定用户应提交真实信息,而用户提供的个人资料不真实、或与注册时信息不一致又未能提供合理证明;
(2)用户违反相关法律法规或本协议的约定;
(3)按照法律规定或有权机关的要求;
(4)出于安全的原因或其他必要的情形。</view>
<view class="brView"></view>
<view class="fontS">五、用户个人隐私信息保护</view>
<view class="fontS">1.依据法律的规定,我们将在特定情形下收集、使用和披露您的个人信息。以下条款描述了我们如何收集、使用和披露您的个人信息。 </view>
<view class="fontS">2. 用户提供
我们会对您直接提供的信息进行保存。比如:我们会记录您的注册信息、寻求客服或者其他和我们沟通的记录。记录信息的种类包括:头像、昵称、性别、出生日期、所在地区以及其他您选择提供的信息。我们收集、使用和披露个人信息是为了通过创建账户、识别用户、回应查询和邮件等方式来为您提供服务。
当你接触或者使用我们的服务时,我们将自动收集您的信息包括:
Log信息(我们记录所有您使用服务时的log信息包括浏览器信息、使用时间、浏览的网页、IP地址及来源)。
我们使用多种技术记录信息包括但不限于向您的移动设备种Cookies。Cookies是一些存在您的硬件上的小数据包
用以帮助我们提高服务的质量及您的使用体验,了解在哪些区域和功能上受欢迎,以及统计流量等。</view>
<view class="fontS">3. 除本隐私政策未载明或本隐私政策的更新未能首先通知您的情况下,您的个人信息将不会用于其他目的。</view>
<view class="fontS">4. 匿名汇总统计数据不是我公司所定义的个人用户信息,我们将为多种目的,包括但不限于分析和使用模式的报告等,来保存和使用此类信息。我公司保留以任何目的或单方面许可第三方使用和披露匿名汇总统计数据的权利。</view>
<view class="fontS">5. 您在本产品中上传的信息,有可能会损坏您或他人的合法权益,您必须充分意识此类风险的存在。您明确同意,自行承担因上传信息所存在的一切风险及后果,我公司无需承担任何责任。</view>
<view class="fontS">6. 虽然我们会尽最大努力保护用户隐私,但当我们有理由相信只有公开个人信息才能遵循现行司法程序、 法院指令或其他法律程序或者保护我公司、我公司用户或第三方的权利、财产或安全时,我们可能披露个人信息。</view>
<view class="fontS">7. 我们会采取合理的实际及电子手段以及规程保障措施来保护您的个人信息。 虽然通过因特网信息传输数据并非100% 安全,但我们已经采取并将继续采取商业范畴内合理的努力来确保您的个人信息得到保护。</view>
<view class="fontS">8. 我公司重视对未成年人个人隐私信息的保护。我公司将依赖用户提供的个人信息判断用户是否为未成年人。任何18岁以下的未成年人注册账号或使用本服务应事先取得家长或其法定监护人(以下简称“监护人”)的书面同意。除根据法律法规的规定及有权机关的指示披露外,我公司不会使用向任何第三方透露未成年人的个人隐私信息。</view>
<view class="brView"></view>
<view class="fontS">六、内容规范</view>
<view class="fontS">1. 本项规范所述内容是指用户使用本服务过程中所制作、上载、复制、发布、传播的任何内容,包括但不限于账号头像、名称、个性签名等注册信息及认证资料,或文字、语音、图片、图文等发送、回复消息和相关链接页面,以及其他使用本产品账号或本服务所产生的内容。</view>
<view class="fontS">2. 用户承诺使用本产品的服务时必须符合中华人民共和国有关法律法规,不得利用本产品的服务制作、上载、复制、发布、传播以下内容:(1)反对宪法所确定的基本原则的;(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的; (3)损害国家荣誉和利益的;(4)煽动民族仇恨、民族歧视,破坏民族团结的;(5)破坏国家宗教政策,宣扬邪教和封建迷信的;(6)散布谣言,扰乱社会秩序,破坏社会稳定的;(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;(8)侮辱或者诽谤他人,侵害他人合法权益的;(9)含有法律、行政法规禁止的其他内容的。</view>
<view class="fontS">3. 用户不得利用本产品账号或本服务制作、上载、复制、发布、传播下干扰本产品正常运营,以及侵犯其他用户或第三方合作权益的内容:
(1)含有任何性暗示的;
(2)含有辱骂、恐吓、威胁内容的;
(3)含有骚扰、垃圾广告、恶意信息、诱骗信息的;
(4)涉及他人隐私、个人信息或资料的;
(5)含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益的。</view>
<view class="brView"></view>
<view class="fontS">七、使用规则</view>
<view class="fontS">1. 用户在本服务中或通过本服务所传送、发布的任何内容并不反映或代表,也不得被视为反映或代表我公司的观点、立场或政策,我公司对此不承担任何责任。</view>
<view class="fontS">2. 用户在使用本产品时,必须遵守中华人民共和国相关法律法规的规定,同意将不会利用本产品进行任何违法或不正当的活动,包括但不限于下列行为:
(1)干扰或破坏有关服务,或与有关服务连接的任何服务器或网络,或与有关服务相关的任何政策、要求或规定;
(2)采集并存储涉及任何其他用户的个人信息,以用于任何被禁止的活动;
(3)故意或非故意违反任何相关的中国法律、法规、规章、条例等其他具有法律效力的规范。</view>
<view class="fontS">3. 用户须对利用本产品账号或本服务传送信息的真实性、合法性、无害性、准确性、有效性等全权负责,与用户所传播信息相关的任何法律责任由用户自行承担,与我公司无关。如因此给我公司或第三方造成损害的,用户应当依法予以赔偿。</view>
<view class="fontS">4. 用户为使用本产品,须自行配备进入国际互联网所必需的设备,包括电脑、手机及其他与接入国际互联网有关的装置,并自行支付与此服务有关的费用。</view>
<view class="brView"></view>
<view class="fontS">八、免责声明</view>
<view class="fontS">1. 对于经由本产品服务而传送的内容,我公司不保证前述内容的正确性、完整性或品质。用户在接受有关服务时,有可能会接触到令人不快、不适当或令人厌恶的内容。在任何情况下,我公司均不对任何内容负责,包括但不限于任何内容发生任何错误或纰漏以及衍生的任何损失或损害。用户使用上述内容,应自行承担风险。</view>
<view class="fontS">2. 用户明确同意其使用本产品所存在的风险及其后果将完全由其自己承担,我公司对用户不承担任何责任。如因用户违反有关法律、法规或本协议项下的任何条款而给任何其他第三人造成损失,用户同意承担由此造成的损害赔偿责任。</view>
<view class="fontS">3. 我公司尊重并保护用户的个人隐私权。但因恶意的网络攻击等行为及其他无法控制的情形,导致用户隐私信息泄露的,用户同意我公司不承担任何责任。</view>
<view class="fontS">4. 对于因电信系统或互联网网络故障、计算机故障、计算机系统问题或其它任何不可抗力原因而产生损失,我公司不承担任何责任,但将尽力减少因此给用户造成的损失和影响。</view>
<view class="brView"></view>
<view class="fontS">九、知识产权声明</view>
<view class="fontS">1. 本产品服务中包含的任何文字、图表、音频、视频和软件(包括但不限于软件中包含的图表、动画、音频、视频、界面实际、数据和程序、代码、文档)等信息或材料均受著作权法、商标法和其它法律法规保护,未经相关权利人书面同意,用户不得以任何方式使用该信息或材料。</view>
<view class="fontS">2. 本协议未授予用户使用本产品任何商标、服务标记、标识、域名和其他显著品牌特征的权利,任何人不得擅自(包括但不限于:以非法的方式复制、传播、展示、镜像、上载、下载)使用,否则我公司将依法追究法律责任。</view>
<view class="fontS">3. 除本协议明确允许以外,用户不得以任何形式或任何方式对本产品部分或全部内容进行修改、出租、租赁、出借、出售、分发、复制、创作衍生品或用于任何商业用途。</view>
<view class="brView"></view>
<view class="fontS">十、法律适用</view>
<view class="fontS">1. 本协议的订立、执行和解释及争议的解决均应适用中国法律并受中国法院管辖。如服务条款任何一部分与中华人民共和国法律相抵触,则该部分条款应按法律规定重新解释,部分条款无效或重新解释不影响其余条款法律效力。</view>
<view class="fontS">2. 用户和我公司一致同意本协议。在执行本协议过程中如发生纠纷,双方应友好协商解决;协商不成时,任何一方可直接向所在地的人民法院提起诉讼。</view>
<view class="brView"></view>
<view class="fontS">十一、其他规定</view>
<view class="fontS">1. 本协议中的标题仅为方便而设,在解释本协议时应被忽略。</view>
<view class="fontS">2. 本协议及其修改权、最终解释权归我公司所有。</view>
</view>
</view>
</van-popup>
<!--隐私政策-->
<van-popup
bind:close="handlePrivacyClose"
closeable
position="bottom"
round
show="{{ privacyShow }}"
>
<view class="privacy_wrap">
<view class="privacy_title">隐私政策</view>
<view class="privacy_content">
<view class="fontWeight">本应用非常重视用户隐私政策并严格遵守相关的法律规定。请您仔细阅读《隐私政策》后再继续使用。
如果您继续使用我们的服务,表示您已经充分阅读和理解我们协议的全部内容。
</view>
<view class="fontS">本小程序尊重并保护所有使用服务用户的个人隐私权。
为了给您提供更准确、更优质的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。
除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。
本应用会不时更新本隐私权政策。您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。
</view>
<view class="brView"></view>
<view class="fontWeight">一、适用范围</view>
<view class="fontWeight">1. 为了分辨用户,开发者将在获取你的明示同意后,收集你的微信昵称、头像。</view>
<view class="fontWeight">2. 为了上传图片或者视频,开发者将在获取你的明示同意后,访问你的摄像头。</view>
<view class="fontWeight">3. 为了保存图片或者上传图片,开发者将在获取你的明示同意后,使用你的相册(仅写入)权限。</view>
<view class="fontWeight">4. 为了登录或者注册,开发者将在获取你的明示同意后,收集你的手机号。</view>
<view class="fontWeight">5. 开发者收集你的设备信息,用于保障你正常使用网络服务。</view>
<view class="fontWeight">6. 开发者收集你的操作日志,用于运营维护。</view>
<view class="fontWeight">7. 开发者访问你的蓝牙,用于设备连接。</view>
<view class="brView"></view>
<view class="fontS">二、信息使用</view>
<view class="fontS">1. 本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人登录信息。
如果我们存储发生维修或升级,我们会事先发出推送消息来通知您,请您提前允许本应用消息通知。</view>
<view class="fontS">2. 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。
任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。
包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据。</view>
<view class="brView"></view>
<view class="fontS">三、本隐私政策的更改</view>
<view class="fontS">1. 如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、
使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。</view>
<view class="fontS">2. 本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。</view>
<view class="brView"></view>
<view class="fontS">请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,
尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。</view>
<view class="fontS">感谢您花时间了解我们的隐私政策!我们将尽全力保护您的个人信息和合法权益,再次感谢您的信任!</view>
</view>
</view>
</van-popup>

View File

@ -0,0 +1,59 @@
/* pages/bind/bind.wxss */
.container{
display: flex;
flex-direction: column;
height: 100vh;
}
.submit_btn{
margin-top: 10%;
}
.privacy_data{
width: 90%;
margin: 2% auto 0;
font-size: 34rpx;
color: #838383;
}
.wx-checkbox-input {
width: 34rpx !important;
height: 34rpx !important;
}
.privacy_color{
color: #5199ff;
}
.privacy_wrap{
width: 96%;
margin: 0 auto;
}
.privacy_title{
width: 100%;
text-align: center;
font-size: 44rpx;
font-weight: bold;
box-sizing: border-box;
padding-bottom: 10rpx;
border-bottom: 1rpx solid #000;
margin-top: 4%;
}
.privacy_content{
width: 100%;
height: 60vh;
overflow-y: auto;
margin: 4% 0;
text-indent: 2rem;
font-size: 28rpx;
color: #585859;
}
.fontWeight{
font-weight: bold;
color: #000;
margin: 5px 0;
font-size: 30rpx;
}
.fontS{
margin: 5px 0;
}
.brView{
margin-top: 20px;
}

View File

@ -0,0 +1,165 @@
// pages/component/pullRefresnView/pullRefreshView.js
// 支持下拉刷新-上拉加载的组件
Component({
options: {
multipleSlots: true
},
properties: {
height: {
type: String,
value: '84vh'
},
refresherEnable:{
type: Boolean,
value: true
},
refresherType: {
type: String,
value: 'default',
},
loadType: {
type: String,
value: 'default',
},
pullText: {
type: String,
value: '下拉刷新',
},
releaseText: {
type: String,
value: '松开立即刷新',
},
refreshText: {
type: String,
value: '正在刷新',
},
loadmoreText: {
type: String,
value: '加载中',
},
nomoreText: {
type: String,
value: '已加载全部数据',
},
noData: {
type: String,
value: '暂无数据',
},
pullDownHeight: {
type: Number,
value: 60,
},
refreshing: {
type: Boolean,
value: false,
observer: '_onRefreshFinished',
},
scrollY: {
type: Boolean,
value: true
},
nomore: {
type: Boolean,
value: false,
},
showLoading:{
type: Boolean,
value: true,
},
scrollToView:{
type:String,
value:''
},
scrollWithAnimation:{
type: Boolean,
value: false,
}
},
data: {
// url: wx.$global.imageUrl,
showTop: false,
pullState: 0,
lastScrollEnd: 0,
scrollTop: 0,
isLoadMore: false,
moveY: -60,
topNum: 0,
},
attached() {
this.setData({
endY: -this.properties.pullDownHeight
})
},
methods: {
//滚动事件
_onScroll: function (e) {
this.triggerEvent('scroll', e);
},
//被下拉
_onPulling: function (e) {
let y = e.detail.dy
if (y < this.properties.pullDownHeight) {
this.setData({
pullState: 0
})
} else {
this.setData({
pullState: 1
})
}
this.triggerEvent('onpulling',this.data.pullState);
},
//滚动到顶部
_onScrollTop: function (e){
this.triggerEvent('scrolltoupper', e);
},
//下拉刷新关闭了
_onClose: function (e) {
this.triggerEvent('onrefreshclose', e);
},
//下拉刷新执行
_onRefresh: function (e) {
this.setData({
pullState: 2
})
this.triggerEvent('onrefresh', e);
},
//滚动到底部
_onLoadmore: function (e) {
this.triggerEvent('scrolltolower', e)
// !this.properties.nomore &&
if (!this.properties.refreshing) {
this.triggerEvent('loadmore', e);
}
},
goTop(){
console.log('到顶部')
this.setData({
topNum:0
})
},
getScrollPosition(e) {
if( e.detail.scrollTop > 800 ) {
this.setData({
showTop: true
})
}else{
this.setData({
showTop: false
})
}
//触发一个重绘的动作 否则经常不能横向切换
this.triggerEvent('resizeactioin')
},
handlerTouchend() {
this.triggerEvent('resizeactioin')
},
hideGoTop() {
console.log('隐藏 go top')
this.setData({
showTop: false
})
}
},
})

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1,49 @@
<!--pages/component/pullRefresnView/pullRefreshView.wxml-->
<scroll-view enable-flex scroll-y="{{scrollY}}"
style="height:{{ height }}"
class="prv-container"
refresher-enabled="{{refresherEnable}}"
bindrefresherrefresh="_onRefresh"
refresher-triggered="{{refreshing}}"
bindscrolltolower="_onLoadmore"
bindrefresherpulling="_onPulling"
refresher-default-style="none"
bindrefresherrestore="_onClose"
bindscrolltoupper="_onScrollTop"
refresher-threshold="{{pullDownHeight}}"
scroll-into-view="{{scrollToView}}"
scroll-with-animation="{{scrollWithAnimation}}"
scroll-top='{{topNum}}'
bindscroll="getScrollPosition"
bindtouchend="handlerTouchend"
lower-threshold="70"
>
<slot slot="refresher" name="refresher" wx:if="{{refresherType=='custom'}}"></slot>
<view slot="refresher" class="prv-pulldown" style="height:{{pullDownHeight}}px;line-height:{{pullDownHeight}}px;" wx:else>
<view wx:if="{{refresherType=='default'}}">
<block wx:if="{{pullState==0||pullState==1}}">
<view class="prv-pull-icon" style='transform:rotate({{pullState==0?0:180}}deg);'></view>
<text class="text" wx:if="{{pullState==0}}"> {{pullText}}</text>
<text class="text" wx:if="{{pullState==1}}" space="nbsp"> {{releaseText}}</text>
</block>
<block wx:if="{{pullState==2}}">
<view class="prv-loading"></view><text> {{refreshText}}</text>
</block>
</view>
<view wx:elif="{{refresherType=='circle'}}" class="prv-loading prv-dot-loading">
</view>
</view>
<slot></slot>
<slot name="loader" wx:if="{{loadType=='custom'&&!isEmpty&&showLoading}}"></slot>
<view class="prv-loadmore" wx:elif="{{!isEmpty&&showLoading}}">
<block wx:if="{{nomore}}">
<text class="load-text">{{noData}}</text>
</block>
<block wx:else>
<view class="prv-loading"></view><text> {{loadmoreText}}</text>
</block>
</view>
</scroll-view>
<!-- 置顶 -->
<!-- <view wx:if="{{showTop}}" class="go-top" bindtap="goTop">置顶</view> -->

View File

@ -0,0 +1,199 @@
/* pages/component/pullRefresnView/pullRefreshView.wxss */
:host {
position: relative;
overflow: hidden;
display: block;
}
.prv-container {
display: flex;
flex-direction: column;
position: relative;
/* height:80vh; */
width: 100%;
}
.prv-scroll-view {
height: 100%;
flex: 1;
}
.prv-pulldown {
width: 100%;
text-align: center;
display: block;
font-size: 26rpx;
}
.prv-pulldown .text {
color: #222;
}
.prv-loadmore {
height: 60rpx;
width: 100%;
line-height: 58rpx;
text-align: center;
font-size: 26rpx;
}
.prv-loadmore .load-text {
color: #444;
}
@keyframes loading {
0% {
transform: rotate(0deg)
}
50% {
transform: rotate(180deg)
}
100% {
transform: rotate(360deg)
}
}
.prv-pull-icon {
width: 18px;
height: 18px;
display: inline-block;
vertical-align: middle;
transition: all 0.6s ease;
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACABAMAAAAxEHz4AAAAJ1BMVEUAAABvb29wcHBzc3NwcHBwcHBwcHBwcHBwcHBwcHBvb29vb29wcHAefdnwAAAADHRSTlMAVdQqRTL07OPbTD3LST/yAAABVElEQVRo3u3OsU0EUQyE4UUnEkiuALITGcHqKiCjBlpAlEFIMbQACUJyUdwfOZiVvXZwkSd4z3Yw+pbJJI9dMgVTMAVTMAVTMAVTMAVTMAVTMAVTcO2CddnK7bq34PC4WfB62ltw/vtaNPefP+u+gsOTfSyaF7PTvoKz2e+zXO/ezSCkBQDM3qTgwQxCWgCAHDcKIIQFDrBvEdzYFoFbAMgJ3AJATuAUAHICpwCQE7gEgJzAJQDkBA4BICdwCAA5gT0A5AT2AJATWANATmBVQIHApoACgU0AFQKLACoEFgFUCMwCqBCYBVAhMAqgQmAUQIXAJIAKgUkAFQKDACoEBgFUCPwCqBD4BVAh8DUATuBzQIPA64AGgdcBDQKPAxoEHgc0CKQHgOAB0CP0ARAE0CYAaBP6AAgOaBMc0CcA6BMc0CcA6BMc0CQ4oEtwQJNwXCaTPP9ccLYeafVjOwAAAABJRU5ErkJggg==) no-repeat;
background-size: 100%;
}
.prv-loading {
width: 20px;
height: 20px;
display: inline-block;
vertical-align: middle;
margin-top: -2rpx;
animation: weuiLoading 1s steps(12, end) infinite;
background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;
background-size: 100%
}
@keyframes weuiLoading {
0% {
transform: rotate3d(0, 0, 1, 0deg)
}
100% {
transform: rotate3d(0, 0, 1, 360deg)
}
}
.prv-dot-loading,
.prv-dot-loading:before,
.prv-dot-loading:after {
display: inline-block;
vertical-align: middle;
width: 6px;
height: 6px;
-webkit-border-radius: 50%;
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.3);
font-size: 0;
animation: dot2 1s step-start infinite
}
.prv-dot-loading {
position: relative
}
.prv-dot-loading:before {
content: "";
position: absolute;
left: -12px;
background-color: rgba(0, 0, 0, 0.1);
animation: dot1 1s step-start infinite
}
.prv-dot-loading:after {
content: "";
position: absolute;
right: -12px;
background-color: rgba(0, 0, 0, 0.5);
animation: dot3 1s step-start infinite
}
@keyframes dot1 {
0%,
100% {
background-color: rgba(0, 0, 0, 0.1)
}
30% {
background-color: rgba(0, 0, 0, 0.5)
}
60% {
background-color: rgba(0, 0, 0, 0.3)
}
}
@keyframes dot2 {
0%,
100% {
background-color: rgba(0, 0, 0, 0.3)
}
30% {
background-color: rgba(0, 0, 0, 0.1)
}
60% {
background-color: rgba(0, 0, 0, 0.5)
}
}
@keyframes dot3 {
0%,
100% {
background-color: rgba(0, 0, 0, 0.5)
}
30% {
background-color: rgba(0, 0, 0, 0.3)
}
60% {
background-color: rgba(0, 0, 0, 0.1)
}
}
.go-top{
position: fixed;
right: 21rpx;
/* bottom: 240rpx; */
bottom: 170rpx;
background-color: #2374ee;
color: #ffffff;
box-sizing: border-box;
padding: 20rpx;
border-radius: 10rpx;
}
.publish-icon-3{
width: 50rpx;
height: 50rpx;
}
.center{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 113rpx;
height: 113rpx;
/* width: 90rpx;
height: 90rpx; */
}

View File

@ -0,0 +1,85 @@
// pages/evaluation/evaluation.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
//信息查询
handleToQuery(){
wx.navigateTo({
url:'../queryList/queryList'
})
},
//审批预警
handleApproval(){
wx.navigateTo({
url:'../approvalWarning/approvalWarning'
})
},
//任务预警
handleTaskWarning(){
wx.navigateTo({
url:'../taskWarning/taskWarning'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "考评管理"
}

View File

@ -0,0 +1,18 @@
<!--pages/evaluation/evaluation.wxml-->
<view class="evalution_wrap">
<view class="evalution_content">
<view class="evalution_item_row" bindtap="handleTaskWarning">
<image class="item_img" src="/asset/img/index/task_warn.png" />
<view class="item_label">任务预警</view>
</view>
<view class="evalution_item_row" bindtap="handleApproval">
<image class="item_img" src="/asset/img/index/evaluation_warn.png" />
<view class="item_label">审批预警</view>
</view>
<view class="evalution_item_row" bindtap="handleToQuery">
<image class="item_img" src="/asset/img/index/info_query.png" />
<view class="item_label">信息查询</view>
</view>
</view>
</view>

View File

@ -0,0 +1,33 @@
/* pages/evaluation/evaluation.wxss */
.evalution_wrap{
width: 100%;
height: 100vh;
box-sizing: border-box;
padding: 10px;
overflow-y: auto;
}
.evalution_content{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.evalution_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;
}

View File

@ -0,0 +1,127 @@
// pages/loading/loading.js
const $api = require('../../utils/api').API;
import Dialog from '@vant/weapp/dialog/dialog';
const $app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
//测试版本更新
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log(res,'是否打印?');
})
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
//登录
const _this = this;
wx.login({
success: res => {
$api.getUserInfo({
"code": res.code
}).then(obj => {
if (obj.code == 200) {
//保存openId
wx.setStorageSync("openId", obj.data.openId);
//判断绑定状态,跳转页面
if (obj.data.status == "UNBIND") {
wx.reLaunch({
url: '/pages/bind/bind'
})
} else {
wx.setStorageSync("token", obj.data.token);
wx.setStorageSync("sourceCow", obj.data.loginUser.sourceCow);
wx.setStorageSync("userInfo", obj.data.loginUser);
wx.setStorageSync("sourceCow", obj.data.loginUser.sourceCow);
wx.setStorageSync("farmName", obj.data.loginUser.name);
let roles = obj.data.loginUser.roles;
//拼接角色字符串
var roleStr = "";
roles.forEach(element => {
roleStr += element.roleKey;
});
wx.setStorageSync("roleStr",roleStr);
//保存用户信息
wx.reLaunch({
url: '/pages/work/work'
});
}
}
}).catch(err => {
Dialog.alert({
message:'服务器错误404请联系管理员'
})
})
},
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,5 @@
<!--pages/loading/loading.wxml-->
<view class="container">
<van-loading type="spinner" />
</view>
<van-dialog id="van-dialog" />

View File

@ -0,0 +1,10 @@
/* pages/loading/loading.wxss */
.container{
background-color: #5199FF;
height: 100vh;
display: flex;
align-items: center;
flex-direction: column;
color: white;
justify-content: center;
}

View File

@ -0,0 +1,295 @@
// pages/queryList/queryList.js
const $api = require('../../utils/api').API;
Page({
/**
* 页面的初始数据
*/
data: {
pageNum: 1,
pageSize: 10,
//所有数据
list: [],
isRefreshing:false,//下拉刷新
isFinish:false,//下拉加载,
//搜索
typeOpt:[
{text:'请选择类型',value:''},
{text:'党务及意识形态',value:'党务及意识形态'},
{text:'党风廉政建设',value:'党风廉政建设'},
{text:'日常考核指标',value:'日常考核指标'},
{text:'年度考核指标',value:'年度考核指标'},
],
deptOpt:[],
targetOpt:[],
personOpt:[],
searchForm:{
deptId:'',
type:'',
target:'',
head:''
},
moreSearchShow:false,
targetShow:false,
mainActiveIndex:0,
activeId:null,
targetValue:'请先选择类型'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.informPort();
this.loadDeptData();
this.loadPersonData();
},
//重置
handleReset(){
this.setData({
"searchForm.type":'',
"searchForm.deptId":'',
"searchForm.target":'',
"searchForm.head":'',
pageNum: 1,
pageSize: 10,
mainActiveIndex:0,
activeId:null,
targetValue:'请先选择类型',
targetOpt:[]
});
this.informPort();
},
//类型搜索
handleSearchType(e){
this.setData({
"searchForm.type":e.detail
})
if(e.detail){
this.loadTargetData({type:e.detail});
}
this.informPort();
},
//更多查询
handleMoreSearchOpen(){
this.setData({
moreSearchShow:true
})
},
handleMoreSearchClose(){
this.setData({
moreSearchShow:false
})
},
//部门搜索
handleSearchDept(e){
this.setData({
"searchForm.deptId":e.detail,
moreSearchShow:false
})
this.informPort();
},
//指标搜索
handleTargetOpen(){
this.setData({
targetShow:true
})
},
handleTargetClose(){
this.setData({
targetShow:false
})
},
handleTargetNav(e){
this.setData({
mainActiveIndex:e.detail.index
})
},
handleTargettem(e){
this.setData({
"searchForm.target":e.detail.text,
activeId:e.detail.id,
targetValue:e.detail.text,
targetShow:false,
moreSearchShow:false
})
this.informPort();
},
//人员搜索
handleSearchPerson(e){
this.setData({
"searchForm.head":e.detail,
moreSearchShow:false
})
this.informPort();
},
//上拉加载
onLoadMore(){
let _num = this.data.pageNum+1;
this.setData({
pageNum:_num
});
this.informPort();
},
//下拉刷新
onRefresh(){
this.setData({
list:[],
pageNum:1,
isFinish:false
});
this.informPort();
},
/**
* 列表接口
*/
informPort() {
var that = this; // //防止this指向问题
wx.showLoading({
title: '加载中',
});
let _param = {
pageSize:that.data.pageSize,
pageNum:that.data.pageNum,
type:that.data.searchForm.type,
deptId:that.data.searchForm.deptId,
head:that.data.searchForm.head,
target: that.data.searchForm.target
}
$api.queryList(_param).then(res => {
if(res.code === 0){
wx.hideLoading();
let _data = res.rows;
_data.forEach(item => {
item.point = item.nowScore?(item.nowScore/item.score).toFixed(2)*100+'%':'0%';
})
if(that.data.pageNum > 1){ //上拉加载的逻辑
if(_data.length == 0){
that.setData({
isFinish:true
})
}
_data = that.data.list.concat(_data); //数据合并
that.setData({
list:_data
})
}else{
if(_data.length < that.data.pageSize){
that.setData({
list:_data,
isRefreshing:false,
isFinish:true
})
}else{
that.setData({
list:_data,
isRefreshing:false,
})
}
}
}
});
},
//加载指标
loadTargetData(param){
let _this = this;
$api.queryTree(param).then(res => {
if(res.code === 0){
res.data.forEach((item,index) => {
item.index = index;
})
_this.setData({
targetOpt:res.data
})
}
})
},
//加载部门
loadDeptData(){
let _this = this;
$api.deptList({}).then(res => {
if(res.code === 0){
let _newData = [{text:'请选择部门',value:''}];
res.data.forEach(item => {
_newData.push({
text:item.deptName,
value:item.deptId
})
})
_this.setData({
deptOpt:_newData
})
}
})
},
//加载人员
loadPersonData(){
let _this = this;
$api.personList({}).then(res => {
if(res.code === 0){
let _newData = [{text:'请选择人员',value:''}];
res.data.forEach(item => {
_newData.push({
text:item.name,
value:item.id
})
})
_this.setData({
personOpt:_newData
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"pullRefreshView":"../component/pullRefreshView/pullRefreshView"
},
"navigationBarTitleText": "信息查询"
}

View File

@ -0,0 +1,87 @@
<!--pages/queryList/queryList.wxml-->
<view class="query_list_wrap">
<view class="search_title">
<view class="title_left">
<van-dropdown-menu active-color="#5199ff">
<van-dropdown-item
value="{{ searchForm.type }}"
options="{{ typeOpt }}"
bind:change="handleSearchType"
/>
</van-dropdown-menu>
</view>
<view class="title_right">
<van-button type="info" bindtap="handleMoreSearchOpen">更多查询</van-button>
<van-button type="default" style="margin-left:10px" bindtap="handleReset">重置</van-button>
</view>
</view>
<pullRefreshView
height="86vh"
bindonrefresh="onRefresh"
refreshing="{{isRefreshing}}"
bindloadmore="onLoadMore"
nomore="{{isFinish}}"
pullText="下拉刷新"
loadmoreText="加载中..."
>
<view class="list_row" data-cattleNum="{{item.name}}" wx:for="{{list}}" wx:key="id" wx:for-item="item">
<view class="list_row_right">
<view>部门:{{item.deptName?item.deptName:'暂无'}}</view>
<view>考核类型:{{item.type?item.type:'暂无'}}</view>
<view>考核指标:{{item.target?item.target:'暂无'}}</view>
<view>标准分:{{item.score?item.score:'暂无'}}</view>
<view>当前分数:{{item.nowScore?item.nowScore:'暂无'}}</view>
<view>当前分数:{{item.point}}</view>
</view>
</view>
</pullRefreshView>
</view>
<!--更多查询组件-->
<van-popup
show="{{ moreSearchShow }}"
position="top"
bind:close="handleMoreSearchClose"
>
<view class="more_search_wrap">
<van-dropdown-menu active-color="#5199ff">
<van-dropdown-item
value="{{ searchForm.deptId }}"
options="{{ deptOpt }}"
bind:change="handleSearchDept"
/>
</van-dropdown-menu>
<van-dropdown-menu active-color="#5199ff">
<van-dropdown-item
value="{{ searchForm.head }}"
options="{{ personOpt }}"
bind:change="handleSearchPerson"
/>
</van-dropdown-menu>
<view style="width:50%;margin:0 auto">
<van-field
value="{{ targetValue }}"
readonly
placeholder="请选择指标"
bind:tap="handleTargetOpen"
/>
</view>
</view>
</van-popup>
<!--指标选择-->
<van-popup
show="{{ targetShow }}"
position="top"
bind:close="handleTargetClose"
>
<view class="target_wrap">
<van-tree-select
items="{{ targetOpt }}"
main-active-index="{{ mainActiveIndex }}"
active-id="{{ activeId }}"
bind:click-nav="handleTargetNav"
bind:click-item="handleTargettem"
/>
</view>
</van-popup>

View File

@ -0,0 +1,38 @@
/* pages/queryList/queryList.wxss */
.query_list_wrap{
width: 100%;
box-sizing: border-box;
padding: 10rpx;
}
.search_title{
width: 100%;
height: 12vh;
display: flex;
flex-direction: row;
align-items: center;
}
.title_left{
width: 50%;
margin-right: 10px;
}
.list_row{
box-sizing: border-box;
padding: 20rpx;
border-bottom: 1rpx solid silver;
display: flex;
flex-direction: row;
align-items: center;
}
.list_row_right{
margin-left: 10rpx;
font-size: 30rpx;
color: #575656;
}
.more_search_wrap{
width: 100%;
height: 30vh;
}
.target_wrap{
width: 100%;
height: 40vh;
}

View File

@ -0,0 +1,140 @@
// pages/taskWarning/taskWarning.js
const {API: $api} = require("../../utils/api");
Page({
/**
* 页面的初始数据
*/
data: {
pageNum: 1,
pageSize: 10,
//所有数据
list: [],
isRefreshing:false,//下拉刷新
isFinish:false,//下拉加载,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.loadListData();
},
//上拉加载
onLoadMore(){
let _num = this.data.pageNum+1;
this.setData({
pageNum:_num
});
this.loadListData();
},
//下拉刷新
onRefresh(){
this.setData({
list:[],
pageNum:1,
isFinish:false
});
this.loadListData();
},
//上传资料
handleSubmitFile(e){
let _data = e.currentTarget.dataset.item;
console.log(_data,'打印_data');
},
/**
* 列表接口
*/
loadListData() {
let that = this; // //防止this指向问题
wx.showLoading({
title: '加载中',
});
let _param = {
pageSize:that.data.pageSize,
pageNum:that.data.pageNum,
}
$api.warnList(_param).then(res => {
if(res.code === 0){
wx.hideLoading();
let _data = res.rows;
if(that.data.pageNum > 1){ //上拉加载的逻辑
if(_data.length == 0){
that.setData({
isFinish:true
})
}
_data = that.data.list.concat(_data); //数据合并
that.setData({
list:_data
})
}else{
if(_data.length < that.data.pageSize){
that.setData({
list:_data,
isRefreshing:false,
isFinish:true
})
}else{
that.setData({
list:_data,
isRefreshing:false,
})
}
}
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"pullRefreshView":"../component/pullRefreshView/pullRefreshView"
},
"navigationBarTitleText": "任务预警"
}

View File

@ -0,0 +1,23 @@
<!--pages/taskWarning/taskWarning.wxml-->
<view class="task_list_wrap">
<pullRefreshView
height="98vh"
bindonrefresh="onRefresh"
refreshing="{{isRefreshing}}"
bindloadmore="onLoadMore"
nomore="{{isFinish}}"
pullText="下拉刷新"
loadmoreText="加载中..."
>
<view class="list_row" wx:for="{{list}}" wx:key="id" wx:for-item="item">
<view class="list_row_right">
<view class="right_tips">【{{item.type}}】的{{item.target}}指标逾期未提交!</view>
<view>预计截止时间:{{item.finishDate || '暂无'}}</view>
<view>指标审批人:{{item.reviewer || '暂无'}}</view>
<view style="width:100%;text-align:center;margin-top:20px">
<van-button data-item="{{item}}" custom-style="width:80%;" type="info" bindtap="handleSubmitFile">提交资料</van-button>
</view>
</view>
</view>
</pullRefreshView>
</view>

View File

@ -0,0 +1,23 @@
/* pages/taskWarning/taskWarning.wxss */
.task_list_wrap{
width: 100%;
box-sizing: border-box;
padding: 10rpx;
}
.list_row{
box-sizing: border-box;
padding: 20rpx;
border-bottom: 1rpx solid silver;
display: flex;
flex-direction: row;
align-items: center;
}
.list_row_right{
margin-left: 10rpx;
font-size: 32rpx;
color: #575656;
}
.right_tips{
color: red;
margin-bottom: 10px;
}

34
miniprogram/utils/api.js Normal file
View File

@ -0,0 +1,34 @@
/**
* author:duxp
* desc:接口统一管理
*/
const http = require('./http');
const API = {
//获取用户信息
getUserInfo:data => http.request("GET","/wx/health/getUserInfo",data,false),
//获取验证码
getMsgCode:data => http.request("GET","/wx/health/sendSms",data,false),
//绑定用户
saveBind:data => http.request("POST","/wx/health/bind",data,false),
//信息查询列表
queryList:data => http.request("POST","/wx/index/queryList",data,true),
//附件提交
commit:data => http.request("POST","/wx/index/commit",data,true),
//审核接口
reviewedSave:data => http.request("POST","/wx/index/reviewedSave",data,true),
//驳回接口
reback:data => http.request("GET","/wx/index/reback",data,true),
//任务预警
warnList:data => http.request("POST","/wx/index/warnList",data,true),
//审批预警
approveList:data => http.request("POST","/wx/index/approveList",data,true),
//指标数据
queryTree:data => http.request("POST",'/wx/index/queryTree',data,true),
//部门数据
deptList:data => http.request("POST","/wx/index/deptList",data,true),
//人员数据
personList:data => http.request("POST","/wx/index/personList",data,true),
}
module.exports = {
API:API
}

53
miniprogram/utils/http.js Normal file
View File

@ -0,0 +1,53 @@
// const base_url = "https://breed.nxcyx.com/wx/"; //配置的域名
const base_url = "http://192.168.0.19:8101"; //配置的域名
// const base_url = "http://q43k76.natappfree.cc/wx/"
/**
* author:duxp
* desc:http请求方法封装
* @param {*} method 请求方式
* @param {*} url 接口名
* @param {*} data 参数名
* @param {*} token 判断是否携带token
*/
function request(method,url,data,token){
return new Promise(function(resolve,reject){
let header = {
"content-type":"application/json",
"Authorization":""
};
if(token){
header.Authorization = 'Bearer '+wx.getStorageSync('token');
}
wx.request({
url: base_url + url,
method: method,
data: method === "POST" ? JSON.stringify(data) : data,
header: header,
success(res){
/**
* 请求成功
* 判断code是否为200
*/
if(res.statusCode == 200){
resolve(res.data);
}else{
reject('运行出错,请稍后再试');
wx.showToast({ //弹出框
title: res.data.msg,
icon: 'error',
duration: 2000
});
}
},
fail(err) {
//请求失败
reject(err)
}
})
})
}
module.exports = {
request: request,
base_url
}

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "demo_test",
"version": "1.0.0",
"description": "",
"main": ".eslintrc.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"123456Aa"
],
"author": "duxingpeng",
"license": "ISC",
"repository": {
"type": "git",
"directory": "http://duxingpeng@192.168.199.101:9002/r/zhmc/cyx-zhmc-wxjk.git"
},
"dependencies": {
"@vant/weapp": "^1.10.5",
"miniprogram-sm-crypto": "^0.3.11",
"pinyin-match": "^1.2.2"
}
}