diff --git a/src/api/api.js b/src/api/api.js
index e907024..b64b61d 100644
--- a/src/api/api.js
+++ b/src/api/api.js
@@ -259,4 +259,22 @@ export function fileController(params) {
method: 'POST',
data: params
})
+}
+
+
+// 新增打卡
+export function insertPositionData(params) {
+ return myAxios({
+ url: `${sx}/energy-effcicency-net-service/clock/insertPositionData`,
+ method: 'POST',
+ data: params
+ })
+}
+// 查询打卡
+export function getPositionData(params) {
+ return myAxios({
+ url: `${sx}/energy-effcicency-net-service/clock/getPositionData`,
+ method: 'POST',
+ data: params
+ })
}
\ No newline at end of file
diff --git a/src/directive/input/index.js b/src/directive/input/index.js
index f2734f5..f5d9dc0 100644
--- a/src/directive/input/index.js
+++ b/src/directive/input/index.js
@@ -29,6 +29,30 @@ export default {
}
if (binding.modifiers.floatNo0) { // 数字+小数点>0
onlyFloat0(input)
+ }
+ // v-input.maxYearDay
+ if (binding.modifiers.maxYearDay) { // 正数加最大366天
+ if(String(Number(input.value))!='NaN'){
+ if(Number(input.value)>366){
+ input.value=366
+ }else if(Number(input.value)<0){
+ input.value=0
+ }else{
+ input.value=parseInt(input.value);
+ }
+ }
+ }
+ // v-input.maxDayHour
+ if (binding.modifiers.maxDayHour) { // 正数加最大24
+ if(String(Number(input.value))!='NaN'){
+ if(Number(input.value)>24){
+ input.value=24
+ }else if(Number(input.value)<0){
+ input.value=0
+ }else{
+ input.value=parseInt(input.value);
+ }
+ }
}
input.dispatchEvent(new Event('input'))
}
diff --git a/src/router/router.js b/src/router/router.js
index 7d2b076..e792c3f 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -546,6 +546,15 @@ export default [
keepAlive: false
},
component: () => import('@/views/industrialReport/components/utilize.vue')
- }
+ },
+ {
+ path: '/clockIn',
+ name: 'clockIn',
+ meta: {
+ title: '打卡',
+ keepAlive: false
+ },
+ component: () => import('@/views/energyEfficiency/clockIn/index.vue')
+ },
]
diff --git a/src/views/energyEfficiency/TaskFilling.vue b/src/views/energyEfficiency/TaskFilling.vue
index 55e8c5d..cce0674 100644
--- a/src/views/energyEfficiency/TaskFilling.vue
+++ b/src/views/energyEfficiency/TaskFilling.vue
@@ -524,7 +524,7 @@ export default {
const data = {
taskId: JSON.parse(sessionStorage.getItem('tidCid')).taskId,
customerId: res.data.customerId,
- item: res.data,
+ item: {...res.data, ...JSON.parse(sessionStorage.getItem('tidCid')).item},
buildId: this.buildId,
equipId: JSON.parse(sessionStorage.getItem('tidCid')).equipId,
}
@@ -625,6 +625,15 @@ export default {
},
//提交页面信息
saveAllInfo() {
+ let item = JSON.parse(sessionStorage.getItem('tidCid')).item
+ if(!item.isPosition){
+ this.$notify({
+ message: '请在完成打卡之后提交',
+ duration: 1000,
+ type: 'warning'
+ })
+ return
+ }
taskList({ consName: this.item.customerName }).then((res) => {
this.records = res.data.list[0]
if (!this.records.buildId) {
diff --git a/src/views/energyEfficiency/clockIn/index.vue b/src/views/energyEfficiency/clockIn/index.vue
new file mode 100644
index 0000000..ce61580
--- /dev/null
+++ b/src/views/energyEfficiency/clockIn/index.vue
@@ -0,0 +1,339 @@
+
+