liaofei 2 роки тому
батько
коміт
f8929fe968

+ 5 - 1
crmeb/app/adminapi/controller/v1/setting/SystemCrud.php

@@ -619,14 +619,18 @@ class SystemCrud extends AuthController
                 continue;
             }
             if (isset($item['is_table']) && $item['is_table']) {
+                $label = '';
                 if (in_array($item['from_type'], ['frameImageOne', 'frameImages'])) {
                     $keyName = 'slot';
+                } elseif (in_array($item['from_type'], ['radio', 'select', 'checkbox'])) {
+                    $label = app()->make(Make::class)->getAttrPrefix();
                 } else {
                     $keyName = 'key';
                 }
+
                 $columns[] = [
                     'title' => $item['table_name'] ?: $item['comment'],
-                    $keyName => $item['field'],
+                    $keyName => $item['field'] . $label,
                     'from_type' => $item['from_type'],
                 ];
             }

+ 13 - 1
crmeb/crmeb/services/crud/Make.php

@@ -142,6 +142,18 @@ abstract class Make
         return $this;
     }
 
+    /**
+     * 获取字段后缀
+     * @return string
+     * @author 等风来
+     * @email 136327134@qq.com
+     * @date 2023/5/22
+     */
+    public function getAttrPrefix()
+    {
+        return $this->attrPrefix;
+    }
+
     /**
      * @return string
      * @author 等风来
@@ -204,7 +216,7 @@ abstract class Make
     public function setFilePathName(string $filePathName = '')
     {
         if ($filePathName) {
-            $this->filePathName = $filePathName;
+//            $this->filePathName = $filePathName;
         }
         return $this;
     }