From ae4b7715d335492a77441444daddb68af01a317a Mon Sep 17 00:00:00 2001
From: shilixia <2309368887@qq.com>
Date: Thu, 2 Apr 2020 15:05:35 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=BB=BB=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 4 +-
pages/bind/binduser.js | 2 +-
pages/checkjob/detail.js | 99 +++++++++++++
pages/checkjob/detail.json | 3 +
pages/checkjob/detail.wxml | 101 +++++++++++++
pages/checkjob/detail.wxss | 20 +++
pages/checkjob/index.js | 277 ++++++++++++++++++++++++++++++++++++
pages/checkjob/index.json | 5 +
pages/checkjob/index.wxml | 106 ++++++++++++++
pages/checkjob/index.wxss | 14 ++
pages/checkjob/job.js | 199 ++++++++++++++++++++++++++
pages/checkjob/job.json | 3 +
pages/checkjob/job.wxml | 108 ++++++++++++++
pages/checkjob/job.wxss | 1 +
pages/checkjob/yanshou.js | 125 ++++++++++++++++
pages/checkjob/yanshou.json | 3 +
pages/checkjob/yanshou.wxml | 109 ++++++++++++++
pages/checkjob/yanshou.wxss | 20 +++
pages/main/main.js | 22 +++
pages/main/main.wxml | 5 +
20 files changed, 1224 insertions(+), 2 deletions(-)
create mode 100644 pages/checkjob/detail.js
create mode 100644 pages/checkjob/detail.json
create mode 100644 pages/checkjob/detail.wxml
create mode 100644 pages/checkjob/detail.wxss
create mode 100644 pages/checkjob/index.js
create mode 100644 pages/checkjob/index.json
create mode 100644 pages/checkjob/index.wxml
create mode 100644 pages/checkjob/index.wxss
create mode 100644 pages/checkjob/job.js
create mode 100644 pages/checkjob/job.json
create mode 100644 pages/checkjob/job.wxml
create mode 100644 pages/checkjob/job.wxss
create mode 100644 pages/checkjob/yanshou.js
create mode 100644 pages/checkjob/yanshou.json
create mode 100644 pages/checkjob/yanshou.wxml
create mode 100644 pages/checkjob/yanshou.wxss
diff --git a/app.json b/app.json
index aed9f49..e12fc27 100644
--- a/app.json
+++ b/app.json
@@ -75,7 +75,9 @@
"pages/data/index",
"pages/examtest/rate",
"pages/data/detail",
- "pages/totalrate/index"
+ "pages/totalrate/index",
+ "pages/checkjob/yanshou",
+ "pages/checkjob/job"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/bind/binduser.js b/pages/bind/binduser.js
index 4f5b4ae..a0275c1 100644
--- a/pages/bind/binduser.js
+++ b/pages/bind/binduser.js
@@ -19,7 +19,7 @@ Page({
},
denglu: function(){
var that=this
- // console.log(that.data)
+ console.log(that.data)
wx.request({
url: getApp().globalData.serverUrl + 'bindmp',
header: {
diff --git a/pages/checkjob/detail.js b/pages/checkjob/detail.js
new file mode 100644
index 0000000..78dc6f5
--- /dev/null
+++ b/pages/checkjob/detail.js
@@ -0,0 +1,99 @@
+var util = require('../../utils/util.js')
+// pages/observe/observedetail.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ serverUrl: getApp().globalData.serverUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getGcdetail(options.id);
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ lookimgPreview: function (e) {
+ var current = e.target.dataset.src
+
+ wx.previewImage({
+ current: current,
+ urls: this.data.lookimg
+ })
+ },
+ getGcdetail: function (id) {
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=checkjobdetail&id=' + id,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ data: {
+ },
+ success: res => {
+ wx.hideLoading();
+ console.log(res.data);
+ if (res.statusCode === 200) {
+ var data = res.data
+ //格式化观察信息
+
+ this.setData(data)
+ }
+ }
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/checkjob/detail.json b/pages/checkjob/detail.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/checkjob/detail.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/checkjob/detail.wxml b/pages/checkjob/detail.wxml
new file mode 100644
index 0000000..6f3f80d
--- /dev/null
+++ b/pages/checkjob/detail.wxml
@@ -0,0 +1,101 @@
+任务详情
+
+
+
+ 任务名称
+
+
+ {{checktask__checktaskname}}
+
+
+
+
+ 检查人
+
+
+ {{checkname__username}}
+
+
+
+
+ 检查时间
+
+
+ {{checktask__checktime}}
+
+
+
+
+ 检查内容
+
+
+ {{checktask__checktype__checkcontent}}
+
+
+
+
+ 检查发现问题
+
+
+ {{checkquestion}}
+
+
+
+
+ 整改情况
+
+
+ {{zgjg}}
+
+
+
+
+
+ 检查状态
+
+
+ {{taskstate==1?'正在检查':'检查完毕'}}
+
+
+
+
+ 检查地点
+
+
+ {{checktask__checkplace}}
+
+
+
+
+ 处罚内容
+
+
+ {{content}}
+
+
+
+
+ 被处罚人员
+
+
+ {{bcfr==[]?'kkl':bcfr}}
+
+
+
+
+ 验收人
+
+
+ {{yanshouren__name}}
+
+
+
+
+ 验收时间
+
+
+ {{yanshou}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/checkjob/detail.wxss b/pages/checkjob/detail.wxss
new file mode 100644
index 0000000..f3a8167
--- /dev/null
+++ b/pages/checkjob/detail.wxss
@@ -0,0 +1,20 @@
+.weui-btn{
+ width:auto;
+ margin: 5px;
+}
+.container {
+ background-color: #fff;
+ color: #939393;
+}
+.head{
+ color:#fff;
+ background-color: cornflowerblue;
+ text-align: center;
+}
+.topban{
+ color:#fff;
+ background-color: rgb(26, 182, 143);
+ height:30x;
+ text-align: center;
+}
+
\ No newline at end of file
diff --git a/pages/checkjob/index.js b/pages/checkjob/index.js
new file mode 100644
index 0000000..422b9c9
--- /dev/null
+++ b/pages/checkjob/index.js
@@ -0,0 +1,277 @@
+// pages/suggest/suggest.js
+var sliderWidth = 96;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ page: 1,
+ serverUrl: getApp().globalData.serverUrl,
+ alllist: [],
+ tabs: ["我的任务", "全部任务", "验收任务"],
+ activeIndex: 1,
+ sliderOffset: 0,
+ sliderLeft: 0
+ },
+ tabClick: function (e) {
+ var that = this
+ that.setData({
+ sliderOffset: e.currentTarget.offsetLeft,
+ activeIndex: e.currentTarget.id
+ });
+ if (that.data.activeIndex == 0) {
+ that.getmylist(1)
+ that.data.mypage = 1
+ }
+ else if (that.data.activeIndex == 1) {
+ that.gettodolist(1)
+ that.data.todopage = 1
+ }
+ else if (that.data.activeIndex == 2) {
+ that.getalllist(1)
+ that.data.page = 1
+ }
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var that = this;
+ wx.getSystemInfo({
+ success: function (res) {
+ that.setData({
+ sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
+ sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
+ });
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ var that = this;
+ that.onPullDownRefresh();
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+ var that = this;
+ if (that.data.activeIndex == 0) {
+ that.getmylist(1)
+ wx.stopPullDownRefresh();
+ that.data.mypage = 1
+ }
+ else if (that.data.activeIndex == 1) {
+ that.gettodolist(1)
+ wx.stopPullDownRefresh();
+ that.data.todopage = 1
+ }
+ else if (that.data.activeIndex == 2) {
+ that.getalllist(1)
+ wx.stopPullDownRefresh();
+ that.data.page = 1
+ }
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ //上拉分页,将页码加1,然后调用分页函数
+ var that = this;
+ if (that.data.activeIndex == 0) {
+ this.data.mypage = this.data.mypage + 1;
+ this.getmylist();
+ }
+ else if (that.data.activeIndex == 1) {
+ this.data.todopage = this.data.todopage + 1;
+ this.gettodolist();
+ }
+ else if (that.data.activeIndex == 2) {
+ this.data.page = this.data.page + 1;
+ this.getalllist();
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ getalllist: function (page) {
+ var that = this;
+ if (page != 1) { page = that.data.page }
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=listchuli&rows=10&page=' + page,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ success: res => {
+ if (res.statusCode === 200) {
+ if (res.data.rows.length == 0) {
+ if (page == 1) {
+ this.setData({
+ total: 0,
+ alllist: []
+ })
+ }
+ else {
+ wx.showModal({
+ content: "已经到底啦!",
+ showCancel: false,
+ confirmText: "确定",
+ })
+ }
+ } else {
+ let list
+ if (page == 1) {
+ list = res.data.rows
+ } else {
+ list = this.data.alllist.concat(res.data.rows)
+ }
+ this.setData({
+ total: res.data.total,
+ alllist: list
+ })
+ }
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+ getmylist: function (page) {
+ var that = this;
+ if (page != 1) { page = that.data.mypage }
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=listself&rows=10&page=' + page,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ success: res => {
+ if (res.statusCode === 200) {
+ if (res.data.rows.length == 0) {
+ if (page == 1) {
+ this.setData({
+ donetotal: 0,
+ donelist: []
+ })
+ }
+ else {
+ wx.showModal({
+ content: "已经到底啦!",
+ showCancel: false,
+ confirmText: "确定",
+ })
+ }
+ } else {
+ let list
+ if (page == 1) {
+ list = res.data.rows
+ } else {
+ list = this.data.donelist.concat(res.data.rows)
+ }
+ this.setData({
+ donetotal: res.data.total,
+ donelist: list
+ })
+ }
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+ scan: function () {
+ wx.scanCode({
+ onlyFromCamera: true,
+ success(res) {
+ console.log(res)
+ let id = res.result.split('=')[1]
+ wx.navigateTo({
+ url: 'check?riskact=' + id,
+ })
+ }
+ })
+ },
+ gettodolist: function (page) {
+ var that = this;
+ if (page != 1) { page = that.data.todopage }
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=listallx&rows=10&page=' + page,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ success: res => {
+ if (res.statusCode === 200) {
+ console.log(res.data)
+ if (res.data.rows.length == 0) {
+ if (page == 1) {
+ this.setData({
+ todototal: 0,
+ todolist: []
+ })
+ }
+ else {
+ wx.showModal({
+ content: "已经到底啦!",
+ showCancel: false,
+ confirmText: "确定",
+ })
+ }
+ } else {
+ let list
+ if (page == 1) {
+ list = res.data.rows
+ } else {
+ list = this.data.todolist.concat(res.data.rows)
+ }
+ this.setData({
+ todototal: res.data.total,
+ todolist: list
+ })
+ }
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/checkjob/index.json b/pages/checkjob/index.json
new file mode 100644
index 0000000..7bdce1d
--- /dev/null
+++ b/pages/checkjob/index.json
@@ -0,0 +1,5 @@
+{
+ "navigationBarTitleText": "排查任务",
+ "enablePullDownRefresh": true,
+ "onReachBottomDistance": 20
+}
\ No newline at end of file
diff --git a/pages/checkjob/index.wxml b/pages/checkjob/index.wxml
new file mode 100644
index 0000000..f0f0ab7
--- /dev/null
+++ b/pages/checkjob/index.wxml
@@ -0,0 +1,106 @@
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+ 共{{donetotal}}条
+
+
+
+
+
+
+ {{item.checktask__checktaskname}}
+
+
+
+ 可执行
+ 已过期
+
+ 任务开始时间:{{item.starttime}}
+ 任务过期时间:{{item.endtime}}
+
+
+ 正在检查
+ 检查完毕
+ 任务关闭
+
+
+
+
+
+
+
+
+ 共{{todototal}}条任务
+
+
+
+
+
+ {{item.checktask__checktaskname}}
+
+
+
+ {{item.checkname__username}}
+ 可执行
+ 已过期
+
+ 任务开始时间:{{item.starttime}}
+ 任务过期时间:{{item.endtime}}
+
+
+ 正在检查
+ 检查完毕
+ 任务关闭
+
+
+
+
+
+
+
+
+ 共{{total}}条任务
+
+
+
+
+
+
+ {{item.checktask__checktaskname}}
+
+
+
+
+ 可执行
+ 已过期
+
+
+ 任务开始时间:{{item.starttime}}
+ 任务过期时间:{{item.endtime}}
+
+
+ 正在检查
+ 检查完毕
+ 任务关闭
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/checkjob/index.wxss b/pages/checkjob/index.wxss
new file mode 100644
index 0000000..ef15154
--- /dev/null
+++ b/pages/checkjob/index.wxss
@@ -0,0 +1,14 @@
+.weui-btn{
+ width:auto;
+ margin: 5px;
+}
+.container {
+ background-color: #fff;
+ color: #939393;
+}
+.head{
+ color:#fff;
+ background-color: cornflowerblue;
+ text-align: center;
+}
+
\ No newline at end of file
diff --git a/pages/checkjob/job.js b/pages/checkjob/job.js
new file mode 100644
index 0000000..ba8dfe8
--- /dev/null
+++ b/pages/checkjob/job.js
@@ -0,0 +1,199 @@
+var util = require('../../utils/util.js')
+// pages/observe/observedetail.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+
+
+ data: {
+ serverUrl: getApp().globalData.serverUrl,
+ items: [
+ { name: '1', value: '正在整改中'},
+ { name: '2', value: '已整改完成' },
+
+ ]
+ },
+ bindjcwtInput: function (e) {
+ this.data.jcwt = e.detail.value
+ },
+ bindzgqkInput: function (e) {
+ this.data.zgqk = e.detail.value
+ },
+ bindcfnrInput: function (e) {
+ this.data.cfnr = e.detail.value
+ },
+ radioChange: function (e) {
+ this.data.jczt = e.detail.value
+ },
+
+ submit: function () {
+
+ if (!this.data.jcwt) {
+ this.Tap1('请填写检查问题!')
+ }
+ else if (!this.data.zgqk) {
+ this.Tap1('请填写整改情况!')
+ }
+ else if (!this.data.jczt) {
+ this.Tap1('请选择检查状态!')
+ }
+ else {
+
+ this.addjob()
+
+ }
+ },
+ Tap1: function (x) {
+ wx.showModal({
+ title: "系统提示",
+ content: x,
+ showCancel: false,
+ confirmText: "确定"
+ })
+ },
+ addjob: function () {
+
+ var jobdata = {
+ checkquestion: this.data.jcwt,//检查问题
+ zgjg: this.data.zgqk,//整改情况
+ content: this.data.cfnr,//处罚内容
+ taskstate: this.data.jczt,//检查状态
+ participant: this.data.cjry,//处罚人
+
+ }
+ console.log(jobdata)
+ wx.showModal({
+ title: '系统提示',
+ content: '确认提交!',
+ confirmText: "确定",
+ cancelText: "取消",
+ success: (res)=> {
+ if (res.confirm) {
+ wx.showLoading({
+ title: '正在提交...',
+ })
+ wx.request({
+ url: getApp().globalData.serverUrl + 'api/checkproject?a=addjobwx&jobid=' + this.data.jobid,
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded', //
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ method: 'POST',
+ data:jobdata ,
+ success: res => {
+ if (res.statusCode === 200) {
+ wx.hideLoading();
+ wx.navigateBack()
+ }
+ }
+ });
+ }
+ }
+ })
+
+
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getGcdetail(options.id);
+ this.setData({
+
+ jobid: options.id
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ let lst = getApp().globalData.selectPeopleList
+ let nst = []
+ let nst1 = []
+ if (lst) {
+ for (var i = 0; i < lst.length; i++) {
+ nst.push(lst[i]['name'])
+ nst1.push(lst[i]['id'])
+ }
+ this.setData({
+ cjryname: nst.join(','),
+ cjry: nst1.join(','),
+ cjrs: nst1.length
+ })
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+ getGcdetail: function (id) {
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=checkjobdetail&id=' + id,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ data: {
+ },
+ success: res => {
+ wx.hideLoading();
+ console.log(res.data);
+ if (res.statusCode === 200) {
+ var data = res.data
+ //格式化观察信息
+
+ this.setData(data)
+ }
+ }
+ });
+
+
+ },
+
+
+})
\ No newline at end of file
diff --git a/pages/checkjob/job.json b/pages/checkjob/job.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/checkjob/job.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/checkjob/job.wxml b/pages/checkjob/job.wxml
new file mode 100644
index 0000000..68bcd5c
--- /dev/null
+++ b/pages/checkjob/job.wxml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+ 任务名称
+
+
+ {{checktask__checktaskname}}
+
+
+
+
+ 检查人
+
+
+ {{checkname__username}}
+
+
+
+
+ 检查时间
+
+
+ {{checktask__checktime}}
+
+
+
+
+ 检查内容
+
+
+ {{checktask__checktype__checkcontent}}
+
+
+
+
+
+ 检查地点
+
+
+ {{checktask__checkplace}}
+
+
+
+ 检查发现问题
+
+
+
+
+
+
+
+ 整改情况
+
+
+
+
+
+
+
+
+
+
+
+ 检查状态
+
+
+
+
+ {{item.value}}
+
+
+
+
+
+
+
+ 处罚内容
+
+
+
+
+
+
+
+
+
+ 被处罚人
+
+
+
+ 请选择
+
+
+
+
+ {{cjryname}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/checkjob/job.wxss b/pages/checkjob/job.wxss
new file mode 100644
index 0000000..bbdb3e3
--- /dev/null
+++ b/pages/checkjob/job.wxss
@@ -0,0 +1 @@
+/* pages/checkjob/job.wxss */
\ No newline at end of file
diff --git a/pages/checkjob/yanshou.js b/pages/checkjob/yanshou.js
new file mode 100644
index 0000000..cf183e8
--- /dev/null
+++ b/pages/checkjob/yanshou.js
@@ -0,0 +1,125 @@
+var util = require('../../utils/util.js')
+// pages/observe/observedetail.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ serverUrl: getApp().globalData.serverUrl
+ },
+ submit: function (e) {
+
+ wx.request({
+ url: getApp().globalData.serverUrl + 'api/checkproject?a=yanshou&id=' + this.data.ysid,
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded', //
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ method: 'get',
+
+ success: res => {
+ if (res.statusCode === 200) {
+ wx.hideLoading();
+ wx.navigateBack()
+ }
+ }
+ });
+
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getGcdetail(options.id);
+ this.setData({
+
+ ysid: options.id
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ lookimgPreview: function (e) {
+ var current = e.target.dataset.src
+
+ wx.previewImage({
+ current: current,
+ urls: this.data.lookimg
+ })
+ },
+ getGcdetail: function (id) {
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=checkjobdetail&id=' + id,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ data: {
+ },
+ success: res => {
+ wx.hideLoading();
+ console.log(res.data);
+ if (res.statusCode === 200) {
+ var data = res.data
+ //格式化观察信息
+
+ this.setData(data)
+ }
+ }
+ });
+
+
+ },
+
+
+})
\ No newline at end of file
diff --git a/pages/checkjob/yanshou.json b/pages/checkjob/yanshou.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/checkjob/yanshou.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/checkjob/yanshou.wxml b/pages/checkjob/yanshou.wxml
new file mode 100644
index 0000000..96fd1f6
--- /dev/null
+++ b/pages/checkjob/yanshou.wxml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+ 任务名称
+
+
+ {{checktask__checktaskname}}
+
+
+
+
+ 检查人
+
+
+ {{checkname__username}}
+
+
+
+
+ 检查时间
+
+
+ {{checktask__checktime}}
+
+
+
+
+ 检查内容
+
+
+ {{checktask__checktype__checkcontent}}
+
+
+
+
+ 检查发现问题
+
+
+ {{checkquestion}}
+
+
+
+
+ 整改情况
+
+
+ {{zgjg}}
+
+
+
+
+
+ 检查状态
+
+
+ {{taskstate==1?'正在检查':'检查完毕'}}
+
+
+
+
+ 检查地点
+
+
+ {{checktask__checkplace}}
+
+
+
+
+ 处罚内容
+
+
+ {{content}}
+
+
+
+
+ 被处罚人员
+
+
+ {{bcfr==[]?'kkl':bcfr}}
+
+
+
+
+ 验收人
+
+
+ {{yanshouren__name}}
+
+
+
+
+ 验收时间
+
+
+ {{yanshou}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/checkjob/yanshou.wxss b/pages/checkjob/yanshou.wxss
new file mode 100644
index 0000000..f3a8167
--- /dev/null
+++ b/pages/checkjob/yanshou.wxss
@@ -0,0 +1,20 @@
+.weui-btn{
+ width:auto;
+ margin: 5px;
+}
+.container {
+ background-color: #fff;
+ color: #939393;
+}
+.head{
+ color:#fff;
+ background-color: cornflowerblue;
+ text-align: center;
+}
+.topban{
+ color:#fff;
+ background-color: rgb(26, 182, 143);
+ height:30x;
+ text-align: center;
+}
+
\ No newline at end of file
diff --git a/pages/main/main.js b/pages/main/main.js
index 228bafe..9d59e69 100644
--- a/pages/main/main.js
+++ b/pages/main/main.js
@@ -14,6 +14,7 @@ Page({
wsnoread: 0,
jytodonum: 0,
tasknum: 0,
+ checknum:0,
serverUrl: getApp().globalData.serverUrl,
isGjjt:false,
// Banner数据
@@ -123,6 +124,7 @@ Page({
this.getwsnoreadnum()//未遂未读
this.getjytodonum()
this.gettasknum()
+ this.getchecknum()//检查任务
},
/**
* 生命周期函数--监听页面隐藏
@@ -336,6 +338,26 @@ Page({
}
});
},
+ getchecknum: function () {
+ var that = this
+ //获取待考
+ wx.request({
+ url: this.data.serverUrl + 'api/checkproject?a=listself',
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': getApp().globalData.sessionId,
+ },
+ data: {},
+ success: res => {
+ if (res.statusCode === 200) {
+ //console.log(res.data)
+ this.setData({
+ checknum: res.data.total,
+ })
+ }
+ }
+ });
+ },
taptest: function () {
if (getApp().globalData.userInfo.perms != undefined) {
if (getApp().globalData.userInfo.perms.indexOf(25) != -1) {//考试功能
diff --git a/pages/main/main.wxml b/pages/main/main.wxml
index cf5615a..f6039e4 100644
--- a/pages/main/main.wxml
+++ b/pages/main/main.wxml
@@ -57,6 +57,11 @@
设备巡检
+
+
+ 检查任务
+ {{checknum}}
+
学习园地