Commit 1bcf5600 by 李伟康

refactor(dailyNewspaper): 简化日报模块代码并规范格式

优化表单值收集逻辑,移除冗余的类型判断分支
修复if语句的空格格式问题
1 parent 42d0f5e8
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
keys.map(key => { keys.map(key => {
let i = data.find(i => i.key == key) let i = data.find(i => i.key == key)
if (data[key]) value.push(data[key]) if (data[key]) value.push(data[key])
if (i) value.push(i.type == 'multipleSelect' ? i[i.key] : i.value || null) if (i) value.push(i[i.key] || null)
}) })
let show = func(...value) let show = func(...value)
return show return show
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
reportParams.requestJson = JSON.stringify(requestJson) reportParams.requestJson = JSON.stringify(requestJson)
console.log('提交日报', reportParams) console.log('提交日报', reportParams)
uni.hideLoading() uni.hideLoading()
if(check) return this.$emit('checkReportDetail', reportParams) if (check) return this.$emit('checkReportDetail', reportParams)
const data = await uni.$api.dailyTemplateApi.saveDraft(reportParams) const data = await uni.$api.dailyTemplateApi.saveDraft(reportParams)
uni.hideLoading() uni.hideLoading()
if (data) { if (data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!