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.

Model.vue 22 kB

3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <template>
  2. <div>
  3. <div class="ui container" id="header">
  4. <el-row style="margin-top: 15px">
  5. <el-table
  6. ref="table"
  7. :data="tableData"
  8. style="min-width: 100%"
  9. row-key="rowKey"
  10. lazy
  11. :load="load"
  12. :tree-props="{ children: 'Children', hasChildren: 'hasChildren' }"
  13. :header-cell-style="tableHeaderStyle"
  14. >
  15. <el-table-column
  16. prop="name"
  17. :label="i18n.model_name"
  18. align="left"
  19. min-width="20%"
  20. >
  21. <template slot-scope="scope">
  22. <div class="expand-icon" v-if="scope.row.hasChildren === false">
  23. <i class="el-icon-arrow-right"></i>
  24. </div>
  25. <!-- <i class="el-icon-time"></i> -->
  26. <span v-if="!scope.row.Children" :class="scope.row.modelType == '1' ? 'm-local' : 'm-online'">{{ scope.row.modelType == '1' ? i18n.local : i18n.online }}</span>
  27. <a
  28. class="text-over"
  29. :href="showinfoHref + scope.row.name"
  30. :title="scope.row.name"
  31. >{{ scope.row.name }}</a
  32. >
  33. </template>
  34. </el-table-column>
  35. <el-table-column
  36. prop="status"
  37. :label="i18n.model_status"
  38. align="center"
  39. min-width="6.5%"
  40. >
  41. <template slot-scope="scope">
  42. <span class="text-over" :title="scope.row.status_title">
  43. <i style="vertical-align: middle" :class="scope.row.status"></i
  44. ></span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column
  48. prop="version"
  49. :label="i18n.model_version"
  50. align="center"
  51. min-width="6%"
  52. >
  53. <template slot-scope="scope">
  54. <span class="text-over" :title="scope.row.version">{{
  55. scope.row.version
  56. }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column
  60. prop="versionCount"
  61. :label="i18n.model_version_num"
  62. align="center"
  63. min-width="7%"
  64. >
  65. <template slot-scope="scope">
  66. <span class="text-over" :title="scope.row.versionCount">{{
  67. scope.row.versionCount
  68. }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column
  72. prop="size"
  73. :label="i18n.model_size"
  74. align="center"
  75. min-width="10%"
  76. >
  77. <template slot-scope="scope">
  78. <span class="text-over">{{ renderSize(scope.row.size) }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column
  82. prop="engineName"
  83. :label="i18n.model_egine"
  84. align="center"
  85. min-width="8%"
  86. >
  87. <template slot-scope="scope">
  88. <span class="text-over" :title="scope.row.engineName">{{
  89. scope.row.engineName
  90. }}</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column
  94. prop="computeResource"
  95. :label="i18n.model_compute_resource"
  96. align="center"
  97. min-width="8%"
  98. >
  99. <template slot-scope="scope">
  100. <span class="text-over">{{ scope.row.computeResource }}</span>
  101. </template>
  102. </el-table-column>
  103. <el-table-column
  104. prop="createdUnix"
  105. :label="i18n.model_create_time"
  106. align="center"
  107. min-width="13.75%"
  108. >
  109. <template slot-scope="scope">
  110. {{ transTime(scope.row.createdUnix) }}
  111. </template>
  112. </el-table-column>
  113. <el-table-column
  114. prop="userName"
  115. :label="i18n.model_creator"
  116. align="center"
  117. min-width="6.75%"
  118. >
  119. <template slot-scope="scope">
  120. <a
  121. :href="!scope.row.userName ? '#' : '/' + scope.row.userName"
  122. :title="scope.row.userName || defaultAvatarName"
  123. >
  124. <img
  125. class="ui avatar image"
  126. :src="scope.row.userRelAvatarLink || defaultAvatar"
  127. />
  128. </a>
  129. </template>
  130. </el-table-column>
  131. <el-table-column
  132. :label="i18n.model_operation"
  133. min-width="15%"
  134. align="center"
  135. >
  136. <template slot-scope="scope">
  137. <div class="space-around" >
  138. <!--<a
  139. :style="{
  140. visibility: !scope.row.Children ? 'visible' : 'hidden',
  141. }"
  142. :class="{ disabled: !scope.row.isCanOper }"
  143. @click="
  144. showcreateVue(
  145. scope.row.name,
  146. scope.row.version,
  147. scope.row.label
  148. )
  149. "
  150. >{{ i18n.model_create_new_ver }}</a
  151. >-->
  152. <a class="op-btn"
  153. v-show="scope.row.modelType == 1"
  154. :href="url + 'create_local_model_tmpl1?type=1&name=' + scope.row.name + '&id=' + scope.row.id"
  155. :class="{ disabled: !scope.row.isCanOper }"
  156. >{{ i18n.modify }}</a>
  157. <a class="op-btn" v-show="scope.row.modelType != 1" style="color:transparent;cursor:default;" >{{ i18n.modify }}</a>
  158. <a class="op-btn"
  159. :href="loadhref + scope.row.id"
  160. :class="{ disabled: !scope.row.isCanOper }"
  161. >{{ i18n.model_download }}</a>
  162. <a class="op-btn"
  163. :class="{ disabled: !scope.row.isCanDelete }"
  164. @click="
  165. deleteModel(scope.row.id, scope.row.cName, scope.row.rowKey)
  166. "
  167. >{{ i18n.model_delete }}</a>
  168. </div>
  169. </template>
  170. </el-table-column>
  171. </el-table>
  172. </el-row>
  173. <div class="ui container" style="margin-top: 50px; text-align: center">
  174. <el-pagination
  175. background
  176. @size-change="handleSizeChange"
  177. @current-change="handleCurrentChange"
  178. :current-page="currentPage"
  179. :page-sizes="[5, 10, 15]"
  180. :page-size="pageSize"
  181. layout="total, sizes, prev, pager, next, jumper"
  182. :total="totalNum"
  183. >
  184. </el-pagination>
  185. </div>
  186. </div>
  187. </div>
  188. </template>
  189. <script>
  190. const { _AppSubUrl, _StaticUrlPrefix, csrf } = window.config;
  191. export default {
  192. components: {},
  193. data() {
  194. return {
  195. i18n: {},
  196. currentPage: 1,
  197. pageSize: 10,
  198. totalNum: 0,
  199. params: { page: 0, pageSize: 10 },
  200. tableData: [],
  201. url: "",
  202. isLoading: true,
  203. loadNodeMap: new Map(),
  204. submitId: {},
  205. defaultAvatar: "/user/avatar/Ghost/-1",
  206. defaultAvatarName: "Ghost",
  207. data: "",
  208. timer: null,
  209. timerFlag: false,
  210. };
  211. },
  212. methods: {
  213. load(tree, treeNode, resolve) {
  214. try {
  215. this.loadNodeMap.set(tree.cName, { tree, treeNode, resolve });
  216. this.$axios
  217. .get(this.url + "show_model_child_api", {
  218. params: {
  219. name: tree.cName,
  220. },
  221. })
  222. .then((res) => {
  223. let trainTaskInfo;
  224. let tableData;
  225. tableData = res.data;
  226. for (let i = 0; i < tableData.length; i++) {
  227. trainTaskInfo = JSON.parse(tableData[i].trainTaskInfo || '{}');
  228. tableData[i].engineName = this.getEngineName(tableData[i]);
  229. tableData[i].computeResource = trainTaskInfo.ComputeResource;
  230. tableData[i].computeResource = tableData[i].type == '0' ? 'CPU/GPU' : 'NPU';
  231. tableData[i].cName = tableData[i].name;
  232. tableData[i].rowKey = tableData[i].id + Math.random();
  233. tableData[i].name = "";
  234. tableData[i].versionCount = "";
  235. tableData[i].Children = true;
  236. }
  237. resolve(tableData || []);
  238. });
  239. } catch (e) {
  240. this.loading = false;
  241. }
  242. },
  243. tableHeaderStyle({ row, column, rowIndex, columnIndex }) {
  244. if (rowIndex === 0) {
  245. return "background:#f5f5f6;color:#606266";
  246. }
  247. },
  248. handleSizeChange(val) {
  249. this.params.pageSize = val;
  250. this.getModelList();
  251. },
  252. handleCurrentChange(val) {
  253. this.params.page = val;
  254. this.getModelList();
  255. },
  256. showcreateVue(name, version, label) {
  257. let title = this.i18n.model_create_version_title;
  258. $(".ui.modal.second")
  259. .modal({
  260. centered: false,
  261. onShow: function () {
  262. $("#model_header").text(title);
  263. $('input[name="name"]').addClass("model_disabled");
  264. $('input[name="name"]').attr("readonly", "readonly");
  265. $('input[name="modelSelectedFile"]').attr("readonly", "readonly");
  266. $('input[name="version"]').addClass("model_disabled");
  267. $(".ui.dimmer").css({
  268. "background-color": "rgb(136, 136, 136,0.7)",
  269. });
  270. $("#job-name").empty();
  271. $("#name").val(name);
  272. $("#label").val(label);
  273. let version_string = versionAdd(version);
  274. $("#version").val(version_string);
  275. loadTrainList();
  276. },
  277. onHide: function () {
  278. document.getElementById("formId").reset();
  279. $('input[name="name"]').removeClass("model_disabled");
  280. $('input[name="name"]').removeAttr("readonly");
  281. $('input[name="modelSelectedFile"]').removeAttr("readonly");
  282. var cityObj = $("#modelSelectedFile");
  283. cityObj.attr("value", "");
  284. $("#choice_model").dropdown("clear");
  285. $("#choice_version").dropdown("clear");
  286. $("#choice_Engine").dropdown("clear");
  287. $(".ui.dimmer").css({ "background-color": "" });
  288. $(".ui.error.message").text();
  289. $(".ui.error.message").css("display", "none");
  290. },
  291. })
  292. .modal("show");
  293. },
  294. check() {
  295. let jobid = document.getElementById("jobId").value;
  296. let versionname = document.getElementById("versionName").value;
  297. let name = document.getElementById("name").value;
  298. let version = document.getElementById("version").value;
  299. let modelSelectedFile =
  300. document.getElementById("modelSelectedFile").value;
  301. if (jobid == "") {
  302. $(".required.ten.wide.field").addClass("error");
  303. return false;
  304. } else {
  305. $(".required.ten.wide.field").removeClass("error");
  306. }
  307. if (modelSelectedFile == "") {
  308. $("#modelSelectedFile").addClass("error");
  309. return false;
  310. } else {
  311. $("#modelSelectedFile").removeClass("error");
  312. }
  313. if (versionname == "") {
  314. $(".required.six.widde.field").addClass("error");
  315. return false;
  316. } else {
  317. $(".required.six.widde.field").removeClass("error");
  318. }
  319. if (name == "") {
  320. $("#modelname").addClass("error");
  321. return false;
  322. } else {
  323. $("#modelname").removeClass("error");
  324. }
  325. if (versionname == "") {
  326. $("#verionname").addClass("error");
  327. return false;
  328. } else {
  329. $("#verionname").removeClass("error");
  330. }
  331. return true;
  332. },
  333. submit() {
  334. let context = this;
  335. let flag = this.check();
  336. if (flag) {
  337. let cName = $("input[name='name']").val();
  338. let version = $("input[name='version']").val();
  339. let data = $("#formId").serialize();
  340. const initModel = $("input[name='initModel']").val();
  341. let url_href =
  342. version === "0.0.1"
  343. ? context.url_create_newModel
  344. : context.url_create_newVersion;
  345. $("#mask").css({ display: "block", "z-index": "9999" });
  346. $.ajax({
  347. url: url_href,
  348. type: "POST",
  349. data: data,
  350. success: function (res) {
  351. context.getModelList();
  352. $("input[name='modelSelectedFile']").val("");
  353. $(".ui.modal.second").modal("hide");
  354. if (initModel === "0") {
  355. location.reload();
  356. }
  357. },
  358. error: function (xhr) {
  359. // 隐藏 loading
  360. // 只有请求不正常(状态码不为200)才会执行
  361. $(".ui.error.message").text(xhr.responseText);
  362. $(".ui.error.message").css("display", "block");
  363. },
  364. complete: function (xhr) {
  365. $("#mask").css({ display: "none", "z-index": "1" });
  366. },
  367. });
  368. } else {
  369. return false;
  370. }
  371. },
  372. loadrefresh(row) {
  373. const store = this.$refs.table.store;
  374. if (!this.loadNodeMap.get(row.cName)) {
  375. const parent = store.states.data;
  376. const index = parent.findIndex((child) => child.rowKey == row.rowKey);
  377. this.getModelList();
  378. } else {
  379. let { tree, treeNode, resolve } = this.loadNodeMap.get(row.cName);
  380. const keys = Object.keys(store.states.lazyTreeNodeMap);
  381. if (keys.includes(row.rowKey)) {
  382. this.getModelList();
  383. } else {
  384. let parentRow = store.states.data.find(
  385. (child) => child.cName == row.cName
  386. );
  387. let childrenIndex = store.states.lazyTreeNodeMap[
  388. parentRow.rowKey
  389. ].findIndex((child) => child.rowKey == row.rowKey);
  390. parentRow.versionCount = parentRow.versionCount - 1;
  391. const parent = store.states.lazyTreeNodeMap[parentRow.rowKey];
  392. if (parent.length === 1) {
  393. this.getModelList();
  394. } else {
  395. parent.splice(childrenIndex, 1);
  396. }
  397. }
  398. }
  399. },
  400. deleteModel(id, name, rowKey) {
  401. let row = { cName: name, id: id, rowKey: rowKey };
  402. let _this = this;
  403. let flag = 1;
  404. $(".ui.basic.modal.first")
  405. .modal({
  406. onDeny: function () {
  407. flag = false;
  408. },
  409. onApprove: function () {
  410. _this.$axios
  411. .delete(_this.url + "delete_model", {
  412. params: {
  413. id: id,
  414. },
  415. })
  416. .then((res) => {
  417. _this.loadrefresh(row);
  418. // _this.getModelList()
  419. });
  420. flag = true;
  421. },
  422. onHidden: function () {
  423. if (flag == false) {
  424. $(".alert")
  425. .html("您已取消操作")
  426. .removeClass("alert-success")
  427. .addClass("alert-danger")
  428. .show()
  429. .delay(1500)
  430. .fadeOut();
  431. } else {
  432. $(".alert")
  433. .html("删除成功")
  434. .removeClass("alert-danger")
  435. .addClass("alert-success")
  436. .show()
  437. .delay(1500)
  438. .fadeOut();
  439. }
  440. },
  441. })
  442. .modal("show");
  443. },
  444. getEngineName(model) {
  445. if (model.engine == 0) {
  446. return "PyTorch";
  447. } else if (model.engine == 1 || model.engine == 121) {
  448. return "TensorFlow";
  449. } else if (
  450. model.engine == 2 ||
  451. model.engine == 122 ||
  452. model.engine == 35
  453. ) {
  454. return "MindSpore";
  455. } else if (model.engine == 4) {
  456. return "PaddlePaddle";
  457. } else if (model.engine == 5) {
  458. return "OneFlow";
  459. } else if (model.engine == 6) {
  460. return "MXNet";
  461. } else {
  462. return "Other";
  463. }
  464. },
  465. intervalModelist() {
  466. if (!this.timerFlag) {
  467. this.timer = setInterval(() => {
  468. this.getModelList();
  469. }, 10000);
  470. }
  471. },
  472. getModelList() {
  473. let countStatus = 0;
  474. try {
  475. this.loadNodeMap.clear();
  476. this.$axios
  477. .get(location.href + "_api", {
  478. params: this.params,
  479. })
  480. .then((res) => {
  481. $(".ui.grid").removeAttr("style");
  482. $("#loadContainer").removeClass("loader");
  483. let trainTaskInfo;
  484. this.tableData = res.data.data;
  485. for (let i = 0; i < this.tableData.length; i++) {
  486. trainTaskInfo = JSON.parse(this.tableData[i].trainTaskInfo);
  487. this.tableData[i].cName = this.tableData[i].name;
  488. this.tableData[i].rowKey = this.tableData[i].id + Math.random();
  489. this.tableData[i].engineName = this.getEngineName(
  490. this.tableData[i]
  491. );
  492. // this.tableData[i].computeResource = trainTaskInfo.ComputeResource;
  493. this.tableData[i].computeResource = this.tableData[i].type == '0' ? 'CPU/GPU' : 'NPU';
  494. this.tableData[i].hasChildren = res.data.data[i].versionCount === 1 ? false : true;
  495. if (this.tableData[i].status !== 1) {
  496. countStatus++;
  497. }
  498. switch (this.tableData[i].status) {
  499. case 1:
  500. this.tableData[i].status = "WAITING";
  501. this.tableData[i].status_title = this.i18n.model_wait;
  502. break;
  503. case 2:
  504. this.tableData[i].status = "FAILED";
  505. this.tableData[i].status_title = this.tableData[i].statusDesc;
  506. break;
  507. default:
  508. this.tableData[i].status = "SUCCEEDED";
  509. this.tableData[i].status_title = this.i18n.model_success;
  510. break;
  511. }
  512. }
  513. this.totalNum = res.data.count;
  514. if (countStatus === this.tableData.length) {
  515. clearInterval(this.timer);
  516. this.timer = null;
  517. this.timerFlag = false;
  518. } else {
  519. this.intervalModelist();
  520. this.timerFlag = true;
  521. }
  522. })
  523. .catch((err) => {
  524. console.log(err);
  525. });
  526. } catch (e) {
  527. console.log(e);
  528. }
  529. },
  530. },
  531. computed: {
  532. loadhref() {
  533. return this.url + "downloadall?id=";
  534. },
  535. showinfoHref() {
  536. return this.url + "show_model_info?name=";
  537. },
  538. transTime() {
  539. return function (time) {
  540. let date = new Date(time * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  541. let Y = date.getFullYear() + "-";
  542. let M =
  543. (date.getMonth() + 1 < 10
  544. ? "0" + (date.getMonth() + 1)
  545. : date.getMonth() + 1) + "-";
  546. let D =
  547. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  548. let h =
  549. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) +
  550. ":";
  551. let m =
  552. (date.getMinutes() < 10
  553. ? "0" + date.getMinutes()
  554. : date.getMinutes()) + ":";
  555. let s =
  556. date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  557. return Y + M + D + h + m + s;
  558. };
  559. },
  560. renderSize() {
  561. return function (value) {
  562. if (null == value || value == "") {
  563. return "0 Bytes";
  564. }
  565. var unitArr = new Array(
  566. "Bytes",
  567. "KB",
  568. "MB",
  569. "GB",
  570. "TB",
  571. "PB",
  572. "EB",
  573. "ZB",
  574. "YB"
  575. );
  576. var index = 0;
  577. var srcsize = parseFloat(value);
  578. index = Math.floor(Math.log(srcsize) / Math.log(1024));
  579. var size = srcsize / Math.pow(1024, index);
  580. size = size.toFixed(2); //保留的小数位数
  581. return size + unitArr[index];
  582. };
  583. },
  584. },
  585. mounted() {
  586. this.submitId = document.getElementById("submitId");
  587. this.intervalModelist();
  588. this.url = location.href.split("show_model")[0];
  589. this.submitId.addEventListener("click", this.submit);
  590. this.url_create_newVersion = this.url + "create_model";
  591. this.url_create_newModel = this.url + "create_new_model";
  592. },
  593. created() {
  594. if (document.documentElement.attributes["lang"].nodeValue == "en-US") {
  595. this.i18n = this.$locale.US;
  596. } else {
  597. this.i18n = this.$locale.CN;
  598. }
  599. this.getModelList();
  600. },
  601. beforeDestroy() {
  602. // 实例销毁之前对点击事件进行解绑
  603. this.submitId.removeEventListener("click", this.submit);
  604. clearInterval(this.timer);
  605. },
  606. };
  607. </script>
  608. <style scoped>
  609. .text-over {
  610. overflow: hidden;
  611. text-overflow: ellipsis;
  612. vertical-align: middle;
  613. white-space: nowrap;
  614. }
  615. .m-local {
  616. background-color: rgb(22, 132, 252);
  617. color: white;
  618. padding: 2px 3px;
  619. border-radius: 4px;
  620. font-size: 12px;
  621. margin-right: 2px;
  622. }
  623. .m-online {
  624. background-color: rgb(91, 185, 115);
  625. color: white;
  626. padding: 2px 3px;
  627. border-radius: 4px;
  628. font-size: 12px;
  629. margin-right: 2px;
  630. }
  631. .el-icon-arrow-right {
  632. font-family: element-icons !important;
  633. speak: none;
  634. font-style: normal;
  635. font-weight: 400;
  636. font-feature-settings: normal;
  637. font-variant: normal;
  638. text-transform: none;
  639. line-height: 1;
  640. vertical-align: middle;
  641. display: inline-block;
  642. -webkit-font-smoothing: antialiased;
  643. -moz-osx-font-smoothing: grayscale;
  644. border: 1px solid #d4d4d5;
  645. border-radius: 50%;
  646. color: #d4d4d5;
  647. margin-right: 4px;
  648. }
  649. .el-icon-arrow-right::before {
  650. content: "\e6e0";
  651. }
  652. .expand-icon {
  653. display: inline-block;
  654. width: 20px;
  655. line-height: 20px;
  656. height: 20px;
  657. text-align: center;
  658. margin-right: 3px;
  659. font-size: 12px;
  660. }
  661. /deep/ .el-table_1_column_1.is-left .cell {
  662. padding-right: 0px !important;
  663. white-space: nowrap;
  664. }
  665. /deep/ .el-table__expand-icon .el-icon-arrow-right {
  666. font-family: element-icons !important;
  667. speak: none;
  668. font-style: normal;
  669. font-weight: 400;
  670. font-feature-settings: normal;
  671. font-variant: normal;
  672. text-transform: none;
  673. line-height: 1;
  674. vertical-align: middle;
  675. display: inline-block;
  676. -webkit-font-smoothing: antialiased;
  677. -moz-osx-font-smoothing: grayscale;
  678. border: 1px solid #3291f8;
  679. border-radius: 50%;
  680. color: #3291f8;
  681. margin-right: 4px;
  682. }
  683. .space-around {
  684. display: flex;
  685. justify-content: space-around;
  686. }
  687. .op-btn-c {
  688. text-align: right;
  689. padding-right: 20px;
  690. }
  691. .op-btn {
  692. margin: 0 0 0 5px;
  693. }
  694. .disabled {
  695. cursor: default;
  696. pointer-events: none;
  697. color: rgba(0, 0, 0, 0.6) !important;
  698. opacity: 0.45 !important;
  699. }
  700. </style>