pic2.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438
  1. <template>
  2. <div class="root">
  3. <el-row :gutter="10" class="container1">
  4. <el-col :span="24">
  5. <div class="itemBox" :span="24">
  6. <el-row :gutter="10" class="flex-box">
  7. <el-col :span="6">
  8. <span class="label">标签名称</span>
  9. <el-autocomplete v-model="searchParam.searchLabel" :fetch-suggestions="getLabelList" placeholder="请输入标签名"
  10. @select="handleSelect" class="el-select"></el-autocomplete>
  11. </el-col>
  12. <el-col :span="2" class="mt10">
  13. <el-checkbox v-model="searchParam.radioTime" @change="isShowTimeinfo">显示时间</el-checkbox>
  14. </el-col>
  15. <el-col :span="2" class="mt10">
  16. <el-checkbox v-model="searchParam.radioItemStatus" @change="isShowItemStatus">显示状态</el-checkbox>
  17. </el-col>
  18. </el-row>
  19. <div class="canvaBox">
  20. <div class="minimap"></div>
  21. <!-- 树图相关 -->
  22. <div id="treeDiv" class="whr100"></div>
  23. <!-- 重命名节点Dialog -->
  24. <el-dialog title="提示" :visible.sync="renameDialogVisible" width="30%" :before-close="editDialogClose">
  25. <el-input v-model="inputLabel.name" placeholder="请输入"></el-input>
  26. <span slot="footer" class="dialog-footer">
  27. <el-button @click="renameDialogVisible = false">取 消</el-button>
  28. <el-button type="primary" @click="renameSubmit">确 定</el-button>
  29. </span>
  30. </el-dialog>
  31. <!-- 删除dialog -->
  32. <el-dialog title="提示" :visible.sync="delDialogVisible" width="20%" :before-close="delDialogClose">
  33. <div class="title">是否确认删除?</div>
  34. <span slot="footer" class="dialog-footer">
  35. <el-button @click="delDialogVisible = false">取 消</el-button>
  36. <el-button type="primary" @click="delSubmit">确 定</el-button>
  37. </span>
  38. </el-dialog>
  39. </div>
  40. </div>
  41. </el-col>
  42. <el-drawer title="节点信息" :visible.sync="dataInfoDrawerVisible" class="dataInfo-drawer-dialog" @close="dataInfoClose"
  43. size="50%">
  44. <el-form ref="dataInfoForm" :model="dataInfoForm" label-width="90px">
  45. <el-form-item label="节点名称">
  46. <el-col :span="11">
  47. <el-input v-model="dataInfoForm.name"></el-input>
  48. </el-col>
  49. </el-form-item>
  50. <el-form-item label="详细情况">
  51. <el-col :span="11">
  52. <el-input v-model="dataInfoForm.content"></el-input>
  53. </el-col>
  54. </el-form-item>
  55. </el-form>
  56. <div class="dataInfoFootDiv">
  57. <el-button @click="dataInfoDrawerVisible = false">取 消</el-button>
  58. <el-button type="primary" @click="dataInfoSubmit">保 存</el-button>
  59. </div>
  60. </el-drawer>
  61. <el-dialog title="文件预览" :visible.sync="dialogVisible" destroy-on-close width="90%" top="6vh" height="90%">
  62. <el-button size="small" type="primary" icon="el-icon-download" @click="downloadFile(chart.fileData)"
  63. :loading="loading" style="position: absolute; right: 100px; top: 20px;">
  64. 点击保存
  65. </el-button>
  66. <iframe :src="previewUrl" width="100%" :height="singleTableHeight"></iframe>
  67. </el-dialog>
  68. </el-row>
  69. <!-- 上传器 -->
  70. <el-dialog title="文件重新上传" :visible.sync="dialogVisible2" destroy-on-close width="15%" top="6vh" height="90%">
  71. <el-upload class="upload-demo" ref="upload2" action="" :http-request="beforeUpload2" :loading="uploadloading"
  72. :auto-upload="true">
  73. <el-button slot="trigger" size="small" type="primary" :loading="loading" icon="el-icon-plus">选取文件
  74. </el-button>
  75. </el-upload>
  76. </el-dialog>
  77. <el-dialog title="文件上传" :visible.sync="dialogVisible1" destroy-on-close width="15%" top="6vh" height="90%">
  78. <el-upload class="upload-demo" ref="upload1" action="" :http-request="beforeUpload" :loading="loading"
  79. :auto-upload="true">
  80. <el-button slot="trigger" size="small" type="primary" :loading="loading" icon="el-icon-plus">选取文件
  81. </el-button>
  82. </el-upload>
  83. </el-dialog>
  84. </div>
  85. </template>
  86. <script>
  87. import moment from "moment";
  88. import { Message } from "element-ui";
  89. import G6 from "@antv/g6";
  90. import insertCss from "insert-css";
  91. const { Util, TreeGraph, registerNode, Menu, Tooltip, Minimap } = G6;
  92. let graph = {};
  93. //节点类型颜色
  94. const nodeType2Color = {
  95. 0: "#BBDAFB",
  96. 100: "#FFFFCC",
  97. 200: "#FBD4D4",
  98. 300: "#BCF2DA",
  99. 400: "#CCFF99",
  100. 500: "#FBD4D4",
  101. 600: "#BBDAFB",
  102. };
  103. //根据节点状态颜色
  104. const itemStatusColor = {
  105. 0: "#5B8FF9",
  106. 100: "#EEBC20",
  107. 200: "#5BD8A6",
  108. 300: "#F46649",
  109. };
  110. export default {
  111. name: "root",
  112. data() {
  113. return {
  114. canvasWidth: 0, // 画布宽度
  115. canvasHeight: 0 ,// 画布高度
  116. singleTableHeight: '720px',
  117. previewUrl: '',
  118. activeMenu: '',
  119. nodeid: '',
  120. NodeData: {
  121. },
  122. selectFileType: "",
  123. uploadData: [],
  124. uploadIf: true,
  125. tableHeight: 500,
  126. uploadStop: false,
  127. dialogVisible: false,
  128. dialogVisible1: false,
  129. dialogVisible2: false,
  130. loading: false,
  131. loading2: false,
  132. uploadloading : false,
  133. tableLoading: false,
  134. chart: {
  135. height: '1024px',
  136. show: false,
  137. fileData: {
  138. fileName: '',
  139. fileUrl: ''
  140. },
  141. option: {
  142. tooltip: {
  143. trigger: 'item',
  144. triggerOn: 'mousemove'
  145. },
  146. toolbox: {
  147. feature: {
  148. saveAsImage: {}
  149. }
  150. },
  151. series: [{
  152. type: 'tree',
  153. data: [],
  154. top: '2%',
  155. left: '25%',
  156. bottom: '1%',
  157. right: '20%',
  158. symbolSize: 8,
  159. nodePadding: 50,
  160. label: {
  161. position: 'left',
  162. verticalAlign: 'bottom',
  163. align: 'right',
  164. fontSize: 15
  165. },
  166. leaves: {
  167. label: {
  168. position: 'right',
  169. verticalAlign: 'middle',
  170. align: 'left'
  171. }
  172. },
  173. emphasis: {
  174. focus: 'descendant'
  175. },
  176. initialTreeDepth: 2,
  177. expandAndCollapse: true,
  178. animationDuration: 550,
  179. animationDurationUpdate: 750,
  180. roam: true
  181. }]
  182. }
  183. },
  184. initTinymce: {
  185. language: "zh_CN", //语言
  186. height: 300, //编辑器高度
  187. branding: false, //是否禁用“Powered by TinyMCE”
  188. menubar: false, //顶部菜单栏显示
  189. },
  190. renameDialogVisible: false,
  191. delDialogVisible: false,
  192. dataInfoDrawerVisible: false,
  193. dataInfoForm: {
  194. id: "",
  195. name: "",
  196. itemtype: "",
  197. itemstatus: "",
  198. content: "",
  199. createtime: "",
  200. tlevel: "",
  201. parentid: "",
  202. filename: ""
  203. },
  204. file: {
  205. id: "",
  206. filename: ""
  207. },
  208. itemStatusList: {
  209. 100: "无文件",
  210. 200: "有文件",
  211. },
  212. dataList: [],
  213. itemTypeList: {
  214. 100: "项目准备工作相关",
  215. 200: "项目程序制作",
  216. 300: "项目测试相关"
  217. },
  218. dataInfo: [],
  219. selectLabelList: [],
  220. findLabeltimeout: false,
  221. lastSelectedNodeArr: [], // 上次选中节点
  222. itemNode: {}, // 右键菜单项 点击时的节点
  223. inputLabel: {
  224. name: "",
  225. },
  226. treeData: [],
  227. listData: [],
  228. searchParam: {
  229. searchLabel: "",
  230. searchItemStatus: "",
  231. itemtype: "",
  232. radioItemStatus: "",
  233. },
  234. };
  235. },
  236. created() {
  237. // this.treeData3();
  238. this.getGxNameData();
  239. },
  240. mounted() {
  241. },
  242. methods: {
  243. treeData3() {
  244. //获取tree数据
  245. // this.treeData = require('../securitys/treeData2.json');
  246. let that = this;
  247. console.log('treeData:', that.treeData)
  248. // 根据tree获取平级数组../
  249. const treeData = JSON.parse(JSON.stringify(this.treeData));
  250. this.listData = this.treeToList(treeData);
  251. // select数据
  252. this.listData.forEach((item) => {
  253. this.selectLabelList.push({
  254. value: item.name,
  255. name: item.name,
  256. id: item.id,
  257. levle: item.tlevel
  258. });
  259. });
  260. let tNow = moment();
  261. this.$nextTick(() => {
  262. this.treeInit();
  263. });
  264. },
  265. treeInit() {
  266. const that = this;
  267. that.styleCss(); // 样式函数
  268. // 创建G6右键菜单
  269. const menu = new Menu({
  270. itemTypes: ["node"],
  271. getContent(evt) {
  272. const model = evt.item.getModel();
  273. let menuHtml = `
  274. <div class="contextmenu__item" id="addLabel">新建标签</div>
  275. <div class="contextmenu__item" id="editLabel">重命名</div>
  276. <div class="contextmenu__item" id="delLabel">删除</div>
  277. <div class="contextmenu__item" id="beforeUpload">上传文件</div>
  278. <div class="contextmenu__item" id="beforeUpload2">修改上传文件</div>`;
  279. return menuHtml;
  280. },
  281. handleMenuClick(target, item) {
  282. if (target.id == "addLabel") {
  283. // 新建
  284. that.itemNode = item;
  285. Object.keys(that.dataInfoForm).forEach((key) => {
  286. that.dataInfoForm[key] = "";
  287. });
  288. that.dataInfoDrawerVisible = true;
  289. } else if (target.id == "editLabel") {
  290. // 重命名
  291. that.itemNode = item;
  292. that.renameDialog();
  293. } else if (target.id == "beforeUpload") {
  294. // 上传文件
  295. that.itemNode = item;
  296. console.log('fileitemNode', that.itemNode)
  297. that.dialogVisible1 = true;
  298. } else if (target.id == "beforeUpload2") {
  299. // 修改上传的文件
  300. that.itemNode = item;
  301. that.dialogVisible2 = true;
  302. } else if (target.id == "delLabel") {
  303. // 删除
  304. that.itemNode = item;
  305. that.delDialogVisible = true;
  306. } else if (target.id == "dataInfoLabel") {
  307. } else if (target.id == "detailLabel") {
  308. // 修改
  309. that.itemNode = item;
  310. that.dataInfoForm = that.itemNode.getModel();
  311. that.dataInfoForm.content = that.dataInfoForm.content.toString();
  312. that.dataInfoDrawerVisible = true;
  313. }
  314. },
  315. });
  316. //弹出层
  317. const tooltip = new Tooltip({
  318. getContent(e) {
  319. var tooltipHtml = "";
  320. const model = e.item.getModel();
  321. if (model.content && model.content.toString().length > 0) {
  322. tooltipHtml =
  323. `
  324. <div class="tooltip-header" >` +
  325. model.createtime +
  326. `(` +
  327. model.itemStatusName +
  328. `)</div>
  329. <div class="tooltip-content" ><h3>` +
  330. model.name +
  331. `</h3>` +
  332. model.content +
  333. `</div> `;
  334. }
  335. return tooltipHtml;
  336. },
  337. shouldBegin(e) {
  338. //设置条件,没有内容不显示tooltip
  339. const model = e.item.getModel();
  340. return model.content ? true : false;
  341. },
  342. itemTypes: ["node"],
  343. offsetX: 1,
  344. offsetY: 0,
  345. fixToNode: false,
  346. offset: 10,
  347. });
  348. // 实例化 minimap 插件
  349. const minimap = new Minimap({
  350. container: document.querySelector(".minimap"),
  351. size: [200, 200],
  352. });
  353. // G6增加自定义节点信息;
  354. registerNode(
  355. "rNode",
  356. {
  357. drawShape: (cfg, group) => {
  358. const {
  359. id,
  360. name,
  361. itemtype,
  362. style,
  363. size,
  364. itemstatus,
  365. itemStatusName,
  366. createtime,
  367. tlevel,
  368. file_name,
  369. file_url
  370. } = cfg;
  371. const rect = group.addShape("rect", {
  372. attrs: {
  373. ...style,
  374. x: -size[0] / 2,
  375. y: -size[1] / 2,
  376. width: size[0],
  377. height: size[1],
  378. fill: nodeType2Color[itemtype],
  379. },
  380. name: "rect",
  381. });
  382. // text time
  383. group.addShape("text", {
  384. attrs: {
  385. text: that.searchParam.radioTime
  386. ? moment(createtime).format("YYYY-MM-DD")
  387. : "",
  388. x: -size[0] / 2,
  389. y: -size[1] / 2 - 15,
  390. opacity: 1,
  391. fill: "#999",
  392. textBaseline: "top",
  393. },
  394. name: "rect-shape-text1",
  395. });
  396. // text itemStatusName
  397. group.addShape("text", {
  398. attrs: {
  399. text: that.searchParam.radioItemStatus ? "(" + itemStatusName + ")" : "",
  400. x: size[0] / 2 - 70,
  401. y: size[1] / 2 - 46,
  402. opacity: 1,
  403. fill: itemStatusColor[itemstatus],
  404. textBaseline: "top",
  405. },
  406. name: "rect-shape-text2",
  407. });
  408. return rect;
  409. },
  410. update: (cfg, item) => {
  411. const { id, name, createtime, itemstatus, itemStatusName } = cfg;
  412. const group = item.getContainer();
  413. // 更新节点名
  414. const label = group.find((e) => e.get("name") === "text-shape");
  415. label.attr("text", this.formatLabel(name));
  416. // 更新时间
  417. const text1 = group.find((e) => e.get("name") === "rect-shape-text1");
  418. text1.attr(
  419. "text",
  420. that.searchParam.radioTime
  421. ? moment(createtime).format("YYYY-MM-DD")
  422. : ""
  423. );
  424. // 更新状态及样式
  425. const text2 = group.find((e) => e.get("name") === "rect-shape-text2");
  426. text2.attr({
  427. text: that.searchParam.radioItemStatus ? "(" + itemStatusName + ")" : "",
  428. fill: itemStatusColor[itemstatus],
  429. });
  430. },
  431. },
  432. "rect"
  433. );
  434. const treeDiv = document.querySelector("#treeDiv");
  435. graph = new TreeGraph({
  436. plugins: [menu, minimap, tooltip],
  437. container: "treeDiv",
  438. width: window.innerWidth - 100,
  439. height: window.innerHeight - 100,
  440. fitView: true,
  441. pixelRatio: 2,
  442. modes: {
  443. // 内置行为参考 https://antv-g6.gitee.io/zh/docs/manual/middle/states/defaultBehavior
  444. default: ["collapse-expand", "drag-canvas", "zoom-canvas", "drag-node"],
  445. },
  446. // 设置一些状态时节点变化
  447. nodeStateStyles: {
  448. mouseenter: {
  449. // 鼠标划入样式设置
  450. shadowColor: "#CCC",
  451. shadowBlur: 1,
  452. },
  453. clicked: {
  454. // 选中样式设置
  455. stroke: "#409EFF",
  456. lineWidth: 2,
  457. shadowColor: "#409EFF",
  458. shadowBlur: 10
  459. },
  460. },
  461. // 节点类型及样式
  462. defaultNode: {
  463. size: [100, 30],
  464. type: "rNode",
  465. style: {
  466. // 节点阴影颜色和宽度
  467. shadowColor: "#CCC",
  468. shadowBlur: 20,
  469. // 阴影偏移量
  470. shadowOffsetX: 5,
  471. shadowOffsetY: 5,
  472. // 边框颜色和宽度
  473. stroke: "",
  474. lineWidth: 0,
  475. },
  476. },
  477. // 连线类型及样式
  478. defaultEdge: {
  479. type: "polyline",
  480. style: {
  481. // 节点阴影颜色和宽度
  482. shadowColor: "#CCC",
  483. shadowBlur: 10,
  484. // 阴影偏移量
  485. shadowOffsetX: 5,
  486. shadowOffsetY: 5,
  487. // 颜色和宽度
  488. stroke: "#999",
  489. lineWidth: 2,
  490. },
  491. },
  492. //布局和绘图类型
  493. layout: {
  494. type: "mindmap",
  495. direction: "H",
  496. getHeight: function getHeight() {
  497. return 40;
  498. },
  499. getWidth: function getWidth() {
  500. return 150;
  501. },
  502. getVGap: function getVGap() {
  503. return 10;
  504. },
  505. getHGap: function getHGap() {
  506. return 80;
  507. },
  508. },
  509. });
  510. // 格式化tree数据
  511. Util.traverseTree(this.treeData, (item) => {
  512. if (item.tlevel >= 2) {
  513. item.collapsed = true;
  514. }
  515. Object.keys(that.itemStatusList).forEach(function (k) {
  516. if (k == item.itemstatus) {
  517. item.itemStatusName = that.itemStatusList[k];
  518. }
  519. });
  520. item.label = that.formatLabel(item.name);
  521. });
  522. graph.read(this.treeData);
  523. if (typeof window !== "undefined")
  524. window.onresize = () => {
  525. this.$nextTick(() => {
  526. if (!graph || graph.get("destroyed")) return;
  527. if (!treeDiv || !treeDiv.scrollWidth || !treeDiv.scrollHeight) return;
  528. graph.changeSize(treeDiv.scrollWidth, treeDiv.scrollHeight);
  529. graph.render();
  530. graph.fitView();
  531. });
  532. };
  533. graph.on("node:click", function (event) {
  534. const { item } = event;
  535. const nodeItem = event.item // 获取被点击的节点元素对象
  536. const nodeModel = item.getModel();
  537. if (nodeModel.tlevel >= 3 && nodeModel.file_url !== null) {
  538. let arg = {
  539. fileUrl: nodeModel.file_url,
  540. fileName: nodeModel.file_name
  541. }
  542. that.preview(arg);
  543. }
  544. that.findNodesByModels([nodeModel]);
  545. });
  546. // 鼠标点击画布,显示所有节点和边
  547. graph.on('canvas:click', function (event) {
  548. const nodes = graph.getNodes();
  549. const edges = graph.getEdges();
  550. nodes.forEach((node) => {
  551. node.show();
  552. });
  553. edges.forEach((edge) => {
  554. edge.show();
  555. });
  556. graph.paint();
  557. });
  558. // 鼠标移入节点 node:mouseenter
  559. graph.on("node:mouseenter", (evt) => {
  560. const { item } = evt;
  561. graph.setItemState(item, "mouseenter", true);
  562. // // 获得当前鼠标操作的目标节点
  563. // const node = item;
  564. // // 获得目标节点的所有相关边
  565. // const edges = node.getEdges();
  566. // // 将所有相关边的 running 状态置为 true,此时将会触发自定义节点的 setState 函数
  567. // edges.forEach((edge) => graph.setItemState(edge, "running", true));
  568. });
  569. // 鼠标移出节点 node:mouseleave
  570. graph.on("node:mouseleave", (evt) => {
  571. const { item } = evt;
  572. graph.setItemState(item, "mouseenter", false);
  573. // // 获得当前鼠标操作的目标节点
  574. // const node = item;
  575. // // 获得目标节点的所有相关边
  576. // const edges = node.getEdges();
  577. // // 将所有相关边的 running 状态置为 false,此时将会触发自定义节点的 setState 函数
  578. // edges.forEach((edge) => graph.setItemState(edge, "running", false));
  579. });
  580. },
  581. // 获取节点结构数据
  582. getGxNameData() {
  583. let that = this
  584. let url = 'pass/ems/v1/emssecuernodes/findAll';
  585. that.axios.post(url)
  586. .then(res => {
  587. if (res.code === '0') {
  588. that.treeData = res.data[0];
  589. console.log('datajson', that.treeData[0])
  590. that.treeData3();
  591. } else {
  592. that.$message.error(res.message);
  593. }
  594. })
  595. },
  596. // 获取节点结构数据
  597. getGxNameData3() {
  598. let that = this
  599. let url = 'pass/ems/v1/emssecuernodes/findAll';
  600. that.axios.post(url)
  601. .then(res => {
  602. if (res.code === '0') {
  603. that.treeData = res.data[0];
  604. console.log('datajson', that.treeData[0])
  605. } else {
  606. that.$message.error(res.message);
  607. }
  608. })
  609. },
  610. getGxNameData2(id) {
  611. let that = this
  612. let url = `pass/ems/v1/emssecuernodes/${id}`;
  613. that.axios.get(url)
  614. .then(res => {
  615. if (res.code === '0') {
  616. that.nodeid = res.data.id;
  617. that.test();
  618. } else {
  619. that.$message.error(res.message);
  620. }
  621. })
  622. },
  623. //查询是否有文件信息
  624. getFileMeg(id) {
  625. let that = this
  626. let url = `pass/ems/v1/uploadfiles/${id}`;
  627. that.axios.get(url)
  628. .then(res => {
  629. if (res.code === '0') {
  630. if (res.fileName) {
  631. that.selectFileType = "1";
  632. }
  633. } else {
  634. that.$message.error(res.message);
  635. }
  636. })
  637. },
  638. //搜索相关
  639. getLabelList(queryString, cb) {
  640. var selectLabelList = this.selectLabelList;
  641. var results = queryString
  642. ? selectLabelList.filter(this.createStateFilter(queryString))
  643. : selectLabelList;
  644. clearTimeout(this.findLabeltimeout);
  645. this.findLabeltimeout = setTimeout(() => {
  646. cb(results);
  647. }, 100);
  648. },
  649. createStateFilter(queryString) {
  650. return (searchLabel) => {
  651. return searchLabel.value.toLowerCase().indexOf(queryString.toLowerCase()) != -1;
  652. };
  653. },
  654. handleSelect(item) {
  655. // 清空searchLabel
  656. this.searchParam.searchItemStatus = "";
  657. const node = graph.findById(item.id);
  658. graph.focusItem(node, true, {
  659. easing: "easeCubic",
  660. duration: 500,
  661. });
  662. graph.translate(0, -200);
  663. this.findNodesByModels([item]);
  664. },
  665. initTree(data) {
  666. // 文本超出隐藏 (字段, 最大长度, 字体大小)
  667. const fittingString = (str, maxWidth, fontSize) => {
  668. const ellipsis = '...';
  669. const ellipsisLength = G6.Util.getTextSize(ellipsis, fontSize)[0];
  670. let currentWidth = 0;
  671. let res = str;
  672. const pattern = new RegExp('[\u4E00-\u9FA5]+'); // distinguish the Chinese charactors and letters
  673. str.split('').forEach((letter, i) => {
  674. if (currentWidth > maxWidth - ellipsisLength) return;
  675. if (pattern.test(letter)) {
  676. // Chinese charactors
  677. currentWidth += fontSize;
  678. } else {
  679. // get the width of single letter according to the fontSize
  680. currentWidth += G6.Util.getLetterWidth(letter, fontSize);
  681. }
  682. if (currentWidth > maxWidth - ellipsisLength) {
  683. res = `${str.substr(0, i)}${ellipsis}`;
  684. }
  685. });
  686. return res;
  687. };
  688. },
  689. findNodesByModels(arr) {
  690. // 查询是否有被选中节点,并清除样式
  691. if (this.lastSelectedNodeArr) {
  692. this.lastSelectedNodeArr.map((val) => {
  693. graph.setItemState(val.id, "clicked", false);
  694. });
  695. this.lastSelectedNodeArr = [];
  696. }
  697. // arr为空,就不走下面选中逻辑了
  698. if (arr) {
  699. arr.map((item) => {
  700. let findobj = graph.findById(item.id);
  701. if (findobj) {
  702. // 保存选中节点
  703. this.lastSelectedNodeArr.push(findobj.getModel());
  704. // 修改选中节点样式
  705. graph.setItemState(item.id, "clicked", true);
  706. }
  707. });
  708. }
  709. },
  710. // 重置条件
  711. searchResetFn() {
  712. Object.keys(this.searchParam).forEach((key) => {
  713. this.searchParam[key] = "";
  714. });
  715. this.findNodesByModels();
  716. },
  717. searchFn() {
  718. // 清空searchLabel
  719. this.searchParam.searchLabel = "";
  720. console.log('searchParam', this.searchParam)
  721. //搜索状态fn
  722. let searchNodes = [];
  723. let searchNodeModels = [];
  724. //获取选中状态的所有节点
  725. searchNodes = graph.findAll("node", (node) => {
  726. return node.get("model").itemstatus == this.searchParam.searchItemStatus;
  727. });
  728. //获取选中状态的所有model
  729. searchNodes.forEach((item) => {
  730. searchNodeModels.push(item.get("model"));
  731. });
  732. this.findNodesByModels(searchNodeModels);
  733. },
  734. isShowTimeinfo() {
  735. graph.render();
  736. graph.fitView();
  737. },
  738. isShowItemStatus() {
  739. graph.render();
  740. graph.fitView();
  741. },
  742. renameDialog() {
  743. this.inputLabel.name = this.itemNode._cfg.model.name;
  744. this.renameDialogVisible = true;
  745. },
  746. dataInfoSubmit() {
  747. let that = this;
  748. if (this.dataInfoForm.name == "") {
  749. Message.error("请输入名称");
  750. return;
  751. }
  752. //add 新建子节点
  753. if (!this.dataInfoForm.id) {
  754. //this.dataInfoForm.id = `n-${Math.random()}`;
  755. this.dataInfoForm.label = this.formatLabel(this.dataInfoForm.name);
  756. this.dataInfoForm.itemtype = this.itemNode._cfg.model.itemtype;
  757. this.dataInfoForm.itemstatus = 0;
  758. this.dataInfoForm.tlevel = this.itemNode._cfg.model.tlevel + 1;
  759. this.dataInfoForm.parentid = this.itemNode._cfg.model.id;
  760. this.addGxNameData(this.dataInfoForm)
  761. const model = this.itemNode.getModel();
  762. if (!model.children) {
  763. model.children = [];
  764. }
  765. this.dataInfoForm.id = that.nodeid;
  766. console.log('that.nodeid', that.nodeid)
  767. model.children.push(this.dataInfoForm);
  768. graph.updateChild(model, model.id);
  769. } else {
  770. //修改节点
  771. const model = this.itemNode.getModel();
  772. const originStyle = this.itemNode.get("originStyle");
  773. let updateModel = {
  774. ...model,
  775. ...this.dataInfoForm,
  776. itemstatus: 0,
  777. itemStatusName: "已保存",
  778. name: this.dataInfoForm.name,
  779. };
  780. const nodeItem = graph.findById(model.id);
  781. graph.updateItem(nodeItem, updateModel);
  782. }
  783. this.dataInfoDrawerVisible = false;
  784. Message.success("新建成功");
  785. },
  786. test() {
  787. //this.dataInfoForm.id = `n-${Math.random()}`;
  788. let that = this;
  789. this.dataInfoForm.label = this.formatLabel(this.dataInfoForm.name);
  790. this.dataInfoForm.itemtype = this.itemNode._cfg.model.itemtype;
  791. this.dataInfoForm.itemstatus = 0;
  792. this.dataInfoForm.tlevel = this.itemNode._cfg.model.tlevel + 1;
  793. this.dataInfoForm.parentid = this.itemNode._cfg.model.id;
  794. const model = this.itemNode.getModel();
  795. if (!model.children) {
  796. model.children = [];
  797. }
  798. this.dataInfoForm.id = that.nodeid;
  799. console.log('that.nodeid', that.nodeid)
  800. model.children.push(this.dataInfoForm);
  801. graph.updateChild(model, model.id);
  802. },
  803. renameSubmit() {
  804. const model = this.itemNode.getModel();
  805. const updateModel = {
  806. ...model,
  807. name: this.inputLabel.name,
  808. label: this.formatLabel(this.inputLabel.name),
  809. };
  810. const updateModel2 = {
  811. name: this.inputLabel.name,
  812. content : this.inputLabel.content
  813. };
  814. let id = model.id;
  815. this.updateNameData(id, updateModel2);
  816. console.log('renanme model', id)
  817. this.itemNode.update(updateModel);
  818. Message.success("修改成功");
  819. this.renameDialogVisible = false;
  820. },
  821. delSubmit() {
  822. this.delDialogVisible = false;
  823. const model = this.itemNode.getModel();
  824. if (model.depth != 0) {
  825. //根节点不能删除,这里写删除访问后台接口逻辑
  826. let id = model.id;
  827. this.getFileMeg(id);
  828. if (this.selectFileType === '1') {
  829. this.open1();
  830. }
  831. this.but_del_plural(id);
  832. graph.removeChild(model.id);
  833. //停止缩进动画,不加就像收起节点一样,视觉显示错误
  834. graph.stopAnimate();
  835. Message.success("删除成功");
  836. }
  837. },
  838. updateDatepicker(arr) {
  839. //时间更新
  840. this.dataInfoForm = {
  841. ...this.dataInfoForm,
  842. startTime: arr[0],
  843. endTime: arr[1],
  844. };
  845. },
  846. downloadImage() {
  847. graph.downloadFullImage('tree');
  848. },
  849. editDialogClose() {
  850. this.renameDialogVisible = false;
  851. },
  852. delDialogClose() {
  853. this.renameDialogVisible = false;
  854. },
  855. dataInfoClose() {
  856. this.dataInfoDrawerVisible = false;
  857. },
  858. //格式化label
  859. formatLabel(str) {
  860. return str.length > 20 ? str.substr(0, 20) + "..." : str;
  861. },
  862. // js实现文件下载而不直接打开
  863. saveAs(data, fileName) {
  864. this.loading = true;
  865. let urlObject = window.URL || window.webkitURL || window;
  866. // 将二进制流转为blob
  867. let exportBlob = new Blob([data]);
  868. if (typeof window.navigator.msSaveBlob !== 'undefined') {
  869. // 兼容IE,window.navigator.msSaveBlob:以本地方式保存文件
  870. window.navigator.msSaveBlob(exportBlob, decodeURI(fileName));
  871. this.loading = false;
  872. } else {
  873. // 创建新的URL并指向File对象或者Blob对象的地址
  874. let blobURL = urlObject.createObjectURL(exportBlob);
  875. let saveLink = document.createElement('a');
  876. // 兼容:某些浏览器不支持HTML5的download属性
  877. if (typeof saveLink.download === 'undefined') {
  878. saveLink.setAttribute('target', '_blank');
  879. } else {
  880. saveLink.download = fileName;
  881. }
  882. // 创建新的URL并指向File对象或者Blob对象的地址
  883. saveLink.href = blobURL;
  884. saveLink.click();
  885. // 释放blob URL地址
  886. urlObject.revokeObjectURL(exportBlob);
  887. this.loading = false;
  888. // let blob = new Blob([data])
  889. // let fileURL = urlObject.createObjectURL(blob);
  890. // 下载代码
  891. // let downEle = document.createElement('a')
  892. // let fname = `download` //下载文件的名字
  893. // downEle.href = fileURL
  894. // downEle.setAttribute('download', fname)
  895. // document.body.appendChild(downEle)
  896. // downEle.click()
  897. // window.open(fileURL);
  898. }
  899. },
  900. // 新增节点结构数据
  901. addGxNameData(arr1) {
  902. let that = this
  903. let url = 'pass/ems/v1/emssecuernodes/';
  904. that.axios.post(url, arr1)
  905. .then(res => {
  906. if (res.code === '0') {
  907. let id = res.data.id;
  908. that.getGxNameData2(id);
  909. } else {
  910. that.$message.error(res.message);
  911. }
  912. })
  913. },
  914. // 更改节点名称
  915. updateNameData(arr1, arr2) {
  916. let that = this
  917. let url = `pass/ems/v1/emssecuernodes/${arr1}`;
  918. that.axios.put(url, arr2)
  919. .then(res => {
  920. if (res.code === '0') {
  921. console.log('res', res)
  922. } else {
  923. that.$message.error(res.message);
  924. }
  925. })
  926. },
  927. // 更改文件信息
  928. updateNameData2(arr1, arr2) {
  929. let that = this
  930. let url = `pass/ems/v1/emssecuernodes/${arr1}`;
  931. that.axios.put(url, arr2)
  932. .then(res => {
  933. if (res.code === '0') {
  934. console.log('res', res)
  935. } else {
  936. that.$message.error(res.message);
  937. }
  938. })
  939. },
  940. //删除提示
  941. open1() {
  942. const h = this.$createElement;
  943. this.$notify({
  944. title: '删除警告',
  945. message: h('i', { style: 'color: teal' }, '该节点存在文件,请确认是否永久删除!!!')
  946. });
  947. },
  948. //上传文件
  949. beforeUpload(file) {
  950. let that = this;
  951. that.uploadloading = true;
  952. let foorData = new FormData();
  953. foorData.append('file', file.file);
  954. foorData.append('id', that.itemNode._cfg.id);
  955. foorData.append('name', that.itemNode._cfg.model.label);
  956. that.axios.post('pass/ems/v1/uploadfiles/file2', foorData, {
  957. headers: {
  958. 'Content-Type': 'multipart/form-data'
  959. }
  960. }).then(function (res) {
  961. if (res.code === '0') {
  962. that.$message({
  963. message: '上传成功',
  964. type: 'success'
  965. });
  966. let arr2 = {
  967. itemstatus : 200,
  968. itemtype: 200
  969. }
  970. that.updateNameData2(that.itemNode._cfg.id,arr2);
  971. that.uploadloading = false;
  972. that.$refs.upload1.clearFiles();
  973. location.reload();
  974. }
  975. else {
  976. that.$message.error(res.message);
  977. that.$refs.upload1.clearFiles();
  978. }
  979. that.tableLoading = false;
  980. that.uploadloading = false;
  981. })
  982. },
  983. //重新上传文件
  984. beforeUpload2(file) {
  985. let that = this;
  986. that.loading = true;
  987. let foorData = new FormData();
  988. foorData.append('file', file.file);
  989. foorData.append('id', that.itemNode._cfg.id);
  990. foorData.append('name', that.itemNode._cfg.model.label);
  991. that.del_fileName(that.itemNode._cfg.id);
  992. that.axios.post('pass/ems/v1/uploadfiles/file2', foorData, {
  993. headers: {
  994. 'Content-Type': 'multipart/form-data'
  995. }
  996. }).then(function (res) {
  997. if (res.code === '0') {
  998. that.$message({
  999. message: '修改成功',
  1000. type: 'success'
  1001. });
  1002. that.loading = false;
  1003. that.$refs.upload2.clearFiles();
  1004. location.reload()
  1005. }
  1006. else {
  1007. that.$message.error(res.message);
  1008. that.$refs.upload2.clearFiles();
  1009. }
  1010. that.tableLoading = false;
  1011. that.loading = false;
  1012. })
  1013. },
  1014. // 删除上传的文件
  1015. del_fileName(id) {
  1016. let that = this;
  1017. if (id) {
  1018. that.axios.delete('pass/ems/v1/uploadfiles/' + id)
  1019. .then(function (res) {
  1020. if (res.code === '0') {
  1021. that.$message({
  1022. message: '删除成功',
  1023. type: 'success'
  1024. });
  1025. } else {
  1026. if (res.code === '51') {
  1027. }
  1028. that.$message.error(res.message);
  1029. }
  1030. }).catch(function () {
  1031. });
  1032. }
  1033. },
  1034. // 删除节点
  1035. but_del_plural(val1) {
  1036. let that = this;
  1037. if (val1) {
  1038. that.axios.delete('pass/ems/v1/emssecuernodes/' + val1)
  1039. .then(function (res) {
  1040. if (res.code === '0') {
  1041. that.$message({
  1042. message: '删除成功',
  1043. type: 'success'
  1044. });
  1045. } else {
  1046. if (res.code === '51') {
  1047. }
  1048. that.$message.error(res.message);
  1049. }
  1050. }).catch(function () {
  1051. });
  1052. }
  1053. },
  1054. //预览文件
  1055. preview(data) {
  1056. let that = this;
  1057. that.loading = true;
  1058. that.chart.fileData = data;
  1059. let SubmitData = {
  1060. fileName: data.fileName,
  1061. fileUrl: data.fileUrl
  1062. };
  1063. let urla = 'pass/ems/v1/uploadfiles/getfile/';
  1064. let type = 'text/html';
  1065. let responseType = 'application/json';
  1066. if (data.fileName !== null) {
  1067. let fileExtension = data.fileName.substring(data.fileName.lastIndexOf('.') + 1);
  1068. if (fileExtension === 'pdf') {
  1069. urla = 'pass/ems/v1/uploadfiles/downloadFile/';
  1070. type = 'application/pdf';
  1071. responseType = 'blob';
  1072. }
  1073. that.axios.get(urla, {
  1074. params: SubmitData,
  1075. responseType: responseType
  1076. }).then(function (res) {
  1077. console.log('111');
  1078. let urlObject = window.URL || window.webkitURL || window;
  1079. // 将二进制流转为blob
  1080. let blob = new Blob([res], {
  1081. type: type
  1082. });
  1083. if (fileExtension !== 'pdf') {
  1084. blob = new Blob([res.data], {
  1085. type: type
  1086. });
  1087. }
  1088. // if (typeof window.navigator.msSaveBlob !== 'undefined') {
  1089. // // 兼容IE,window.navigator.msSaveBlob:以本地方式保存文件
  1090. // window.navigator.msSaveBlob(blob, decodeURI(fileName))
  1091. // } else {
  1092. // 创建新的URL并指向File对象或者Blob对象的地址
  1093. let blobURL = urlObject.createObjectURL(blob);
  1094. that.dialogVisible = true;
  1095. that.previewUrl = blobURL;
  1096. that.tableLoading = false;
  1097. that.loading = false;
  1098. // 'https://file.keking.cn/onlinePreview?url=' + encodeURIComponent(blobURL)
  1099. // http://view.officeapps.live.com/op/view.aspx?src' + blobURL;
  1100. // 创建a标签,用于跳转至下载链接
  1101. // let tempLink = document.createElement('a')
  1102. // tempLink.style.display = 'none'
  1103. // tempLink.href = blobURL;
  1104. // tempLink.setAttribute('download', decodeURI(fileName))
  1105. // 兼容:某些浏览器不支持HTML5的download属性
  1106. // if (typeof tempLink.download === 'undefined') {
  1107. // tempLink.setAttribute('target', '_blank')
  1108. // }
  1109. // // 挂载a标签
  1110. // document.body.appendChild(tempLink)
  1111. // tempLink.click()
  1112. // // 销毁a标签
  1113. // document.body.removeChild(tempLink)
  1114. // 释放blob URL地址
  1115. // urlObject.revokeObjectURL(blobURL);
  1116. setTimeout(() => {
  1117. urlObject.revokeObjectURL(blobURL);
  1118. }, 1000)
  1119. }).catch(function () {
  1120. //that.tableLoading = false;
  1121. that.$message.error('预览失败');
  1122. that.loading = true;
  1123. })
  1124. }
  1125. },
  1126. //下载文件
  1127. downloadFile(data) {
  1128. let that = this;
  1129. let SubmitData = {
  1130. fileName: data.fileName,
  1131. fileUrl: data.fileUrl
  1132. };
  1133. // 不带token访问方式,留底后端修改shiroconfig.java,application.properties
  1134. // let url = '/icore.icp.web/pass/ems/v1/uploadfiles/downloadFile/?fileName=' + that.tableFormDataObj[key].fileName + '&fileUrl=' + that.tableFormDataObj[key].fileUrl;
  1135. // const xhr = new XMLHttpRequest();
  1136. // xhr.open('GET', url, true);
  1137. // xhr.responseType = 'blob';
  1138. // xhr.onload = () => {
  1139. // if (xhr.status === 200) {
  1140. // var fileName = that.tableFormDataObj[key].fileName;
  1141. // // 获取文件blob数据并保存
  1142. // that.saveAs(xhr.response, fileName);
  1143. // }
  1144. // };
  1145. // xhr.send();
  1146. that.loading = true;
  1147. let urla = 'pass/ems/v1/uploadfiles/downloadFile/';
  1148. that.axios.get(urla, {
  1149. params: SubmitData,
  1150. responseType: 'blob'
  1151. }).then(function (res) {
  1152. that.saveAs(res, data.fileName);
  1153. that.$message({
  1154. message: '下载成功',
  1155. type: 'success'
  1156. });
  1157. that.loading = false;
  1158. }).catch(function () {
  1159. that.$message.error('下载失败');
  1160. that.loading = false;
  1161. })
  1162. },
  1163. /* tree转化平级数组 */
  1164. treeToList(tree) {
  1165. var queen = [];
  1166. var out = [];
  1167. queen = queen.concat(tree);
  1168. while (queen.length) {
  1169. var first = queen.shift();
  1170. if (first.children) {
  1171. queen = queen.concat(first.children);
  1172. delete first["children"];
  1173. }
  1174. out.push(first);
  1175. }
  1176. return out;
  1177. },
  1178. back() {
  1179. this.$router.go(-1);
  1180. },
  1181. // 浮框样式
  1182. styleCss() {
  1183. insertCss(`
  1184. .g6-component-tooltip {
  1185. max-width: 600px;
  1186. max-height: 500px;
  1187. overflow-y: auto;
  1188. position: absolute;
  1189. left: -150px;
  1190. z-index: 5;
  1191. border: 1px solid #e2e2e2;
  1192. border-radius: 4px;
  1193. font-size: 14px;
  1194. color: #545454;
  1195. background-color: rgba(255, 255, 255, 0.9);
  1196. padding: 10px 8px;
  1197. box-shadow: rgb(174, 174, 174) 0px 0px 10px;
  1198. text-align: justify;
  1199. text-justify: newspaper;
  1200. word-break: break-all;
  1201. }
  1202. .contextmenu__item {
  1203. display: block;
  1204. line-height: 34px;
  1205. text-align: center;
  1206. }
  1207. .contextmenu__item:not(:last-child) {
  1208. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  1209. }
  1210. .g6-component-contextmenu {
  1211. width: 150px;
  1212. }
  1213. .contextmenu__item:hover {
  1214. cursor: pointer;
  1215. background: #66b1ff;
  1216. border-color: #66b1ff;
  1217. color: #fff;
  1218. }
  1219. .tooltip-header{
  1220. padding:5px;
  1221. text-align: left;
  1222. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  1223. font-size: 14px;
  1224. }
  1225. .tooltip-content{
  1226. line-height:26px;
  1227. font-size: 14px;
  1228. padding:5px;
  1229. text-align: left;
  1230. }
  1231. `);
  1232. },
  1233. },
  1234. };
  1235. </script>
  1236. <style rel="stylesheet/scss" lang="scss" scoped>
  1237. .root {
  1238. width: 100%;
  1239. height: 100%;
  1240. left: 0;
  1241. top: 0;
  1242. right: 0;
  1243. bottom: 0;
  1244. position: absolute;
  1245. }
  1246. .minimap {
  1247. position: absolute;
  1248. top: 0;
  1249. left: 0;
  1250. z-index: 1;
  1251. border: 1px solid #994343;
  1252. background-color: #e0f0e9;
  1253. }
  1254. .container1 {
  1255. border: 1px solid #305d91;
  1256. height: 100%;
  1257. position: relative;
  1258. overflow: auto;
  1259. .top {
  1260. display: flex;
  1261. justify-content: space-between;
  1262. width: 100%;
  1263. height: 50px;
  1264. background-color: rgb(43, 104, 137);
  1265. padding: 0 20px;
  1266. display: flex;
  1267. align-items: center;
  1268. justify-content: space-between;
  1269. margin-bottom: 10px;
  1270. .cursor {
  1271. cursor: pointer;
  1272. font-size: 20px;
  1273. }
  1274. .el-button {
  1275. min-width: 70px;
  1276. }
  1277. }
  1278. .itemBox {
  1279. background-color: white;
  1280. padding: 15px;
  1281. font-size: 14px;
  1282. .form-item {
  1283. display: flex;
  1284. align-items: center;
  1285. justify-content: space-between;
  1286. ::v-deep {
  1287. .el-form-item {
  1288. padding-bottom: 10px !important;
  1289. }
  1290. }
  1291. }
  1292. span {
  1293. color: rgba(0, 0, 0, 0.65);
  1294. }
  1295. }
  1296. .dataInfoFootDiv {
  1297. text-align: center;
  1298. margin-bottom: 20px;
  1299. ::v-deep {
  1300. .el-button {
  1301. width: 100px;
  1302. margin-right: 30px;
  1303. }
  1304. }
  1305. }
  1306. .el-form-item {
  1307. margin-bottom: 10px;
  1308. }
  1309. .flex-box {
  1310. padding-bottom: 15px;
  1311. border-bottom: 1px solid rgba(151, 151, 151, 0.35);
  1312. .el-row {
  1313. display: flex;
  1314. align-items: center;
  1315. margin-bottom: 15px;
  1316. }
  1317. .el-col {
  1318. display: flex;
  1319. align-items: center;
  1320. }
  1321. .label {
  1322. margin-right: 5px;
  1323. }
  1324. .el-select,
  1325. .el-input,
  1326. .el-autocomplete,
  1327. .el-date-editor {
  1328. width: 80%;
  1329. }
  1330. }
  1331. .canvaBox {
  1332. height: 100%;
  1333. position: relative;
  1334. background: url(../../../../assets/img/img/filebg8.jpg) center bottom no-repeat;
  1335. background-size: 100% 100%;
  1336. }
  1337. .whr100 {
  1338. width: 100%;
  1339. height: 100%;
  1340. position: relative;
  1341. }
  1342. .mt10 {
  1343. margin-top: 10px;
  1344. }
  1345. }
  1346. ::v-deep {
  1347. .dataInfo-drawer-dialog {
  1348. :focus {
  1349. outline: 0;
  1350. }
  1351. .el-drawer__header {
  1352. border-bottom: 1px solid rgba(151, 151, 151, 0.35);
  1353. padding-bottom: 10px;
  1354. margin-bottom: 10px;
  1355. }
  1356. .el-drawer__body {
  1357. padding: 0 5px;
  1358. }
  1359. }
  1360. .el-progress-bar__outer,
  1361. .el-progress-bar__inner {
  1362. border-radius: 0;
  1363. }
  1364. .el-date-editor--daterange.el-input__inner {
  1365. width: 394px;
  1366. }
  1367. }
  1368. .uploader-example {
  1369. width: 880px;
  1370. padding: 15px;
  1371. margin: 40px auto 0;
  1372. font-size: 12px;
  1373. box-shadow: 0 0 10px rgba(0, 0, 0, .4);
  1374. }
  1375. .uploader-example .uploader-btn {
  1376. margin-right: 4px;
  1377. }
  1378. .uploader-example .uploader-list {
  1379. max-height: 440px;
  1380. overflow: auto;
  1381. overflow-x: hidden;
  1382. overflow-y: auto;
  1383. }
  1384. </style>