diff --git a/.DS_Store b/.DS_Store index 7bbd772..52a5587 100644 --- a/.DS_Store +++ b/.DS_Store diff --git a/common/config.js b/common/config.js index 7c2e8a7..811245d 100644 --- a/common/config.js +++ b/common/config.js @@ -1,7 +1,7 @@ let BASE_URL='http://8.130.38.56:8536'; -// let BASE_URL='http://10.0.0.2:2023'; +// let BASE_URL='http://192.168.179.221:8536'; export default BASE_URL diff --git a/manifest.json b/manifest.json index 0def68e..b655ee5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "数字民政服务平台", - "appid" : "__UNI__15B0592", + "appid" : "__UNI__E8DBEA9", "description" : "", "versionName" : "1.0.2", "versionCode" : "100", diff --git a/pages/funeral/funeral.vue b/pages/funeral/funeral.vue index 42c2654..43f5755 100644 --- a/pages/funeral/funeral.vue +++ b/pages/funeral/funeral.vue @@ -110,29 +110,8 @@ }, onLoad() { uni.hideTabBar(); - this.getGps(); }, methods: { - // 获取gps定位 - getGps(){ - var info = { - request:{ - "Action":"GetVehicleTrackData", - "UserId":"user", - "Pwd":"6B18CFA67F76F079B0BFFBD773DC4494", - "PlateNum":"川Zyb907", - "ColorCode":"0", - "BeginTime":"20231010090000", - "EndTime":"20231010150000", - "MinSpeed":"1", - "NeedAddress":"0", - } - } - info.request = JSON.stringify(info.request) - this.API.getGps(info).then(res=>{ - console.log("gps",res); - }) - }, home() { uni.navigateTo({ url: '/pages/home/home' diff --git a/pages/funeralcremation/funeralcremation.vue b/pages/funeralcremation/funeralcremation.vue index 619734d..ef50cd4 100644 --- a/pages/funeralcremation/funeralcremation.vue +++ b/pages/funeralcremation/funeralcremation.vue @@ -172,11 +172,12 @@ onLoad(params) { this.OrderType = params.type; var now = new Date(); - this.nowdate = now - this.from.scheduledCremationDate = now + this.nowdate = this.timestampToTime(now) + this.from.scheduledCremationDate = this.timestampToTime(now) + console.log("时间",this.from.scheduledCremationDate); // this.gethhsjsl(this.parseTime(now)); this.getbsinfo(); - this.zxhhllist(now); + this.zxhhllist(this.timestampToTime(now)); }, onReady() { this.$nextTick(() => { @@ -208,8 +209,20 @@ }, 2000); }, methods:{ + timestampToTime(timestamp) { + timestamp = timestamp ? timestamp : null; + let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 + let Y = date.getFullYear() + '-'; + let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; + let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '; + let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'; + let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'; + let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); + return Y + M + D; + }, // 火化炉列表获取 zxhhllist(date){ + console.log("初始化时间",date); this.API.zxhhllist().then(res=>{ console.log("火化炉",res); this.columns = []; @@ -280,7 +293,7 @@ gethhsjsl(times){ this.API.gethhsjsl().then(res=>{ console.log("获取预约时间和数量",res); - console.log("时间",times); + console.log("时间111",times); this.sjlist = [] for(let i = 0;i < res.data.length;i++){ if(res.data[i].DateStr == times){ @@ -327,10 +340,14 @@ console.log("火化炉id",this.hhlid); this.zxhqhhltimelist(this.nowdate); this.hhlshow = false; + this.sjlist = [] this.from.cremationFurnaceInfo = e.value[0]; }, // 最新获取时间火化炉时间 zxhqhhltimelist(time){ + // time = time + '' + var reg = /[\t\r\f\n\s]*/g; + time = time.replace(reg,''); var infos = { furnaceId:this.hhlid, useStatus:"2", @@ -339,17 +356,30 @@ this.API.gethhsjsl(infos).then(res=>{ console.log("最新时间列表",res); this.sjlist = [] + console.log("选择的时间",time); + for(let i = 0;i < res.data.length;i++){ + console.log("时间是否正确",res.data[i].dateStr == time,res.data[i].dateStr,typeof(time),typeof(res.data[i].dateStr)); + // if(res.data[i].dateStr === time){ + // for(let s = 0;s < res.data[i].timeAndTotalList.length;s++){ + // var info = { + // time:"", + // status:false + // } + // info.time = res.data[i].timeAndTotalList[s].timePeriod; + // if(s == 0){ + // info.status = true + // this.from.scheduledCremationTime = res.data[i].timeAndTotalList[s].timePeriod; + // } + // this.sjlist.push(info) + // } + // } for(let s = 0;s < res.data[i].timeAndTotalList.length;s++){ var info = { time:"", status:false } info.time = res.data[i].timeAndTotalList[s].timePeriod; - // if(s == 0){ - // info.status = true - // this.from.scheduledCremationTime = res.data[i].timeAndTotalList[s].timePeriod; - // } this.sjlist.push(info) } } @@ -380,6 +410,7 @@ return } this.from.obituaryOrderNumber = this.bspersoninfo.obituaryOrderNumber + this.from.furnaceId = this.hhlid console.log("from",this.from); // return this.API.hhlyy(this.from).then(res=>{ diff --git a/pages/funeralreport/funeralreport.vue b/pages/funeralreport/funeralreport.vue index 4827870..f452f87 100644 --- a/pages/funeralreport/funeralreport.vue +++ b/pages/funeralreport/funeralreport.vue @@ -66,7 +66,7 @@ - + 死亡原因 @@ -74,6 +74,7 @@ 死亡日期 + @@ -181,6 +182,10 @@ ], timeshow:false, jytimeshow:false, + swyycolumns:[ + ['自然死亡','疾病死亡','意外死亡'] + ], + swyyshow:false, }; }, onPageScroll(e) {this.$refs.nv.pageScroll(e)}, @@ -217,8 +222,9 @@ this.fileList.splice(event.index, 1) }, funeralreportmove(){ + // this.from.deceasedSex = this.sex var info = JSON.stringify(this.from) - console.log("提交的数据",this.from); + console.log("提交的数据",this.from,this.sex); // return // deceasedName deceasedAge idCardNumber ethnicity contactName contactPhone deathCase deathdate sex if(this.from.deceasedName == '' || this.from.deceasedAge == '' || this.from.idCardNumber == '' || this.from.ethnicity == '' || this.from.contactName == '' || this.from.contactPhone == '' || this.from.deathCase == '' || this.from.deathdate == '请选择' || this.sex == '请选择'){ @@ -240,6 +246,7 @@ xbconfirm(e){ this.xbshow = false this.sex = e.value[0] + this.from.deceasedSex = e.value[0] console.log("性别选择",e); }, // 性别取消选择 @@ -263,6 +270,17 @@ timeclose(){ this.timeshow = false }, + // 死亡原因确认 + swyyconfirm(e){ + console.log("e",e); + this.from.deathCase = e.value[0] + this.swyyshow = false + }, + // 死亡原因取消 + swyyclose(){ + this.swyyshow = false + } + } } diff --git a/pages/funeralreportmove/funeralreportmove.vue b/pages/funeralreportmove/funeralreportmove.vue index 62f1ca8..6af8545 100644 --- a/pages/funeralreportmove/funeralreportmove.vue +++ b/pages/funeralreportmove/funeralreportmove.vue @@ -3,7 +3,6 @@ - 遗体接运信息(必填) @@ -22,7 +21,7 @@ - {{accessTime}} + 接运时间 @@ -41,7 +40,7 @@ @@ -86,6 +85,7 @@ ], accessTime:"请选择", + accessTimeby:2, timeshow:false, remarks:"", info:{} @@ -108,8 +108,9 @@ methods:{ xztime(value){ this.timeshow = false - console.log("value",value); - this.accessTime = this.timestampToTime(value.value) + var that = this; + let selectTime =this.timestampToTime(value.value); + that.accessTime = selectTime; }, qxtime(){ this.timeshow = false @@ -164,12 +165,7 @@ areaclose(){ this.areashow = false }, - // 时间选择 - timeconfirm(e){ - console.log(e); - this.accessTime = e[0] - this.timeshow = false; - }, + timeclose(){ this.timeshow = false }, diff --git a/pages/home/home.vue b/pages/home/home.vue index c8f7b7b..d52a6b5 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -21,7 +21,7 @@ - 未成年保护 + 个案登记 @@ -33,8 +33,8 @@ - - 个案接报登记 + 路门牌上报 + @@ -139,30 +139,68 @@ }, lmpsb(){ uni.navigateTo({ - // url:'/pages/mapdoorplate/mapdoorplate' - url: '/pages/receiptRegistration/receiptRegistration' + url:'/pages/mapdoorplate/mapdoorplate' + // url: '/pages/receiptRegistration/receiptRegistration' }) }, - minor() { - uni.navigateTo({ - url: '/pages/minor/minor' + minor() { + uni.navigateTo({ + // url:'/pages/mapdoorplate/mapdoorplate' + url: '/pages/receiptRegistration/receiptRegistration' }) + // uni.navigateTo({ + // url: '/pages/minor/minor' + // }) }, journalism() { uni.navigateTo({ url: '/pages/journalism/journalism' }) + }, + // 获取用户信息 + hquserinfo(){ + var info = { + userId:uni.getStorageSync("USERS_KEY").userId, + } + this.API.hquserinfo(info).then(res=>{ + console.log("获取用户信息",res); + this.user.nickName = res.data.nickName; + this.user.avatar = res.data.avatar + this.user.deptId = res.data.deptId + console.log("信息",this.user); + }) }, funeral() { - if(uni.getStorageSync('userjs') != '普通用户'){ - uni.switchTab({ - url: '/pages/my/my' - }) - }else{ - uni.switchTab({ - url: '/pages/funeral/funeral' - }) - } + var info = { + userId:uni.getStorageSync("USERS_KEY").userId, + } + this.API.hquserinfo(info).then(res=>{ + console.log("获取用户信息",res); + console.log("信息1",res.data.roles[0].roleName,uni.getStorageSync('userjs')); + if(res.data.roles[0].roleName != uni.getStorageSync('userjs')){ + uni.reLaunch({ + url: '/pages/login/login' + }); + return + } + if(uni.getStorageSync('userjs') == null || uni.getStorageSync('userjs') == undefined){ + uni.reLaunch({ + url: '/pages/login/login' + }); + return + } + + if(uni.getStorageSync('userjs') != '普通用户'){ + uni.switchTab({ + url: '/pages/my/my' + }) + }else{ + uni.switchTab({ + url: '/pages/funeral/funeral' + }) + } + }) + }, map() { uni.navigateTo({ diff --git a/pages/my/my.vue b/pages/my/my.vue index ef96792..83b1ef2 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -10,7 +10,7 @@ - - - 我的服务 @@ -193,7 +151,7 @@ }, user:{ nickName:"", - deptId:"", + userId:"", avatar:"" }, sjshow:false, @@ -245,7 +203,7 @@ console.log("获取用户信息",res); this.user.nickName = res.data.nickName; this.user.avatar = res.data.avatar - this.user.deptId = res.data.deptId + this.user.userId = res.data.userId console.log("信息",this.user); }) }, diff --git a/pages/mydeathdetail/mydeathdetail.vue b/pages/mydeathdetail/mydeathdetail.vue index 36bb739..098a971 100644 --- a/pages/mydeathdetail/mydeathdetail.vue +++ b/pages/mydeathdetail/mydeathdetail.vue @@ -7,10 +7,11 @@ - 联系电话 + 联系电话 - + + @@ -137,6 +138,14 @@ longitude: 116.39742, iconPath: '../../../static/location.png' }], + + polyline: [{ + points: [], + color: "#31c27c", + width: 10, + arrowLine: true, + borderWidth: 2 //线的边框宽度,还有很多参数,请看文档 + }] }; }, onPageScroll(e) {this.$refs.nv.pageScroll(e)}, @@ -150,6 +159,20 @@ // this.OrderType = params.type; }, methods:{ + lxdh(){ + uni.showModal({ + title: '联系电话', + content: '028-36241643', + success: function(res) { + if (res.confirm) { + console.log('点击了确认') + } else { + console.log('点击了取消') + } + } + }) + + }, /** * 返回点击 */ @@ -182,7 +205,11 @@ this.API.getbsdetail(id).then(res=>{ console.log(11111); console.log("用户订单",res); - this.getGps(res.data.vehicleNumber); + if(res.data.vehicleNumber != null){ + this.getGps(res.data.vehicleNumber); + }else{ + this.mapshow = false + } this.number = res.data.funeralOrderDetailsInfoPo.quantityNumber this.price = res.data.funeralOrderDetailsInfoPo.unitPrice this.API.getspjcxx(res.data.funeralOrderDetailsInfoPo.productId).then(res1=>{ @@ -209,6 +236,17 @@ "EndTime":"20231010150000", "MinSpeed":"1", "NeedAddress":"0", + + // "Action":"GetVehicleGpsInfo", + // "UserId":"user", + // "Pwd":"6B18CFA67F76F079B0BFFBD773DC4494", + // "Vehicles":[ + // { + // "PlateNum":vehicleNumber, + // "ColorCode":"1" + // } + // ], + // "NeedAddress":0 } } info.request.BeginTime = BeginTime; @@ -224,6 +262,23 @@ this.longitude = res.Data[len].Longitude this.covers[0].latitude = res.Data[len].Latitude this.covers[0].longitude = res.Data[len].Longitude + + // this.latitude = data[0][1] + // this.longitude = data[0][0] + let points = [] + res.Data.forEach(item => { + points.push({ + latitude: item.Latitude, + longitude: item.Longitude + }) + }) + this.polyline = [{ + points: points, + color: "#31c27c", + width: 4, + arrowLine: true, + // borderWidth: 2 //线的边框宽度,还有很多参数,请看文档 + }] } }) diff --git a/pages/myinfo/myinfo.vue b/pages/myinfo/myinfo.vue index 1f48c86..a9a33e2 100644 --- a/pages/myinfo/myinfo.vue +++ b/pages/myinfo/myinfo.vue @@ -82,7 +82,7 @@ this.fileList.push({ name:"1", fileId:res.newFileName, - url: this.BASE_URL + res.data.avatar + url: res.data.avatar }) this.nickName = res.data.nickName; }) @@ -96,7 +96,7 @@ var info = { userId:uni.getStorageSync("USERS_KEY").userId, nickName:this.nickName, - avtar:this.fileList[0].url + avatar:this.fileList[0].url } this.API.xguserinfo(info).then(res=>{ console.log("修改用户信息",res); diff --git a/pages/myreservation/myreservation.vue b/pages/myreservation/myreservation.vue index af739b3..980b4df 100644 --- a/pages/myreservation/myreservation.vue +++ b/pages/myreservation/myreservation.vue @@ -37,9 +37,9 @@ 火化预约 礼堂预约 骨灰寄存 - 预约时间:{{item.scheduledCremationDate}} - 预约时间:{{item.scheduledStartTime}} - 预约时间:{{item.storageStartTime}} + 预约时间:{{item.createdTime}} + 预约时间:{{item.createdTime}} + 预约时间:{{item.createdTime}} diff --git a/pages/myreservationdetail/myreservationdetail.vue b/pages/myreservationdetail/myreservationdetail.vue index 9643267..ddef2e6 100644 --- a/pages/myreservationdetail/myreservationdetail.vue +++ b/pages/myreservationdetail/myreservationdetail.vue @@ -5,12 +5,14 @@ + + - 联系电话 + 联系电话 - - + + @@ -135,6 +137,14 @@ longitude: 116.39742, iconPath: '../../../static/location.png' }], + + polyline: [{ + points: [], + color: "#31c27c", + width: 10, + arrowLine: true, + borderWidth: 2 //线的边框宽度,还有很多参数,请看文档 + }] }; }, onPageScroll(e) {this.$refs.nv.pageScroll(e)}, @@ -147,6 +157,20 @@ // this.OrderType = params.type; }, methods:{ + lxdh(){ + uni.showModal({ + title: '联系电话', + content: '028-36241643', + success: function(res) { + if (res.confirm) { + console.log('点击了确认') + } else { + console.log('点击了取消') + } + } + }) + + }, /** * 返回点击 */ @@ -179,12 +203,18 @@ this.API.getbsdetail(id).then(res=>{ console.log(11111); console.log("用户订单",res); - this.getGps(res.data.vehicleNumber); + // this.getGps(res.data.vehicleNumber); + if(res.data.vehicleNumber != ''){ + this.getGps(res.data.vehicleNumber); + }else{ + this.mapshow = false + } this.info = res.data - this.number = res.data.funeralOrderDetailsInfoPo.quantityNumber - this.price = res.data.funeralOrderDetailsInfoPo.unitPrice + // this.number = res.data.funeralOrderDetailsInfoPo.quantityNumber + // this.price = res.data.funeralOrderDetailsInfoPo.unitPrice this.hhtime = res.data.funeralCremationScheduledInfoPo.scheduledCremationTime this.hhdate = res.data.funeralCremationScheduledInfoPo.scheduledCremationDate + console.log("火化时间日期",this.hhtime,this.hhdate); }) }, // 获取gps定位 @@ -199,12 +229,24 @@ "Action":"GetVehicleTrackData", "UserId":"user", "Pwd":"6B18CFA67F76F079B0BFFBD773DC4494", + // "PlateNum":"川ZVN180", "PlateNum":vehicleNumber, "ColorCode":"0", "BeginTime":"20231010090000", "EndTime":"20231010150000", "MinSpeed":"1", "NeedAddress":"0", + + // "Action":"GetVehicleGpsInfo", + // "UserId":"user", + // "Pwd":"6B18CFA67F76F079B0BFFBD773DC4494", + // "Vehicles":[ + // { + // "PlateNum":vehicleNumber, + // "ColorCode":"1" + // } + // ], + // "NeedAddress":0 } } info.request.BeginTime = BeginTime; @@ -220,6 +262,21 @@ this.longitude = res.Data[len].Longitude this.covers[0].latitude = res.Data[len].Latitude this.covers[0].longitude = res.Data[len].Longitude + + let points = [] + res.Data.forEach(item => { + points.push({ + latitude: item.Latitude, + longitude: item.Longitude + }) + }) + this.polyline = [{ + points: points, + color: "#31c27c", + width: 4, + arrowLine: true, + // borderWidth: 2 //线的边框宽度,还有很多参数,请看文档 + }] } })