修改时间插件
This commit is contained in:
parent
2d88e52926
commit
221fa148f1
|
|
@ -76,10 +76,12 @@ export default {
|
||||||
else if (rule.dataRule.type == "timestamp") { // 如果是时间戳
|
else if (rule.dataRule.type == "timestamp") { // 如果是时间戳
|
||||||
if (!value) {
|
if (!value) {
|
||||||
data[saveField] = null;
|
data[saveField] = null;
|
||||||
|
}else if(typeof(value) == 'object'){
|
||||||
|
data[saveField] = parseInt(new Date(value).getTime() / 1000); // 转换为时间戳
|
||||||
}else{
|
}else{
|
||||||
let date = value.replace('-','.')
|
let date = value.replace('-','.')
|
||||||
data[saveField] = parseInt(new Date(date).getTime() / 1000); // 转换为时间戳
|
data[saveField] = parseInt(new Date(date).getTime() / 1000); // 转换为时间戳
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (rule.dataRule.type == "string") { // 如果是字符串
|
else if (rule.dataRule.type == "string") { // 如果是字符串
|
||||||
if (data[saveField] === true) {
|
if (data[saveField] === true) {
|
||||||
|
|
|
||||||
|
|
@ -430,7 +430,7 @@ export default {
|
||||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||||
|
|
||||||
|
|
||||||
console.log(pageData.formOptions)
|
|
||||||
return pageData;
|
return pageData;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -479,7 +479,6 @@ export default {
|
||||||
rules: this.formOptions.items
|
rules: this.formOptions.items
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this.formOptions2.data = {
|
this.formOptions2.data = {
|
||||||
problem: a.data[this.detailDataFieldName].problem,
|
problem: a.data[this.detailDataFieldName].problem,
|
||||||
|
|
||||||
|
|
@ -524,7 +523,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
pageUpdateData() {
|
pageUpdateData() {
|
||||||
console.log(this.infos);
|
|
||||||
let processing_cost = 0;
|
let processing_cost = 0;
|
||||||
this.infos.forEach(info => {
|
this.infos.forEach(info => {
|
||||||
|
|
||||||
|
|
@ -869,7 +867,6 @@ export default {
|
||||||
// 格式化提交的数据
|
// 格式化提交的数据
|
||||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||||
|
|
||||||
|
|
||||||
if (postdata.id) {
|
if (postdata.id) {
|
||||||
postdata.id = this.$mk.toBigInt(postdata.id);
|
postdata.id = this.$mk.toBigInt(postdata.id);
|
||||||
}
|
}
|
||||||
|
|
@ -906,7 +903,6 @@ export default {
|
||||||
if (componentDetails) {
|
if (componentDetails) {
|
||||||
componentDetails.forEach(componentDetail => {
|
componentDetails.forEach(componentDetail => {
|
||||||
if (componentDetail.postDataUpdate) {
|
if (componentDetail.postDataUpdate) {
|
||||||
console.log("postDataUpdate");
|
|
||||||
componentDetail.postDataUpdate();
|
componentDetail.postDataUpdate();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue