index.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. <template>
  2. <div class="container">
  3. <div class="main-box" :key="simpleSheetKey">
  4. <div class="inner-left">
  5. <div class="button-list">
  6. <el-button size="mini" type="" @click="addMenu('root')" :disabled="!authData" >
  7. 添加根目录</el-button
  8. >
  9. <el-button size="mini" type="" @click="addMenu('detail')" :disabled="!authData">
  10. 添加清单目录</el-button
  11. >
  12. <el-button size="medium" type="" @click="delMenu" :disabled="!authData"> 删除 </el-button>
  13. </div>
  14. <el-alert type="warning" :closable="false">
  15. <template slot="title">
  16. <span style="word-break: break-all">
  17. {{
  18. checkedNode && checkedNode.length > 0
  19. ? "当前选择节点名称:" + checkedNode[0].name
  20. : "当前无选择节点"
  21. }}
  22. </span>
  23. </template>
  24. </el-alert>
  25. <div style="margin: 10px 0">
  26. <el-input
  27. size="medium"
  28. placeholder="请输入内容"
  29. v-model="filterText"
  30. class="input-with-select"
  31. clearable
  32. @change="
  33. () => {
  34. if (!filterText) {
  35. searchMenu();
  36. }
  37. }
  38. "
  39. >
  40. <el-button
  41. slot="append"
  42. @click="searchMenu"
  43. icon="el-icon-search"
  44. ></el-button>
  45. </el-input>
  46. </div>
  47. <div
  48. style="
  49. height: calc(100% - 182px);
  50. overflow-y: auto;
  51. margin-top: 20px;
  52. "
  53. >
  54. <el-tree
  55. ref="catalogTree"
  56. :expand-on-click-node="true"
  57. :auto-expand-parent="true"
  58. :default-expand-all="true"
  59. :props="defaultProps"
  60. @node-click="nodeClick"
  61. :filter-node-method="filterNode"
  62. :data="menuList"
  63. node-key="id"
  64. >
  65. <span class="custom-tree-node" slot-scope="{ node }">
  66. <el-tooltip effect="light" :content="node.label" placement="right">
  67. <span class="item-tit">
  68. <span :style="
  69. node.data.parentCode===0
  70. ? 'font-size:14px;padding-left:5px'
  71. : 'font-size:12px;padding-left:5px'
  72. "
  73. >
  74. {{node.data.name}}
  75. </span>
  76. </span>
  77. </el-tooltip>
  78. </span>
  79. </el-tree>
  80. </div>
  81. </div>
  82. <div class="inner-right" v-if="addOnlineWordFlag">
  83. <simple-dialog
  84. v-if="fullscreen"
  85. :fullscreen="fullscreen"
  86. :visible="addOnlineWordFlag"
  87. width="1200px"
  88. >
  89. <simple-sheet ref="simpleSheet" :type="type"
  90. :fullscreen="fullscreen"
  91. @saveData="handleSaveData"
  92. @handleFullscreen="handleFullscreen"
  93. @save="handleSave"
  94. :workName="workName"
  95. :work-data="workData"
  96. :id="tmpId" :mkdirId="params.mkdirId" :isCreater="isCreater"/>
  97. </simple-dialog>
  98. <simple-sheet v-else :type="type"
  99. :fullscreen="fullscreen"
  100. @saveData="handleSaveData"
  101. @handleFullscreen="handleFullscreen"
  102. :workName="workName"
  103. :work-data="workData"
  104. @save="handleSave"
  105. :id="tmpId" :mkdirId="params.mkdirId" :isCreater="isCreater"/>
  106. </div>
  107. <div class="inner-right" v-if="workListFlag">
  108. <div class="search">
  109. <span>{{ catalogueName }}</span>
  110. </div>
  111. <div style="margin-bottom: 10px;margin-top: 10px;">
  112. <el-button
  113. v-if="checkedNode && checkedNode.length === 2"
  114. type="primary"
  115. size="mini"
  116. @click="addFile('add',{delFlag:'1'})"
  117. style="width: 80px"
  118. >
  119. 新建
  120. </el-button>
  121. </div>
  122. <div class="tabBoxClass">
  123. <el-table
  124. height="calc(100% )"
  125. class="com-table"
  126. ref="multipleTable"
  127. :data="tableData"
  128. tooltip-effect="dark"
  129. :key="tableData.id"
  130. border
  131. size="small"
  132. style="width:100%"
  133. v-loading="loading"
  134. >
  135. <el-table-column
  136. prop="templateName"
  137. show-overflow-tooltip
  138. label="名称"
  139. min-width="25%"
  140. align="center"
  141. >
  142. </el-table-column>
  143. <el-table-column
  144. prop="createTime"
  145. show-overflow-tooltip
  146. label="创建时间"
  147. min-width="20%"
  148. align="center"
  149. />
  150. <el-table-column
  151. prop="createCity"
  152. show-overflow-tooltip
  153. label="创建科室"
  154. min-width="25%"
  155. align="center"
  156. >
  157. </el-table-column>
  158. <el-table-column
  159. prop="createBy"
  160. show-overflow-tooltip
  161. label="创建人"
  162. min-width="10%"
  163. align="center"
  164. >
  165. </el-table-column>
  166. <el-table-column
  167. prop="stateNm"
  168. show-overflow-tooltip
  169. label="状态"
  170. min-width="10%"
  171. align="center"
  172. >
  173. </el-table-column>
  174. <el-table-column label="操作" align="center" width="150">
  175. <template slot-scope="scope">
  176. <el-button
  177. :disabled="scope.row.editFlag=='1'?false:true"
  178. class="font-btn"
  179. size="mini"
  180. type="text"
  181. plain
  182. @click="addFile('edit',scope.row)"
  183. >编辑
  184. </el-button>
  185. <el-button
  186. class="font-btn"
  187. size="mini"
  188. type="text"
  189. plain
  190. @click="addFile('view',scope.row)"
  191. >查看
  192. </el-button>
  193. <el-button
  194. v-show="scope.row.delFlag=='1'?true:false"
  195. class="font-btn"
  196. size="mini"
  197. type="text"
  198. plain
  199. @click="deleteOne(scope.row)"
  200. >删除
  201. </el-button>
  202. </template>
  203. </el-table-column>
  204. </el-table>
  205. <el-pagination
  206. class="pageBox"
  207. @current-change="currchange"
  208. layout="total, prev, pager, next"
  209. background
  210. :total="total"
  211. >
  212. </el-pagination>
  213. </div>
  214. </div>
  215. </div>
  216. <el-dialog
  217. class="p-new-box"
  218. size="50%"
  219. title="新增目录"
  220. :append-to-body="true"
  221. :visible.sync="addDialogStatus"
  222. :close-on-click-modal="false"
  223. >
  224. <el-form
  225. :model="formData"
  226. :rules="rules"
  227. ref="ruleForm"
  228. label-width="100px"
  229. class="demo-ruleForm"
  230. style="width: 90%; margin: 30px auto"
  231. >
  232. <el-form-item label="目录名称:" prop="name">
  233. <el-input
  234. v-model="formData.name"
  235. placeholder="请输入目录名称"
  236. ></el-input>
  237. </el-form-item>
  238. <el-form-item
  239. label="父级目录:"
  240. prop="parentName"
  241. >
  242. <el-input
  243. disabled
  244. v-model="formData.parentName"
  245. placeholder="请输入父级名称"
  246. ></el-input>
  247. </el-form-item>
  248. <el-form-item label="操作人:" prop="createName">
  249. <el-input
  250. v-model="formData.createId"
  251. disabled
  252. ></el-input>
  253. </el-form-item>
  254. <div class="drawer-footer" style="text-align: right">
  255. <el-button
  256. type="primary"
  257. size="medium"
  258. @click="submitForm('ruleForm')"
  259. >确认</el-button
  260. >
  261. <el-button
  262. style="margin-right: 40px"
  263. size="medium"
  264. @click="resetForm('ruleForm')"
  265. >取消</el-button
  266. >
  267. </div>
  268. </el-form>
  269. </el-dialog>
  270. </div>
  271. </template>
  272. <script>
  273. import Vue from 'vue';
  274. import simpleSheet from "./sheet.vue";
  275. import simpleDialog from "./dialog.vue";
  276. export default {
  277. components: {
  278. simpleSheet,
  279. simpleDialog
  280. },
  281. data() {
  282. return {
  283. catalogueName:"部门工作清单",
  284. isCreater:"0",//1:创建者 0:非创建者
  285. addDialogStatus: false,
  286. tooltit: "部门工作清单",
  287. filterText: "", // tree搜索value
  288. menuList: [], // tree数据源
  289. checkedNode: [], // 选中节点信息
  290. authData: false, //是否有权限 false无全权限
  291. fullscreen: false,
  292. formData: {
  293. name: "",
  294. parentCode: "",
  295. parentName: "",
  296. createId: JSON.parse(sessionStorage.userInfo).loginNo,
  297. },
  298. defaultProps: {
  299. children: "children",
  300. label: "name",
  301. },
  302. rules: {
  303. name: [
  304. {
  305. required: true,
  306. message: "请输入目录名称",
  307. trigger: "change",
  308. },
  309. ],
  310. },
  311. tmpId:'',
  312. rowData:{},
  313. type:'add',
  314. workListFlag:true,
  315. addOnlineWordFlag:false,
  316. loading: false,
  317. tableData: [
  318. // {
  319. // templateName:"测试",
  320. // createTime:"2022-6-12",
  321. // createCity:"规划开发室",
  322. // createBy:"范岩",
  323. // state:"开",
  324. // delFlag:"1",//1:代表创建人有删除权限 0:不显示
  325. // editFlag:"0"//1:不置灰(状态state字段为开时);0:置灰(状态state字段为关时且不是创建人时)
  326. // }
  327. ], // 表格数据源
  328. infolist: {
  329. isFile: "1",
  330. title: "", // 材料名称
  331. meeting: "", // 会议名称
  332. titleBg: "", // 材料背景
  333. auth: "1", // 查看权限
  334. mkFileShareAttachList: [], // 附件数据
  335. parentId: "",
  336. }, // 提交表单数据源
  337. filerules: {
  338. title: [
  339. {
  340. required: true,
  341. message: "请输入材料名称",
  342. trigger: "change",
  343. },
  344. ],
  345. meeting: [
  346. {
  347. required: true,
  348. message: "请输入会议名称",
  349. trigger: "change",
  350. },
  351. ],
  352. titleBg: [
  353. {
  354. required: true,
  355. message: "请输入材料背景",
  356. trigger: "change",
  357. },
  358. ],
  359. },
  360. subType: "",
  361. total: 0,
  362. pageSize: 1,
  363. params: {
  364. id: "",
  365. mkdirId:"3"
  366. },
  367. paramsSearch: {
  368. isFile: "1",
  369. id: "",
  370. },
  371. fileInfo: {
  372. type: "bt1n",
  373. typename: "上传文件",
  374. limit: 5,
  375. url: "/market/cmkFileShareNet/upload",
  376. fileList: [],
  377. },
  378. titname: "新增",
  379. dialogStatus: false,
  380. attList: [],
  381. simpleSheetKey:0,
  382. workName:'',
  383. workData:null,
  384. };
  385. },
  386. methods: {
  387. handleSaveData(workName, workData){
  388. this.workName = workName;
  389. this.workData = workData;
  390. },
  391. handleFullscreen(fullscreen){
  392. if (fullscreen){
  393. Vue.set(this, 'fullscreen', fullscreen)
  394. /*this.$nextTick(()=>{
  395. this.$refs.simpleSheet.handleFullscreenOption()
  396. })*/
  397. }else {
  398. this.$nextTick(()=>{
  399. this.$refs.simpleSheet.handleFullscreenOption()
  400. Vue.set(this, 'fullscreen', fullscreen)
  401. })
  402. }
  403. },
  404. saveData(workName, workData){
  405. this.workName = workName;
  406. this.workData = workData;
  407. },
  408. // 搜索按钮事件
  409. searchMenu() {
  410. this.$refs.catalogTree.filter(this.filterText);
  411. },
  412. // 新增目录-表单提交
  413. async submitForm(formName) {
  414. let valid = await this.$refs[formName].validate().catch((err) => err);
  415. if (valid) {
  416. let nm = this.formData.name;
  417. if(""===nm.trim()){
  418. this.$message({
  419. type: "error",
  420. message: "新建失败!目录名称不能为空",
  421. });
  422. return;
  423. }
  424. this.$http({
  425. url:"/market/mkWorkListCatalogue/add",
  426. method: "post",
  427. headers: {
  428. "Content-Type": "application/json",
  429. },
  430. data: this.formData,
  431. }).then((res) => {
  432. if (res.data.result === 0) {
  433. this.$message({
  434. type: "success",
  435. message: res.data.desc,
  436. });
  437. this.getData();
  438. this.$refs[formName].resetFields();
  439. this.addDialogStatus = false;
  440. }else {
  441. this.$message({
  442. type: "error",
  443. message: res.data.desc,
  444. });
  445. }
  446. });
  447. }
  448. },
  449. // 取消新增目录
  450. resetForm(formName) {
  451. this.$refs[formName].resetFields();
  452. this.addDialogStatus = false;
  453. },
  454. // 新增目录
  455. addMenu(flag) {
  456. if (flag === 'detail'){
  457. if (!this.checkedNode || this.checkedNode.length !== 1){
  458. this.$message({
  459. type: "warning",
  460. message: "请先选择根目录",
  461. });
  462. return;
  463. }
  464. this.formData.parentCode = this.checkedNode[0].id
  465. this.formData.parentName = this.checkedNode[0].name
  466. }else if (flag === 'root'){
  467. this.formData.parentCode = 0;
  468. this.formData.parentName = ''
  469. }
  470. this.addDialogStatus = true
  471. },
  472. // 删除目录
  473. delMenu() {
  474. if (!this.checkedNode || this.checkedNode.length === 0) {
  475. this.$message("请先选中要删除的目录");
  476. } else {
  477. this.$confirm("即将删除此条数据, 是否删除?", "提示", {
  478. confirmButtonText: "确定",
  479. cancelButtonText: "取消",
  480. type: "warning",
  481. })
  482. .then(() => {
  483. this.$http({
  484. url: "/market/mkWorkListCatalogue/del",
  485. method: "post",
  486. headers: {
  487. "Content-Type": "application/json",
  488. },
  489. data: {
  490. id: this.checkedNode[0].id,
  491. parentCode: this.checkedNode[0].parentCode
  492. },
  493. }).then((res) => {
  494. if (res.data.result === 0) {
  495. this.$notify({
  496. title: "成功",
  497. message: res.data.desc,
  498. type: "success",
  499. });
  500. this.checkedNode = [];
  501. //删除成功后渲染右边目录和表格数据
  502. this.catalogueName="部门工作清单";
  503. this.params.mkdirId='-1';//确保查不到数据
  504. this.getList(this.params, this.pageSize);
  505. this.getData();
  506. }else if(res.data.result === 1) {
  507. this.$notify({
  508. title: "失败",
  509. message: res.data.desc,
  510. type: "error",
  511. });
  512. }
  513. });
  514. })
  515. .catch(() => {});
  516. }
  517. },
  518. // tree过滤方法
  519. filterNode(value, data) {
  520. if (!value) return true;
  521. return data.name.indexOf(value) !== -1;
  522. },
  523. // 点击树节点事件
  524. nodeClick(data, node) {
  525. this.formData.parentCode = data.parentCode;
  526. let clickNode = []
  527. this.getParent(node, clickNode)
  528. this.checkedNode = clickNode
  529. if (clickNode.length === 2){
  530. this.catalogueName = clickNode[1].name + '-' + clickNode[0].name
  531. this.params.mkdirId = clickNode[0].id + ''
  532. this.getList(this.params, this.pageSize);
  533. }else if(clickNode.length === 1){
  534. //父目录,则显示新建按钮只显示表头
  535. this.catalogueName =data.name
  536. this.params.mkdirId=data.id;
  537. this.getList(this.params, this.pageSize);
  538. }
  539. //返回列表页面
  540. this.addOnlineWordFlag=false;
  541. this.workListFlag=true;
  542. },
  543. getParent(node, list){
  544. if (node.level > 0){
  545. list.push(node.data)
  546. this.getParent(node.parent, list);
  547. }
  548. },
  549. // 获取目录
  550. getData() {
  551. this.$http({
  552. url: "/market/mkWorkListCatalogue/queryList",
  553. method: "post",
  554. headers: {
  555. "Content-Type": "application/json",
  556. },
  557. data: { isFile: "0" },
  558. }).then((res) => {
  559. if (res.data.result === 0) {
  560. this.menuList = res.data.body;
  561. }else {
  562. this.$message({
  563. message: res.data.desc,
  564. type: "error",
  565. });
  566. }
  567. });
  568. },
  569. // 获取权限
  570. getAuthData() {
  571. let menus = JSON.parse(window.sessionStorage.childrenMenus);
  572. for(let n=0;n<menus.length;n++){
  573. if (menus[n].jspUrl === "/workListCatalogueAuth") {
  574. this.authData = true
  575. }
  576. }
  577. },
  578. handleSave() {
  579. // switch (type) {
  580. // case "add":
  581. console.log("************")
  582. this.addOnlineWordFlag=false;
  583. this.workListFlag=true;
  584. // break;
  585. // case "edit":
  586. // this.handleVisible("edit");
  587. // break;
  588. // }
  589. //调用list列表接口根据目录ID
  590. // this.handleInit();
  591. this.getList(this.params, this.pageSize);
  592. },
  593. //搜索数据
  594. searchInfo(v) {
  595. this.paramsSearch = {};
  596. v[0] ? this.paramsSearch.title = v[0] : '';
  597. this.paramsSearch.isFile = "1";
  598. // this.paramsSearch.parentId = this.infolist.parentId;
  599. this.pageSize = 1;//重置分页
  600. this.getList(this.paramsSearch, this.pageSize);
  601. },
  602. // 新增在线文档
  603. addFile(type,data) {
  604. // this.titname = "新增";
  605. this.workName = ""
  606. this.workData = null
  607. this.workListFlag = false;
  608. this.addOnlineWordFlag = true;
  609. this.type=type;
  610. this.isCreater = data.delFlag;
  611. this.tmpId=data.id
  612. // switch (type) {
  613. // case "add":
  614. // break;
  615. // case "edit":
  616. //
  617. // this.rowData=data;
  618. // break;
  619. // case "view":
  620. // this.rowData=data;
  621. // break;
  622. // }
  623. },
  624. // 上传回调
  625. uploadBack(v) {
  626. this.attList = v;
  627. },
  628. deleteOne(val) {
  629. this.$confirm("即将删除此条数据, 是否删除?", "提示", {
  630. confirmButtonText: "确定",
  631. cancelButtonText: "取消",
  632. type: "warning",
  633. })
  634. .then(() => {
  635. this.pageSize = 1;
  636. this.$http({
  637. url: "/market/workLists/del",
  638. method: "post",
  639. headers: {
  640. "Content-Type": "application/json",
  641. },
  642. data: {
  643. id: val.id,
  644. },
  645. }).then((res) => {
  646. if (res.data.result == 0) {
  647. this.$message({
  648. message: "删除成功",
  649. type: "success",
  650. });
  651. this.getList(this.params, this.pageSize);
  652. }else if(res.data.result == 1) {
  653. this.$message({
  654. message: res.data.body,
  655. type: "error",
  656. });
  657. }
  658. });
  659. })
  660. .catch(() => {});
  661. },
  662. //功能栏
  663. iconCli(v) {
  664. if (v === 1) {
  665. this.getList(this.params, this.pageSize);
  666. }
  667. if (v === 2) {
  668. this.fullscreen = !this.fullscreen;
  669. }
  670. },
  671. // 分页
  672. currchange(v) {
  673. this.pageSize = v;
  674. this.getList(this.params, this.pageSize);
  675. },
  676. //获取列表
  677. getList(v, n) {
  678. this.pageSize = n;
  679. this.loading = true;
  680. this.tableData = [];
  681. this.$http({
  682. url: "/market/workLists/list",
  683. method: "post",
  684. headers: {
  685. "Content-Type": "application/json",
  686. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  687. },
  688. data: v,
  689. }).then((res) => {
  690. if(res.data.result==0){
  691. this.tableData=res.data.body.data
  692. this.tableData.forEach(item=>{
  693. item.stateNm=item.state=='1'?'开启':'关闭';
  694. });
  695. }else{
  696. this.$message({
  697. message: "获取失败",
  698. type: "error",
  699. });
  700. }
  701. this.total = res.data.body.totalRecord;
  702. this.loading = false;
  703. });
  704. },
  705. },
  706. mounted() {
  707. this.getData();
  708. this.getAuthData();
  709. },
  710. };
  711. </script>
  712. <style scoped lang="scss">
  713. .radviv div {
  714. width: 80% !important;
  715. }
  716. .pageBox {
  717. text-align: right;
  718. margin-top: 5px;
  719. }
  720. .info-line {
  721. width: 100%;
  722. display: block;
  723. // padding-left: 20px;
  724. div {
  725. width: 50%;
  726. display: inline-block;
  727. }
  728. span {
  729. width: 100px;
  730. display: inline-block;
  731. text-align: right;
  732. font-weight: bold;
  733. font-size: 14px;
  734. padding-right: 15px;
  735. i {
  736. color: red;
  737. display: inline-block;
  738. padding-right: 5px;
  739. }
  740. }
  741. .el-select,
  742. .el-input {
  743. width: calc(100% - 100px);
  744. }
  745. .tree {
  746. width: calc(100% - 100px);
  747. }
  748. }
  749. .online {
  750. width: 100%;
  751. .el-select {
  752. width: calc(100% - 100px);
  753. }
  754. span {
  755. vertical-align: top;
  756. }
  757. .el-textarea {
  758. width: calc(100% - 100px);
  759. }
  760. }
  761. </style>
  762. <style lang="scss" scoped>
  763. .titbox {
  764. div {
  765. float: right;
  766. i {
  767. font-size: 22px;
  768. margin-left: 20px;
  769. cursor: pointer;
  770. }
  771. }
  772. }
  773. .container {
  774. background-color: #f0f2f5;
  775. .clearStyle {
  776. cursor: pointer;
  777. color: #0b82ff;
  778. }
  779. .el-col {
  780. background-color: white;
  781. padding: 0 20px;
  782. }
  783. .container-box {
  784. padding: 0;
  785. margin-top: 0;
  786. height: 100%;
  787. background-color: white;
  788. padding: 20px;
  789. }
  790. .main-box {
  791. overflow: hidden;
  792. display: flex;
  793. background-color: white;
  794. padding: 20px 0;
  795. > div {
  796. background-color: white;
  797. }
  798. .inner-left {
  799. width: 320px;
  800. padding: 0 20px;
  801. border: 1px solid #ddd;
  802. border-radius: 5px;
  803. height: calc(100vh - 220px);
  804. .canel-style {
  805. color: #1890ff;
  806. cursor: pointer;
  807. padding-left: 10px;
  808. }
  809. }
  810. .inner-right {
  811. flex: 1;
  812. margin: 0 2%;
  813. //overflow-y: auto;
  814. // border-left: 1px solid #ddd;
  815. height: calc(100vh - 220px);
  816. width: calc(100% - 320px - 4%);
  817. .tabBoxClass {
  818. height: calc(100% - 120px);
  819. }
  820. }
  821. }
  822. }
  823. .button-list {
  824. padding: 30px 0 10px 0;
  825. display: flex;
  826. // justify-content: center;
  827. justify-content: space-between;
  828. }
  829. .choice-style {
  830. background: rgb(255, 255, 255);
  831. }
  832. .tree-action {
  833. bottom: 0;
  834. width: 100%;
  835. // border-top: 1px solid #e8e8e8;
  836. padding: 10px 16px;
  837. text-align: left;
  838. left: 0;
  839. background: #fff;
  840. border-radius: 0 0 2px 2px;
  841. }
  842. .tree-line {
  843. // .el-tree-node__content {
  844. // padding-left: 0 !important;
  845. // }
  846. .el-tree-node__expand-icon.is-leaf {
  847. display: none !important;
  848. }
  849. .el-tree-node {
  850. position: relative;
  851. padding-left: 16px; // 缩进量
  852. }
  853. .el-tree-node__children {
  854. padding-left: 16px; // 缩进量
  855. }
  856. // 竖线
  857. .el-tree-node::before {
  858. content: "";
  859. height: 100%;
  860. width: 1px;
  861. position: absolute;
  862. left: -3px;
  863. top: -17px;
  864. border-width: 1px;
  865. border-left: 1px dashed #52627c;
  866. }
  867. // 当前层最后一个节点的竖线高度固定
  868. .el-tree-node:last-child::before {
  869. height: 38px; // 可以自己调节到合适数值
  870. }
  871. // 横线
  872. .el-tree-node::after {
  873. content: "";
  874. width: 24px;
  875. height: 20px;
  876. position: absolute;
  877. left: -3px;
  878. top: 20px;
  879. border-width: 1px;
  880. border-top: 1px dashed #52627c;
  881. }
  882. // 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
  883. & > .el-tree-node::after {
  884. border-top: none;
  885. }
  886. & > .el-tree-node::before {
  887. border-left: none;
  888. }
  889. // 展开关闭的icon
  890. .el-tree-node__expand-icon {
  891. font-size: 16px;
  892. // 叶子节点(无子节点)
  893. &.is-leaf {
  894. color: transparent;
  895. // display: none; // 也可以去掉
  896. }
  897. }
  898. }
  899. .custom-tree-node {
  900. flex: 1;
  901. display: flex;
  902. align-items: center;
  903. justify-content: space-between;
  904. font-size: 14px;
  905. padding-right: 8px;
  906. // .item-tit{
  907. // color: #ffffff;
  908. // }
  909. }
  910. .el-tree ::v-deep .custom-tree-node,
  911. .el-tree ::v-deep .custom-tree-node .item-tit{
  912. overflow: hidden!important;
  913. text-overflow:ellipsis!important;
  914. white-space: nowrap!important;
  915. }
  916. </style>