clusteringManagement.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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.userName"
  9. size="small"
  10. clearable
  11. placeholder="请输入"
  12. >
  13. </el-input>
  14. </template>
  15. <template slot="searchItem2">
  16. <span class="label">操作时间</span>
  17. <el-date-picker
  18. v-model="modifyTimeRange"
  19. type="daterange"
  20. format="yyyy-MM-dd"
  21. value-format="yyyy-MM-dd"
  22. range-separator="至"
  23. start-placeholder="开始日期"
  24. end-placeholder="结束日期"
  25. >
  26. </el-date-picker>
  27. </template>
  28. <template slot="searchItem3">
  29. <span class="label">到期时间</span>
  30. <el-date-picker
  31. v-model="dueTimeRange"
  32. type="daterange"
  33. format="yyyy-MM-dd"
  34. value-format="yyyy-MM-dd"
  35. range-separator="至"
  36. start-placeholder="开始日期"
  37. end-placeholder="结束日期"
  38. >
  39. </el-date-picker>
  40. </template>
  41. <template slot="searchBtn1">
  42. <el-button type="primary" @click="doSearch">查询</el-button>
  43. </template>
  44. <template slot="searchBtn2">
  45. <el-button type="primary" @click="reset">重置</el-button>
  46. </template>
  47. </search-layout>
  48. <!--<div class="btnsPanel">
  49. <el-button
  50. type="primary"
  51. icon="el-icon-circle-plus-outline"
  52. @click="addConfig"
  53. >新建配置</el-button
  54. >
  55. </div>-->
  56. <div style="border-top: none; margin: 30px 40px 10px 40px">
  57. <span>仿真软件已分配未到期节点数量:{{totalSimulation}}
  58. <span v-if = " totalSimulationAll && totalSimulationAll >= 0"> / {{totalSimulationAll}}</span>
  59. </span>
  60. <span style="margin-left: 20%">动力学软件已分配未到期节点数量:{{totalDynamic}}
  61. <span v-if = " totalDynamicAll && totalDynamicAll >= 0"> / {{totalDynamicAll}}</span>
  62. </span>
  63. </div>
  64. <tableList
  65. ref="table"
  66. style="border-top: none; margin: 0 30px"
  67. :columns="columns"
  68. :getDataWay="getDataWay"
  69. :pagination="pagination"
  70. index
  71. >
  72. <!--<el-table-column label="独占类型" slot="useType" align="center">
  73. <template v-slot="scope">
  74. <span>
  75. {{(useTypeList.find(item=>item.code==scope.row.useType)||{}).caption||''}}
  76. </span>
  77. </template>
  78. </el-table-column>-->
  79. <el-table-column label="操作" slot="cgInfos" align="center">
  80. <template v-slot="scope">
  81. <i
  82. @click="addMarkDia(scope.row)"
  83. class="el-icon-edit-outline elIcon"
  84. ></i>
  85. </template>
  86. </el-table-column>
  87. </tableList>
  88. </div>
  89. </template>
  90. <script>
  91. import searchLayout from "@/components/grid/searchLayout";
  92. import tableList from "@/components/grid/TableList";
  93. export default {
  94. name: "clusteringManagement", // 账户管理
  95. components: { searchLayout, tableList },
  96. data() {
  97. return {
  98. searchParams: {
  99. //搜索参数
  100. userName: "",
  101. dueTimeStart: "",
  102. dueTimeEnd: "",
  103. modifyTimeStart: "",
  104. modifyTimeEnd: ""
  105. },
  106. modifyTimeRange:[],
  107. dueTimeRange:[],
  108. list: [],
  109. totalSimulation:0,
  110. totalSimulationAll:-1,
  111. totalDynamic:0,
  112. totalDynamicAll:-1,
  113. useTypeList:[],
  114. columns: [
  115. //表格列
  116. {
  117. label: "账户名称",
  118. prop: "userName",
  119. },
  120. {
  121. label: "独占类型",
  122. prop: "useType",
  123. //template:true
  124. },
  125. {
  126. label: "仿真软件license",
  127. prop: "numSimulationLicense",
  128. },
  129. {
  130. label: "到期时间",
  131. prop: "dateSimulationLicense",
  132. formatter:(data)=>{
  133. return data.dateSimulationLicense?data.dateSimulationLicense.slice(0,10):''
  134. }
  135. },
  136. {
  137. label: "动力学软件license",
  138. prop: "numDynamicLicense",
  139. },
  140. {
  141. label: "到期时间",
  142. prop: "dateDynamicLicense",
  143. formatter:(data)=>{
  144. return data.dateDynamicLicense?data.dateDynamicLicense.slice(0,10):''
  145. }
  146. },
  147. {
  148. label: "操作",
  149. prop: "cgInfos",
  150. template: true,
  151. },
  152. ],
  153. pagination: {
  154. //分页使用
  155. currentPage: 1,
  156. pageSize: 10,
  157. position: "right",
  158. pageSizes: [10, 30, 50, 100, 200],
  159. layout: "sizes, total, prev, pager, next, jumper",
  160. },
  161. getDataWay: {
  162. dataType: "url",
  163. type: "post",
  164. data: this.$api.systemManagement.getClusterList,
  165. param: {},
  166. },
  167. };
  168. },
  169. created(){
  170. //获取未到期已分配节点数量
  171. this.$axios({
  172. method:'POST',
  173. url:this.$api.systemManagement.getClusterNum,
  174. data:{}
  175. }).then(res=>{
  176. if(res.code=='200'){
  177. this.totalSimulation=res.info.totalSimulation;
  178. this.totalSimulationAll=res.info.totalSimulationAll;
  179. this.totalDynamic=res.info.totalDynamic;
  180. this.totalDynamicAll=res.info.totalDynamicAll;
  181. }
  182. })
  183. },
  184. async mounted(){
  185. await this.$dicsListsInit({
  186. useTypeList: "useType"
  187. });
  188. },
  189. methods: {
  190. doSearch(){
  191. this.searchParams.modifyTimeStart=this.modifyTimeRange[0]||''
  192. this.searchParams.modifyTimeEnd=this.modifyTimeRange[1]||''
  193. this.searchParams.dueTimeStart=this.modifyTimeRange[0]||''
  194. this.searchParams.dueTimeEnd=this.modifyTimeRange[1]||''
  195. this.refreshList(this.searchParams)
  196. },
  197. reset(){
  198. this.searchParams = {
  199. userName: "",
  200. dueTimeStart: "",
  201. dueTimeEnd: "",
  202. modifyTimeStart: "",
  203. modifyTimeEnd: ""
  204. }
  205. this.modifyTimeRange=[]
  206. this.dueTimeRange=[]
  207. this.refreshList(this.searchParams)
  208. },
  209. refreshList(param) {
  210. param
  211. ? this.$refs["table"].loadData(param)
  212. : this.$refs["table"].loadData();
  213. },
  214. addConfig() {
  215. this.$router.push({
  216. path:'/clusteringDetail'
  217. })
  218. },
  219. addMarkDia(row) {
  220. let query = {...row}
  221. this.$router.push({
  222. path:'/clusteringDetail',
  223. query
  224. })
  225. },
  226. },
  227. };
  228. </script>
  229. <style scoped lang="less">
  230. .btnsPanel {
  231. margin: 45px 40px 15px;
  232. }
  233. </style>