-
+
导入excel
导出excel
@@ -54,13 +60,13 @@ const info = () => {
luckysheet.create(options.value)
}
//绑定value
-const setValue = (e: any) => {
+const setValue = (e: any, frontAndBack: number) => {
let data = luckysheet.getRange()
luckysheet.setCellValue(
data[0].row[0],
data[0].column[0],
{
- v: e[e.length - 1],
+ v: frontAndBack == 0 ? e[e.length - 1] : `~` + e[e.length - 1],
tr: e
}
// checkedNodes[0].data.label
@@ -119,24 +125,28 @@ const submitForm = (formdata: any, text: string) => {
params.append('reportForm', formdata.reportForm)
ElMessage.info('正在保存请稍等!')
if (text == '新增报表模板') {
- addTemplate(params).then(res => {
- ElMessage.success('新增成功!')
- formFer.value.shutDown()
- emit('shutDown')
- }).catch(err => {
- ElMessage.error('保存失败!')
- formFer.value.shutDown()
- })
+ addTemplate(params)
+ .then(res => {
+ ElMessage.success('新增成功!')
+ formFer.value.shutDown()
+ emit('shutDown')
+ })
+ .catch(err => {
+ ElMessage.error('保存失败!')
+ formFer.value.shutDown()
+ })
} else if (text == '编辑报表模板') {
params.append('id', list.value.id)
- dateTemplateup(params).then(res => {
- ElMessage.success('编辑成功!')
- formFer.value.shutDown()
- emit('shutDown')
- }).catch(err => {
- ElMessage.error('保存失败!')
- formFer.value.shutDown()
- })
+ dateTemplateup(params)
+ .then(res => {
+ ElMessage.success('编辑成功!')
+ formFer.value.shutDown()
+ emit('shutDown')
+ })
+ .catch(err => {
+ ElMessage.error('保存失败!')
+ formFer.value.shutDown()
+ })
}
}
const open = async (text: string, row?: any) => {
@@ -150,7 +160,7 @@ const open = async (text: string, row?: any) => {
info()
}
defineExpose({ open })
-onMounted(() => { })
+onMounted(() => {})