excelmodel.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. <template>
  2. <div
  3. style="height:100%;"
  4. class="flexStar"
  5. >
  6. <div
  7. class="boxswai"
  8. style="width:26%;padding-left:0px;"
  9. >
  10. <div class="boxnei">
  11. <!-- 树结构 -->
  12. <el-tree
  13. style="width:100%;"
  14. ref="trees"
  15. :loading="loading"
  16. :load="treeLoad"
  17. lazy
  18. :data="data"
  19. :props="defaultProps"
  20. @node-click="nodeClick"
  21. node-key="id"
  22. :expand-on-click-node="false"
  23. >
  24. <span
  25. class="custom-tree-node"
  26. slot-scope="{ data ,node }"
  27. @mouseover.stop="mouseOver(data)"
  28. @mouseleave.stop="mouseLeave(data)"
  29. style="box-sizing: border-box;padding-right:70px!important;;"
  30. >
  31. <div style="width:100%;">
  32. <span style="text-overflow: ellipsis;"> {{ data.name }} </span>
  33. <!-- <span> {{ node}} </span> -->
  34. <!-- 添加 -->
  35. <span v-show="data.moreShow">
  36. <i
  37. class="el-icon-circle-plus-outline marleft10"
  38. @click.stop="addExcel(data)"
  39. v-if="data.fileType!=3"
  40. ></i>
  41. <!-- 编辑 -->
  42. <i
  43. class="el-icon-edit marleft10"
  44. @click.stop="editExcel(data)"
  45. v-if="data.fileType!=1"
  46. ></i>
  47. <!-- 删除 -->
  48. <i
  49. class="el-icon-delete marleft10"
  50. @click.stop="deleteExcelM(data,node)"
  51. ></i>
  52. </span>
  53. </div>
  54. </span>
  55. </el-tree>
  56. </div>
  57. </div>
  58. <div
  59. class="boxswai"
  60. style="width:74%;padding-left:0px;padding-right:0px;"
  61. >
  62. <div class="boxnei">
  63. <div
  64. class="marleft10"
  65. style="height:100%;"
  66. >
  67. <!-- 上传、删除、下载操作栏 -->
  68. <div
  69. class="rightHeader"
  70. v-show="from.checkd&&from.fileUrl"
  71. >
  72. <div class="excelname">
  73. <div>{{from.extension}}</div>
  74. <i
  75. class="el-icon-success marleft10"
  76. style="color: rgb(0, 168, 112);"
  77. ></i>
  78. </div>
  79. <el-upload
  80. class="marleft10"
  81. :auto-upload="false"
  82. :show-file-list="false"
  83. action="#"
  84. :limit="1"
  85. :file-list='fileList'
  86. accept=".xls,.xlsx"
  87. :on-change="uploadChange"
  88. >
  89. <el-button
  90. type="primary"
  91. size="mini"
  92. >重新上传</el-button>
  93. </el-upload>
  94. <el-link
  95. class="marleft10 colorblue"
  96. @click="delectExcelMS"
  97. >删除</el-link>
  98. <el-link
  99. underline
  100. class="marleft10 colorblue"
  101. style="text-decoration:underline;"
  102. @click="downloadExcel()"
  103. >下载EXCEL</el-link>
  104. </div>
  105. <div
  106. class="rightHeader"
  107. v-show="from.checkd&&!from.fileUrl"
  108. >
  109. <el-upload
  110. :auto-upload="false"
  111. :show-file-list="false"
  112. action="#"
  113. :limit="1"
  114. :file-list='fileList'
  115. accept=".xls,.xlsx"
  116. :on-change="uploadChange"
  117. >
  118. <el-button
  119. type="primary"
  120. size="mini"
  121. >上传 excel</el-button>
  122. </el-upload>
  123. </div>
  124. <el-empty
  125. style="height:80%;"
  126. v-show="!from.checkd"
  127. description="该目录为根目录没有EXCEL文件"
  128. ></el-empty>
  129. <div
  130. class="martop20"
  131. v-if="from.fileUrl"
  132. style="height:94%;"
  133. >
  134. <iframe
  135. :src="excelSrc"
  136. width="100%"
  137. height="100%"
  138. ></iframe>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <!-- 弹出框 -->
  144. <el-dialog
  145. :title="dialogTapType"
  146. class="dialogModel"
  147. :visible.sync="dialogTap"
  148. width="800px"
  149. modal-append-to-body
  150. append-to-body
  151. @close="handleClose"
  152. >
  153. <div class="dialogBox">
  154. <el-form
  155. ref="excelForm"
  156. :model="excelForm"
  157. label-width="80px"
  158. :rules="rules"
  159. >
  160. <div style="display: flex;justify-content: space-between;">
  161. <el-form-item
  162. label="清表名称"
  163. style="width: 370px;"
  164. size="small"
  165. prop="nodeName"
  166. >
  167. <el-input v-model="excelForm.nodeName"></el-input>
  168. </el-form-item>
  169. <el-form-item
  170. label="清表类型"
  171. style="width: 370px;"
  172. size="small"
  173. prop="tabType"
  174. >
  175. <el-select
  176. v-model="excelForm.tabType"
  177. style="width:100%;"
  178. placeholder="请选择清表类型"
  179. >
  180. <el-option
  181. v-for="(val,index) in exceltypeData"
  182. :key="index"
  183. :label="val.dictValue"
  184. :value="val.id"
  185. ></el-option>
  186. </el-select>
  187. </el-form-item>
  188. </div>
  189. </el-form>
  190. <div
  191. class="middle"
  192. v-if="wbsmiddle"
  193. >
  194. <div class="left">
  195. <div class="select">
  196. <el-select
  197. placeholder="请选择WBS模板"
  198. style="width: 96%;"
  199. size="small"
  200. @change="wbsmodelchange"
  201. v-model="excelForm.wbsId"
  202. >
  203. <el-option
  204. v-for="(val,index) in wbsmodel"
  205. :key="index"
  206. :label="val.wbsName"
  207. :value="val.id"
  208. ></el-option>
  209. </el-select>
  210. </div>
  211. <div class="leftscroll" v-loading="loading">
  212. <avue-tree
  213. :option="option2"
  214. :data="wbsdata"
  215. @node-click="nodeClickExcel"
  216. >
  217. <span
  218. class="el-tree-node__label"
  219. slot-scope="{ data }"
  220. >
  221. <div>
  222. <span> {{ data.deptName }} </span>
  223. </div>
  224. </span>
  225. </avue-tree>
  226. </div>
  227. </div>
  228. <!-- 右侧关联 -->
  229. <template>
  230. <el-table
  231. :data="tableData"
  232. border height="502px"
  233. style="width: 100%;margin-left:20px">
  234. <el-table-column
  235. prop="tableName"
  236. label="表名">
  237. </el-table-column>
  238. <el-table-column
  239. label="操作"
  240. align="center"
  241. width="120">
  242. <template slot-scope="scope">
  243. <el-button
  244. v-if="scope.row.isLinkTable!=2"
  245. type="info"
  246. size="small"
  247. @click="relation(scope.$index)"
  248. >关联</el-button>
  249. <el-button
  250. v-if="scope.row.isLinkTable==2"
  251. type="warning"
  252. size="small"
  253. @click="Disassociate(scope.$index)"
  254. >取消关联</el-button>
  255. </template>
  256. </el-table-column>
  257. </el-table>
  258. </template>
  259. </div>
  260. </div>
  261. <div class="btbox">
  262. <el-button
  263. size="mini"
  264. @click="handleClose()"
  265. >取消</el-button>
  266. <el-button
  267. type="info"
  268. style="margin-left: 50px;"
  269. size="mini"
  270. @click="saveExcel()"
  271. >确定</el-button>
  272. </div>
  273. </el-dialog>
  274. </div>
  275. </template>
  276. <script>
  277. import { detailExcel, excelType, tabLazytree, getWbsTypeList, wbstree, selectByNodeTable, Excelmodify, uploadExcel, deleteExcelshu, deleteExcel } from '@/api/exctab/excelmodel'
  278. export default {
  279. data () {
  280. return {
  281. treeNode: {},
  282. //#region 鼠标
  283. leftTRee: '',//左侧树ID
  284. threessW: 400,
  285. //#endregion
  286. heightss: '',//
  287. loading: false,//懒加载
  288. data: [],//清表模板
  289. defaultProps: {
  290. children: "children",
  291. isLeaf: function (data) {
  292. return !data.hasChildren || (data.isExistForm == 1);
  293. },
  294. },
  295. wbsdata: [],//wbs模板
  296. //#region 右侧数据
  297. from: {
  298. checkd: false,//判断是否可以进行上传、重新上传excel
  299. id: '',//清表树ID
  300. extension: '', //文件名称
  301. fileUrl: '',//文件路径
  302. },
  303. fileList: [],//选中的文件
  304. excelSrc: '',//
  305. //#endregion
  306. //#region 弹框
  307. dialogTapType: '',
  308. dialogTap: false,
  309. option2: {
  310. filter: false,
  311. lazy: true,
  312. menu: false,
  313. treeLoad: (async (node, resolve) => {
  314. if (node.data.hasChildren) {
  315. const { data: res } = await wbstree({ parentId: node.data.id, wbsId: this.excelForm.wbsId, wbsType: this.excelForm.wbsType })
  316. console.log(res);
  317. if (res.code === 200) {
  318. if (Array.isArray(res.data)) {
  319. res.data.forEach((val) => {
  320. if (!val.hasChildren) {
  321. val.leaf = true
  322. }
  323. })
  324. }
  325. return resolve(res.data)
  326. }
  327. } else {
  328. return resolve([])
  329. }
  330. }),
  331. },//弹框里面的wbs树
  332. excelForm: {
  333. nodeName: '',//清表名称
  334. tabType: '',//清表类型
  335. id: '',//清表Id,编辑时用
  336. parentId: '',//清表Id,添加时用
  337. wbsId: '',//WBS模板Id
  338. wbsType: '',//WBS模板类型
  339. },
  340. rules: {
  341. nodeName: [
  342. { required: true, message: '请输入清表名称', trigger: 'blur' },
  343. ],
  344. tabType: [
  345. { required: true, message: '请选择清表类型', trigger: 'blur' },
  346. ],
  347. },
  348. wbsform: {
  349. id: '',
  350. wbsType: '',
  351. wbsName: '',
  352. },//wbs树选中的值
  353. tableData: [],//右侧表数据
  354. wbsmiddle: false,//选择wbs模板那块是否有
  355. tableList: [],//进行处理的wbs关联表
  356. exceltypeData: [],//清表类型枚举
  357. wbsmodel: [],//wbs模板名称枚举
  358. //#endregion
  359. }
  360. },
  361. methods: {
  362. //#region 接口
  363. async tabLazytree (parentId, modeId) {//清表树
  364. const { data: res } = await tabLazytree({ parentId, modeId })
  365. console.log(res);
  366. if (res.code === 200) {
  367. return res.data
  368. }
  369. },
  370. async detailExcel (id) {//获取列表信息
  371. const { data: res } = await detailExcel({ id })
  372. console.log(res);
  373. if (res.code === 200) {
  374. this.from.id = res.data.id
  375. this.from.extension = res.data.extension //文件名称
  376. this.from.fileUrl = res.data.fileUrl //文件路径
  377. let routeUrl = res.data.fileUrl
  378. let pSrc = routeUrl + '?r=' + new Date()
  379. this.excelSrc = 'http://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(pSrc)
  380. }
  381. },
  382. async getWbsTypeList () {//清表编辑 wbs 下拉框选择
  383. const { data: res } = await getWbsTypeList({ wbstype: 2 })
  384. console.log(res);
  385. if (res.code === 200) {
  386. this.wbsmodel = res.data
  387. }
  388. },
  389. async excelType () {//清表类型
  390. const { data: res } = await excelType({ code: 'sys_excltab_type' })
  391. console.log(res);
  392. if (res.code === 200) {
  393. this.exceltypeData = res.data
  394. }
  395. },
  396. async wbstree () {//wbs树懒加载
  397. this.loading = true;
  398. const { data: res } = await wbstree({ parentId: 0, wbsId: this.excelForm.wbsId, wbsType: this.excelForm.wbsType })
  399. console.log(res);
  400. this.loading = false
  401. if (res.code === 200) {
  402. res.data.forEach((val) => {
  403. if (!val.hasChildren) {
  404. val.leaf = true
  405. }
  406. })
  407. this.wbsdata = res.data
  408. }
  409. },
  410. async selectByNodeTable (id, wbsType, projectid) {//wbs树获取表
  411. const { data: res } = await selectByNodeTable({ id, wbsType, projectid })
  412. console.log(res);
  413. if (res.code === 200) {
  414. console.log(Array.isArray(res.data));
  415. if (Array.isArray(res.data)) {
  416. this.tableData = res.data
  417. this.tableData.forEach(val => {
  418. val.changeTable = val.isLinkTable
  419. })
  420. } else {
  421. this.tableData = []
  422. }
  423. }
  424. },
  425. async deleteExcelshu (ids) {//删除清表
  426. // console.log(ids);
  427. const { data: res } = await deleteExcelshu(ids)
  428. console.log(res);
  429. if (res.code === 200) {
  430. this.$message({
  431. message: '删除清表树成功',
  432. type: 'success'
  433. });
  434. this.tabLazytree(0, this.$route.params.id)//获取清表树
  435. this.from = {
  436. checkd: false,//判断是否可以进行上传、重新上传excel
  437. id: '',//清表树ID
  438. extension: '', //文件名称
  439. fileUrl: '',//文件路径
  440. }
  441. }
  442. },
  443. async Excelmodify (wbsExclTabParmVO) {//编辑添加清表
  444. console.log(wbsExclTabParmVO, this.treeNode);
  445. const { data: res } = await Excelmodify(wbsExclTabParmVO)
  446. console.log(res);
  447. if (res.code === 200) {
  448. this.$message({
  449. type: 'success',
  450. message: '保存成功'
  451. })
  452. let ids = ''
  453. if (wbsExclTabParmVO.id) {
  454. ids = this.treeNode.parentId
  455. } else {
  456. ids = wbsExclTabParmVO.parentId
  457. }
  458. let das = await this.tabLazytree(ids, this.$route.params.id)//获取清表树
  459. if (wbsExclTabParmVO.id) {
  460. this.treeNode.name = wbsExclTabParmVO.nodeName
  461. } else {
  462. this.$refs.trees.updateKeyChildren(this.treeNode.id, das)
  463. }
  464. let node = this.$refs.trees.getNode(ids);
  465. node.isLeaf = false;
  466. node.isLeafByUser = false;
  467. this.dialogTap = false
  468. }
  469. },
  470. async uploadExcel (data) {//上传清表
  471. const { data: res } = await uploadExcel(data)
  472. console.log(res);
  473. if (res.code === 200) {
  474. this.$message({
  475. message: '上传文件成功',
  476. type: 'success'
  477. })
  478. this.detailExcel(this.from.id)
  479. this.from.checkd = true
  480. }
  481. this.fileList = []
  482. },
  483. async deleteExcel (data) {//删除excel表
  484. const { data: res } = await deleteExcel(data)
  485. if (res.code === 200) {
  486. this.$message({
  487. message: '删除excel表成功',
  488. type: 'success'
  489. })
  490. this.detailExcel(this.from.id)
  491. }
  492. },
  493. //#endregion
  494. //#region 右侧
  495. async uploadChange (file, fileList) {//选中表后触发
  496. console.log(file, fileList);
  497. this.fileList = [file.raw]
  498. let formData = new FormData()
  499. formData.append('file', ...this.fileList)
  500. formData.append('nodeId', this.from.id)
  501. const loading = this.$loading({
  502. lock: true,
  503. text: 'Loading',
  504. spinner: 'el-icon-loading',
  505. background: 'rgba(0, 0, 0, 0.7)'
  506. });
  507. try {
  508. await this.uploadExcel(formData)
  509. loading.close();
  510. } catch (error) {
  511. loading.close();
  512. }
  513. },
  514. delectExcelMS () {//删除excel表点击事件、
  515. let _that = this
  516. this.$confirm('确认删除该文件?', '', {
  517. confirmButtonText: '确定',
  518. cancelButtonText: '取消',
  519. type: 'warning'
  520. }).then(() => {
  521. _that.deleteExcel({ id: _that.from.id, fileUrl: '' })
  522. }).catch(() => {
  523. })
  524. },
  525. downloadExcel () {//下载excel表
  526. this.downFile(this.from.fileUrl,"123456.xlsx");
  527. // window.open(this.from.fileUrl,'namexxx')
  528. },
  529. //#endregion
  530. //#region 外层左侧事件
  531. mouseLeave (data) {
  532. if (data.moreShow) {
  533. this.$set(data, 'moreShow', false)
  534. }
  535. },
  536. mouseOver (data) {
  537. if (!data.moreShow) {
  538. this.$set(data, 'moreShow', true)
  539. }
  540. },
  541. async treeLoad (node, resolve) {
  542. let id = node.data.id
  543. if (node.level == 0) {
  544. id = 0
  545. }
  546. let das = await this.tabLazytree(id, this.$route.params.id)
  547. return resolve(das)
  548. },
  549. nodeClick (data) {//外层树结构
  550. if (data.hasChildren == false) {
  551. this.from.checkd = true
  552. } else if (data.fileType == 3) {
  553. this.from.checkd = true
  554. } else {
  555. this.from.checkd = false
  556. }
  557. if (this.from.checkd) {
  558. this.detailExcel(data.id)
  559. } else {
  560. this.from = {
  561. checkd: false,//判断是否可以进行上传、重新上传excel
  562. id: '',//清表树ID
  563. extension: '', //文件名称
  564. fileUrl: '',//文件路径
  565. }
  566. }
  567. },
  568. async editExcel (data) {//编辑
  569. this.dialogTapType = '编辑'
  570. if (data.fileType != 3 && data.hasChildren) {
  571. this.wbsmiddle = false
  572. } else {
  573. this.wbsmiddle = true
  574. this.getWbsTypeList()//wbs模板名称
  575. }
  576. const { data: res } = await detailExcel({ id: data.id })
  577. console.log(res);
  578. if (res.code === 200) {
  579. this.excelForm.id = res.data.id
  580. this.excelForm.nodeName = res.data.name //清表名称
  581. this.excelForm.tabType = res.data.tabType //清表类型
  582. this.treeNode = data
  583. this.dialogTap = true
  584. }
  585. },
  586. async addExcel (data) {//添加
  587. this.dialogTapType = '新增'
  588. console.log(data);
  589. if (data.fileType == 3) {
  590. this.wbsmiddle = false
  591. } else {
  592. this.wbsmiddle = true
  593. this.getWbsTypeList()//wbs模板名称
  594. }
  595. this.excelForm.parentId = data.id
  596. this.treeNode = data
  597. this.dialogTap = true
  598. },
  599. deleteExcelM (data, node) {//删除
  600. console.log(node);
  601. if(data.hasChildren){
  602. this.$message({
  603. type: 'warning',
  604. message: '该节点下有子节点,无法删除'
  605. })
  606. return;
  607. }
  608. const _that = this
  609. this.$confirm('确定将选择数据删除?', '', {
  610. confirmButtonText: '确定',
  611. cancelButtonText: '取消',
  612. type: 'error'
  613. }).then(async () => {
  614. await _that.deleteExcelshu(data.id)
  615. _that.$refs.trees.remove(node) //删除界面上的节点
  616. }).catch(() => {
  617. });
  618. },
  619. //#endregion
  620. //#region 弹框属性
  621. handleClose () {//关闭弹框触发事件
  622. this.excelForm = {
  623. nodeName: '',//清表名称
  624. tabType: '',//清表类型
  625. id: '',//清表Id,编辑时用
  626. parentId: '',//清表Id,添加时用
  627. wbsId: '',//WBS模板Id
  628. wbsType: '',//WBS模板类型
  629. }
  630. this.wbsform = {
  631. id: '',
  632. wbsType: '',
  633. wbsName: '',
  634. }//wbs树选中的值
  635. this.wbsdata = [] //wbs树数据
  636. this.tableData = []//弹框table数据
  637. this.tableList = []//关联取消关联的数据
  638. this.dialogTap = false
  639. },
  640. wbsmodelchange (val) {//wbs模板change事件
  641. if (val) {
  642. this.wbsmodel.forEach((da) => {
  643. if (da.id == val) {
  644. this.excelForm.wbsType = da.wbsType
  645. }
  646. })
  647. }
  648. window.setTimeout(() => {
  649. this.wbstree();
  650. }, 100)
  651. },
  652. nodeClickExcel (data) {//wbs树点击事件
  653. console.log(data);
  654. this.wbsform.id = data.id
  655. this.wbsform.wbsType = data.type
  656. this.wbsform.wbsName = data.deptName
  657. if (this.tableList == '') {
  658. this.selectByNodeTable(data.id, data.type, this.excelForm.wbsId)
  659. } else {
  660. let tag = true
  661. this.tableList.forEach((val) => {
  662. if (val.id == data.id) {
  663. this.tableData = val.arrs
  664. tag = false
  665. }
  666. })
  667. if (tag) {
  668. this.selectByNodeTable(data.id, data.type, this.excelForm.wbsId)
  669. }
  670. }
  671. },
  672. relation (key) {//关联
  673. this.tableData[key].isLinkTable = 2
  674. let tap = this.tableList.find((val) => {
  675. return val.id == this.wbsform.id
  676. })
  677. if (!tap) {
  678. this.tableList.push({
  679. id: this.wbsform.id,
  680. wbsType: this.wbsform.wbsType,
  681. wbsName: this.wbsform.wbsName,
  682. arrs: this.tableData
  683. })
  684. }
  685. },
  686. Disassociate (key) {//取消关联
  687. this.tableData[key].isLinkTable = 1
  688. const tap = this.tableList.find((val) => {
  689. return val.id == this.wbsform.id
  690. })
  691. if (!tap) {
  692. this.tableList.push({
  693. id: this.wbsform.id,
  694. wbsType: this.wbsform.wbsType,
  695. wbsName: this.wbsform.wbsName,
  696. arrs: this.tableData
  697. })
  698. }
  699. },
  700. saveExcel () {//保存按钮
  701. this.$refs.excelForm.validate(async (valid) => {
  702. if (valid) {
  703. let linkDataInfo = []
  704. if (this.tableList.length > 0) {
  705. this.tableList.forEach(val => {
  706. let linkIds = ''
  707. val.arrs.forEach(da => {
  708. if (da.isLinkTable != da.changeTable) {
  709. linkIds =`${linkIds}${linkIds != '' ? ',' : ''}${da.pkeyId}_${da.isLinkTable}`
  710. }
  711. })
  712. if (linkIds != '') {
  713. linkDataInfo.push({
  714. id: val.id,
  715. linkIds: linkIds,
  716. wbsName: val.wbsName,
  717. wbsType: val.wbsType
  718. })
  719. }
  720. })
  721. }
  722. if (this.excelForm.parentId && !this.excelForm.id) {
  723. await this.Excelmodify({
  724. nodeName: this.excelForm.nodeName,
  725. tabType: this.excelForm.tabType,
  726. parentId: this.excelForm.parentId,
  727. linkDataInfo: linkDataInfo
  728. })
  729. } else {
  730. await this.Excelmodify({
  731. nodeName: this.excelForm.nodeName,
  732. tabType: this.excelForm.tabType,
  733. id: this.excelForm.id,
  734. linkDataInfo: linkDataInfo
  735. })
  736. }
  737. this.dialogTap = false
  738. }
  739. });
  740. },
  741. //#endregion
  742. },
  743. created () {
  744. this.excelType()//清表类型
  745. },
  746. mounted () {
  747. // this.heightss = this.$refs.rulesss.clientHeight
  748. }
  749. }
  750. </script>
  751. <style scoped lang="scss">
  752. .marleft10 {
  753. margin-left: 10px;
  754. }
  755. /deep/.el-tree-node__expand-icon {
  756. font-size: 16px;
  757. }
  758. .colorblue {
  759. color: rgb(0, 82, 217);
  760. }
  761. .el-scrollbar {
  762. height: 100%;
  763. }
  764. .rightHeader {
  765. display: flex;
  766. justify-content: flex-start;
  767. align-items: top;
  768. font-size: 14px;
  769. background-color: #fff;
  770. .excelname {
  771. box-sizing: border-box;
  772. min-width: 200px;
  773. height: 28px;
  774. border: 1px solid rgb(220, 220, 220);
  775. padding: 0 10px;
  776. border-radius: 3px;
  777. display: flex;
  778. justify-content: space-between;
  779. align-items: center;
  780. }
  781. }
  782. .dialogModel {
  783. .dialogBox {
  784. .middle {
  785. display: flex;
  786. .left {
  787. border: 1px solid rgb(220, 220, 220);
  788. border-radius: 3px;
  789. height: 500px;
  790. width: 49%;
  791. .select {
  792. box-sizing: border-box;
  793. display: flex;
  794. justify-content: center;
  795. padding: 5px 0;
  796. border-bottom: 1px solid #e0e0e0;
  797. }
  798. .leftscroll {
  799. height: 450px;
  800. overflow-y: scroll;
  801. }
  802. }
  803. .right {
  804. height: auto;
  805. height: 60px;
  806. max-height: 500px;
  807. margin-left: 2%;
  808. // height: 500px;
  809. border-radius: 3px;
  810. td {
  811. box-sizing: border-box;
  812. padding: 5px 10px;
  813. height: 30px;
  814. line-height: 30px;
  815. }
  816. }
  817. }
  818. }
  819. .btbox {
  820. margin-top: 20px;
  821. display: flex;
  822. justify-content: center;
  823. }
  824. }
  825. .rightBox {
  826. flex: 1;
  827. }
  828. </style>