Merge branch 'master' of https://e.coding.net/g-cphe0354/cashier/cashier-web into ymf
This commit is contained in:
commit
a72949a19b
|
|
@ -113,6 +113,7 @@ export default {
|
|||
},
|
||||
Confirm() {
|
||||
this.dialogVisible = false
|
||||
console.log(1111111111111, this.selectImage)
|
||||
this.$emit('successEvent', this.selectImage)
|
||||
},
|
||||
handleBeforeRemove(file, fileList) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<el-dialog v-model="showUpload" title="">
|
||||
<MultiImageUpload v-model="fileList" />
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="doSubmit">确认</el-button>
|
||||
<el-button type="primary" :loading="loadings" @click="doSubmit">确认</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
|
@ -35,6 +35,7 @@ export default {
|
|||
showUpload: false,
|
||||
selectList: [],
|
||||
fileList: [],
|
||||
loadings: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -44,14 +45,20 @@ export default {
|
|||
this.showUpload = true;
|
||||
},
|
||||
async doSubmit() {
|
||||
let res = await API.add({
|
||||
pictureClassifyId: this.activedata,
|
||||
urls: this.fileList
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.showUpload = false;
|
||||
this.fileList = []
|
||||
this.$emit('getList')
|
||||
if (this.fileList.length) {
|
||||
this.loadings = true
|
||||
let res = await API.add({
|
||||
pictureClassifyId: this.activedata,
|
||||
urls: this.fileList
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.loadings = false
|
||||
this.showUpload = false;
|
||||
this.fileList = []
|
||||
this.$emit('getList')
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
deleteImg(d) {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||
formAction: function (data) {
|
||||
let obj = { ...data }
|
||||
obj.printType = data.printType.join(',')
|
||||
obj.categoryIds = JSON.stringify(data.categoryIdsArr)
|
||||
obj.categoryList = JSON.stringify(data.categoryIdsArr)
|
||||
if (data.categoryIdsArr) {
|
||||
obj.categoryIds = JSON.stringify(data.categoryIdsArr)
|
||||
obj.categoryList = JSON.stringify(data.categoryIdsArr)
|
||||
}
|
||||
return printerApi.edit(obj);
|
||||
},
|
||||
beforeSubmit(data) {
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ async function handleEditClick(row: IObject) {
|
|||
// 根据id获取数据进行填充
|
||||
let data = await UserAPI.get(row.id);
|
||||
data.printType = data.printType.split(',');
|
||||
|
||||
if (data.categoryIds) {
|
||||
data.categoryIdsArr = JSON.parse(data.categoryIds)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue