瀏覽代碼

修改代码生成字典字段int类型没有自动选中问题

RuoYi 5 年之前
父節點
當前提交
eec5c58b4a
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 2
      ruoyi/src/main/resources/vm/vue/index-tree.vue.vm
  2. 4 2
      ruoyi/src/main/resources/vm/vue/index.vue.vm

+ 4 - 2
ruoyi/src/main/resources/vm/vue/index-tree.vue.vm

@@ -146,7 +146,8 @@
               v-for="dict in ${field}Options"
               :key="dict.dictValue"
               :label="dict.dictLabel"
-              :value="dict.dictValue"
+              #if($column.javaType == "Integer"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
+
             ></el-option>
           </el-select>
         </el-form-item>
@@ -162,7 +163,8 @@
             <el-radio
               v-for="dict in ${field}Options"
               :key="dict.dictValue"
-              :label="dict.dictValue"
+              #if($column.javaType == "Integer"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
+
             >{{dict.dictLabel}}</el-radio>
           </el-radio-group>
         </el-form-item>

+ 4 - 2
ruoyi/src/main/resources/vm/vue/index.vue.vm

@@ -174,7 +174,8 @@
               v-for="dict in ${field}Options"
               :key="dict.dictValue"
               :label="dict.dictLabel"
-              :value="dict.dictValue"
+              #if($column.javaType == "Integer"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
+
             ></el-option>
           </el-select>
         </el-form-item>
@@ -190,7 +191,8 @@
             <el-radio
               v-for="dict in ${field}Options"
               :key="dict.dictValue"
-              :label="dict.dictValue"
+              #if($column.javaType == "Integer"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
+
             >{{dict.dictLabel}}</el-radio>
           </el-radio-group>
         </el-form-item>