From 8d0666cab2a3ff820a4cf1361cfeaaf4aa80af89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Wed, 30 Aug 2023 23:57:34 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
miniprogram/app.js.mine | 71 ---
miniprogram/app.json | 8 +-
.../pageage/project_checking/add/index.js | 8 +-
.../pageage/project_measure/add/index.js | 446 ++++++++++++++++++
.../pageage/project_measure/add/index.json | 6 +
.../pageage/project_measure/add/index.wxml | 138 ++++++
.../pageage/project_measure/add/index.wxss | 7 +
.../pageage/project_measure/info/index.js | 180 +++++++
.../pageage/project_measure/info/index.json | 4 +
.../pageage/project_measure/info/index.wxml | 108 +++++
.../pageage/project_measure/info/index.wxss | 23 +
.../pageage/project_measure/list/index.js | 143 ++++++
.../pageage/project_measure/list/index.json | 7 +
.../pageage/project_measure/list/index.wxml | 62 +++
.../pageage/project_measure/list/index.wxss | 1 +
.../quality/add/index.js | 6 +-
.../quality/add/index.wxml | 2 +-
.../quality/check/index.js | 6 +-
.../quality/info/index.js | 4 +-
.../quality/modify/index.js | 6 +-
.../security/add/index.js | 4 +-
.../security/add/index.wxml | 2 +-
.../security/check/index.js | 6 +-
.../security/info/index.js | 4 +-
.../security/modify/index.js | 6 +-
.../pageage/project_special/add/index.js | 333 +++++++++++++
.../pageage/project_special/add/index.json | 6 +
.../pageage/project_special/add/index.wxml | 120 +++++
.../pageage/project_special/add/index.wxss | 36 ++
.../pageage/project_special/info/index.js | 202 ++++++++
.../pageage/project_special/info/index.json | 7 +
.../pageage/project_special/info/index.wxml | 108 +++++
.../pageage/project_special/info/index.wxss | 23 +
.../pageage/project_special/list/index.js | 151 ++++++
.../pageage/project_special/list/index.json | 7 +
.../pageage/project_special/list/index.wxml | 61 +++
.../pageage/project_special/list/index.wxss | 1 +
.../pageage/project_train/add/index.js | 13 +-
.../pageage/project_train/add/index.wxml | 5 +
.../pageage/project_train/add/index.wxss | 10 +
.../components/voucher-select/index.wxml | 2 +-
miniprogram/pages/login/login.js | 20 +-
miniprogram/pages/login/login.wxml | 7 +-
miniprogram/pages/login/login.wxss | 10 +-
44 files changed, 2264 insertions(+), 116 deletions(-)
delete mode 100644 miniprogram/app.js.mine
create mode 100644 miniprogram/pageage/project_measure/add/index.js
create mode 100644 miniprogram/pageage/project_measure/add/index.json
create mode 100644 miniprogram/pageage/project_measure/add/index.wxml
create mode 100644 miniprogram/pageage/project_measure/add/index.wxss
create mode 100644 miniprogram/pageage/project_measure/info/index.js
create mode 100644 miniprogram/pageage/project_measure/info/index.json
create mode 100644 miniprogram/pageage/project_measure/info/index.wxml
create mode 100644 miniprogram/pageage/project_measure/info/index.wxss
create mode 100644 miniprogram/pageage/project_measure/list/index.js
create mode 100644 miniprogram/pageage/project_measure/list/index.json
create mode 100644 miniprogram/pageage/project_measure/list/index.wxml
create mode 100644 miniprogram/pageage/project_measure/list/index.wxss
create mode 100644 miniprogram/pageage/project_special/add/index.js
create mode 100644 miniprogram/pageage/project_special/add/index.json
create mode 100644 miniprogram/pageage/project_special/add/index.wxml
create mode 100644 miniprogram/pageage/project_special/add/index.wxss
create mode 100644 miniprogram/pageage/project_special/info/index.js
create mode 100644 miniprogram/pageage/project_special/info/index.json
create mode 100644 miniprogram/pageage/project_special/info/index.wxml
create mode 100644 miniprogram/pageage/project_special/info/index.wxss
create mode 100644 miniprogram/pageage/project_special/list/index.js
create mode 100644 miniprogram/pageage/project_special/list/index.json
create mode 100644 miniprogram/pageage/project_special/list/index.wxml
create mode 100644 miniprogram/pageage/project_special/list/index.wxss
diff --git a/miniprogram/app.js.mine b/miniprogram/app.js.mine
deleted file mode 100644
index 9aefa08..0000000
--- a/miniprogram/app.js.mine
+++ /dev/null
@@ -1,71 +0,0 @@
-//app.js
-
-//全局分享
-!function(){
- var PageTmp = Page;
- Page =function (pageConfig) {
- // 设置全局默认分享
- pageConfig = Object.assign({
- //右上角分享功能
- onShareAppMessage () {
- return {
- title: '智能工地+',//分享标题
- path: '/pages/login/login',//分享用户点开后页面
- success (res) {
- console.log('分享成功!')
- }
- }
- }
- },pageConfig);
- PageTmp(pageConfig);
- };
-}();
-
-App({
- globalData: {
- paramDeptId:'',
- //请求地址参数
- //reqUrl:"http://192.168.31.126:9981",
- //reqUrl:'https://zngdtest.makalu.cc/',
- reqUrl:'https://zngd.makalu.cc',
- //地图相关参数
- scale:'',
- initialLon:'',
- initialLat:'',
- markers:[],
- //页面跳转参数
- type:'',
- value1:'省',
- value2:'市/区',
- value3:'公司',
- projectInfoList:{},
- projectId:'',
- projectName:'',
- },
-
- onLaunch: function () {
- if (!wx.cloud) {
- console.error('请使用 2.2.3 或以上的基础库以使用云能力')
- } else {
- wx.cloud.init({
- // env 参数说明:
- // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
- // 此处请填入环境 ID, 环境 ID 可打开云控制台查看
- // 如不填则使用默认环境(第一个创建的环境)
- // env: 'my-env-id',
- traceUser: true,
- })
- }
- },
-
- //页面弹窗
- toast: function (msg) {
- wx.showToast({
- title: msg,
- icon: 'none',
- duration: 2000,
- mask: true
- });
- }
-
-})
\ No newline at end of file
diff --git a/miniprogram/app.json b/miniprogram/app.json
index e032c51..a25a8fe 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -90,7 +90,13 @@
"project_schedule/info/index",
"project_train/list/index",
"project_train/add/index",
- "project_train/info/index"
+ "project_train/info/index",
+ "project_special/list/index",
+ "project_special/add/index",
+ "project_special/info/index",
+ "project_measure/list/index",
+ "project_measure/add/index",
+ "project_measure/info/index"
],
"independent": false
}
diff --git a/miniprogram/pageage/project_checking/add/index.js b/miniprogram/pageage/project_checking/add/index.js
index 15bbeef..98c4b78 100644
--- a/miniprogram/pageage/project_checking/add/index.js
+++ b/miniprogram/pageage/project_checking/add/index.js
@@ -16,7 +16,7 @@ Page({
rectifierData:[],
rectifierData2:[],
imageInfoData:[],
- checkingResult:"",
+ checkingResult:"1",
//验收时间
checkTime:'',
loadShow:false,
@@ -136,7 +136,7 @@ Page({
//取消页面
cancelSaveView(){
- wx.navigateBack()
+ this.returnToPage()
},
//保存
@@ -243,7 +243,7 @@ Page({
if(res.code == 200){
app.toast("添加成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -290,7 +290,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_measure/add/index.js b/miniprogram/pageage/project_measure/add/index.js
new file mode 100644
index 0000000..bddea3a
--- /dev/null
+++ b/miniprogram/pageage/project_measure/add/index.js
@@ -0,0 +1,446 @@
+// pageage/safetyManagement/addSafetyInspect/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate:new Date(2088,1,1).getTime(),
+ deptId:"",
+ projectId:"",
+ projectName:"",
+ loginName:"",
+ rectifierData:[],
+ rectifierData2:[],
+ imageInfoData:[],
+ loadShow:false,
+ measureType:"1",
+ measureTypeList:[],
+ measureInfo:"1",
+ measureInfoTypeList:[],
+ measurePosition:"",
+ measurePointPosition:"",
+ qualityUser:"",
+ qualityUserName:"",
+ superviseUser:"",
+ superviseUserName:"",
+ //验收时间
+ measureTime:'',
+ measureResult:"1",
+ resultList:[{id:1,text:"合格"},{id:2,text:"不合格"}]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {projectId,projectName} = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success:res=>{
+ this.setData({
+ projectId,
+ projectName,
+ deptId:res.data.deptId,
+ loginName:res.data.loginName
+ })
+ this.getProjectUserData();
+ this.getMeasureTypeList();
+ this.getMeasureInfoTypeList();
+ }
+ })
+ },
+
+ //查询项目人员数据
+ getProjectUserData(){
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectuserinfo/list',
+ method:"get",
+ data:{
+ projectId:that.data.projectId
+ },
+ header:{
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res){
+ res = res.data
+ if(res.code == 200){
+ that.setData({
+ rectifierData:res.data,
+ rectifierData2:res.data
+ })
+ }
+ }
+ })
+ },
+
+ getMeasureTypeList(){
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectMeasure/queryDictType',
+ method:"get",
+ data:{
+ type:'project_measure_type'
+ },
+ header:{
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res){
+ res = res.data
+ if(res.code == 200){
+ let list=[];
+ res.data.forEach(it =>{
+ list.push({"id":it.dictValue,"text":it.dictLabel});
+ })
+ that.setData({
+ measureTypeList:list
+ })
+ }
+ }
+ })
+ },
+
+ getMeasureInfoTypeList(){
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectMeasure/queryDictType',
+ method:"get",
+ data:{
+ type:'project_measure_info_type'
+ },
+ header:{
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res){
+ res = res.data
+ if(res.code == 200){
+ let list=[];
+ res.data.forEach(it =>{
+ list.push({"id":it.dictValue,"text":it.dictLabel});
+ })
+ that.setData({
+ measureInfoTypeList:list
+ })
+ }
+ }
+ })
+ },
+
+ //测量部位
+ onInputMeasurePosition(e){
+ let measurePosition = e.detail.value
+ this.setData({
+ measurePosition
+ })
+ },
+
+ //测量点位
+ onInputMeasurePointPosition(e){
+ let measurePointPosition = e.detail.value
+ this.setData({
+ measurePointPosition
+ })
+ },
+
+ //验收时间
+ onInputTime(e){
+ let measureTime = e.detail
+ this.setData({
+ measureTime
+ })
+ },
+
+ // list 上传图片
+ onImagesArr(e){
+ var data = this.data.imageInfoData
+ data = e.detail
+ this.setData({
+ imageInfoData:data
+ })
+ },
+
+ //添加质量专员
+ onAddQualityUser(e){
+ if(e.detail.length>0){
+ this.setData({
+ qualityUser:e.detail[0].phoneNumber,
+ qualityUserName:e.detail[0].userName
+ })
+ }
+ },
+
+ //添加监理专员
+ onAddSuperviseUser(e){
+ if(e.detail.length>0){
+ this.setData({
+ superviseUser:e.detail[0].phoneNumber,
+ superviseUserName:e.detail[0].userName
+ })
+ }
+ },
+
+ //切换测量结果
+ onSelectType(e){
+ this.setData({
+ measureResult:e.detail.id
+ })
+ },
+
+ //取消页面
+ cancelSaveView(){
+ this.returnToPage()
+ },
+
+ //保存
+ onSave(){
+ this.setData({
+ loadShow:true
+ })
+ let that = this
+ let {projectId,loginName, deptId,measureType,
+ measureInfo,
+ measurePosition,
+ measurePointPosition,
+ qualityUser,
+ qualityUserName,
+ superviseUser,
+ superviseUserName,
+ measureTime,
+ measureResult,imageInfoData} = that.data;
+ //数据效验
+ if(projectId==""||loginName==""||deptId==""){
+ app.toast("数据异常,请刷新页面重试!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(imageInfoData.length==0){
+ app.toast("请上传测量现场图片!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(measureType==""){
+ app.toast("请选择测量类型!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(measureInfo==""){
+ app.toast("请选择测量内容!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(measurePosition==""){
+ app.toast("请填写测量部位!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(measurePointPosition==""){
+ app.toast("请填写测量点位!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(qualityUser==""||qualityUserName==""){
+ app.toast("请选择质量专员!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(superviseUser==""||superviseUserName==""){
+ app.toast("请选择监理专员!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(measureTime==""){
+ app.toast("请选择测量时间!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(measureResult==""){
+ app.toast("请选择测量结果!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(superviseUser==qualityUser){
+ app.toast("质量专员和监理专员不能是同一人!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ let fileUrls = [];
+ imageInfoData.forEach(async (item)=>{
+ let uploadUrl = app.globalData.uploadUrl+'/common/upload'
+ let name = "file"
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ let obj = await that.syncUploadImage(uploadUrl,item,name);
+ fileUrls.push(obj.data.fileName);
+ //验证图片上传完毕
+ if(fileUrls.length == imageInfoData.length){
+ let params = {
+ projectId,
+ deptId,
+ imageUrls:fileUrls.toString(),
+ measureType,
+ measureInfo,
+ measurePosition,
+ measurePointPosition,
+ qualityUser,
+ qualityUserName,
+ superviseUser,
+ superviseUserName,
+ measureTime:measureTime+":00",
+ measureResult,
+ createBy:loginName
+ }
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectMeasure/add',
+ method:"POST",
+ data:params,
+ header: {
+ "Username": loginName,
+ "Content-Type": "application/json"
+ },
+ success(res){
+ that.setData({
+ loadShow:false
+ })
+ res = res.data
+ if(res.code == 200){
+ app.toast("添加成功!")
+ setTimeout(()=>{
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },200)
+ }
+ }
+ })
+ }
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(url,uploadFile,name) {
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url, // 上传的服务器接口地址
+ filePath: uploadFile,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ name, //上传的所需字段,后端提供
+ formData: { user: 'test' },
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ //选择测量类型
+ onSelectMeasureType(e){
+ this.setData({
+ measureType:e.detail.id
+ })
+ },
+
+ //选择测量内容
+ onSelectMeasureInfo(e){
+ this.setData({
+ measureInfo:e.detail.id
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/add/index.json b/miniprogram/pageage/project_measure/add/index.json
new file mode 100644
index 0000000..aeb0384
--- /dev/null
+++ b/miniprogram/pageage/project_measure/add/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/add/index.wxml b/miniprogram/pageage/project_measure/add/index.wxml
new file mode 100644
index 0000000..4691739
--- /dev/null
+++ b/miniprogram/pageage/project_measure/add/index.wxml
@@ -0,0 +1,138 @@
+
+
+
+
+
+ {{projectName}}
+
+
+ 测量图片
+
+
+
+
+
+ 测量类型
+
+
+
+
+
+ 测量内容
+
+
+
+
+
+ 测量部位
+
+
+
+
+
+ 测量点位
+
+
+
+
+
+
+ 质量专员
+
+
+
+
+
+
+ 监理专员
+
+
+
+
+
+
+ 测量时间
+
+
+
+
+
+ 测量结果
+
+
+
+
+
+
+ 取消
+ 提交
+
+
+
+
+
+
+ 数据加载中!请稍后...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pageage/project_measure/add/index.wxss b/miniprogram/pageage/project_measure/add/index.wxss
new file mode 100644
index 0000000..38bd48d
--- /dev/null
+++ b/miniprogram/pageage/project_measure/add/index.wxss
@@ -0,0 +1,7 @@
+/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
diff --git a/miniprogram/pageage/project_measure/info/index.js b/miniprogram/pageage/project_measure/info/index.js
new file mode 100644
index 0000000..8b25b31
--- /dev/null
+++ b/miniprogram/pageage/project_measure/info/index.js
@@ -0,0 +1,180 @@
+// pageage/project_checking/info/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:"",
+ infoData:{},
+ loadShow:false,
+ loginName:"",
+ showDel:false,
+ imageList:[],
+ minImageList:[],
+ request:app.globalData.reqUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {id} = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success:res=>{
+ this.setData({
+ id,
+ loginName:res.data.loginName
+ })
+ this.getInfo();
+ }
+ })
+ },
+
+
+ /**
+ * 获取安全检查详情信息
+ *
+ */
+ getInfo(){
+ let {id} = this.data
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectMeasure/info',
+ method:"get",
+ data:{
+ id:id
+ },
+ success(res){
+ res = res.data
+ if(res.code == 200){
+ let urls = [];
+ let minUrls = [];
+ if(res.data.imageUrls){
+ res.data.imageUrls.split(',').forEach(element => {
+ urls.push(that.data.request+element);
+ minUrls.push(that.data.request+element+'.min.jpg');
+ });
+ }
+ that.setData({
+ infoData:res.data,
+ imageList:urls,
+ minImageList:minUrls,
+ loadShow:false
+ })
+ //判断当前能否删除
+ if(res.data.createBy==that.data.loginName){
+ that.setData({
+ showDel:true
+ })
+ }
+ }
+ }
+ })
+ },
+
+ onDelete(){
+ //弹出确认
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '是否确定删除此条数据?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.deleteData();
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+ deleteData(){
+ let {id} = this.data
+ let that = this;
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectMeasure/remove',
+ header: {
+ "Username": that.data.loginName,
+ },
+ data:{
+ id:id
+ },
+ method:"get",
+ success(res){
+ app.toast("删除成功!")
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }
+ })
+ },
+
+ //展示图片
+ showImg:function(e){
+ var that=this;
+ wx.previewImage({
+ urls: that.data.imageList,
+ current: that.data.imageList[e.currentTarget.dataset.index]
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/info/index.json b/miniprogram/pageage/project_measure/info/index.json
new file mode 100644
index 0000000..ba2821f
--- /dev/null
+++ b/miniprogram/pageage/project_measure/info/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/info/index.wxml b/miniprogram/pageage/project_measure/info/index.wxml
new file mode 100644
index 0000000..5cef8a3
--- /dev/null
+++ b/miniprogram/pageage/project_measure/info/index.wxml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+
+ 测量图片
+
+
+
+
+
+
+
+
+
+ 测量类型
+ {{infoData.measureTypeName}}
+
+
+
+
+ 测量内容
+ {{infoData.measureInfoName}}
+
+
+
+
+ 测量部位
+ {{infoData.measurePosition}}
+
+
+
+
+ 测量点位
+ {{infoData.measurePointPosition}}
+
+
+
+
+ 测量时间
+ {{infoData.measureTime}}
+
+
+
+
+ 质量专员
+ {{infoData.qualityUserName}}
+
+
+
+
+ 监理专员
+ {{infoData.superviseUserName}}
+
+
+
+
+ 测量结果
+
+ 合格
+ 不合格
+
+
+
+
+
+ 提交单位
+ {{infoData.deptName}}
+
+
+
+
+ 提交用户
+ {{infoData.createBy}}
+
+
+
+
+ 提交时间
+ {{infoData.createTime}}
+
+
+
+
+
+
+ 删除
+
+
+
diff --git a/miniprogram/pageage/project_measure/info/index.wxss b/miniprogram/pageage/project_measure/info/index.wxss
new file mode 100644
index 0000000..e8ea92e
--- /dev/null
+++ b/miniprogram/pageage/project_measure/info/index.wxss
@@ -0,0 +1,23 @@
+/* pageage/project_checking/info/index.wxss */
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 8px 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/list/index.js b/miniprogram/pageage/project_measure/list/index.js
new file mode 100644
index 0000000..d6049a2
--- /dev/null
+++ b/miniprogram/pageage/project_measure/list/index.js
@@ -0,0 +1,143 @@
+// pageage/safetyManagement/securityCheckGR/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deptId:"",
+ loginName:"",
+ projectId:"",
+ minRoleId:"",
+ projectData:{},
+ initData: {},
+ show:false,
+ listData:[],
+ request:app.globalData.reqUrl
+ },
+
+ skipAdd(){
+ wx.redirectTo({
+ url: `../add/index?projectId=${this.data.initData.id}&projectName=`+this.data.initData.text,
+ })
+ },
+
+ getInfo(e){
+ let {id} = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success:res=>{
+ this.setData({
+ deptId:res.data.deptId,
+ loginName:res.data.loginName,
+ userName:res.data.userName,
+ projectId:app.globalData.projectId,
+ minRoleId:res.data.minRoleId,
+ initData:{text:app.globalData.projectName,id:app.globalData.projectId}
+ })
+ this.getListData(app.globalData.projectId,res.data.deptId,res.data.minRoleId);
+ }
+ })
+ },
+
+ /**
+ * 查询项目举牌验收数据
+ */
+ getListData(projectId,deptId,minRoleId) {
+ var that = this;
+ //判断角色,
+ if(minRoleId==2||minRoleId==3||minRoleId==4){
+ deptId=0;
+ }
+ let param = {
+ "projectId": projectId,
+ "deptId":deptId
+ }
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectMeasure/list',
+ data:param,
+ method: "get",
+ success: function (res) {
+ that.setData({
+ listData:res.data.data
+ })
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../../pages/gengduogongneng/gengduogongneng',
+ })
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e){
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.projectId = projectId;
+ app.globalData.projectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/list/index.json b/miniprogram/pageage/project_measure/list/index.json
new file mode 100644
index 0000000..c38e268
--- /dev/null
+++ b/miniprogram/pageage/project_measure/list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_measure/list/index.wxml b/miniprogram/pageage/project_measure/list/index.wxml
new file mode 100644
index 0000000..0227637
--- /dev/null
+++ b/miniprogram/pageage/project_measure/list/index.wxml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+ 测量时间:{{item.measureTime}}
+
+
+
+
+
+ 不合格
+ 合格
+
+
+
+ 测量类型:{{item.measureTypeName}}
+ 测量内容:{{item.measureInfoName}}
+ 测量点位:{{item.measurePointPosition}}
+
+
+ 测量部位:{{item.measurePosition}}
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pageage/project_measure/list/index.wxss b/miniprogram/pageage/project_measure/list/index.wxss
new file mode 100644
index 0000000..f370194
--- /dev/null
+++ b/miniprogram/pageage/project_measure/list/index.wxss
@@ -0,0 +1 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.js b/miniprogram/pageage/project_problemmodify/quality/add/index.js
index 15b60ee..c164048 100644
--- a/miniprogram/pageage/project_problemmodify/quality/add/index.js
+++ b/miniprogram/pageage/project_problemmodify/quality/add/index.js
@@ -184,7 +184,7 @@ Page({
//取消页面
cancelSaveView(){
- wx.navigateBack()
+ this.returnToPage()
},
//保存
@@ -311,7 +311,7 @@ Page({
if(res.code == 200){
app.toast("添加成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -365,7 +365,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
index 0f8e936..4b42147 100644
--- a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml
@@ -45,7 +45,7 @@
整改截至时间
-
+
diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.js b/miniprogram/pageage/project_problemmodify/quality/check/index.js
index 1b0f7ce..3959def 100644
--- a/miniprogram/pageage/project_problemmodify/quality/check/index.js
+++ b/miniprogram/pageage/project_problemmodify/quality/check/index.js
@@ -108,7 +108,7 @@ Page({
//取消页面
cancelSaveView(){
- wx.navigateBack()
+ this.returnToPage()
},
//保存
@@ -156,7 +156,7 @@ Page({
if(res.code == 200){
app.toast("操作成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -230,7 +230,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/quality/info/index.js b/miniprogram/pageage/project_problemmodify/quality/info/index.js
index 4351865..09ae0f5 100644
--- a/miniprogram/pageage/project_problemmodify/quality/info/index.js
+++ b/miniprogram/pageage/project_problemmodify/quality/info/index.js
@@ -139,7 +139,7 @@ Page({
method:"get",
success(res){
app.toast("删除成功!")
- wx.navigateTo({
+ wx.redirectTo({
url: `../list/index`,
})
}
@@ -166,7 +166,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/quality/modify/index.js b/miniprogram/pageage/project_problemmodify/quality/modify/index.js
index 4c4b8ba..48da860 100644
--- a/miniprogram/pageage/project_problemmodify/quality/modify/index.js
+++ b/miniprogram/pageage/project_problemmodify/quality/modify/index.js
@@ -104,7 +104,7 @@ Page({
//取消页面
cancelSaveView(){
- wx.navigateBack()
+ this.returnToPage()
},
//保存
@@ -169,7 +169,7 @@ Page({
if(res.code == 200){
app.toast("提交成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -225,7 +225,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/security/add/index.js b/miniprogram/pageage/project_problemmodify/security/add/index.js
index 941ab7a..8b74030 100644
--- a/miniprogram/pageage/project_problemmodify/security/add/index.js
+++ b/miniprogram/pageage/project_problemmodify/security/add/index.js
@@ -318,7 +318,7 @@ Page({
if(res.code == 200){
app.toast("添加成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -372,7 +372,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/security/add/index.wxml b/miniprogram/pageage/project_problemmodify/security/add/index.wxml
index 1d5b0df..2cf3ea9 100644
--- a/miniprogram/pageage/project_problemmodify/security/add/index.wxml
+++ b/miniprogram/pageage/project_problemmodify/security/add/index.wxml
@@ -45,7 +45,7 @@
整改截至时间
-
+
diff --git a/miniprogram/pageage/project_problemmodify/security/check/index.js b/miniprogram/pageage/project_problemmodify/security/check/index.js
index 0142be2..2e93b1f 100644
--- a/miniprogram/pageage/project_problemmodify/security/check/index.js
+++ b/miniprogram/pageage/project_problemmodify/security/check/index.js
@@ -108,7 +108,7 @@ Page({
//取消页面
cancelSaveView(){
- wx.navigateBack()
+ this.returnToPage()
},
//保存
@@ -156,7 +156,7 @@ Page({
if(res.code == 200){
app.toast("操作成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -230,7 +230,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/security/info/index.js b/miniprogram/pageage/project_problemmodify/security/info/index.js
index 5dc08dc..a07c632 100644
--- a/miniprogram/pageage/project_problemmodify/security/info/index.js
+++ b/miniprogram/pageage/project_problemmodify/security/info/index.js
@@ -137,7 +137,7 @@ Page({
method:"get",
success(res){
app.toast("删除成功!")
- wx.navigateTo({
+ wx.redirectTo({
url: `../list/index`,
})
}
@@ -163,7 +163,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_problemmodify/security/modify/index.js b/miniprogram/pageage/project_problemmodify/security/modify/index.js
index 190c689..69f6f03 100644
--- a/miniprogram/pageage/project_problemmodify/security/modify/index.js
+++ b/miniprogram/pageage/project_problemmodify/security/modify/index.js
@@ -104,7 +104,7 @@ Page({
//取消页面
cancelSaveView(){
- wx.navigateBack()
+ this.returnToPage()
},
//保存
@@ -169,7 +169,7 @@ Page({
if(res.code == 200){
app.toast("提交成功!")
setTimeout(()=>{
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},200)
@@ -225,7 +225,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
- wx.navigateTo({
+ wx.redirectTo({
url: '../list/index',
})
},
diff --git a/miniprogram/pageage/project_special/add/index.js b/miniprogram/pageage/project_special/add/index.js
new file mode 100644
index 0000000..4e48746
--- /dev/null
+++ b/miniprogram/pageage/project_special/add/index.js
@@ -0,0 +1,333 @@
+// pageage/safetyManagement/addSafetyInspect/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate:new Date(2088,1,1).getTime(),
+ deptId:"",
+ projectId:"",
+ projectName:"",
+ loginName:"",
+ name:"",
+ sex:"1",
+ phoneNumber:"",
+ specialType:"1",
+ credentialNumber:"",
+ credentialExpirationTime:"",
+ sexList:[{id:"1",text:"男"},{id:"2",text:"女"},{id:"3",text:"未知"}],
+ specialTypeList:[],
+ credentialFileData:[],
+ limit:1,
+ fileType:["pdf","png","jpg","jpeg"]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {projectId,projectName} = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success:res=>{
+ this.setData({
+ projectId,
+ projectName,
+ deptId:res.data.deptId,
+ loginName:res.data.loginName
+ })
+ this.getDictData();
+ }
+ })
+ },
+
+ //获取字典数据
+ getDictData(){
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectSpecial/querySpecialType',
+ method:"get",
+ data:{},
+ success(res){
+ res = res.data
+ if(res.code == 200){
+ let temData=[];
+ res.data.forEach(item =>{
+ temData.push({id:item.dictValue,text:item.dictLabel});
+ });
+ that.setData({
+ specialTypeList:temData
+ })
+ }
+ }
+ })
+ },
+
+ //取消页面
+ cancelSaveView(){
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index'
+ })
+ },
+
+ //保存
+ onSave(){
+ this.setData({
+ loadShow:true
+ })
+ let that = this
+ let {projectId,projectName,deptId,loginName,name,sex,phoneNumber,specialType,credentialNumber,credentialExpirationTime,credentialFileData} = that.data;
+ //数据效验
+ if(projectId==""||loginName==""||deptId==""){
+ app.toast("数据异常,请刷新页面重试!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(name==""){
+ app.toast("请填写人员姓名!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(sex==""){
+ app.toast("请选择人员性别!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(phoneNumber==""){
+ app.toast("请填写联系方式!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(phoneNumber.length!=11){
+ app.toast("人员联系方式格式错误!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(specialType==""){
+ app.toast("请选择人员类型!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(credentialNumber==""){
+ app.toast("请填写证书编号!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(credentialExpirationTime==""){
+ app.toast("请选择证书过期时间!")
+ that.setData({
+ loadShow:false
+ })
+ return;
+ }
+ if(credentialFileData.length==0){
+ app.toast("请上传证书附件!")
+ that.setData({
+ loadShow:false
+ });
+ return;
+ }
+ let _fileType = credentialFileData[0].path.split('.');
+ _fileType = _fileType[_fileType.length-1].toLowerCase();
+ //判断附件类型,如果是图片直接展示,非图片则显示附件
+ if(this.data.fileType.indexOf(_fileType)==-1){
+ app.toast("证书附件不支持 [ "+_fileType+" ] 格式!")
+ that.setData({
+ loadShow:false
+ });
+ return;
+ }
+ credentialFileData.forEach(async (item)=>{
+ let uploadUrl = app.globalData.uploadUrl+'/common/upload'
+ let uploadName = "file"
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ let obj = await that.syncUploadImage(uploadUrl,credentialFileData[0].path,uploadName);
+ let params = {
+ projectId,
+ projectName,
+ deptId,
+ specialType,
+ name,sex,phoneNumber,credentialNumber,credentialExpirationTime,
+ credentialFile:obj.data.fileName,
+ isCredential:"Y",
+ isDel:0,
+ createBy:loginName
+ }
+
+ wx.request({
+ url: app.globalData.reqUrl + "/wechat/projectSpecial/add",
+ method:"POST",
+ data:params,
+ header: {
+ "Username": loginName,
+ "Content-Type": "application/json"
+ },
+ success(res){
+ that.setData({
+ loadShow:false
+ })
+ res = res.data
+ if(res.code == 200){
+ app.toast("添加成功!")
+ setTimeout(()=>{
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },200)
+ }
+ }
+ })
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(url,uploadFile,name) {
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url, // 上传的服务器接口地址
+ filePath: uploadFile,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ name, //上传的所需字段,后端提供
+ formData: { user: 'test' },
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ nameAction: function (options) {
+ this.data.name = options.detail.value;
+ },
+
+ phoneAction: function (options) {
+ let value = options.detail.value;
+ value = value.replace(/[^0-9]/g, ''); // 正则表达式替换非数字为空
+ this.setData({
+ phoneNumber: value
+ });
+ },
+ credentialNumberAction: function (options) {
+ this.data.credentialNumber = options.detail.value
+ },
+
+ fileUpload(a,b,c){
+ let file=a.detail;
+ this.setData({
+ credentialFileData: file
+ });
+ },
+
+ //演练训练时间
+ onInputTime(e){
+ let credentialExpirationTime = e.detail
+ this.setData({
+ credentialExpirationTime
+ })
+ },
+
+ //切换性别
+ onSelectSex(e){
+ this.setData({
+ sex:e.detail.id
+ })
+ },
+ //切换人员类型
+ onSelectSpecialType(e){
+ this.setData({
+ specialType:e.detail.id
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/add/index.json b/miniprogram/pageage/project_special/add/index.json
new file mode 100644
index 0000000..aeb0384
--- /dev/null
+++ b/miniprogram/pageage/project_special/add/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/add/index.wxml b/miniprogram/pageage/project_special/add/index.wxml
new file mode 100644
index 0000000..dc48af9
--- /dev/null
+++ b/miniprogram/pageage/project_special/add/index.wxml
@@ -0,0 +1,120 @@
+
+
+
+
+
+ {{projectName}}
+
+
+ 人员姓名
+
+
+
+
+
+ 人员性别
+
+
+
+
+
+ 联系方式
+
+
+
+
+
+ 人员类型
+
+
+
+
+
+ 证书编号
+
+
+
+
+
+ 过期时间
+
+
+
+
+
+ 证书附件
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+ 数据加载中!请稍后...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pageage/project_special/add/index.wxss b/miniprogram/pageage/project_special/add/index.wxss
new file mode 100644
index 0000000..6a3c08a
--- /dev/null
+++ b/miniprogram/pageage/project_special/add/index.wxss
@@ -0,0 +1,36 @@
+/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
diff --git a/miniprogram/pageage/project_special/info/index.js b/miniprogram/pageage/project_special/info/index.js
new file mode 100644
index 0000000..6ac1743
--- /dev/null
+++ b/miniprogram/pageage/project_special/info/index.js
@@ -0,0 +1,202 @@
+// pageage/project_checking/info/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id:"",
+ infoData:{},
+ imageList:[],
+ minImageList:[],
+ loadShow:false,
+ loginName:"",
+ showDel:false,
+ request:app.globalData.reqUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {id} = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success:res=>{
+ this.setData({
+ id,
+ loginName:res.data.loginName
+ })
+ this.getInfo();
+ }
+ })
+ },
+
+
+ /**
+ * 获取安全检查详情信息
+ *
+ */
+ getInfo(){
+ let {id} = this.data
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl+'/wechat/projectSpecial/info',
+ method:"get",
+ data:{
+ id:id
+ },
+ success(res){
+ res = res.data
+ if(res.code == 200){
+ let urls = [];
+ let minUrls = [];
+ if(res.data.credentialFile){
+ res.data.credentialFile.split(',').forEach(element => {
+ urls.push(that.data.request+element);
+ minUrls.push(that.data.request+element+'.min.jpg');
+ });
+ }
+ that.setData({
+ infoData:res.data,
+ imageList:urls,
+ minImageList:minUrls,
+ loadShow:false
+ })
+ //判断当前能否删除
+ if(res.data.createBy==that.data.loginName){
+ that.setData({
+ showDel:true
+ })
+ }
+ }
+ }
+ })
+ },
+
+ onDelete(){
+ //弹出确认
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '是否确定删除此条数据?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.deleteData();
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+ deleteData(){
+ let {id} = this.data
+ let that = this;
+ wx.request({
+ url: app.globalData.reqUrl+"/wechat/projectSpecial/remove",
+ header: {
+ "Username": this.data.loginName,
+ },
+ data:{
+ id:id
+ },
+ method:"get",
+ success(res){
+ app.toast("删除成功!")
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }
+ })
+ },
+
+ //展示图片
+ showImg:function(e){
+ var that=this;
+ wx.previewImage({
+ urls: that.data.imageList,
+ current: that.data.imageList[e.currentTarget.dataset.index]
+ })
+ },
+
+ downFile:function(e){
+ let idx = e.currentTarget.dataset['index'];
+ let that = this;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: that.data.request+that.imageList[idx],
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail:function(res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index'
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/info/index.json b/miniprogram/pageage/project_special/info/index.json
new file mode 100644
index 0000000..ef67f38
--- /dev/null
+++ b/miniprogram/pageage/project_special/info/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "形象进度详情"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/info/index.wxml b/miniprogram/pageage/project_special/info/index.wxml
new file mode 100644
index 0000000..32aff07
--- /dev/null
+++ b/miniprogram/pageage/project_special/info/index.wxml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 证书图片
+
+
+
+
+
+
+
+
+
+ 证书附件
+
+
+
+ 下载附件
+
+
+
+
+
+
+ 人员姓名
+ {{infoData.name}}
+
+
+
+
+ 人员性别
+
+ 男
+ 女
+ 未知
+
+
+
+
+
+ 人员类型
+ {{infoData.specialTypeName}}
+
+
+
+
+ 证书编号
+ {{infoData.credentialNumber}}
+
+
+
+
+ 联系方式
+ {{infoData.phoneNumber}}
+
+
+
+
+ 过期时间
+ {{infoData.credentialExpirationTime}}
+
+
+
+
+ 所属单位
+ {{infoData.deptName}}
+
+
+
+
+
+ 提交用户
+ {{infoData.createBy}}
+
+
+
+
+ 提交时间
+ {{infoData.createTime}}
+
+
+
+
+
+
+ 删除
+
+
+
diff --git a/miniprogram/pageage/project_special/info/index.wxss b/miniprogram/pageage/project_special/info/index.wxss
new file mode 100644
index 0000000..e8ea92e
--- /dev/null
+++ b/miniprogram/pageage/project_special/info/index.wxss
@@ -0,0 +1,23 @@
+/* pageage/project_checking/info/index.wxss */
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 8px 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/list/index.js b/miniprogram/pageage/project_special/list/index.js
new file mode 100644
index 0000000..3e09134
--- /dev/null
+++ b/miniprogram/pageage/project_special/list/index.js
@@ -0,0 +1,151 @@
+// pageage/safetyManagement/securityCheckGR/index.js
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deptId:"",
+ loginName:"",
+ userName:"",
+ projectId:"",
+ projectData:{},
+ projectNameArgs:"",
+ initData: {},
+ show:false,
+ listData:[],
+ request:app.globalData.reqUrl
+ },
+
+ onClose(){
+ this.setData({ show: false });
+ },
+ showPopup() {
+ this.setData({ show: true });
+ },
+
+ skipAdd(){
+ wx.redirectTo({
+ url: `../add/index?projectId=${this.data.initData.id}&projectName=${this.data.initData.text}`,
+ })
+ },
+
+ getInfo(e){
+ let {id} = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success:res=>{
+ this.setData({
+ deptId:res.data.deptId,
+ loginName:res.data.loginName,
+ userName:res.data.userName,
+ projectId:app.globalData.projectId,
+ projectNameArgs:app.globalData.projectName,
+ minRoleId:res.data.minRoleId,
+ initData:{text:app.globalData.projectName,id:app.globalData.projectId}
+ })
+ this.getListData(app.globalData.projectId,res.data.deptId,res.data.minRoleId);
+ }
+ })
+ },
+
+ /**
+ * 查询项目特种人员数据
+ */
+ getListData(projectId,deptId,minRoleId) {
+ var that = this;
+ //判断角色,
+ if(minRoleId==2||minRoleId==3||minRoleId==4){
+ deptId=0;
+ }
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectSpecial/list',
+ data: {
+ "deptId":deptId,
+ "projectId": projectId
+ },
+ method: "get",
+ success: function (res) {
+ that.setData({
+ listData:res.data.data
+ })
+ }
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../../pages/gengduogongneng/gengduogongneng',
+ })
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e){
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.projectId = projectId;
+ app.globalData.projectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/list/index.json b/miniprogram/pageage/project_special/list/index.json
new file mode 100644
index 0000000..c38e268
--- /dev/null
+++ b/miniprogram/pageage/project_special/list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_special/list/index.wxml b/miniprogram/pageage/project_special/list/index.wxml
new file mode 100644
index 0000000..5bad8e9
--- /dev/null
+++ b/miniprogram/pageage/project_special/list/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+ {{' '+item.credentialNumber}}
+
+
+
+
+
+
+
+
+
+ 人员姓名:{{item.name}}
+ 人员类型:{{item.specialTypeName}}
+ 证书过期时间:{{item.credentialExpirationTime}}
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pageage/project_special/list/index.wxss b/miniprogram/pageage/project_special/list/index.wxss
new file mode 100644
index 0000000..f370194
--- /dev/null
+++ b/miniprogram/pageage/project_special/list/index.wxss
@@ -0,0 +1 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
diff --git a/miniprogram/pageage/project_train/add/index.js b/miniprogram/pageage/project_train/add/index.js
index bac7175..52b79bf 100644
--- a/miniprogram/pageage/project_train/add/index.js
+++ b/miniprogram/pageage/project_train/add/index.js
@@ -26,6 +26,7 @@ Page({
projectDeptList:[],
navs:[],
deptNames:"",
+ fileType:["doc","docx","xls","xlsx","ppt","pptx","txt","pdf","png","jpg","jpeg","mp4"]
},
/**
@@ -112,7 +113,6 @@ Page({
})
let that = this
let {projectId,projectName,loginName,imageInfoData,trainType,trainTitle,trainParticipants,beginDate,trainContent,trainFileData,minTitle,deptId} = that.data;
- debugger
//数据效验
if(projectId==""||loginName==""){
app.toast("数据异常,请刷新页面重试!")
@@ -163,6 +163,16 @@ Page({
});
return;
}
+ let _fileType = trainFileData[0].path.split('.');
+ _fileType = _fileType[_fileType.length-1].toLowerCase();
+ //判断附件类型,如果是图片直接展示,非图片则显示附件
+ if(this.data.fileType.indexOf(_fileType)==-1){
+ app.toast("当前 [ "+_fileType+" ] 文件不支持上传!")
+ that.setData({
+ loadShow:false
+ });
+ return;
+ }
let fileUrls = [];
imageInfoData.forEach(async (item)=>{
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
@@ -178,7 +188,6 @@ Page({
this.data.navs.forEach((it)=>{
depts.push({deptId:that.data.projectDeptList[it].unitId});
});
- debugger
let params = {
projectId,
projectName,
diff --git a/miniprogram/pageage/project_train/add/index.wxml b/miniprogram/pageage/project_train/add/index.wxml
index c3eb80d..1885c7b 100644
--- a/miniprogram/pageage/project_train/add/index.wxml
+++ b/miniprogram/pageage/project_train/add/index.wxml
@@ -67,6 +67,11 @@
+
+ 取消
+ 请选择协作团队
+ 确认
+
{{item.deptName}}
diff --git a/miniprogram/pageage/project_train/add/index.wxss b/miniprogram/pageage/project_train/add/index.wxss
index 6a3c08a..39d0889 100644
--- a/miniprogram/pageage/project_train/add/index.wxss
+++ b/miniprogram/pageage/project_train/add/index.wxss
@@ -34,3 +34,13 @@
font-weight: 600;
color: #14feff
}
+.option_list_title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx 0;
+ }
+ .option_list_title_btn{
+ color: #1989fa;
+ font-size: 30rpx;
+ }
diff --git a/miniprogram/pages/components/voucher-select/index.wxml b/miniprogram/pages/components/voucher-select/index.wxml
index 04f0c01..2a5ed28 100644
--- a/miniprogram/pages/components/voucher-select/index.wxml
+++ b/miniprogram/pages/components/voucher-select/index.wxml
@@ -15,7 +15,7 @@
取消
{{placeholder}}
确认
-
+
diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js
index 6cad760..8b8c17f 100644
--- a/miniprogram/pages/login/login.js
+++ b/miniprogram/pages/login/login.js
@@ -55,10 +55,11 @@ Page({
},
success:(res)=>{
res = res.data;
- this.onClickHide();
+ this.onClickHide();
this.setData({
openId:res.data.openid,
})
+ wx.setStorageSync('openId', res.data.openid)
//验证登录用户
this.selectUserInfoByOpenId(res.data.openid);
}
@@ -80,7 +81,6 @@ Page({
}
this.onClickShow();
var that = this;
- wx.setStorageSync('openId', openId)
wx.request({
url: app.globalData.reqUrl+'/wechat/openIdLogin',
data:{
@@ -119,13 +119,15 @@ Page({
url: '../map/map',
})
}
+ }else{
+ that.onClickHide();
}
}
})
},
//登录
- userLogin:function(){
+ userLogin:function(openid){
var that = this;
var username = that.data.username;
var password = that.data.password;
@@ -137,9 +139,13 @@ Page({
app.toast("密码不能为空");
return;
}
- if(!that.data.openId){
- app.toast("获取微信小程序授权失败,请重启应用或微信再试!如果还是授权失败,请删除应用后再试...");
- return;
+ let openId = that.data.openId
+ if(openId==""){
+ openId = wx.getStorageSync("openId");
+ if(openId==""){
+ app.toast("获取微信授权失败,请卸载后重新进入应用!!");
+ return;
+ }
}
//启动蒙版
that.onClickShow();
@@ -149,7 +155,7 @@ Page({
data:{
"username":username,
"password":password,
- "openId":that.data.openId,
+ "openId":openId,
},
method:"POST",
success(res){
diff --git a/miniprogram/pages/login/login.wxml b/miniprogram/pages/login/login.wxml
index c9c70f5..bfc4054 100644
--- a/miniprogram/pages/login/login.wxml
+++ b/miniprogram/pages/login/login.wxml
@@ -1,17 +1,20 @@
+
+
+
+
北跨泾河-产发工程数字管理平台
- 登录
产发工程数字管理平台,请使用手机号登录
-
+
diff --git a/miniprogram/pages/login/login.wxss b/miniprogram/pages/login/login.wxss
index 616cf27..66a1883 100644
--- a/miniprogram/pages/login/login.wxss
+++ b/miniprogram/pages/login/login.wxss
@@ -3,21 +3,20 @@ page{
background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
}
.login_title{
- height: 200rpx;
- padding:0 50rpx;
- line-height: 200rpx;
+ height: 180rpx;
+ line-height: 180rpx;
color: #728ce3;
font-size: 45rpx;
font-weight: bold;
+ text-align: center;
}
.login_title text{
border-bottom: 3px solid #728ce3;
}
.login_bg{
-
border-radius: 20rpx;
margin: 0 40rpx;
- padding: 80rpx 40rpx;
+ padding: 25rpx 40rpx;
}
.login_dl{
color: #ffffff;
@@ -28,6 +27,7 @@ page{
padding:20rpx 0;
font-size: 28rpx;
color: #8ca4ee;
+ text-align: center;
}
.login_input{
margin-top: 50rpx;