excelmodel.vue 24 KB

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