parameterManagement.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!--参数管理-->
  2. <template>
  3. <div>
  4. <search-layout :needBox="true">
  5. <template slot="searchItem1">
  6. <span class="label">账户名</span>
  7. <el-input
  8. v-model="searchParams.algorithmCode"
  9. size="small"
  10. clearable
  11. placeholder="请输入"
  12. maxlength="60"
  13. >
  14. </el-input>
  15. </template>
  16. <template slot="searchBtn1">
  17. <el-button type="primary" @click="doSearch">查询</el-button>
  18. </template>
  19. <template slot="searchBtn2">
  20. <el-button type="primary" @click="doReset">重置</el-button>
  21. </template>
  22. </search-layout>
  23. <div class="myTabsBox myTabsBoxThreeTabs">
  24. <el-button
  25. v-bind:class="{ addBtn: true}"
  26. icon="el-icon-circle-plus-outline"
  27. @click="addOne"
  28. type="primary"
  29. >新增参数配置</el-button
  30. >
  31. </div>
  32. <tableList
  33. ref="table"
  34. style="margin: 0 30px"
  35. :columns="columns"
  36. :getDataWay="getDataWay"
  37. :pagination="pagination"
  38. index
  39. >
  40. <el-table-column label="操作" slot="cgInfos" align="center">
  41. <template v-slot="scope">
  42. <i
  43. @click="editRow(scope.row)"
  44. class="el-icon-edit-outline elIcon"
  45. title="编辑"
  46. ></i>
  47. <i
  48. @click="delOne(scope.row)"
  49. class="el-icon-delete elIcon"
  50. title="删除"
  51. ></i>
  52. </template>
  53. </el-table-column>
  54. </tableList>
  55. </div>
  56. </template>
  57. <script>
  58. import searchLayout from "@/components/grid/searchLayout";
  59. import tableList from "@/components/grid/TableList";
  60. export default{
  61. name: "parameterManagement",
  62. components: { searchLayout, tableList },
  63. data() {
  64. return {
  65. searchParams: {
  66. //搜索参数
  67. },
  68. validationStatusList: [],
  69. getDataWay:{
  70. //dataType: "url",
  71. dataType: "data",
  72. type: "post",
  73. // firstRequest: false,
  74. // data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
  75. data:[{a1:'1',a2:'2',a3:'3',a4:'4'}],
  76. param: {},
  77. },
  78. columns: [
  79. //表格列
  80. {
  81. label: "账户名",
  82. prop: "a1",
  83. },
  84. {
  85. label: "可创建子账户数量",
  86. prop: "a2",
  87. },
  88. {
  89. label: "最多可创建场景测试包数量",
  90. prop: "a3",
  91. },
  92. {
  93. label: "场景数量包的最大场景数",
  94. prop: "a4",
  95. },
  96. {
  97. label: "操作",
  98. prop: "cgInfos",
  99. template: true
  100. }
  101. ],
  102. pagination: {
  103. //分页使用
  104. currentPage: 1,
  105. pageSize: 10,
  106. position: "right",
  107. pageSizes: [10, 30, 50, 100, 200],
  108. layout: "sizes, total, prev, pager, next, jumper",
  109. },
  110. };
  111. },
  112. methods: {
  113. doSearch() {
  114. this.$nextTick(() => {
  115. this.refreshList(this.searchParams);
  116. });
  117. },
  118. refreshList(param) {
  119. param
  120. ? this.$refs["table"].loadData(param)
  121. : this.$refs["table"].loadData();
  122. },
  123. doReset() {
  124. this.searchParams = {
  125. };
  126. this.doSearch();
  127. },
  128. addOne() {
  129. this.$router.push("/parameterDetail")
  130. },
  131. editRow(row) {
  132. },
  133. delOne(row) {
  134. this.$confirm("确认是否删除?", "提示", {
  135. confirmButtonText: "确定",
  136. cancelButtonText: "取消",
  137. type: "warning",
  138. }).then(() => {
  139. });
  140. },
  141. },
  142. }
  143. </script>
  144. <style scoped lang="less">
  145. .tabsBox {
  146. position: relative;
  147. overflow: hidden;
  148. .el-button {
  149. position: absolute;
  150. right: 40px;
  151. top: 45px;
  152. }
  153. }
  154. .myTabsBox{
  155. min-height:99px;
  156. }
  157. </style>