You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

QueueDialog.vue 5.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <div class="base-dlg">
  3. <BaseDialog :visible.sync="dialogShow" :width="`750px`" :title="type === 'add' ? `新建资源池(队列)` : '修改资源池(队列)'"
  4. @open="open" @opened="opened" @close="close" @closed="closed">
  5. <div class="dlg-content">
  6. <div class="form">
  7. <div class="form-row">
  8. <div class="title required">
  9. <span>资源池(队列)名称</span>
  10. </div>
  11. <div class="content">
  12. <el-input v-model="point" placeholder=""></el-input>
  13. </div>
  14. </div>
  15. <div class="form-row">
  16. <div class="title required">
  17. <span>所属集群</span>
  18. </div>
  19. <div class="content">
  20. <el-select :value="selectValue"></el-select>
  21. </div>
  22. </div>
  23. <div class="form-row">
  24. <div class="title required">
  25. <span>智算中心</span>
  26. </div>
  27. <div class="content">
  28. <el-select :value="selectValue"></el-select>
  29. </div>
  30. </div>
  31. <div class="form-row">
  32. <div class="title required">
  33. <span>计算资源</span>
  34. </div>
  35. <div class="content">
  36. <el-select :value="selectValue"></el-select>
  37. </div>
  38. </div>
  39. <div class="form-row">
  40. <div class="title required">
  41. <span>卡类型</span>
  42. </div>
  43. <div class="content">
  44. <el-select :value="selectValue"></el-select>
  45. </div>
  46. </div>
  47. <div class="form-row">
  48. <div class="title required">
  49. <span>卡数</span>
  50. </div>
  51. <div class="content">
  52. <el-input v-model="point" type="number" placeholder=""></el-input>
  53. </div>
  54. </div>
  55. <div class="form-row" style="margin-top: 10px">
  56. <div class="title"><span>备注</span></div>
  57. <div class="content" style="width: 400px">
  58. <el-input type="textarea" :autosize="{ minRows: 3, maxRows: 4 }"
  59. :placeholder="true ? '请输入充值操作备注' : '请输入扣减操作备注'" v-model="remark">
  60. </el-input>
  61. </div>
  62. </div>
  63. <div class="form-row" style="margin-top: 20px">
  64. <div class="title"></div>
  65. <div class="content">
  66. <el-button type="primary" class="btn confirm-btn" @click="confirm">确定</el-button>
  67. <el-button class="btn" @click="cancel">取消</el-button>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </BaseDialog>
  73. </div>
  74. </template>
  75. <script>
  76. import BaseDialog from '~/components/BaseDialog.vue';
  77. export default {
  78. name: "QueueDialog",
  79. props: {
  80. visible: { type: Boolean, default: false },
  81. title: { type: String, default: '' },
  82. type: { type: String, defalut: 'add' },
  83. data: { type: Object, default: () => ({}) },
  84. },
  85. components: {
  86. BaseDialog
  87. },
  88. data: function () {
  89. return {
  90. dialogShow: false,
  91. dataInfo: {},
  92. point: '',
  93. remark: '',
  94. selectValue: '',
  95. };
  96. },
  97. watch: {
  98. visible: function (val) {
  99. this.dialogShow = val;
  100. },
  101. },
  102. methods: {
  103. open: function () {
  104. if (this.type === 'add') {
  105. } else if (this.type === 'edit') {
  106. }
  107. console.log('open', this.type, this.data);
  108. this.$emit("open");
  109. },
  110. opened: function () {
  111. this.$emit("opened");
  112. },
  113. close: function () {
  114. this.$emit("close");
  115. },
  116. closed: function () {
  117. this.$emit("closed");
  118. this.$emit("update:visible", false);
  119. },
  120. confirm: function () {
  121. },
  122. cancel: function () {
  123. }
  124. },
  125. };
  126. </script>
  127. <style scoped lang="less">
  128. .dlg-content {
  129. margin: 20px 0 25px 0;
  130. display: flex;
  131. justify-content: center;
  132. .form {
  133. width: 600px;
  134. .form-row {
  135. display: flex;
  136. min-height: 42px;
  137. margin-bottom: 4px;
  138. .title {
  139. width: 160px;
  140. display: flex;
  141. justify-content: flex-end;
  142. align-items: center;
  143. margin-right: 20px;
  144. color: rgb(136, 136, 136);
  145. font-size: 14px;
  146. &.required {
  147. span {
  148. position: relative;
  149. }
  150. span::after {
  151. position: absolute;
  152. right: -10px;
  153. top: -2px;
  154. vertical-align: top;
  155. content: '*';
  156. color: #db2828;
  157. }
  158. }
  159. }
  160. .content {
  161. width: 300px;
  162. display: flex;
  163. align-items: center;
  164. /deep/ .el-select {
  165. width: 100%;
  166. }
  167. }
  168. }
  169. }
  170. .btn {
  171. color: rgb(2, 0, 4);
  172. background-color: rgb(194, 199, 204);
  173. border-color: rgb(194, 199, 204);
  174. &.confirm-btn {
  175. color: #fff;
  176. background-color: rgb(56, 158, 13);
  177. border-color: rgb(56, 158, 13);
  178. }
  179. }
  180. }
  181. </style>