index.vue 30 KB

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