Commit 62b63137 by zhuxiaomei

添加图片和详情

parent 6cb8a7fa
......@@ -997,7 +997,8 @@
}
},
_editSave: async function (data) {
let result = await samplingSummary.edit({id: this.id, obj: data})
data.id = this.id
let result = await samplingSummary.edit(data)
if (result) {
this.$toast('编辑成功!')
this.$router.go(-1)
......
......@@ -905,7 +905,10 @@
if(result.sample[key]){
if (key === 'sampleDate') {
this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
} else {
}else if(key==='storageCondition'){
this.storageCondition = result.sample[key].split(',')
this.sample[key] = result.sample[key]
} else {
this.sample[key] = result.sample[key]
}
}
......
......@@ -881,6 +881,9 @@
if (result.sample[key]) {
if (key === 'sampleDate') {
this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
} else if(key==='storageCondition'){
this.storageCondition = result.sample[key].split(',')
this.sample[key] = result.sample[key]
} else {
this.sample[key] = result.sample[key]
}
......
......@@ -185,11 +185,11 @@
},
//上传
_submitImg(files) {
// let action =this.$global.baseURL + '/env/v1/sample_attachment/' + '1299251712557694978';
var task = plus.uploader.createUpload(this.action,
{method: "POST"},
(t, status) => { //上传完成
console.log(t, status)
console.log(JSON.stringify(t), JSON.stringify(status))
this._getData();
}
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment