Kaynağa Gözat

更新参数

lex 2 yıl önce
ebeveyn
işleme
939b35576a
1 değiştirilmiş dosya ile 2 ekleme ve 18 silme
  1. 2 18
      src/school/attendance-rules/component/range.tsx

+ 2 - 18
src/school/attendance-rules/component/range.tsx

@@ -63,24 +63,10 @@ export default defineComponent({
 
     // 修改
     const onSubmit = async () => {
-      // formsRef.value.validate(async (errors: any) => {
-      //   if (errors) return
-
-      //   const submitData = dataCompare(beforeData.value, forms)
-      //   if (submitData && submitData.length > 0) {
-      //     btnLoading.value = true
-      //     try {
-      //       await sysParamConfigUpdate({ configs: [...submitData], group: 'ATTENDANCE' })
-      //       beforeData.value = { ...forms }
-      //     } catch {}
-      //     btnLoading.value = false
-      //   } else {
-      //   }
-      // })
       try {
         const submitData = dataCompare(beforeData.value, forms)
         await request.post('/api-school/schoolParamConfig/update', {
-          data: [...submitData]
+          data: { configs: [...submitData], group: 'ATTENDANCE' }
         })
         showToast('保存成功')
       } catch {
@@ -141,9 +127,7 @@ export default defineComponent({
                   <Field
                     class={[styles.field, styles['field-m'], styles['field-w136']]}
                     autocomplete="off"
-                    formatter={(val: string) => {
-                      return onFormatterInt(val, 'sign_in_attendance_type')
-                    }}
+                    formatter={onFormatterInt}
                     type="number"
                     v-model={forms['sign_in_attendance']}
                   >