修改时间禁用
This commit is contained in:
@@ -80,6 +80,7 @@
|
|||||||
<a-date-picker class="box-input"
|
<a-date-picker class="box-input"
|
||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||||
@change="dateChange(item)"
|
@change="dateChange(item)"
|
||||||
|
:disabledDate="disabledDate"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
v-model="formInline[item.db_field_name]"
|
v-model="formInline[item.db_field_name]"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@@ -115,9 +116,9 @@
|
|||||||
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
}}
|
}}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
||||||
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -292,6 +293,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
disabledDate(current) {
|
||||||
|
return current && current < moment().subtract(1,"day");
|
||||||
|
},
|
||||||
sumber() {
|
sumber() {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -327,7 +331,7 @@
|
|||||||
onChange(item) {
|
onChange(item) {
|
||||||
let dateOne = moment(this.formInline[item][0]).format('YYYY-MM-DD')
|
let dateOne = moment(this.formInline[item][0]).format('YYYY-MM-DD')
|
||||||
let dateTwo = moment(this.formInline[item][1]).format('YYYY-MM-DD')
|
let dateTwo = moment(this.formInline[item][1]).format('YYYY-MM-DD')
|
||||||
this.formInline[item] =dateOne ? [dateOne, dateTwo] : []
|
this.formInline[item] = dateOne ? [dateOne, dateTwo] : []
|
||||||
},
|
},
|
||||||
|
|
||||||
clickButtonToUpload(current) {
|
clickButtonToUpload(current) {
|
||||||
@@ -402,10 +406,10 @@
|
|||||||
}
|
}
|
||||||
if (res.field_show_type === '1' || res.field_show_type === '2' ||
|
if (res.field_show_type === '1' || res.field_show_type === '2' ||
|
||||||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|
||||||
|| res.field_show_type === '11'){
|
|| res.field_show_type === '11') {
|
||||||
rule.push({
|
rule.push({
|
||||||
max: res.db_length,
|
max: res.db_length,
|
||||||
message: res.db_field_txt+'不能超出'+res.db_length+'个字符',
|
message: res.db_field_txt + '不能超出' + res.db_length + '个字符',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -458,7 +462,7 @@
|
|||||||
},
|
},
|
||||||
StandardselectionChange(value, id) {
|
StandardselectionChange(value, id) {
|
||||||
this.formInline[value + '_id'] = id
|
this.formInline[value + '_id'] = id
|
||||||
this.formInline = {...this.formInline}
|
this.formInline = { ...this.formInline }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
:multiple="true"
|
:multiple="true"
|
||||||
:action='uploadAction'
|
:action='uploadAction'
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
|
@preview="preview"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:remove='remove'
|
:remove='remove'
|
||||||
@change="handleChange">
|
@change="handleChange">
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'file',
|
name: 'file',
|
||||||
@@ -114,7 +116,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
mypreview(item) {
|
mypreview(item) {
|
||||||
console.log(item)
|
|
||||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
|
||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
},
|
},
|
||||||
@@ -193,6 +194,13 @@
|
|||||||
resetFileList() {
|
resetFileList() {
|
||||||
this.myfileList = []
|
this.myfileList = []
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
|
},
|
||||||
|
preview(file) {
|
||||||
|
if (file.response) {
|
||||||
|
downloadFile('/sys/common/download', file.response.result.fileName, { id: file.response.result.id })
|
||||||
|
} else {
|
||||||
|
downloadFile('/sys/common/download', file.fileName, { id: file.id })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user