|
@ -3,12 +3,17 @@ |
|
|
<view style="background-color: #F3F3F3;min-height: 100vh;"> |
|
|
<view style="background-color: #F3F3F3;min-height: 100vh;"> |
|
|
<u-sticky> |
|
|
<u-sticky> |
|
|
<view style="background-color: #3A71FF;height: 90px;"> |
|
|
<view style="background-color: #3A71FF;height: 90px;"> |
|
|
<image :src="applet+'/close.png'" style="width: 35px;height: 35px;margin-top: 40px;margin-left: 10px;" @tap="close"></image> |
|
|
<image :src="applet+'/close.png'" style="width: 35px;height: 35px;margin-top: 40px;margin-left: 10px;" |
|
|
<view style="text-align: center;color: #fff;position: absolute;top: 49px;left: 40%;font-size: 17px;" >值班打卡</view> |
|
|
@tap="close"></image> |
|
|
|
|
|
<view style="text-align: center;color: #fff;position: absolute;top: 49px;left: 40%;font-size: 17px;"> |
|
|
|
|
|
值班打卡</view> |
|
|
</view> |
|
|
</view> |
|
|
</u-sticky> |
|
|
</u-sticky> |
|
|
<view style="margin: 10px auto;border: 1px #b7b7b7 dashed;width: 80%;border-radius: 6px;padding: 10px;background-color: #eaeaea;"> |
|
|
<view |
|
|
<view style="margin-bottom: 10px;text-align: center;">打卡时间范围</view><view v-for="item in ruleList" style="font-size: 12px;text-align: center;margin-top: 10px;">{{item.startTime}} ~ {{item.endTime}}</view> |
|
|
style="margin: 10px auto;border: 1px #b7b7b7 dashed;width: 80%;border-radius: 6px;padding: 10px;background-color: #eaeaea;"> |
|
|
|
|
|
<view style="margin-bottom: 10px;text-align: center;">打卡时间范围</view> |
|
|
|
|
|
<view v-for="item in ruleList" style="font-size: 12px;text-align: center;margin-top: 10px;"> |
|
|
|
|
|
{{item.startTime}} ~ {{item.endTime}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view style="margin-top: 30px;" @click="clickSign"> |
|
|
<view style="margin-top: 30px;" @click="clickSign"> |
|
|
<view class="module CBlue"> |
|
|
<view class="module CBlue"> |
|
@ -18,7 +23,10 @@ |
|
|
<view style="margin: 10px 0;text-align: center;font-size: 12px;">提示:打卡需要您上传中控室的自拍照片</view> |
|
|
<view style="margin: 10px 0;text-align: center;font-size: 12px;">提示:打卡需要您上传中控室的自拍照片</view> |
|
|
</view> |
|
|
</view> |
|
|
<view style="text-align: center;font-size: 12px;margin-top: 20px;"> |
|
|
<view style="text-align: center;font-size: 12px;margin-top: 20px;"> |
|
|
<view v-for="item in ingDate" style="margin-top: 5px;"><image :src="applet+'/success.png'" style="width: 14px;height: 14px;margin-right: 5px;"></image>{{item.time}}已打卡</view> |
|
|
<view v-for="item in ingDate" style="margin-top: 5px;"> |
|
|
|
|
|
<image :src="applet+'/success.png'" style="width: 14px;height: 14px;margin-right: 5px;"></image> |
|
|
|
|
|
{{item.time}}已打卡 |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view style="padding: 10px 10px;"> |
|
|
<view style="padding: 10px 10px;"> |
|
|
<view> |
|
|
<view> |
|
@ -28,8 +36,13 @@ |
|
|
<u-card class="custom-card" v-for="(val,index) in list" @click="previewOpen(val.picUrl)" |
|
|
<u-card class="custom-card" v-for="(val,index) in list" @click="previewOpen(val.picUrl)" |
|
|
:show-foot="false" :show-head="false"> |
|
|
:show-foot="false" :show-head="false"> |
|
|
<view slot="body" class="u-body-item" style="display: flex;flex-wrap:nowrap;"> |
|
|
<view slot="body" class="u-body-item" style="display: flex;flex-wrap:nowrap;"> |
|
|
<view><image :src="val.picUrl" mode="aspectFill" style="width: 60px;height: 80px;"></image></view> |
|
|
<view> |
|
|
<view style="margin-left: 20px;line-height: 28px;margin-top: 11px;"><view>打卡时间:</view><view>{{val.time}}</view></view> |
|
|
<image :src="val.picUrl" mode="aspectFill" style="width: 60px;height: 80px;"></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="margin-left: 20px;line-height: 28px;margin-top: 11px;"> |
|
|
|
|
|
<view>打卡时间:</view> |
|
|
|
|
|
<view>{{val.time}}</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</u-card> |
|
|
</u-card> |
|
|
</uni-list> |
|
|
</uni-list> |
|
@ -39,7 +52,9 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { formatterDateTime } from "@/common/utils.js" |
|
|
import { |
|
|
|
|
|
formatterDateTime |
|
|
|
|
|
} from "@/common/utils.js" |
|
|
import config from "../../uni_modules/uview-ui/libs/config/config" |
|
|
import config from "../../uni_modules/uview-ui/libs/config/config" |
|
|
var interval = null |
|
|
var interval = null |
|
|
export default { |
|
|
export default { |
|
@ -78,13 +93,20 @@ import config from "../../uni_modules/uview-ui/libs/config/config" |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
initRuleList() { |
|
|
initRuleList() { |
|
|
this.$http.get("/fire-customer/sign/getRuleByUnitIdAndDate",{unitId:uni.getStorageSync("dept_id"),date:this.date},{}).then(res =>{ |
|
|
this.$http.get("/fire-customer/sign/getRuleByUnitIdAndDate", { |
|
|
|
|
|
unitId: uni.getStorageSync("dept_id"), |
|
|
|
|
|
date: this.date |
|
|
|
|
|
}, {}).then(res => { |
|
|
this.ruleList = res.data |
|
|
this.ruleList = res.data |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getRecordByToday() { |
|
|
getRecordByToday() { |
|
|
//获取今天打卡记录 |
|
|
//获取今天打卡记录 |
|
|
this.$http.get("/fire-customer/sign/getRecordByUserIdAndDate",{userId:uni.getStorageSync("user_id"),unitId:uni.getStorageSync("dept_id"),date:this.date},{}).then(res =>{ |
|
|
this.$http.get("/fire-customer/sign/getRecordByUserIdAndDate", { |
|
|
|
|
|
userId: uni.getStorageSync("user_id"), |
|
|
|
|
|
unitId: uni.getStorageSync("dept_id"), |
|
|
|
|
|
date: this.date |
|
|
|
|
|
}, {}).then(res => { |
|
|
this.ingDate = res.data |
|
|
this.ingDate = res.data |
|
|
this.ingDate.forEach(ingDate => { |
|
|
this.ingDate.forEach(ingDate => { |
|
|
this.ruleList.forEach((rule, index) => { |
|
|
this.ruleList.forEach((rule, index) => { |
|
@ -119,7 +141,7 @@ import config from "../../uni_modules/uview-ui/libs/config/config" |
|
|
bl = true |
|
|
bl = true |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
rule.bb = true |
|
|
//rule.bb = true |
|
|
this.taskId = rule.id |
|
|
this.taskId = rule.id |
|
|
bl = true |
|
|
bl = true |
|
|
this.getDw() |
|
|
this.getDw() |
|
@ -164,7 +186,8 @@ import config from "../../uni_modules/uview-ui/libs/config/config" |
|
|
this.form.unitId = uni.getStorageSync("dept_id") |
|
|
this.form.unitId = uni.getStorageSync("dept_id") |
|
|
this.form.date = this.date |
|
|
this.form.date = this.date |
|
|
this.form.taskId = this.taskId |
|
|
this.form.taskId = this.taskId |
|
|
this.$http.post('/fire-customer/sign/addRecord',this.form,{}).then(res =>{ |
|
|
this.$http.post('/fire-customer/sign/addRecord', this.form, {}).then( |
|
|
|
|
|
res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.getRecordByToday() |
|
|
this.getRecordByToday() |
|
|
this.pageInfo.page = 1; |
|
|
this.pageInfo.page = 1; |
|
@ -265,6 +288,7 @@ import config from "../../uni_modules/uview-ui/libs/config/config" |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.u-body-title { |
|
|
.u-body-title { |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
color: #333; |
|
|
color: #333; |
|
|