independent.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. <template>
  2. <div style="height: 100%" class="flexStar">
  3. <div class="boxswai" style="width: 26%; padding-left: 0px">
  4. <div class="boxnei" style="display: flex; flex-direction: column">
  5. <h3>引用元素表</h3>
  6. <div style="overflow: auto; flex: 1">
  7. <el-tree
  8. style="display: inline-block;min-width: 100%;"
  9. ref="trees"
  10. :loading="loading"
  11. :load="loadNode"
  12. lazy
  13. :data="data"
  14. :props="defaultProps"
  15. @node-click="nodeClick"
  16. node-key="id"
  17. :expand-on-click-node="false"
  18. v-show="!allTreeShow"
  19. :default-expanded-keys="defaultExpandKey"
  20. :current-node-key="defaultCheckedKey"
  21. >
  22. <span
  23. class="custom-tree-node"
  24. slot-scope="{ data ,node }"
  25. style="box-sizing: border-box;padding-right:70px!important;;"
  26. >
  27. <div style="width:100%;">
  28. <span style="text-overflow: ellipsis;"> {{ data.title }} </span>
  29. <!-- 调整排序 -->
  30. <i
  31. class="el-icon-sort"
  32. @click="sortpai(data, node)"
  33. v-if="node.level == 2"
  34. title="调整排序"
  35. ></i>
  36. </div>
  37. </span>
  38. </el-tree>
  39. </div>
  40. </div>
  41. </div>
  42. <div
  43. class="boxswai"
  44. style="width: 74%; padding-left: 0px; padding-right: 0px"
  45. >
  46. <div class="boxnei">
  47. <div
  48. class="marleft10"
  49. style="height: 100%; display: flex; flex-direction: column"
  50. >
  51. <div class="martop20" v-if="true" style="flex: 1">
  52. <avue-crud
  53. :data="loadData"
  54. :option="loadOption"
  55. v-model="obj"
  56. ref="crud"
  57. @selection-change="selectionChange"
  58. :page.sync="page"
  59. :table-loading="tabloading"
  60. @on-load="onLoad"
  61. >
  62. <template slot="menuRight">
  63. <el-button
  64. type="primary"
  65. size="small"
  66. plain
  67. @click="quteEle"
  68. >引用元素表单库
  69. </el-button>
  70. <el-button
  71. size="small"
  72. type="danger"
  73. plain
  74. @click="handleDelete"
  75. >删除表单
  76. </el-button>
  77. </template>
  78. <template slot="menuLeft" slot-scope="{size}">
  79. <el-input placeholder="请输入你想搜索的表单名称" v-model="input3" :size="size" clearable @clear="clearinput">
  80. <i class="el-icon-search" slot="append" @click="searchChange"></i>
  81. </el-input>
  82. </template>
  83. <template slot-scope="{type,size,row}" slot="menu">
  84. <el-button :size="size" :type="type" :disabled="row.excelIds == -1" @click="Associationlist(row)">关联清表</el-button>
  85. <el-button :size="size" :type="type" @click="rightClick(row)">编辑元素</el-button>
  86. <el-button :size="size" :type="type" :disabled="row.excelIds == -1" @click="adjustExcel(row.id,row.primaryKeyId)">调整表单</el-button>
  87. <el-button :size="size" :type="type" @click="handleEditFormula(row)">编辑公式</el-button>
  88. </template>
  89. </avue-crud>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <Qute ref="Qute" :projectid="projectid" :wbsid="wbsid" :onLoad1="onLoad1" :refreshTree="refreshTree"> </Qute>
  95. <Relation ref="Relation" :GLExcelFrom="GLExcelFrom" :wbsid="wbsid" :onLoad1="onLoad1"></Relation>
  96. <!-- 编辑元素 -->
  97. <!-- 编辑元素 -->
  98. <el-dialog
  99. title=" "
  100. :visible.sync="editElementVisible"
  101. fullscreen
  102. append-to-body
  103. class="full-dialog"
  104. >
  105. <EditElement
  106. :pkeyId="editElementQuery.pkeyId"
  107. :id="editElementQuery.id"
  108. :initTableName="editElementQuery.initTableName"
  109. :pid="editElementQuery.pid"
  110. :wbsid="editElementQuery.wbsid"
  111. :nodeid="editElementQuery.nodeid"
  112. :initTableId="editElementQuery.initTableId"
  113. @hideDialog="editElementVisible = false"
  114. v-if="editElementVisible"
  115. ></EditElement>
  116. </el-dialog>
  117. <!-- 调整表单模板 -->
  118. <div v-if="excelHtml" class="excelHtml">
  119. <dynamicExcel
  120. @remove="removeExcel"
  121. v-if="excelHtml"
  122. :pkeyId="GLExcelFrom.id"
  123. />
  124. </div>
  125. <!-- 元素公式 -->
  126. <el-dialog
  127. title="元素公式"
  128. :visible.sync="editEleFormulaVisible"
  129. width="800px"
  130. append-to-body
  131. :close-on-click-modal="false"
  132. >
  133. <div class="flex mg-b-10">
  134. <el-input
  135. v-model="formulaInput"
  136. placeholder="请输入名称"
  137. size="samll"
  138. clearable
  139. @clear="searchFormulaName"
  140. ></el-input>
  141. <el-button type="info" class="mg-l-10" @click="searchFormulaName"
  142. >搜索</el-button
  143. >
  144. </div>
  145. <el-table
  146. :data="editEleListFilter"
  147. border
  148. style="width: 100%"
  149. height="400px"
  150. >
  151. <el-table-column align="center" prop="eName" label="字段信息">
  152. </el-table-column>
  153. <el-table-column align="center" label="操作" width="200">
  154. <template slot-scope="scope">
  155. <el-link
  156. :type="scope.row.globalFormula == 1 ? 'warning' : 'primary'"
  157. @click="toFormulaEdit(scope.row,1)"
  158. >全局公式</el-link
  159. >
  160. <el-link
  161. class="mg-l-10"
  162. :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
  163. @click="toFormulaEdit(scope.row,10)"
  164. >节点公式</el-link
  165. >
  166. <!-- <el-link
  167. class="mg-l-10"
  168. type="danger"
  169. @click="delEleRowHandle(scope.$index,editEleListFilter)"
  170. >删除</el-link> -->
  171. </template>
  172. </el-table-column>
  173. </el-table>
  174. </el-dialog>
  175. <!-- 公式 -->
  176. <el-dialog
  177. title="元素公式"
  178. :visible.sync="formulaCompVisible"
  179. fullscreen
  180. append-to-body
  181. class="full-dialog"
  182. >
  183. <FormulaEdit
  184. :wbsid="id"
  185. :nodeid="curTreeData.id"
  186. :eleid="formulaCurRow.id"
  187. :projectid="projectid"
  188. @hideDialog="formulaCompVisible = false"
  189. v-if="formulaCompVisible"
  190. ></FormulaEdit>
  191. </el-dialog>
  192. <!-- 排序弹框 -->
  193. <el-dialog
  194. title="调整排序"
  195. :visible.sync="sortTag"
  196. width="50%"
  197. append-to-body
  198. >
  199. <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
  200. <span slot="footer" class="dialog-footer">
  201. <el-button @click="(sortTag = false), (sortTag2 = false)"
  202. >取 消</el-button
  203. >
  204. <el-button type="primary" @click="editSort()">确 定</el-button>
  205. </span>
  206. </el-dialog>
  207. </div>
  208. </template>
  209. <script>
  210. import {tabTypeLazyTree,delAprojectTab} from "@/api/manager/wbsprivate";
  211. import {selectPrivateFormElements} from "@/api/manager/wbstree";
  212. import {getExcelHtml} from "@/api/exctab/excelmodel"
  213. import Qute from "./qutediaolog/qute1.vue";//引入元素库
  214. import Relation from './qutediaolog/relation.vue'//关联清表
  215. import EditElement from "@/views/manager/projectinfo/editElement/editElement.vue";//编辑元素
  216. import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
  217. import FormulaEdit from "@/views/formula/edit.vue";
  218. import ManualSorting from '@/components/WbsTree/ManualSorting'
  219. export default {
  220. components: { dynamicExcel, EditElement, Qute,Relation,FormulaEdit,ManualSorting },
  221. computed:{
  222. ids () {
  223. let ids = [];
  224. this.selectionList.forEach(ele => {
  225. ids.push(ele.primaryKeyId);
  226. });
  227. return ids.join(",");
  228. }
  229. },
  230. data() {
  231. return {
  232. input3:'',
  233. page:{
  234. current:1,
  235. size:10,
  236. total:0
  237. },
  238. search:{},
  239. loading:false,
  240. tabloading:false,
  241. dialogVisible: false,
  242. obj: {},
  243. data: [],
  244. defaultProps: {
  245. children: "children",
  246. isLeaf: function (data) {
  247. return !data.hasChildren;
  248. },
  249. },
  250. allTreeShow:false,//是否显示整棵树
  251. loadData: [],
  252. loadData1: [
  253. {
  254. tableName: "张三",
  255. formatTableType: "男",
  256. },
  257. ],
  258. loadData2: [
  259. {
  260. tableName: "李四2",
  261. formatTableType: "女",
  262. },
  263. ],
  264. loadOption: {
  265. height: "auto",
  266. calcHeight: 30,
  267. tip: false,
  268. searchShow: true,
  269. searchMenuSpan: 6,
  270. border: true,
  271. index: true,
  272. viewBtn: false,
  273. selection: true,
  274. editBtn: false,
  275. delBtn: false,
  276. addBtn: false,
  277. menu: true,
  278. menuWidth:300,
  279. searchShowBtn:true,
  280. dialogClickModal: false,
  281. column: [
  282. {
  283. label: "元素表名称",
  284. prop: "title",
  285. editDisplay: false,
  286. addDisplay: false,
  287. },
  288. {
  289. label: "元素表类型",
  290. prop: "tabType",
  291. // search: true,
  292. rules: [
  293. {
  294. required: true,
  295. message: "请输入名称",
  296. trigger: "blur",
  297. },
  298. ],
  299. },
  300. {
  301. label: "元素总量",
  302. prop: "elementTotal",
  303. editDisplay: false,
  304. addDisplay: false,
  305. rules: [
  306. {
  307. message: "请输入表数量",
  308. trigger: "blur",
  309. },
  310. ],
  311. },
  312. {
  313. label: "所书方",
  314. prop: "tabOwner",
  315. editDisplay: false,
  316. addDisplay: false,
  317. rules: [
  318. {
  319. message: "请输入表数量",
  320. trigger: "blur",
  321. },
  322. ],
  323. },
  324. {
  325. label: "填报率",
  326. prop: "fillRate",
  327. editDisplay: false,
  328. addDisplay: false,
  329. rules: [
  330. {
  331. message: "请输入表数量",
  332. trigger: "blur",
  333. },
  334. ],
  335. },
  336. ],
  337. },
  338. defaultExpandKey:[],//默认展开的节点
  339. defaultCheckedKey:'',
  340. selectionList:[],
  341. GLExcelFrom: {
  342. id: "",
  343. name: "",
  344. search: "", //搜素框舒服的值
  345. ids: "",
  346. excelId: "",
  347. initTableName: "",
  348. initTableId:'',
  349. },
  350. //编辑元素弹窗
  351. editElementVisible: false, //编辑元素弹框
  352. editElementQuery: {
  353. pkeyId: "",
  354. excelId: "",
  355. id: "",
  356. initTableName: "",
  357. pid: "",
  358. wbsid: "",
  359. nodeid: "",
  360. }, //
  361. excelHtml:false,//调整表单
  362. curEleTable: {},//编辑元素公式
  363. editEleFormulaVisible: false,//元素公式
  364. formulaInput: "",
  365. editEleListFilter: [],
  366. editEleListAll: [],
  367. formulaCurRow: {}, //当前元素
  368. formulaCompVisible:false,
  369. //#region公式
  370. id: "",
  371. curTreeData: {},
  372. projectid:'',
  373. treeId:"",
  374. curNode:{},
  375. sortTag: false,
  376. sortTag2: false,
  377. };
  378. },
  379. created() {
  380. // this.loadData = this.loadData1;
  381. this.projectid = this.$route.query.pid;
  382. this.wbsid=this.$route.query.wbsid;
  383. // this.treeLoad1()
  384. },
  385. methods: {
  386. async sortpai(data,node) {
  387. console.log(data,node);
  388. await this.findWbsTreePrivateSameLevel(node,data)
  389. this.sortTag = true;
  390. this.sortTag2 = true;
  391. },
  392. editSort() {
  393. this.wbsTreePrivateSort();
  394. },
  395. bianhua() {
  396. this.sortTag2 = false;
  397. this.$nextTick(() => {
  398. this.sortTag2 = true;
  399. });
  400. },
  401. async wbsTreePrivateSort() {
  402. //wbs私有树节点手动排序
  403. // const { data: res } = await wbsTreePrivateSort(this.sort);
  404. // console.log(res);
  405. // if (res.code == 200) {
  406. // this.sortTag = false;
  407. // this.sortTag2 = false;
  408. // this. treeLoad1();
  409. // }
  410. },
  411. async findWbsTreePrivateSameLevel(node,data) {
  412. const { data: res } =await tabTypeLazyTree({parentId:node.data.parentId,projectId:this.projectid,current:1,size:1000})
  413. if (res.code == 200) {
  414. console.log(res.data,'res1111111');
  415. let tabArr=res.data.records
  416. tabArr.forEach((item)=>{
  417. item.tableName=item.title
  418. })
  419. console.log(tabArr,'tabArr');
  420. this.sort =tabArr
  421. }
  422. },
  423. async treeLoad1 () {
  424. let id = 12345678910
  425. this.loading=true
  426. let das = await this.tabTypeLazyTree(id, this.projectid,this.page.current,this.page.size)
  427. console.log(this.projectid,'projectid');
  428. this.data=das.records
  429. this.loading=false
  430. // return resolve(das.records)
  431. },
  432. //#region 接口
  433. async tabTypeLazyTree (parentId, projectId,current,size,titleName) {//清表树
  434. console.log(parentId, projectId);
  435. this.loading=true;
  436. const { data: res } = await tabTypeLazyTree({ parentId, projectId,current,size,titleName })
  437. this.loading=false;
  438. if (res.code === 200) {
  439. return res.data;
  440. }
  441. },
  442. loadNode(node, resolve) {
  443. const parentId = (node.level === 0) ? 12345678910 : node.data.id;
  444. this.tabTypeLazyTree(parentId,this.projectid,this.page.current,this.page.size).then(res=>{
  445. resolve(res.records.map(item=>{
  446. return{
  447. ...item,
  448. leaf: !item.hasChildren
  449. }
  450. }))
  451. })
  452. },
  453. searchChange(){
  454. if(this.treeId){
  455. this.onLoad2()
  456. }else{
  457. this.$message.warning("请先选择左侧节点");
  458. }
  459. },
  460. clearinput(){
  461. this.searchChange()
  462. },
  463. onLoad2(){
  464. if(this.curTreeData.hasChildren){
  465. this.tabloading=true;
  466. this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
  467. console.log(res.records);
  468. this.loadData=res.records;
  469. this.page.total=res.total;
  470. this.tabloading=false;
  471. })
  472. }
  473. if(this.curTreeData.hasChildren===false&&this.curNode.level==2){
  474. this.tabloading=true;
  475. let arr=[]
  476. arr.push(this.curTreeData)
  477. this.loadData=arr
  478. this.page.total=1
  479. setTimeout(() => {
  480. this.tabloading=false
  481. }, 1000);
  482. }else{
  483. this.loadData=[]
  484. this.page.total=0
  485. }
  486. },
  487. onLoad1(){
  488. if(this.curNode.level===1&&this.curNode.data.hasChildren){
  489. this.tabloading=true;
  490. this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
  491. this.loadData=res.records
  492. this.page.total=res.total
  493. this.tabloading=false
  494. })
  495. }else{
  496. this.tabTypeLazyTree(this.curTreeData.parentId, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
  497. let faArr=res.records;
  498. this.loadData=faArr.filter((item)=>{
  499. if(item.id===this.treeId){
  500. return item
  501. }
  502. })
  503. })
  504. }
  505. },
  506. onLoad(page){
  507. if(this.treeId){
  508. this.tabloading=true
  509. this.tabTypeLazyTree(this.treeId,this.projectid, page.currentPage,page.pageSize,this.input3).then((res)=>{
  510. this.loadData=res.records
  511. this.page.total=res.total
  512. this.tabloading=false
  513. })
  514. }
  515. },
  516. nodeClick (data,node) {//外层树结构
  517. console.log(data,node,'treedata');
  518. this.curNode=node
  519. this.treeId=data.id
  520. this.curTreeData=data
  521. if(data.hasChildren){
  522. this.tabloading=true;
  523. this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
  524. console.log(res.records);
  525. this.loadData=res.records;
  526. this.page.total=res.total;
  527. this.tabloading=false;
  528. })
  529. }
  530. if(data.hasChildren===false&&node.level==2){
  531. this.tabloading=true;
  532. let arr=[]
  533. arr.push(data)
  534. this.loadData=arr
  535. this.page.total=1
  536. setTimeout(() => {
  537. this.tabloading=false
  538. }, 1000);
  539. }else{
  540. this.loadData=[]
  541. this.page.total=0
  542. }
  543. },
  544. handleClose(done) {
  545. this.$confirm("确认关闭?")
  546. .then((_) => {
  547. done();
  548. })
  549. .catch((_) => {});
  550. },
  551. //引用元素表单库
  552. quteEle(){
  553. this.$refs.Qute.show();
  554. },
  555. handleDelete () {
  556. if (this.selectionList.length === 0) {
  557. this.$message.warning("请选择至少一条数据");
  558. return;
  559. }
  560. this.$confirm("确定将选择数据删除?", {
  561. confirmButtonText: "确定",
  562. cancelButtonText: "取消",
  563. type: "warning"
  564. })
  565. .then(() => {
  566. return delAprojectTab(this.ids,this.projectid);
  567. })
  568. .then(() => {
  569. this.onLoad1()
  570. this.refreshTree()
  571. this.$message({
  572. type: "success",
  573. message: "操作成功!"
  574. });
  575. this.$refs.crud.toggleSelection();
  576. });
  577. },
  578. selectionChange (list) {
  579. this.selectionList = list;
  580. },
  581. selectionClear () {
  582. this.selectionList = [];
  583. this.$refs.crud.toggleSelection();
  584. },
  585. //关联清表
  586. Associationlist(row) {
  587. console.log('关联清表',row);
  588. this.$refs.Relation.show()
  589. // this.GLExcelFrom.name = row.title;
  590. this.GLExcelFrom.id = row.primaryKeyId;
  591. this.GLExcelFrom.excelId =row.excelIds;
  592. this.GLExcelFrom.ids = row.id;
  593. this.GLExcelFrom.initTableName =row.initTableName;
  594. this.GLExcelFrom.initTableId =row.initTableId;
  595. this.GLExcelFrom.nodeid =this.curTreeData.id
  596. },
  597. //#region 编辑元素
  598. async rightClick(row) {
  599. console.log(row,'编辑元素');
  600. await this.getExcelHtml2(row.primaryKeyId);
  601. // console.log('编辑元素');
  602. this.editElementQuery.pkeyId = row.primaryKeyId;
  603. this.editElementQuery.excelId = row.excelIds;
  604. this.editElementQuery.id = row.id;
  605. this.editElementQuery.initTableName =row. initTableName;
  606. this.editElementQuery.pid = this.$route.query.pid;
  607. this.editElementQuery.wbsid = this.$route.query.wbsid;
  608. this.editElementQuery.initTableId = row.initTableId;
  609. this.editElementQuery.nodeid = this.curTreeData.id;
  610. this.editElementVisible = true;
  611. },
  612. async getExcelHtml2(pkeyId) {
  613. const { data: res } = await getExcelHtml({ pkeyId });
  614. console.log(res);
  615. if (res.code === 200) {
  616. localStorage.setItem("editElement", res.data);
  617. }
  618. },
  619. //#region 调整表单
  620. adjustExcel(id,pkeyId) {
  621. this.excelHtml=true
  622. // console.log('调整表单');
  623. // //调整表单
  624. this.GLExcelFrom.id = pkeyId;
  625. this.getExcelHtml(pkeyId);
  626. },
  627. handleEditFormula(row) {
  628. console.log(row,'公式');
  629. this.curEleTable = row;
  630. selectPrivateFormElements(this.curEleTable.initTableId).then((res) => {
  631. // selectFormElements(this.curEleTable.id).then((res) => {
  632. this.editEleListFilter = res.data.data;
  633. this.editEleListAll = [].concat(this.editEleListFilter);
  634. });
  635. this.editEleFormulaVisible = true;
  636. },
  637. //搜索 筛选
  638. searchFormulaName() {
  639. this.editEleListFilter = this.editEleListAll.filter((ele) => {
  640. return ele.eName.indexOf(this.formulaInput) > -1;
  641. });
  642. },
  643. async getExcelHtml(pkeyId) {
  644. const { data: res } = await getExcelHtml({ pkeyId });
  645. console.log(res);
  646. if (res.code === 200) {
  647. localStorage.setItem("excelHtml", res.data);
  648. this.adjustmentExcel = res.data;
  649. this.excelHtml = true;
  650. }
  651. },
  652. removeExcel() {
  653. this.excelHtml = false;
  654. },
  655. //跳转到公式配置页面
  656. toFormulaEdit(row,type) {
  657. // this.$router.push({
  658. // path: '/formula/edit',
  659. // query: {
  660. // wbsid: this.id,
  661. // eleid: row.id,
  662. // nodeid:this.curTreeData.id,
  663. // projectid:this.projectid
  664. // }
  665. // });
  666. this.formulaCurRow = row;
  667. this.formulaCompVisible = true;
  668. this.formulaCurRow.globaltype = type;
  669. },
  670. //刷新左边树形数据
  671. refreshTree(){
  672. //刷新左边树形数据
  673. const parentId =12345678910
  674. tabTypeLazyTree({parentId,projectId:this.projectid,current:1,size:1000}).then(res => {
  675. this.data=res.data.data.records;
  676. this.$nextTick(()=>{
  677. if(this.curNode.level==2){
  678. this.defaultExpandKey.push(this.curNode.data.parentId)
  679. }else{
  680. this.defaultExpandKey.push(this.curNode.data.id)
  681. }
  682. })
  683. });
  684. }
  685. // getNodeDetail(data, node) {
  686. // let parentName = "";
  687. // if (node.parent.data) {
  688. // parentName = node.parent.data.title;
  689. // }
  690. // this.curTreeData = data;
  691. // this.curTreeNode = node;
  692. // this.curTreeData.parentName = parentName;
  693. // getDetail(data.id, this.id, this.projectid).then((res) => {
  694. // res.data.data.parentName = parentName;
  695. // this.tableData = [res.data.data];
  696. // this.nodeDetail = Object.assign({}, res.data.data);
  697. // });
  698. // this.updateNodeTable();
  699. // //获取节点展开路径
  700. // this.getExpandedKeys(node);
  701. // },
  702. },
  703. mounted() {
  704. // this.heightss = this.$refs.rulesss.clientHeight
  705. },
  706. };
  707. </script>
  708. <style scoped lang="scss">
  709. //调整表单样式
  710. .excelHtml {
  711. position: absolute;
  712. z-index: 999999;
  713. top: 50px;
  714. left: 0px;
  715. width: 100%;
  716. height: 100%;
  717. }
  718. .marleft10 {
  719. margin-left: 10px;
  720. }
  721. /deep/.el-tree-node__expand-icon {
  722. font-size: 16px;
  723. }
  724. .colorblue {
  725. color: rgb(0, 82, 217);
  726. }
  727. .treecontent /deep/.el-scrollbar {
  728. height: 100%;
  729. }
  730. .el-scrollbar {
  731. height: 100%;
  732. }
  733. .rightHeader {
  734. display: flex;
  735. justify-content: flex-start;
  736. align-items: top;
  737. font-size: 14px;
  738. background-color: #fff;
  739. .excelname {
  740. box-sizing: border-box;
  741. min-width: 200px;
  742. height: 28px;
  743. border: 1px solid rgb(220, 220, 220);
  744. padding: 0 10px;
  745. border-radius: 3px;
  746. display: flex;
  747. justify-content: space-between;
  748. align-items: center;
  749. }
  750. }
  751. .dialogModel {
  752. .dialogBox {
  753. .middle {
  754. display: flex;
  755. .left {
  756. border: 1px solid rgb(220, 220, 220);
  757. border-radius: 3px;
  758. height: 500px;
  759. width: 49%;
  760. .select {
  761. box-sizing: border-box;
  762. display: flex;
  763. justify-content: center;
  764. padding: 5px 0;
  765. border-bottom: 1px solid #e0e0e0;
  766. }
  767. .leftscroll {
  768. height: 450px;
  769. overflow-y: scroll;
  770. }
  771. }
  772. .right {
  773. height: auto;
  774. height: 60px;
  775. max-height: 500px;
  776. margin-left: 2%;
  777. // height: 500px;
  778. border-radius: 3px;
  779. td {
  780. box-sizing: border-box;
  781. padding: 5px 10px;
  782. height: 30px;
  783. line-height: 30px;
  784. }
  785. }
  786. }
  787. }
  788. .btbox {
  789. margin-top: 20px;
  790. display: flex;
  791. justify-content: center;
  792. }
  793. }
  794. .rightBox {
  795. flex: 1;
  796. }
  797. .boxswai {
  798. height: 100%;
  799. box-sizing: border-box;
  800. padding-bottom: 10px;
  801. }
  802. /deep/.avue-crud__left{
  803. width: 65%;
  804. }
  805. </style>