independent.vue 25 KB

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