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 23 kB

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