TableList.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. $foreach(column in genTable.Columns)
  2. $set(labelName = "")
  3. $set(checkboxHtml = "")
  4. $set(showToolTipHtml = "")
  5. $set(columnName = column.CsharpFieldFl)
  6. $if(column.CsharpType == "string" || column.HtmlType == "datetime")
  7. $set(showToolTipHtml = " :show-overflow-tooltip=\"true\"")
  8. $end
  9. $if(column.ColumnComment != "")
  10. $set(labelName = column.ColumnComment)
  11. $else
  12. $set(labelName = column.CsharpFieldFl)
  13. $end
  14. $if(column.IsList == true)
  15. $if(column.HtmlType == "customInput" && column.IsPk == false)
  16. <el-table-column prop="${columnName}" label="${labelName}" width="90" sortable align="center">
  17. <template slot-scope="scope">
  18. <span v-show="editIndex != scope.${index}index" @click="editCurrRow(scope.${index}index,'rowkeY')">{{scope.row.${columnName}}}</span>
  19. <el-input :id="scope.${index}index+'rowkeY'" size="mini" v-show="(editIndex == scope.${index}index)"
  20. v-model="scope.row.${columnName}" @blur="handleChangeSort(scope.row)"></el-input>
  21. </template>
  22. </el-table-column>
  23. $elseif(column.HtmlType == "imageUpload")
  24. <el-table-column prop="${columnName}" label="${labelName}" align="center">
  25. <template slot-scope="scope">
  26. <el-image class="table-td-thumb" fit="contain" :src="scope.row.${columnName}" :preview-src-list="[scope.row.${columnName}]">
  27. <div slot="error"><i class="el-icon-document" /></div>
  28. </el-image>
  29. </template>
  30. </el-table-column>
  31. $elseif(column.HtmlType == "checkbox" || column.HtmlType == "select" || column.HtmlType == "radio")
  32. <el-table-column prop="${columnName}" label="${labelName}" align="center">
  33. <template slot-scope="scope">
  34. $if(column.HtmlType == "checkbox")
  35. <dict-tag :options="$if(column.DictType != "") ${column.DictType} $else ${column.CsharpFieldFl}Options$end" :value="scope.row.${columnName} ? scope.row.${columnName}.split(',') : []" />
  36. $else
  37. <dict-tag :options="$if(column.DictType != "") ${column.DictType} $else ${column.CsharpFieldFl}Options$end" :value="scope.row.${columnName}" />
  38. $end
  39. </template>
  40. </el-table-column>
  41. $else
  42. <el-table-column prop="${columnName}" label="${labelName}" align="center"${showToolTipHtml} />
  43. $end
  44. $end
  45. $end