master
lion 1 year ago
parent 18858bb56e
commit 66685e6e2c

@ -52,7 +52,7 @@
</svg> </svg>
</div> </div>
</template> </template>
<theme-picker class="tool-item" /> <!-- <theme-picker class="tool-item" /> -->
<!-- <el-badge :is-dot="device === 'mobile'" :max="99" :value="12" class="tool-item">--> <!-- <el-badge :is-dot="device === 'mobile'" :max="99" :value="12" class="tool-item">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" /><path d="M9 17v1a3 3 0 0 0 6 0v-1" /></svg>--> <!-- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" /><path d="M9 17v1a3 3 0 0 0 6 0v-1" /></svg>-->
<!-- </el-badge>--> <!-- </el-badge>-->

@ -64,7 +64,8 @@
<template #edit="{ row }"> <template #edit="{ row }">
<vxe-upload v-model="row['sign']" name-field="original_name" progress-text="{percent}%" <vxe-upload v-model="row['sign']" name-field="original_name" progress-text="{percent}%"
:more-config="{ maxCount: 1, layout: 'horizontal' }" :show-button-text="false" :more-config="{ maxCount: 1, layout: 'horizontal' }" :show-button-text="false"
:upload-method="({file}) => uploadMethod(file)" /> :upload-method="({file}) => uploadMethod(file)"
:remove-method="({file}) => removeMethod(file)"/>
</template> </template>
</vxe-column> </vxe-column>
@ -259,6 +260,9 @@
}).catch(_ => { }).catch(_ => {
window.$_uploading = false window.$_uploading = false
}) })
},
removeMethod(file){
console.log("file",file)
}, },
async saveRowEvent(row) { async saveRowEvent(row) {
if (window.$_uploading) { if (window.$_uploading) {
@ -280,8 +284,13 @@
form[key] = row[key] form[key] = row[key]
} }
console.log("row",row) console.log("row",row)
if (Array.isArray(row['sign']) && row['sign'].length > 0) { if (Array.isArray(row['sign'])) {
form['sign_id'] = row['sign'][0]?.response?.id ?? '' if(row['sign'].length > 0){
form['sign_id'] = row['sign'][0]?.response?.id ?? ''
}else{
form['sign_id'] = ''
}
} }
this.loading = true this.loading = true
await save(form) await save(form)

Loading…
Cancel
Save