Browse Source

限制提醒时间

shibei_master
13176889840 3 years ago
parent
commit
e864e09fe9
  1. 21
      src/views/modules/secretaryLog/difficulty/difficultyForm.vue
  2. 20
      src/views/modules/secretaryLog/humanisticCare/careForm.vue
  3. 2
      src/views/modules/secretaryLog/humanisticCare/careList.vue
  4. 22
      src/views/modules/secretaryLog/workLog/form.vue
  5. 2
      src/views/modules/secretaryLog/workLog/index.vue

21
src/views/modules/secretaryLog/difficulty/difficultyForm.vue

@ -56,6 +56,8 @@
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
type="datetime"
:picker-options="pickerOptions"
@change="handleTime"
placeholder="选择时间">
</el-date-picker>
</el-form-item>
@ -114,6 +116,7 @@
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { dateFormats } from '@/utils/index'
@ -125,7 +128,11 @@ export default {
formType: 'add', // addeditdetail
btnDisable: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() <= Date.now() - 8.64e7;
}
},
difficultyId: '',
formData: {
content: '',//
@ -150,7 +157,12 @@ export default {
},
methods: {
handleTime() {
var startAt = new Date(this.formData.remindTime) * 1000 /1000;
if(startAt < Date.now()) {
this.formData.remindTime = dateFormats('YYYY-mm-dd HH:MM', new Date());
}
},
async initForm (type, difficultyId) {
this.startLoading()
this.$refs.ref_form.resetFields();
@ -203,8 +215,7 @@ export default {
} else {
await this.addDifficulty()
this.$store.dispatch('setTipsList')
this.$store.dispatch('setTipsTime')
}
})
@ -240,6 +251,8 @@ export default {
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
this.$store.dispatch('setTipsList')
this.$store.dispatch('setTipsTime')
} else {
this.btnDisable = false
this.$message.error(msg)

20
src/views/modules/secretaryLog/humanisticCare/careForm.vue

@ -82,6 +82,8 @@
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
type="datetime"
:picker-options="pickerOptions"
@change="handleTime"
placeholder="选择时间">
</el-date-picker>
</el-form-item>
@ -145,6 +147,7 @@
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { dateFormats } from '@/utils/index'
@ -166,7 +169,11 @@ export default {
],
btnDisable: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() <= Date.now() - 8.64e7;
}
},
careId: '',
formData: {
content: '',//怀
@ -194,7 +201,12 @@ export default {
},
methods: {
handleTime() {
var startAt = new Date(this.formData.remindTime) * 1000 /1000;
if(startAt < Date.now()) {
this.formData.remindTime = dateFormats('YYYY-mm-dd HH:MM', new Date());
}
},
async initForm (type, careId) {
this.startLoading()
this.$refs['ref_form'].resetFields();
@ -248,8 +260,6 @@ export default {
} else {
await this.addCare()
this.$store.dispatch('setTipsList')
this.$store.dispatch('setTipsTime')
}
})
@ -293,6 +303,8 @@ export default {
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
this.$store.dispatch('setTipsList')
this.$store.dispatch('setTipsTime')
} else {
this.btnDisable = false
this.$message.error(msg)

2
src/views/modules/secretaryLog/humanisticCare/careList.vue

@ -127,7 +127,7 @@
label="关怀人员"
min-width="120">
</el-table-column>
<el-table-column prop="phnoe"
<el-table-column prop="phone"
header-align="center"
align="center"
label="电话"

22
src/views/modules/secretaryLog/workLog/form.vue

@ -45,6 +45,8 @@
value-format="yyyy-MM-dd HH:mm"
type="datetime"
:disabled="disabled"
:picker-options="pickerOptions"
@change="handleTime"
placeholder="选择时间">
</el-date-picker>
</el-form-item>
@ -90,6 +92,7 @@
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { dateFormats } from '@/utils/index'
@ -102,7 +105,11 @@ export default {
formType: 'add', // addeditdetail
btnDisable: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() <= Date.now() - 8.64e7;
}
},
id: '',
formData: {
content: '',//
@ -140,7 +147,12 @@ export default {
// this.endLoading()
},
handleTime() {
var startAt = new Date(this.formData.remindTime) * 1000 /1000;
if(startAt < Date.now()) {
this.formData.remindTime = dateFormats('YYYY-mm-dd HH:MM', new Date());
}
},
async loadFormData () {
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/detail'
@ -179,8 +191,7 @@ export default {
} else {
await this.addDifficulty()
this.$store.dispatch('setTipsList')
this.$store.dispatch('setTipsTime')
}
@ -215,8 +226,11 @@ export default {
message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
this.$store.dispatch('setTipsList')
this.$store.dispatch('setTipsTime')
} else {
this.btnDisable = false
this.$message.error(msg)

2
src/views/modules/secretaryLog/workLog/index.vue

@ -204,7 +204,7 @@ export default {
editForm
},
async created () {
console.log('sHeightcreated-----', this.sHeight, this.tableHeight)
console.log('sHeightcreated-----', this.sHeight, Date.now())
},
async mounted () {

Loading…
Cancel
Save