RuoYi
2020-06-18 3b88fe2b6f9cb84b0fbe4e1d76cbd5bad7f3e676
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -174,7 +174,7 @@
              v-for="dict in ${field}Options"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              #if($column.javaType == "Integer"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
              #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
            ></el-option>
          </el-select>
@@ -191,7 +191,7 @@
            <el-radio
              v-for="dict in ${field}Options"
              :key="dict.dictValue"
              #if($column.javaType == "Integer"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
              #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
            >{{dict.dictLabel}}</el-radio>
          </el-radio-group>
@@ -229,7 +229,7 @@
</template>
<script>
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
export default {
  name: "${BusinessName}",
@@ -392,8 +392,6 @@
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              } else {
                this.msgError(response.msg);
              }
            });
          } else {
@@ -402,8 +400,6 @@
                this.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              } else {
                this.msgError(response.msg);
              }
            });
          }
@@ -426,16 +422,9 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有${functionName}数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return export${BusinessName}(queryParams);
        }).then(response => {
          this.download(response.msg);
        }).catch(function() {});
      this.download('${moduleName}/${businessName}/export', {
        ...this.queryParams
      }, `${moduleName}_${businessName}.xlsx`)
    }
  }
};