Ricky
2021-11-25 4d4123243cf6272e824769684637a8b9c42da033
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -136,7 +136,11 @@
#elseif($column.list && "" != $column.dictType)
      <el-table-column label="${comment}" align="center" prop="${javaField}">
        <template slot-scope="scope">
#if($column.htmlType == "checkbox")
          <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
#else
          <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
#end
        </template>
      </el-table-column>
#elseif($column.list && "" != $javaField)
@@ -500,13 +504,13 @@
#end
          if (this.form.${pkColumn.javaField} != null) {
            update${BusinessName}(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.#[[$modal]]#.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            add${BusinessName}(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.#[[$modal]]#.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
@@ -517,11 +521,11 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids;
      this.$modal.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() {
      this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() {
        return del${BusinessName}(${pkColumn.javaField}s);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
        this.#[[$modal]]#.msgSuccess("删除成功");
      }).catch(() => {});
    },
#if($table.sub)
@@ -543,7 +547,7 @@
    /** ${subTable.functionName}删除按钮操作 */
    handleDelete${subClassName}() {
      if (this.checked${subClassName}.length == 0) {
        this.msgError("请先选择要删除的${subTable.functionName}数据");
        this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
      } else {
        const ${subclassName}List = this.${subclassName}List;
        const checked${subClassName} = this.checked${subClassName};
@@ -561,7 +565,7 @@
    handleExport() {
      this.download('${moduleName}/${businessName}/export', {
        ...this.queryParams
      }, `${moduleName}_${businessName}.xlsx`)
      }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
    }
  }
};