fieldSetModal.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <div class="dialog">
  3. <el-dialog
  4. :title="formData.JGMC"
  5. width="40%"
  6. :visible.sync="dialogVisible"
  7. :before-close="close"
  8. :modal-append-to-body="false"
  9. :close-on-click-modal="false"
  10. >
  11. <div class="content">
  12. <el-table
  13. ref="multipleTable"
  14. :data="fieldList"
  15. style="width: 100%"
  16. @selection-change="handleSelectionChange"
  17. >
  18. <el-table-column label="序号" width="70px">
  19. <template slot-scope="scope">{{ scope.$index + 1 }}</template>
  20. </el-table-column>
  21. <el-table-column prop="label" label="字段名"> </el-table-column>
  22. <el-table-column prop="name" label="中文名" show-overflow-tooltip>
  23. </el-table-column>
  24. <el-table-column label="是否可共享" width="150">
  25. <template #default="{ row }">
  26. <el-checkbox v-model="row.checked" @change="changeShare(row)">
  27. 可共享
  28. </el-checkbox>
  29. </template></el-table-column
  30. >
  31. </el-table>
  32. </div>
  33. <span slot="footer" class="dialog-footer">
  34. <el-button type="primary" @click="submit">保存</el-button>
  35. <el-button type="primary" @click="close">关闭</el-button>
  36. </span>
  37. </el-dialog>
  38. </div>
  39. </template>
  40. <script>
  41. export default {
  42. components: {},
  43. props: {},
  44. data() {
  45. return {
  46. formData: {},
  47. fieldList: [{ label: "sc", name: "字段" }],
  48. dialogVisible: false,
  49. };
  50. },
  51. created() {},
  52. methods: {
  53. // 关闭弹窗
  54. close() {
  55. this.dialogVisible = false;
  56. this.$emit("close");
  57. },
  58. Init(rowdata) {
  59. this.formData = rowdata;
  60. this.dialogVisible = true;
  61. },
  62. async submit() {
  63. this.close();
  64. },
  65. },
  66. };
  67. </script>
  68. <style lang="scss" scoped>
  69. .dialog {
  70. .content {
  71. height: 400px;
  72. overflow-y: auto;
  73. overflow-x: hidden;
  74. color: #fff;
  75. .el-checkbox {
  76. color: #fff;
  77. }
  78. }
  79. }
  80. </style>
  81. <style lang="scss" >
  82. </style>