diff --git a/pages/rescue/index.vue b/pages/rescue/index.vue
index 6901b5a..59d2903 100644
--- a/pages/rescue/index.vue
+++ b/pages/rescue/index.vue
@@ -37,7 +37,8 @@
- {{item.name}}任务总数: {{nub}}/{{week}}
+ {{item.name}}
+ 任务总数: {{nub}}/{{week}}
@@ -51,7 +52,7 @@
-
+
+
-
+
-
+
协助人员:
-
-
-
- {{i.name}}
+
+ {{i.name}}
@@ -134,14 +133,15 @@
检查时间:
- {{item.checkTime}}
+ {{item.checkTime}}
-
+
预定时间:
- {{tasktiem}}
+ {{tasktiem}}
@@ -244,7 +244,7 @@
fontSize: 25,
color: "#fff"
},
-
+
extra: {
ring: {
width: 50,
@@ -270,8 +270,8 @@
list: [],
month: 0,
nub: 0,
- index2:false,
- tasktiem:"检查时间",
+ index2: false,
+ tasktiem: "检查时间",
index: false,
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
}
@@ -284,81 +284,19 @@
this.month = date.getMonth() + 1
this.dates.year = date.getFullYear()
this.today.year = date.getFullYear()
-
- this.dates.day = date.getDate()
- let a = this.month % 2
- let b = 0
- if (this.dates.year % 4 == 0 && year % 100 != 0 || this.dates.year % 400 == 0) {
- b = 1
- }
- if (this.month < 8 && this.month != 2 && a == 0) {
- for (let i = 0; i < 30; i++) {
- var dt2 = new Date(Date.parse(JSON.stringify(this.dates.month) + " " + "1 " + JSON.stringify(this.dates
- .year)) + i * 24 * 3600 * 1000);
- var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- var week = weekDay[dt2.getDay()]
- if (week == "周二" || week == "周四") {
- this.week++
- }
- }
- } else if (this.month < 8 && this.month != 2 && a != 0) {
- for (let i = 0; i < 31; i++) {
- var dt2 = new Date(Date.parse(JSON.stringify(this.dates.month) + " " + "1 " + JSON.stringify(this.dates
- .year)) + i * 24 * 3600 * 1000);
- var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- var week = weekDay[dt2.getDay()]
- if (week == "周二" || week == "周四") {
- this.week++
- }
- }
- } else if (this.month >= 8 && a == 0) {
- for (let i = 0; i < 31; i++) {
- var dt2 = new Date(Date.parse(JSON.stringify(this.dates.month) + " " + "1 " + JSON.stringify(this.dates
- .year)) + i * 24 * 3600 * 1000);
- var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- var week = weekDay[dt2.getDay()]
- if (week == "周二" || week == "周四") {
- this.week++
- }
- }
- } else if (this.month >= 8 && a != 0) {
- for (let i = 0; i < 30; i++) {
- var dt2 = new Date(Date.parse(JSON.stringify(this.dates.month) + " " + "1 " + JSON.stringify(this.dates
- .year)) + i * 24 * 3600 * 1000);
- var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- var week = weekDay[dt2.getDay()]
- if (week == "周二" || week == "周四") {
- this.week++
- }
- }
- } else if (this.month == 2 && !b) {
- for (let i = 0; i < 28; i++) {
- var dt2 = new Date(Date.parse(JSON.stringify(this.dates.month) + " " + "1 " + JSON.stringify(this.dates
- .year)) + i * 24 * 3600 * 1000);
- var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- var week = weekDay[dt2.getDay()]
- if (week == "周二" || week == "周四") {
- this.week++
- }
- }
- } else {
- for (let i = 0; i < 29; i++) {
- var dt2 = new Date(Date.parse(JSON.stringify(this.dates.month) + " " + "1 " + JSON.stringify(this.dates
- .year)) + i * 24 * 3600 * 1000);
- var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
- var week = weekDay[dt2.getDay()]
- if (week == "周二" || week == "周四") {
- this.week++
- }
- }
- }
- this.getOrganizations()
- },
- onReady() {
+ this.dates.day = date.getDate()
+ this.getTargetCount()
this.getOrganizations()
},
methods: {
+ getTargetCount(){
+ let selectedTime = this.dates.year + '-' + this.dates.month + '-' + '01'
+ this.$request.get('/api/TaskTargets/GetTargetCount/'+selectedTime,null,(data,res)=>{
+ console.log(res);
+ this.week=res
+ })
+ },
getOrganizations() {
const that = this
let selectedTime = this.dates.year + '-' + this.dates.month + '-' + '01'
@@ -397,7 +335,7 @@
if (res[i].name = userName) {
this.user = [res[i]]
-
+
for (let i = 0; i < this.user.length; i++) {
this.user[i]["tasknub"] = 0
this.user[i]["rate"] = 0
@@ -491,18 +429,18 @@
this.index = false
this.getOrganizations()
},
- scheduledTime(e,item){
+ scheduledTime(e, item) {
console.log(e);
- this.tasktiem=e.detail.value
+ this.tasktiem = e.detail.value
let body = {
- checkTime: this.tasktiem
- }
- this.$request.patch('/api/PlanTasks/'+item.id,body, (data, res) => {
+ checkTime: this.tasktiem
+ }
+ this.$request.patch('/api/PlanTasks/' + item.id, body, (data, res) => {
this.$alert.showError("检查时间修改成功")
console.log(res);
this.getOrganizations()
})
-
+
},
bohui(item) {
this.$request.post('/api/PlanTasks/Approval/' + item.id + '?approvalStatus=' + '驳回', null, (data, res) => {
@@ -511,13 +449,13 @@
})
},
start(item) {
- if(!item.checkTime){
- return 请选择检查时间
+ if (!item.checkTime) {
+ return this.$alert.showError("请填写检查时间")
}
console.log(item);
// return
uni.navigateTo({
- url: '/pages/rescue/task_implement/details?id=' + item.company.id + '&uid=' + item.id,
+ url: '/pages/rescue/task_implement/details?id=' + item.company.id + '&user=' + item.id,
})
}
}
@@ -561,7 +499,7 @@
border-radius: 40rpx 40rpx 0 0;
padding: 10rpx 40rpx 0 40rpx;
display: flex;
-
+
view:nth-child(1) {
flex: 1;
}
@@ -729,17 +667,19 @@
margin-top: 20rpx;
height: 60rpx;
display: flex;
- .top_name{
+
+ .top_name {
width: 180rpx;
white-space: nowrap;
/*内容超宽后禁止换行显示*/
-
+
overflow: hidden;
/*超出部分隐藏*/
-
+
text-overflow: ellipsis;
/*文字超出部分以省略号显示*/
}
+
.left {
display: flex;
flex: 1;
@@ -944,26 +884,66 @@
}
.staffbox {
+
display: flex;
margin: 6rpx 0;
font-size: 30rpx;
+ white-space: nowrap;
+ /*内容超宽后禁止换行显示*/
+
+ overflow: hidden;
+ /*超出部分隐藏*/
+
+ text-overflow: ellipsis;
.staff {
display: flex;
color: rgba(16, 15, 25, 0.48);
- image {
- margin-top: 8rpx;
- width: 26rpx;
- height: 26rpx;
+
+ .zhu {
+
+ color: #100F19;
}
- .tiem {
- color: #317AFF;
+ view {
+ margin-right: 20rpx;
}
+
+ img {
+ width: 40rpx;
+ height: 40rpx;
+ min-width: 40rpx;
+ min-height: 40rpx;
+ }
+ }
+
+ .staff2 {
+ display: flex;
+ color: rgba(16, 15, 25, 0.48);
+ // width: 70%;
+ white-space: nowrap;
+ /*内容超宽后禁止换行显示*/
+
+ overflow: hidden;
+ /*超出部分隐藏*/
+
+ text-overflow: ellipsis;
+
+ .staff_namebox {
+ white-space: nowrap;
+ /*内容超宽后禁止换行显示*/
+
+ overflow: hidden;
+ /*超出部分隐藏*/
+
+ text-overflow: ellipsis;
+ }
+
.zhu {
- color: #100109;
- }
+ color: #100F19;
+ }
+
view {
margin-right: 20rpx;
}
@@ -985,17 +965,18 @@
}
.implement {
-
+ text-align: right;
margin-bottom: 10rpx;
-
+ width: 100%;
.buttons {
- margin-top: 20rpx;
+ margin-top: 10rpx;
width: 100%;
height: 100%;
padding-top: 20rpx;
}
img {
+ // float: right;
width: 100rpx;
height: 100rpx;
}
diff --git a/pages/rescue/task_implement/details.vue b/pages/rescue/task_implement/details.vue
index 7e6c0e5..846265d 100644
--- a/pages/rescue/task_implement/details.vue
+++ b/pages/rescue/task_implement/details.vue
@@ -192,7 +192,8 @@
onLoad(e) {
console.log(e);
this.id=e.id
- this.uid=e.uid
+ this.uid=e.user
+
this.getCompanies()
},
onReady() {
@@ -212,14 +213,18 @@
}
})
},
+
bbb(){
- let params={
- approvalStatus:'已检查',
- inspectionResult:'未发现违法违规情况'
- }
- this.$request.patch('/api/PlanTasks/' + this.uid, params, (data, res) => {
- console.log(res);
- })
+ // let params={
+ // approvalStatus:'已检查',
+ // inspectionResult:'未发现违法违规情况'
+ // }
+ // this.$request.patch('/api/PlanTasks/' + this.uid, params, (data, res) => {
+ // console.log(res);
+ // })
+ // uni.redirectTo({
+ // url:"/pages/rescue/task_implement/implement?id="+
+ // })
},
danweif(e){
console.log(e);
@@ -233,7 +238,10 @@