add order
This commit is contained in:
@@ -264,32 +264,41 @@ export default {
|
||||
this.loadingStatus = true;
|
||||
|
||||
// 获取基本信息
|
||||
this.$http.get(this.urls.base + `/${this.dataForm.id}`).then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
|
||||
/** 格式化文件上传列表 */
|
||||
if (Array.isArray(this.dataForm.files)) {
|
||||
this.dataForm.files = this.dataForm.files.map((file) => ({
|
||||
id: file.id,
|
||||
name: file.fileUrl.split("/").pop(),
|
||||
typeCode: file.typeCode,
|
||||
url: file.fileUrl,
|
||||
}));
|
||||
this.$http
|
||||
.get(this.urls.base + `/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
|
||||
/** 格式化文件上传列表 */
|
||||
if (Array.isArray(this.dataForm.files)) {
|
||||
this.dataForm.files = this.dataForm.files.map((file) => ({
|
||||
id: file.id,
|
||||
name: file.fileUrl.split("/").pop(),
|
||||
typeCode: file.typeCode,
|
||||
url: file.fileUrl,
|
||||
}));
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
// console.log("[DialogJustForm] init():", this.dataForm);
|
||||
}
|
||||
// console.log("[DialogJustForm] init():", this.dataForm);
|
||||
}
|
||||
this.loadingStatus = false;
|
||||
}).catch(err => {
|
||||
this.loadingStatus = false;
|
||||
this.$message({
|
||||
message: `${err}`,
|
||||
type: 'error',
|
||||
duration: 1500
|
||||
this.loadingStatus = false;
|
||||
})
|
||||
});
|
||||
.catch((err) => {
|
||||
this.loadingStatus = false;
|
||||
this.$message({
|
||||
message: `${err}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// 如果不是编辑
|
||||
this.loadingStatus = false
|
||||
this.loadingStatus = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -347,7 +356,7 @@ export default {
|
||||
const { updateTime } = this.dataForm;
|
||||
httpPayload = {
|
||||
...httpPayload,
|
||||
updateTime: updateTime ? moment(updateTime).format("YYYY-MM-DDTHH:mm:ss") : moment().format("YYYY-MM-DDTHH:mm:ss")
|
||||
updateTime: updateTime ? moment(updateTime).format("YYYY-MM-DDTHH:mm:ss") : moment().format("YYYY-MM-DDTHH:mm:ss"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user