commit df9307abb8fb9df9d9e09a1b2e786ab4805bdc77 Author: duxp Date: Thu Aug 31 10:38:54 2023 +0800 增加功能 diff --git a/miniprogram/asset/img/evaluation.png b/miniprogram/asset/img/evaluation.png new file mode 100644 index 0000000..7422fbd Binary files /dev/null and b/miniprogram/asset/img/evaluation.png differ diff --git a/miniprogram/asset/img/evaluation_active.png b/miniprogram/asset/img/evaluation_active.png new file mode 100644 index 0000000..c12c5f0 Binary files /dev/null and b/miniprogram/asset/img/evaluation_active.png differ diff --git a/miniprogram/asset/img/index/day.png b/miniprogram/asset/img/index/day.png new file mode 100644 index 0000000..c139f1b Binary files /dev/null and b/miniprogram/asset/img/index/day.png differ diff --git a/miniprogram/asset/img/index/dflzjs.png b/miniprogram/asset/img/index/dflzjs.png new file mode 100644 index 0000000..6e5d1cd Binary files /dev/null and b/miniprogram/asset/img/index/dflzjs.png differ diff --git a/miniprogram/asset/img/index/dwysxt.png b/miniprogram/asset/img/index/dwysxt.png new file mode 100644 index 0000000..25534d2 Binary files /dev/null and b/miniprogram/asset/img/index/dwysxt.png differ diff --git a/miniprogram/asset/img/index/evaluation_warn.png b/miniprogram/asset/img/index/evaluation_warn.png new file mode 100644 index 0000000..239d6fe Binary files /dev/null and b/miniprogram/asset/img/index/evaluation_warn.png differ diff --git a/miniprogram/asset/img/index/info_query.png b/miniprogram/asset/img/index/info_query.png new file mode 100644 index 0000000..764ae6d Binary files /dev/null and b/miniprogram/asset/img/index/info_query.png differ diff --git a/miniprogram/asset/img/index/logo.png b/miniprogram/asset/img/index/logo.png new file mode 100644 index 0000000..54abfa9 Binary files /dev/null and b/miniprogram/asset/img/index/logo.png differ diff --git a/miniprogram/asset/img/index/logo2.png b/miniprogram/asset/img/index/logo2.png new file mode 100644 index 0000000..a7cda0a Binary files /dev/null and b/miniprogram/asset/img/index/logo2.png differ diff --git a/miniprogram/asset/img/index/logo3.jpg b/miniprogram/asset/img/index/logo3.jpg new file mode 100644 index 0000000..01259b9 Binary files /dev/null and b/miniprogram/asset/img/index/logo3.jpg differ diff --git a/miniprogram/asset/img/index/task_warn.png b/miniprogram/asset/img/index/task_warn.png new file mode 100644 index 0000000..4167702 Binary files /dev/null and b/miniprogram/asset/img/index/task_warn.png differ diff --git a/miniprogram/asset/img/index/year.png b/miniprogram/asset/img/index/year.png new file mode 100644 index 0000000..9e7baea Binary files /dev/null and b/miniprogram/asset/img/index/year.png differ diff --git a/miniprogram/pages/approvalWarning/approvalForm/approvalForm.js b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.js new file mode 100644 index 0000000..fece3ce --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/approvalWarning/approvalForm/approvalForm.json b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.json new file mode 100644 index 0000000..69563cb --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "审批" +} \ No newline at end of file diff --git a/miniprogram/pages/approvalWarning/approvalForm/approvalForm.wxml b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.wxml new file mode 100644 index 0000000..fedf212 --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.wxml @@ -0,0 +1,22 @@ + + + + 提交人:{{fData.head || '暂无'}} + 提交时间:{{fData.updateTime || '暂无'}} + 提交指标:{{fData.target || '暂无'}} + + + 附件信息 + + + ({{index+1}})、{{item.name}} + + + + diff --git a/miniprogram/pages/approvalWarning/approvalForm/approvalForm.wxss b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.wxss new file mode 100644 index 0000000..9b27e17 --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalForm/approvalForm.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/pages/approvalWarning/approvalWarning.js b/miniprogram/pages/approvalWarning/approvalWarning.js new file mode 100644 index 0000000..6f2edc0 --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalWarning.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/approvalWarning/approvalWarning.json b/miniprogram/pages/approvalWarning/approvalWarning.json new file mode 100644 index 0000000..0012747 --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalWarning.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "pullRefreshView":"../component/pullRefreshView/pullRefreshView" + }, + "navigationBarTitleText": "审批预警" +} \ No newline at end of file diff --git a/miniprogram/pages/approvalWarning/approvalWarning.wxml b/miniprogram/pages/approvalWarning/approvalWarning.wxml new file mode 100644 index 0000000..ef33a1d --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalWarning.wxml @@ -0,0 +1,39 @@ + + + + + + + + + + + 提交人:{{item.head?item.head:'暂无'}} + 提交时间:{{item.updateTime?item.updateTime:'暂无'}} + 提交指标:{{item.target?item.target:'暂无'}} + 审批人:{{item.reviewer?item.reviewer:'暂无'}} + 审批状态:{{item.statusName}} + + + 审批 + + + + diff --git a/miniprogram/pages/approvalWarning/approvalWarning.wxss b/miniprogram/pages/approvalWarning/approvalWarning.wxss new file mode 100644 index 0000000..5bb2b4f --- /dev/null +++ b/miniprogram/pages/approvalWarning/approvalWarning.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/pages/bind/bind.js b/miniprogram/pages/bind/bind.js new file mode 100644 index 0000000..c060ea9 --- /dev/null +++ b/miniprogram/pages/bind/bind.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/bind/bind.json b/miniprogram/pages/bind/bind.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/miniprogram/pages/bind/bind.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/pages/bind/bind.wxml b/miniprogram/pages/bind/bind.wxml new file mode 100644 index 0000000..1dfde33 --- /dev/null +++ b/miniprogram/pages/bind/bind.wxml @@ -0,0 +1,164 @@ + + + + + + + + + {{sendMsgBtnText}} + + + + + 绑定 + + + + + 我已阅读并同意和 + + + + + + + + 用户协议 + + 一、总则 + 1. 用户在注册及使用前请认真阅读本协议,确保充分理解本协议中所有条款。除非您接受本协议所有条款, + 否则您无权注册、登录或使用本协议所涉服务。您的注册、登录、使用等行为将视为无条件接受本协议所有条款的约束。 + 2. 除非另有明确规定,本产品所推出的新功能、新服务,均无条件的使用本协议。 + 3. 我公司保留在任何时候修改本协议条款的权利,且无需另行通知。在我公司修改协议条款后,如果您不接受修改后的条款, + 请立即停止使用本产品提供的服务,继续使用本产品提供的服务将被视为接受修改后的协议。 + + 二、用户注册 + 1. 用户应当同意本协议的全部条款并按照页面提示完成全部注册程序(未成年人应与法定监护人共同完成)。用户在注册过程中点击“绑定”按钮即表示完全接受本协议全部条款。 + 2. 用户在使用本服务前需要注册一个本产品账号。本产品账号应当使用手机号码绑定注册,请用户使用尚未与本产品账号绑定且未被本产品根据本协议封禁的手机号码注册账号。 + 本产品可以根据用户需求或产品需求对账号注册和绑定的方式进行更改,而无须事先通知用户。 + 3. 用户在使用本产品服务过程中应保证各项服务业务所需信息的真实性,如果因信息不真实而引起的问题,以及问题发生所带来的后果,本公司不负任何责任。 + 4. 在用户注册及使用本产品时,要搜集能识别用户身份的个人信息以便系统可以在必要时联系用户,或为用户提供更好的使用体验。 + 系统搜集的信息包括但不限于用户的性别、年龄、出生日期、所在城市;系统同意对这些信息的使用将受限于用户个人隐私信息保护的约束。 + + 三、服务内容 + 1. 本服务的具体内容由本产品根据实际情况提供,包括但不限于用户使用本产品等。本产品可以对提供的服务予以变更,且本产品提供的服务内容可能随时变更,用户将会收到关于服务变更的通知。 + 2.除非本协议另有其他明示规定,本公司所推出的新产品、新功能、新服务,均受到本协议条款之规范。 + + 四、服务变更、中断或终止 + 1. 鉴于网络服务的特殊性(包括但不限于服务器的稳定性问题、恶意的网络攻击等行为的存在及其他无法控制的情形),用户同意我公司有权随时中断或终止部分或全部的服务。 + 2. 我公司需要定期或不定期地对提供服务的系统或相关设备进行检修或维护,如因此类情况而造成服务在合理时间内的中断,我公司无需为此承担任何责任 + 3. 如发生下列任何一种情形,我公司有权随时变更、中断或终止向用户提供本协议项下的服务而无需对用户或任何第三方承担任何责任: + (1)根据法律规定用户应提交真实信息,而用户提供的个人资料不真实、或与注册时信息不一致又未能提供合理证明; + (2)用户违反相关法律法规或本协议的约定; + (3)按照法律规定或有权机关的要求; + (4)出于安全的原因或其他必要的情形。 + + 五、用户个人隐私信息保护 + 1.依据法律的规定,我们将在特定情形下收集、使用和披露您的个人信息。以下条款描述了我们如何收集、使用和披露您的个人信息。 + 2. 用户提供 + 我们会对您直接提供的信息进行保存。比如:我们会记录您的注册信息、寻求客服或者其他和我们沟通的记录。记录信息的种类包括:头像、昵称、性别、出生日期、所在地区以及其他您选择提供的信息。我们收集、使用和披露个人信息是为了通过创建账户、识别用户、回应查询和邮件等方式来为您提供服务。 + 当你接触或者使用我们的服务时,我们将自动收集您的信息包括: + Log信息(我们记录所有您使用服务时的log信息,包括浏览器信息、使用时间、浏览的网页、IP地址及来源)。 + 我们使用多种技术记录信息,包括但不限于:向您的移动设备种Cookies。Cookies是一些存在您的硬件上的小数据包, + 用以帮助我们提高服务的质量及您的使用体验,了解在哪些区域和功能上受欢迎,以及统计流量等。 + 3. 除本隐私政策未载明或本隐私政策的更新未能首先通知您的情况下,您的个人信息将不会用于其他目的。 + 4. 匿名汇总统计数据不是我公司所定义的个人用户信息,我们将为多种目的,包括但不限于分析和使用模式的报告等,来保存和使用此类信息。我公司保留以任何目的或单方面许可第三方使用和披露匿名汇总统计数据的权利。 + 5. 您在本产品中上传的信息,有可能会损坏您或他人的合法权益,您必须充分意识此类风险的存在。您明确同意,自行承担因上传信息所存在的一切风险及后果,我公司无需承担任何责任。 + 6. 虽然我们会尽最大努力保护用户隐私,但当我们有理由相信只有公开个人信息才能遵循现行司法程序、 法院指令或其他法律程序或者保护我公司、我公司用户或第三方的权利、财产或安全时,我们可能披露个人信息。 + 7. 我们会采取合理的实际及电子手段以及规程保障措施来保护您的个人信息。 虽然通过因特网信息传输数据并非100% 安全,但我们已经采取并将继续采取商业范畴内合理的努力来确保您的个人信息得到保护。 + 8. 我公司重视对未成年人个人隐私信息的保护。我公司将依赖用户提供的个人信息判断用户是否为未成年人。任何18岁以下的未成年人注册账号或使用本服务应事先取得家长或其法定监护人(以下简称“监护人”)的书面同意。除根据法律法规的规定及有权机关的指示披露外,我公司不会使用向任何第三方透露未成年人的个人隐私信息。 + + 六、内容规范 + 1. 本项规范所述内容是指用户使用本服务过程中所制作、上载、复制、发布、传播的任何内容,包括但不限于账号头像、名称、个性签名等注册信息及认证资料,或文字、语音、图片、图文等发送、回复消息和相关链接页面,以及其他使用本产品账号或本服务所产生的内容。 + 2. 用户承诺使用本产品的服务时必须符合中华人民共和国有关法律法规,不得利用本产品的服务制作、上载、复制、发布、传播以下内容:(1)反对宪法所确定的基本原则的;(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的; (3)损害国家荣誉和利益的;(4)煽动民族仇恨、民族歧视,破坏民族团结的;(5)破坏国家宗教政策,宣扬邪教和封建迷信的;(6)散布谣言,扰乱社会秩序,破坏社会稳定的;(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;(8)侮辱或者诽谤他人,侵害他人合法权益的;(9)含有法律、行政法规禁止的其他内容的。 + 3. 用户不得利用本产品账号或本服务制作、上载、复制、发布、传播下干扰本产品正常运营,以及侵犯其他用户或第三方合作权益的内容: + (1)含有任何性暗示的; + (2)含有辱骂、恐吓、威胁内容的; + (3)含有骚扰、垃圾广告、恶意信息、诱骗信息的; + (4)涉及他人隐私、个人信息或资料的; + (5)含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益的。 + + 七、使用规则 + 1. 用户在本服务中或通过本服务所传送、发布的任何内容并不反映或代表,也不得被视为反映或代表我公司的观点、立场或政策,我公司对此不承担任何责任。 + 2. 用户在使用本产品时,必须遵守中华人民共和国相关法律法规的规定,同意将不会利用本产品进行任何违法或不正当的活动,包括但不限于下列行为: + (1)干扰或破坏有关服务,或与有关服务连接的任何服务器或网络,或与有关服务相关的任何政策、要求或规定; + (2)采集并存储涉及任何其他用户的个人信息,以用于任何被禁止的活动; + (3)故意或非故意违反任何相关的中国法律、法规、规章、条例等其他具有法律效力的规范。 + 3. 用户须对利用本产品账号或本服务传送信息的真实性、合法性、无害性、准确性、有效性等全权负责,与用户所传播信息相关的任何法律责任由用户自行承担,与我公司无关。如因此给我公司或第三方造成损害的,用户应当依法予以赔偿。 + 4. 用户为使用本产品,须自行配备进入国际互联网所必需的设备,包括电脑、手机及其他与接入国际互联网有关的装置,并自行支付与此服务有关的费用。 + + 八、免责声明 + 1. 对于经由本产品服务而传送的内容,我公司不保证前述内容的正确性、完整性或品质。用户在接受有关服务时,有可能会接触到令人不快、不适当或令人厌恶的内容。在任何情况下,我公司均不对任何内容负责,包括但不限于任何内容发生任何错误或纰漏以及衍生的任何损失或损害。用户使用上述内容,应自行承担风险。 + 2. 用户明确同意其使用本产品所存在的风险及其后果将完全由其自己承担,我公司对用户不承担任何责任。如因用户违反有关法律、法规或本协议项下的任何条款而给任何其他第三人造成损失,用户同意承担由此造成的损害赔偿责任。 + 3. 我公司尊重并保护用户的个人隐私权。但因恶意的网络攻击等行为及其他无法控制的情形,导致用户隐私信息泄露的,用户同意我公司不承担任何责任。 + 4. 对于因电信系统或互联网网络故障、计算机故障、计算机系统问题或其它任何不可抗力原因而产生损失,我公司不承担任何责任,但将尽力减少因此给用户造成的损失和影响。 + + 九、知识产权声明 + 1. 本产品服务中包含的任何文字、图表、音频、视频和软件(包括但不限于软件中包含的图表、动画、音频、视频、界面实际、数据和程序、代码、文档)等信息或材料均受著作权法、商标法和其它法律法规保护,未经相关权利人书面同意,用户不得以任何方式使用该信息或材料。 + 2. 本协议未授予用户使用本产品任何商标、服务标记、标识、域名和其他显著品牌特征的权利,任何人不得擅自(包括但不限于:以非法的方式复制、传播、展示、镜像、上载、下载)使用,否则我公司将依法追究法律责任。 + 3. 除本协议明确允许以外,用户不得以任何形式或任何方式对本产品部分或全部内容进行修改、出租、租赁、出借、出售、分发、复制、创作衍生品或用于任何商业用途。 + + 十、法律适用 + 1. 本协议的订立、执行和解释及争议的解决均应适用中国法律并受中国法院管辖。如服务条款任何一部分与中华人民共和国法律相抵触,则该部分条款应按法律规定重新解释,部分条款无效或重新解释不影响其余条款法律效力。 + 2. 用户和我公司一致同意本协议。在执行本协议过程中如发生纠纷,双方应友好协商解决;协商不成时,任何一方可直接向所在地的人民法院提起诉讼。 + + 十一、其他规定 + 1. 本协议中的标题仅为方便而设,在解释本协议时应被忽略。 + 2. 本协议及其修改权、最终解释权归我公司所有。 + + + + + + + 隐私政策 + + 本应用非常重视用户隐私政策并严格遵守相关的法律规定。请您仔细阅读《隐私政策》后再继续使用。 + 如果您继续使用我们的服务,表示您已经充分阅读和理解我们协议的全部内容。 + + 本小程序尊重并保护所有使用服务用户的个人隐私权。 + 为了给您提供更准确、更优质的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。 + 除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。 + 本应用会不时更新本隐私权政策。您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。 + + + 一、适用范围 + 1. 为了分辨用户,开发者将在获取你的明示同意后,收集你的微信昵称、头像。 + 2. 为了上传图片或者视频,开发者将在获取你的明示同意后,访问你的摄像头。 + 3. 为了保存图片或者上传图片,开发者将在获取你的明示同意后,使用你的相册(仅写入)权限。 + 4. 为了登录或者注册,开发者将在获取你的明示同意后,收集你的手机号。 + 5. 开发者收集你的设备信息,用于保障你正常使用网络服务。 + 6. 开发者收集你的操作日志,用于运营维护。 + 7. 开发者访问你的蓝牙,用于设备连接。 + + 二、信息使用 + 1. 本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人登录信息。 + 如果我们存储发生维修或升级,我们会事先发出推送消息来通知您,请您提前允许本应用消息通知。 + 2. 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。 + 任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。 + 包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据。 + + 三、本隐私政策的更改 + 1. 如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、 + 使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。 + 2. 本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。 + + 请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密, + 尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。 + 感谢您花时间了解我们的隐私政策!我们将尽全力保护您的个人信息和合法权益,再次感谢您的信任! + + + \ No newline at end of file diff --git a/miniprogram/pages/bind/bind.wxss b/miniprogram/pages/bind/bind.wxss new file mode 100644 index 0000000..fc65945 --- /dev/null +++ b/miniprogram/pages/bind/bind.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/pages/component/pullRefreshView/pullRefreshView.js b/miniprogram/pages/component/pullRefreshView/pullRefreshView.js new file mode 100644 index 0000000..e7b09ca --- /dev/null +++ b/miniprogram/pages/component/pullRefreshView/pullRefreshView.js @@ -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 + }) + } + }, + }) diff --git a/miniprogram/pages/component/pullRefreshView/pullRefreshView.json b/miniprogram/pages/component/pullRefreshView/pullRefreshView.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/pages/component/pullRefreshView/pullRefreshView.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/pages/component/pullRefreshView/pullRefreshView.wxml b/miniprogram/pages/component/pullRefreshView/pullRefreshView.wxml new file mode 100644 index 0000000..2cfc210 --- /dev/null +++ b/miniprogram/pages/component/pullRefreshView/pullRefreshView.wxml @@ -0,0 +1,49 @@ + + + + + + + + {{pullText}} + {{releaseText}} + + + {{refreshText}} + + + + + + + + + + {{noData}} + + + {{loadmoreText}} + + + + + + diff --git a/miniprogram/pages/component/pullRefreshView/pullRefreshView.wxss b/miniprogram/pages/component/pullRefreshView/pullRefreshView.wxss new file mode 100644 index 0000000..ef15b85 --- /dev/null +++ b/miniprogram/pages/component/pullRefreshView/pullRefreshView.wxss @@ -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; */ + } \ No newline at end of file diff --git a/miniprogram/pages/evaluation/evaluation.js b/miniprogram/pages/evaluation/evaluation.js new file mode 100644 index 0000000..62128df --- /dev/null +++ b/miniprogram/pages/evaluation/evaluation.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/evaluation/evaluation.json b/miniprogram/pages/evaluation/evaluation.json new file mode 100644 index 0000000..d390b4c --- /dev/null +++ b/miniprogram/pages/evaluation/evaluation.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "考评管理" +} \ No newline at end of file diff --git a/miniprogram/pages/evaluation/evaluation.wxml b/miniprogram/pages/evaluation/evaluation.wxml new file mode 100644 index 0000000..bbfb93c --- /dev/null +++ b/miniprogram/pages/evaluation/evaluation.wxml @@ -0,0 +1,18 @@ + + + + + + 任务预警 + + + + 审批预警 + + + + 信息查询 + + + + diff --git a/miniprogram/pages/evaluation/evaluation.wxss b/miniprogram/pages/evaluation/evaluation.wxss new file mode 100644 index 0000000..df5c8af --- /dev/null +++ b/miniprogram/pages/evaluation/evaluation.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/pages/loading/loading.js b/miniprogram/pages/loading/loading.js new file mode 100644 index 0000000..78c45f5 --- /dev/null +++ b/miniprogram/pages/loading/loading.js @@ -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() { + + } +}) diff --git a/miniprogram/pages/loading/loading.json b/miniprogram/pages/loading/loading.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/miniprogram/pages/loading/loading.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/pages/loading/loading.wxml b/miniprogram/pages/loading/loading.wxml new file mode 100644 index 0000000..1130f0a --- /dev/null +++ b/miniprogram/pages/loading/loading.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/miniprogram/pages/loading/loading.wxss b/miniprogram/pages/loading/loading.wxss new file mode 100644 index 0000000..436816c --- /dev/null +++ b/miniprogram/pages/loading/loading.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/pages/queryList/queryList.js b/miniprogram/pages/queryList/queryList.js new file mode 100644 index 0000000..908c7de --- /dev/null +++ b/miniprogram/pages/queryList/queryList.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/queryList/queryList.json b/miniprogram/pages/queryList/queryList.json new file mode 100644 index 0000000..ed0628a --- /dev/null +++ b/miniprogram/pages/queryList/queryList.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "pullRefreshView":"../component/pullRefreshView/pullRefreshView" + }, + "navigationBarTitleText": "信息查询" +} \ No newline at end of file diff --git a/miniprogram/pages/queryList/queryList.wxml b/miniprogram/pages/queryList/queryList.wxml new file mode 100644 index 0000000..0e823d9 --- /dev/null +++ b/miniprogram/pages/queryList/queryList.wxml @@ -0,0 +1,87 @@ + + + + + + + + + + 更多查询 + 重置 + + + + + + 部门:{{item.deptName?item.deptName:'暂无'}} + 考核类型:{{item.type?item.type:'暂无'}} + 考核指标:{{item.target?item.target:'暂无'}} + 标准分:{{item.score?item.score:'暂无'}} + 当前分数:{{item.nowScore?item.nowScore:'暂无'}} + 当前分数:{{item.point}} + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/queryList/queryList.wxss b/miniprogram/pages/queryList/queryList.wxss new file mode 100644 index 0000000..be14f7a --- /dev/null +++ b/miniprogram/pages/queryList/queryList.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/pages/taskWarning/taskWarning.js b/miniprogram/pages/taskWarning/taskWarning.js new file mode 100644 index 0000000..c4b82ed --- /dev/null +++ b/miniprogram/pages/taskWarning/taskWarning.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/taskWarning/taskWarning.json b/miniprogram/pages/taskWarning/taskWarning.json new file mode 100644 index 0000000..e4cee5e --- /dev/null +++ b/miniprogram/pages/taskWarning/taskWarning.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "pullRefreshView":"../component/pullRefreshView/pullRefreshView" + }, + "navigationBarTitleText": "任务预警" +} \ No newline at end of file diff --git a/miniprogram/pages/taskWarning/taskWarning.wxml b/miniprogram/pages/taskWarning/taskWarning.wxml new file mode 100644 index 0000000..e04d66e --- /dev/null +++ b/miniprogram/pages/taskWarning/taskWarning.wxml @@ -0,0 +1,23 @@ + + + + + + 【{{item.type}}】的{{item.target}}指标逾期未提交! + 预计截止时间:{{item.finishDate || '暂无'}} + 指标审批人:{{item.reviewer || '暂无'}} + + 提交资料 + + + + + diff --git a/miniprogram/pages/taskWarning/taskWarning.wxss b/miniprogram/pages/taskWarning/taskWarning.wxss new file mode 100644 index 0000000..5f71788 --- /dev/null +++ b/miniprogram/pages/taskWarning/taskWarning.wxss @@ -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; +} \ No newline at end of file diff --git a/miniprogram/utils/api.js b/miniprogram/utils/api.js new file mode 100644 index 0000000..cc6eecc --- /dev/null +++ b/miniprogram/utils/api.js @@ -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 +} diff --git a/miniprogram/utils/http.js b/miniprogram/utils/http.js new file mode 100644 index 0000000..ae489ee --- /dev/null +++ b/miniprogram/utils/http.js @@ -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 +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..dbd60af --- /dev/null +++ b/package.json @@ -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" + } +}