excelmodel.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363
  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. <div class="flex">
  6. <el-input size="small" placeholder="输入关键字搜索" clearable @clear="allTreeShow = false" v-model="filterText">
  7. </el-input>
  8. <el-button size="small" class="mg-l-10" @click="treeFilter">搜索</el-button>
  9. </div>
  10. <!-- 树结构 -->
  11. <div style="overflow: auto;flex:1" v-if="isShowTree">
  12. <el-tree style="display: inline-block;min-width: 100%;" ref="trees" :loading="loading" :load="treeLoad" lazy
  13. :data="data" :props="defaultProps" @node-click="nodeClick" node-key="id" :expand-on-click-node="false"
  14. v-show="!allTreeShow" :default-expanded-keys="expandedKeys" auto-expand-parent>
  15. <span class="custom-tree-node" slot-scope="{ data ,node }" @mouseover.stop="mouseOver(data)"
  16. @mouseleave.stop="mouseLeave(data)" style="box-sizing: border-box;padding-right:70px!important;;">
  17. <div style="width:100%;">
  18. <span style="text-overflow: ellipsis;"> {{ data.name }} </span>
  19. <!-- <span> {{ node}} </span> -->
  20. <!-- 添加 -->
  21. <span v-show="data.moreShow">
  22. <el-link :underline="false">
  23. <i class="el-icon-circle-plus-outline" @click.stop="addExcel(data)" v-if="data.fileType != 3"
  24. title="新增"></i>
  25. </el-link>
  26. <!-- 编辑 -->
  27. <el-link :underline="false">
  28. <i class="el-icon-edit marleft10 " @click.stop="editExcel(data)" v-if="data.fileType != 1"
  29. title="编辑"></i>
  30. </el-link>
  31. <el-link :underline="false">
  32. <i class="el-icon-sort marleft10" @click.stop="sortpai(data, node)" v-if="node.level != 1"
  33. title="调整排序"></i>
  34. </el-link>
  35. <el-link :underline="false">
  36. <i class="el-icon-upload marleft10" @click.stop="uploadMoudle(data, node)" v-if="data.fileType != 3"
  37. title="上传"></i>
  38. </el-link>
  39. <!-- 删除 -->
  40. <i class="el-icon-delete marleft10" @click.stop="deleteExcelM(data, node)" title="删除"></i>
  41. </span>
  42. </div>
  43. </span>
  44. </el-tree>
  45. <el-tree style="display: inline-block;min-width: 100%;" ref="treeall" v-loading="treeloading"
  46. :data="allTreeData" :props="defaultProps" @node-click="nodeClick" node-key="id" :expand-on-click-node="false"
  47. :filter-node-method="filterNode" v-show="allTreeShow">
  48. <span class="custom-tree-node" slot-scope="{ data ,node }" @mouseover.stop="mouseOver(data)"
  49. @mouseleave.stop="mouseLeave(data)" style="box-sizing: border-box;padding-right:70px!important;;">
  50. <div style="width:100%;">
  51. <span style="text-overflow: ellipsis;"> {{ data.name }} </span>
  52. <!-- <span> {{ node}} </span> -->
  53. <!-- 添加 -->
  54. <span v-show="data.moreShow">
  55. <i class="el-icon-circle-plus-outline marleft10" @click.stop="addExcel(data)"
  56. v-if="data.fileType != 3"></i>
  57. <!-- 编辑 -->
  58. <i class="el-icon-edit marleft10" @click.stop="editExcel(data)" v-if="data.fileType != 1"></i>
  59. <el-link :underline="false">
  60. <i class="el-icon-sort" @click.stop="sortpai(data, node)" v-if="node.level == 3" title="调整排序"></i>
  61. </el-link>
  62. <el-link :underline="false">
  63. <i class="el-icon-upload marleft10" @click.stop="uploadMoudle(data, node)" v-if="node.level != 1"
  64. title="上传"></i>
  65. </el-link>
  66. <!-- 删除 -->
  67. <i class="el-icon-delete marleft10" @click.stop="deleteExcelM(data, node)" title="删除"></i>
  68. </span>
  69. </div>
  70. </span>
  71. </el-tree>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="boxswai" style="width:74%;padding-left:0px;padding-right:0px;">
  76. <div class="boxnei">
  77. <div class="marleft10" style="height:100%;
  78. display: flex;flex-direction: column;">
  79. <!-- 上传、删除、下载操作栏 -->
  80. <div class="rightHeader" v-show="from.checkd">
  81. <template v-if="from.fileUrl">
  82. <div class="excelname">
  83. <div>{{ from.extension }}</div>
  84. <i class="el-icon-success marleft10" style="color: rgb(0, 168, 112);"></i>
  85. </div>
  86. <el-upload class="marleft10" :auto-upload="false" :show-file-list="false" action="#" :limit="1"
  87. :file-list='fileList' accept=".xls,.xlsx" :on-change="uploadChange" ref="file1">
  88. <el-button type="primary" size="mini">重新上传</el-button>
  89. </el-upload>
  90. <el-link class="marleft10 colorblue" @click="delectExcelMS">删除</el-link>
  91. <el-link underline class="marleft10 colorblue" style="text-decoration:underline;"
  92. @click="downloadExcel()">下载EXCEL</el-link>
  93. </template>
  94. <template v-else>
  95. <el-upload :auto-upload="false" :show-file-list="false" action="#" :limit="1" :file-list='fileList'
  96. accept=".xls,.xlsx" :on-change="uploadChange" ref="file2">
  97. <el-button type="primary" size="mini">上传 excel</el-button>
  98. </el-upload>
  99. </template>
  100. <div style="margin-left:50px;position: relative;" class="flex">
  101. <div class="excelname mg-r-10" v-if="from.templateExtension">
  102. <div>{{ from.templateExtension }}</div>
  103. <i class="el-icon-success marleft10" style="color: rgb(0, 168, 112);"></i>
  104. </div>
  105. <!-- <el-upload :auto-upload="false" :show-file-list="false" action="#" :limit="1" accept=".xls,.xlsx"
  106. :on-change="uploadcoverfileExcel" ref="file3">
  107. <el-button type="primary" size="mini">{{ from.templateExtension ? '重新上传导入模板' : '上传导入模板' }}</el-button>
  108. </el-upload> -->
  109. <div>
  110. <el-link v-if="from.templateExtension" class="marleft10 colorblue" @click="delectExcelMSModel">删除</el-link>
  111. <el-link v-if="from.templateExtension" underline class="marleft10 colorblue"
  112. style="text-decoration:underline;" @click="downloadExcelModel()">下载模板</el-link>
  113. <el-button type="success" size="mini" @click="saveExcelInfo" :loading="saveExcelJsonLoad" style="margin-left: 5px;">保存数据</el-button>
  114. <el-button type="primary" size="mini" @click="preViewInfoPdf" style="margin-left: 5px;" :loading="pdfLoad">预览</el-button>
  115. </div>
  116. </div>
  117. <div style="position: absolute;right:30px;top:65px;">
  118. <el-button type="primary" size="mini" @click="fullPage">全屏显示</el-button>
  119. </div>
  120. </div>
  121. <el-empty style="height:80%;" v-show="!from.checkd" description="该目录为根目录没有EXCEL文件"></el-empty>
  122. <div class="martop10" v-if="from.fileUrl" style="flex:1;">
  123. <!-- <iframe
  124. :src="excelSrc"
  125. style="width:100%;height:100%;"
  126. ></iframe> -->
  127. <div v-if='excelshow' style="width:100%;height:100%;" id="fullscreen_content">
  128. <!-- <vab-only-office :option='exceloption' /> -->
  129. <lucky-sheet
  130. v-loading="initLoad"
  131. ref="luckySheet"
  132. @data-change="handleDataChange"
  133. :initialData="initialData"
  134. :url="from.fileUrl"
  135. ></lucky-sheet>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <!-- 弹出框 -->
  142. <el-dialog :title="dialogTapType" class="dialogModel" :visible.sync="dialogTap" width="800px" modal-append-to-body
  143. append-to-body @close="handleClose">
  144. <div class="dialogBox">
  145. <el-form ref="excelForm" :model="excelForm" label-width="80px" :rules="rules">
  146. <div style="display: flex;justify-content: space-between;">
  147. <el-form-item label="清表名称" style="width: 370px;" size="small" prop="nodeName">
  148. <el-input v-model="excelForm.nodeName"></el-input>
  149. </el-form-item>
  150. <el-form-item label="清表类型" style="width: 370px;" size="small" prop="tabType">
  151. <el-select v-model="excelForm.tabType" style="width:100%;" placeholder="请选择清表类型">
  152. <el-option v-for="(val, index) in exceltypeData" :key="index" :label="val.dictValue"
  153. :value="val.dictKey"></el-option>
  154. </el-select>
  155. </el-form-item>
  156. </div>
  157. </el-form>
  158. <div class="middle" v-if="wbsmiddle">
  159. <div class="left">
  160. <div class="select">
  161. <el-select placeholder="请选择WBS模板" style="width: 96%;" size="small" @change="wbsmodelchange"
  162. v-model="excelForm.wbsId">
  163. <el-option v-for="(val, index) in wbsmodel" :key="index" :label="val.wbsName" :value="val.id"></el-option>
  164. </el-select>
  165. </div>
  166. <div class="treecontent" v-loading="loading">
  167. <avue-tree :option="option2" :data="wbsdata" @node-click="nodeClickExcel" style="height:450px">
  168. <span class="el-tree-node__label" slot-scope="{ data }">
  169. <div>
  170. <span> {{ data.nodeName }} </span>
  171. </div>
  172. </span>
  173. </avue-tree>
  174. </div>
  175. </div>
  176. <!-- 右侧关联 -->
  177. <template>
  178. <el-table :data="tableData" border height="502px" style="width: 100%;margin-left:20px">
  179. <el-table-column prop="tableName" label="表名">
  180. </el-table-column>
  181. <el-table-column label="操作" align="center" width="120">
  182. <template slot-scope="scope">
  183. <el-button v-if="scope.row.isLinkTable != 2" type="info" size="small"
  184. @click="relation(scope.$index)">关联</el-button>
  185. <el-button v-if="scope.row.isLinkTable == 2" type="warning" size="small"
  186. @click="Disassociate(scope.$index)">取消关联</el-button>
  187. </template>
  188. </el-table-column>
  189. </el-table>
  190. </template>
  191. </div>
  192. </div>
  193. <div class="btbox">
  194. <el-button size="mini" @click="handleClose()">取消</el-button>
  195. <el-button type="info" style="margin-left: 50px;" size="mini" :loading="saveExcelLoad"
  196. @click="saveExcel()">确定</el-button>
  197. </div>
  198. </el-dialog>
  199. <!-- 私有wbs树排序弹框 -->
  200. <el-dialog title="调整排序" :visible.sync="sortTag" width="50%" append-to-body>
  201. <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
  202. <span slot="footer" class="dialog-footer">
  203. <el-button @click="(sortTag = false), (sortTag2 = false)">取 消</el-button>
  204. <el-button type="primary" @click="editSort()">确 定</el-button>
  205. </span>
  206. </el-dialog>
  207. <!-- 上传Excel表格 -->
  208. <el-dialog title="上传Excel表格" :visible.sync="exceldialogVisible" width="40%" append-to-body
  209. :before-close="cancleexceldialog">
  210. <span>
  211. <el-upload accept=".xls, .xlsx" class="upload-demo" action="#" :auto-upload="false" :on-change="excelhandleChange"
  212. :show-file-list="false" multiple :on-exceed="excelhandleExceed" :file-list="excelfileList"
  213. ref="excelmoudelupload">
  214. <el-button size="small" type="primary">选择文件</el-button>
  215. <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
  216. </el-upload>
  217. <el-table class="down" :data="dataList" border stripe style="width: 100%;margin-top: 20px;">
  218. <el-table-column label="序号" width="150">
  219. <template slot-scope="scope">
  220. <i class="el-icon-sort-up marleft10 text-hover" @click="upSortFile(scope.row,scope.$index)"></i>
  221. <i class="el-icon-sort-down marleft10 text-hover" @click="downSortFile(scope.row,scope.$index)"></i>
  222. {{ scope.$index + 1 }}
  223. </template>
  224. </el-table-column>
  225. <el-table-column prop="name" label="文件名称">
  226. <template slot-scope="scope">
  227. <el-input v-model="scope.row.name" placeholder="请输入内容"></el-input>
  228. </template>
  229. </el-table-column>
  230. <el-table-column width="80" label="操作">
  231. <template slot-scope="scope">
  232. <el-button size="small" type="text" @click="deleteHandle(scope.row.uid)">删除</el-button>
  233. </template>
  234. </el-table-column>
  235. </el-table>
  236. </span>
  237. <span slot="footer" class="dialog-footer">
  238. <el-button @click="cancleexceldialog">取 消</el-button>
  239. <el-button type="primary" @click="aumbitexcelmoudel">确 定上传</el-button>
  240. </span>
  241. </el-dialog>
  242. <!-- 预览pdf -->
  243. <PdfView
  244. ref="pdfDrawerExcelRef"
  245. @save-pdf="saveExcelInfoPdf"
  246. :saveExcelJsonLoadPdf="saveExcelJsonLoadPdf"
  247. />
  248. </div>
  249. </template>
  250. <script>
  251. import { mapGetters } from "vuex";
  252. import {
  253. detailExcel, excelType, tabLazytree, getWbsTypeList, wbstree, selectByNodeTable, Excelmodify, uploadExcel, deleteExcelshu, deleteExcel, deleteExcelmodel, tabLazytreeAll,
  254. uploadcoverfileExcel, downExcelFile, downExcelFileModel, exctabSort,batchUploadExcelTab
  255. } from '@/api/exctab/excelmodel';
  256. import ManualSorting from '@/components/WbsTree/ManualSorting'
  257. import VabOnlyOffice from '@/components/online-office/index'
  258. import PdfView from '@/components/PdfView.vue';
  259. import screenfull from "screenfull";
  260. import LuckySheet from '@/components/lucky-sheet-editor/LuckySheet.vue'
  261. import {getExcelJson,saveExcelJson,getExcelPdf,getTempExcelFileUrl} from '@/api/exctab/exceltab';
  262. export default {
  263. components: {
  264. ManualSorting, VabOnlyOffice,LuckySheet,PdfView
  265. },
  266. data() {
  267. return {
  268. //参考vabOnlyOffice组件参数配置
  269. excelshow: false,
  270. expandedKeys: [],//默认展开的节点
  271. excelId: '',
  272. treeNode: {},
  273. //#region 鼠标
  274. leftTRee: '',//左侧树ID
  275. threessW: 400,
  276. //#endregion
  277. heightss: '',//
  278. loading: false,//懒加载
  279. data: [],//清表模板
  280. filterText: "",//搜索关键字
  281. allTreeShow: false,//是否显示整棵树
  282. treeloading: false,
  283. allTreeData: [],
  284. defaultProps: {
  285. children: "children",
  286. isLeaf: function (data) {
  287. return !data.hasChildren || (data.isExistForm == 1);
  288. },
  289. },
  290. wbsdata: [],//wbs模板
  291. //#region 右侧数据
  292. from: {
  293. checkd: false,//判断是否可以进行上传、重新上传excel
  294. id: '',//清表树ID
  295. extension: '', //文件名称
  296. fileUrl: '',//文件路径
  297. import: null,
  298. },
  299. fileList: [],//选中的文件
  300. excelSrc: '',//
  301. //#endregion
  302. //#region 弹框
  303. dialogTapType: '',
  304. dialogTap: false,
  305. option2: {
  306. filter: false,
  307. lazy: true,
  308. menu: false,
  309. treeLoad: (async (node, resolve) => {
  310. if (node.data.hasChildren) {
  311. const { data: res } = await wbstree({ parentId: node.data.id, wbsId: this.excelForm.wbsId, wbsType: this.excelForm.wbsType })
  312. console.log(res);
  313. if (res.code === 200) {
  314. if (Array.isArray(res.data)) {
  315. res.data.forEach((val) => {
  316. if (!val.hasChildren) {
  317. val.leaf = true
  318. }
  319. })
  320. }
  321. return resolve(res.data)
  322. }
  323. } else {
  324. return resolve([])
  325. }
  326. }),
  327. },//弹框里面的wbs树
  328. excelForm: {
  329. nodeName: '',//清表名称
  330. tabType: '',//清表类型
  331. id: '',//清表Id,编辑时用
  332. parentId: '',//清表Id,添加时用
  333. wbsId: '',//WBS模板Id
  334. wbsType: '',//WBS模板类型
  335. },
  336. rules: {
  337. nodeName: [
  338. { required: true, message: '请输入清表名称', trigger: 'blur' },
  339. ],
  340. tabType: [
  341. { required: true, message: '请选择清表类型', trigger: 'blur' },
  342. ],
  343. },
  344. wbsform: {
  345. id: '',
  346. wbsType: '',
  347. wbsName: '',
  348. },//wbs树选中的值
  349. tableData: [],//右侧表数据
  350. wbsmiddle: false,//选择wbs模板那块是否有
  351. tableList: [],//进行处理的wbs关联表
  352. exceltypeData: [],//清表类型枚举
  353. wbsmodel: [],//wbs模板名称枚举
  354. //#endregion
  355. saveExcelLoad: false,
  356. sortTag: false,
  357. sortTag2: false,
  358. sort: [],
  359. curTreeData: {},
  360. defaultExpandKey: [],
  361. exceldialogVisible: false,
  362. isShowTree:true,
  363. uploadId:'',
  364. excelfileList: [],
  365. dataList: [],
  366. fileobj: [],
  367. initialData: [],
  368. initLoad: false,
  369. saveExcelJsonLoad: false,
  370. pdfLoad: false,
  371. pdfDrawerExcelRef: null,
  372. saveExcelJsonLoadPdf: false,
  373. saveDataInfo: {},
  374. pdfDataUrl:''
  375. }
  376. },
  377. computed: {
  378. ...mapGetters(["userInfo"]),
  379. },
  380. methods: {
  381. fullPage(){
  382. console.log('全屏显示');
  383. // 判断是否支持
  384. if (!screenfull.isEnabled) {
  385. this.$message({
  386. message: "浏览器不支持全屏",
  387. type: "warning"
  388. });
  389. return false;
  390. }
  391. const element = document.getElementById('fullscreen_content');//指定全屏区域元素
  392. screenfull.request(element);
  393. // screenfull.toggle();
  394. s
  395. },
  396. getFile() {
  397. this.excelshow = true
  398. this.getInitialData()
  399. },
  400. //刷新左边树形数据
  401. refreshTree() {
  402. console.log(this.curTreeData, 'this.curTreeData111111111');
  403. //刷新左边树形数据
  404. if (this.curTreeData.level === 1) {
  405. const parentId = 0
  406. tabLazytree({
  407. parentId: this.curTreeData.parentId,
  408. modeId: this.$route.params.id
  409. }).then(res => {
  410. this.data = res.data.data.data;
  411. this.$nextTick(() => {
  412. this.defaultExpandKey.push(this.curTreeData.id);
  413. this.$refs.trees.setCurrentKey(this.curTreeData.id);
  414. })
  415. });
  416. } else {
  417. this.updateTreeNewNode()
  418. }
  419. },
  420. updateTreeNewNode() {
  421. tabLazytree({
  422. parentId: this.curTreeData.parentId,
  423. modeId: this.$route.params.id
  424. }).then((res) => {
  425. let node = this.$refs.trees.getNode(this.curTreeData.parentId.parentId);
  426. this.$refs.trees.updateKeyChildren(this.curTreeData.parentId, res.data.data)
  427. this.$refs.trees.setCurrentKey(this.curTreeData.id);
  428. })
  429. },
  430. //#region 调整排序排序
  431. async sortpai(data, node) {
  432. console.log(data, node);
  433. await this.findWbsTreePrivateSameLevel(node, data)
  434. this.sortTag = true;
  435. this.sortTag2 = true;
  436. this.curTreeData = data
  437. },
  438. editSort() {
  439. this.exctabSort();
  440. },
  441. bianhua() {
  442. this.sortTag2 = false;
  443. this.$nextTick(() => {
  444. this.sortTag2 = true;
  445. });
  446. },
  447. async exctabSort() {
  448. console.log(this.sort, 'this.sort');
  449. var newArr = this.sort.map((v) => { return v.id })
  450. newArr = newArr.join(',')
  451. //清表树手动排序
  452. const { data: res } = await exctabSort(newArr);
  453. console.log(res);
  454. if (res.code == 200) {
  455. this.sortTag = false;
  456. this.sortTag2 = false;
  457. this.updateTreeNewNode();
  458. }
  459. },
  460. async findWbsTreePrivateSameLevel(node, data) {
  461. const { data: res } = await tabLazytree(
  462. {
  463. parentId: data.parentId,
  464. modeId: this.$route.params.id
  465. })
  466. if (res.code == 200) {
  467. res.data.forEach((item) => {
  468. item.tableName = item.name
  469. })
  470. this.sort = res.data
  471. }
  472. },
  473. async getLazytreessss() {
  474. const { data: res } = await tabLazytree(
  475. {
  476. parentId: 0,
  477. modeId: this.$route.params.id
  478. }
  479. );
  480. console.log(res);
  481. if (res.code == 200) {
  482. this.data = res.data;
  483. this.allTreeData = res.data
  484. }
  485. },
  486. //#region 接口
  487. async tabLazytree(parentId, modeId) {//清表树
  488. const { data: res } = await tabLazytree({ parentId, modeId })
  489. console.log(res);
  490. if (res.code === 200) {
  491. return res.data
  492. }
  493. },
  494. async detailExcel(id) {//获取列表信息
  495. const { data: res } = await detailExcel({ id })
  496. console.log(res);
  497. if (res.code === 200) {
  498. this.from.id = res.data.id
  499. this.from.extension = res.data.extension //文件名称
  500. this.from.templateExtension = res.data.templateExtension
  501. this.from.name = res.data.name
  502. this.from.fileUrl = res.data.fileUrl //文件路径
  503. let routeUrl = res.data.fileUrl
  504. let pSrc = routeUrl + '?r=' + new Date()
  505. this.excelSrc = 'http://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(pSrc);
  506. // //导入模板名称
  507. // this.from.import={}
  508. this.getFile()
  509. }
  510. },
  511. async getWbsTypeList() {//清表编辑 wbs 下拉框选择
  512. const { data: res } = await getWbsTypeList({ wbstype: 2 })
  513. console.log(res);
  514. if (res.code === 200) {
  515. this.wbsmodel = res.data
  516. }
  517. },
  518. async excelType() {//清表类型
  519. const { data: res } = await excelType({ code: 'sys_excltab_type' })
  520. console.log(res);
  521. if (res.code === 200) {
  522. res.data.forEach(element => {
  523. element.dictKey = Number(element.dictKey)
  524. });
  525. this.exceltypeData = res.data
  526. }
  527. },
  528. async wbstree() {//wbs树懒加载
  529. this.loading = true;
  530. const { data: res } = await wbstree({ parentId: 0, wbsId: this.excelForm.wbsId, wbsType: this.excelForm.wbsType })
  531. console.log(res);
  532. this.loading = false
  533. if (res.code === 200) {
  534. res.data.forEach((val) => {
  535. if (!val.hasChildren) {
  536. val.leaf = true
  537. }
  538. })
  539. this.wbsdata = res.data
  540. }
  541. },
  542. async selectByNodeTable(id, wbsType, liunxId, projectid) {//wbs树获取表
  543. const { data: res } = await selectByNodeTable({ id, wbsType, liunxId, projectid })
  544. console.log(res);
  545. if (res.code === 200) {
  546. console.log(Array.isArray(res.data));
  547. if (Array.isArray(res.data)) {
  548. this.tableData = res.data
  549. this.tableData.forEach(val => {
  550. val.changeTable = val.isLinkTable
  551. })
  552. } else {
  553. this.tableData = []
  554. }
  555. }
  556. },
  557. async deleteExcelshu(ids) {//删除清表
  558. // console.log(ids);
  559. const { data: res } = await deleteExcelshu(ids)
  560. console.log(res);
  561. if (res.code === 200) {
  562. this.$message({
  563. message: '删除清表树成功',
  564. type: 'success'
  565. });
  566. this.tabLazytree(0, this.$route.params.id)//获取清表树
  567. this.from = {
  568. checkd: false,//判断是否可以进行上传、重新上传excel
  569. id: '',//清表树ID
  570. extension: '', //文件名称
  571. fileUrl: '',//文件路径
  572. }
  573. }
  574. },
  575. async Excelmodify(wbsExclTabParmVO) {//编辑添加清表
  576. console.log(wbsExclTabParmVO, this.treeNode);
  577. const { data: res } = await Excelmodify(wbsExclTabParmVO)
  578. console.log(res);
  579. if (res.code === 200) {
  580. this.$message({
  581. type: 'success',
  582. message: '保存成功'
  583. })
  584. let ids = ''
  585. if (wbsExclTabParmVO.id) {
  586. ids = this.treeNode.parentId
  587. } else {
  588. ids = wbsExclTabParmVO.parentId
  589. }
  590. let das = await this.tabLazytree(ids, this.$route.params.id)//获取清表树
  591. if (wbsExclTabParmVO.id) {
  592. this.treeNode.name = wbsExclTabParmVO.nodeName
  593. } else {
  594. this.$refs.trees.updateKeyChildren(this.treeNode.id, das)
  595. }
  596. let node = this.$refs.trees.getNode(ids);
  597. node.isLeaf = false;
  598. node.isLeafByUser = false;
  599. this.dialogTap = false
  600. }
  601. },
  602. async uploadExcel(data) {//上传清表
  603. console.log('上传');
  604. const { data: res } = await uploadExcel(data)
  605. console.log(res);
  606. if (res.code === 200) {
  607. this.$message({
  608. message: '上传文件成功',
  609. type: 'success'
  610. })
  611. this.detailExcel(this.from.id)
  612. this.from.checkd = true
  613. }
  614. this.fileList = [];
  615. this.refreshTree()
  616. },
  617. async deleteExcel(data) {//删除excel表
  618. const { data: res } = await deleteExcel(data)
  619. if (res.code === 200) {
  620. this.$message({
  621. message: '删除excel表成功',
  622. type: 'success'
  623. })
  624. this.detailExcel(this.from.id)
  625. this.refreshTree()
  626. }
  627. },
  628. //#endregion
  629. //#region 右侧
  630. async uploadChange(file, fileList) {//选中表后触发
  631. this.fileList = [file.raw]
  632. let formData = new FormData()
  633. formData.append('file', ...this.fileList)
  634. formData.append('nodeId', this.from.id)
  635. if (this.from.fileUrl && this.from.fileUrl.length >= 2) {
  636. formData.append('type', 2)
  637. } else {
  638. formData.append('type', 1)
  639. }
  640. const loading = this.$loading({
  641. lock: true,
  642. text: 'Loading',
  643. spinner: 'el-icon-loading',
  644. background: 'rgba(0, 0, 0, 0.7)'
  645. });
  646. try {
  647. await this.uploadExcel(formData)
  648. loading.close();
  649. } catch (error) {
  650. loading.close();
  651. }
  652. if (this.$refs.file1) {
  653. this.$refs.file1.clearFiles();
  654. }
  655. if (this.$refs.file2) {
  656. this.$refs.file2.clearFiles();
  657. }
  658. },
  659. delectExcelMS() {//删除excel表点击事件、
  660. let _that = this
  661. this.$confirm('确认删除该文件?', '', {
  662. confirmButtonText: '确定',
  663. cancelButtonText: '取消',
  664. type: 'warning'
  665. }).then(() => {
  666. _that.deleteExcel({ id: _that.from.id, fileUrl: '' })
  667. }).catch(() => {
  668. })
  669. },
  670. downloadExcel() {//下载excel表
  671. //this.downFile(this.from.fileUrl,"123456.xlsx");
  672. //window.open(this.from.fileUrl,'namexxx')
  673. const link = document.createElement('a')
  674. downExcelFile(this.from.id).then((res) => {
  675. // 创建Blob对象,设置文件类型
  676. let blob = new Blob([res.data], { type: "application/vnd.ms-excel" })
  677. let objectUrl = URL.createObjectURL(blob) // 创建URL
  678. link.href = objectUrl
  679. link.download = this.from.extension // 自定义文件名
  680. link.click() // 下载文件
  681. URL.revokeObjectURL(objectUrl); // 释放内存
  682. })
  683. },
  684. delectExcelMSModel() {//删除excel表点击事件、
  685. let _that = this
  686. this.$confirm('确认删除该文件?', '', {
  687. confirmButtonText: '确定',
  688. cancelButtonText: '取消',
  689. type: 'warning'
  690. }).then(() => {
  691. deleteExcelmodel({ id: _that.from.id, fileUrl: '' }).then((res) => {
  692. if (res.data.code == 200) {
  693. _that.from.templateExtension = ''
  694. this.$forceUpdate()
  695. }
  696. })
  697. }).catch(() => {
  698. })
  699. },
  700. downloadExcelModel() {//下载excel表
  701. //this.downFile(this.from.fileUrl,"123456.xlsx");
  702. //window.open(this.from.fileUrl,'namexxx')
  703. const link = document.createElement('a')
  704. downExcelFileModel(this.from.id).then((res) => {
  705. // 创建Blob对象,设置文件类型
  706. let blob = new Blob([res.data], { type: "application/vnd.ms-excel" })
  707. let objectUrl = URL.createObjectURL(blob) // 创建URL
  708. link.href = objectUrl
  709. link.download = this.from.extension // 自定义文件名
  710. link.click() // 下载文件
  711. URL.revokeObjectURL(objectUrl); // 释放内存
  712. })
  713. },
  714. //#endregion
  715. //#region 外层左侧事件
  716. mouseLeave(data) {
  717. if (data.moreShow) {
  718. this.$set(data, 'moreShow', false)
  719. }
  720. },
  721. mouseOver(data) {
  722. if (!data.moreShow) {
  723. this.$set(data, 'moreShow', true)
  724. }
  725. },
  726. async treeLoad(node, resolve) {
  727. let id = node.data.id
  728. if (node.level == 0) {
  729. id = 0
  730. }
  731. let das = await this.tabLazytree(id, this.$route.params.id)
  732. return resolve(das)
  733. },
  734. nodeClick(data) {//外层树结构
  735. this.curTreeData = data;
  736. this.from.import = ""
  737. if (data.hasChildren == false) {
  738. this.from.checkd = true
  739. } else if (data.fileType == 3) {
  740. this.from.checkd = true
  741. } else {
  742. this.from.checkd = false
  743. }
  744. if (this.from.checkd) {
  745. this.detailExcel(data.id)
  746. } else {
  747. this.from = {
  748. checkd: false,//判断是否可以进行上传、重新上传excel
  749. id: '',//清表树ID
  750. extension: '', //文件名称
  751. fileUrl: '',//文件路径
  752. }
  753. }
  754. },
  755. async editExcel(data) {//编辑
  756. this.dialogTapType = '编辑'
  757. if (data.fileType != 3 && data.hasChildren) {
  758. this.wbsmiddle = false
  759. } else {
  760. this.wbsmiddle = true
  761. this.getWbsTypeList()//wbs模板名称
  762. }
  763. const { data: res } = await detailExcel({ id: data.id })
  764. console.log(res);
  765. if (res.code === 200) {
  766. this.excelForm.id = res.data.id
  767. this.excelForm.nodeName = res.data.name //清表名称
  768. this.excelForm.tabType = res.data.tabType //清表类型
  769. this.treeNode = data
  770. this.dialogTap = true
  771. }
  772. },
  773. async addExcel(data) {//添加
  774. this.dialogTapType = '新增'
  775. console.log(data);
  776. if (data.fileType == 3) {
  777. this.wbsmiddle = false
  778. } else {
  779. this.wbsmiddle = true
  780. this.getWbsTypeList()//wbs模板名称
  781. }
  782. this.excelForm.parentId = data.id
  783. this.treeNode = data
  784. this.dialogTap = true
  785. },
  786. deleteExcelM(data, node) {//删除
  787. console.log(node);
  788. if (data.hasChildren) {
  789. this.$message({
  790. type: 'warning',
  791. message: '该节点下有子节点,无法删除'
  792. })
  793. return;
  794. }
  795. const _that = this
  796. this.$confirm('确定将选择数据删除?', '', {
  797. confirmButtonText: '确定',
  798. cancelButtonText: '取消',
  799. type: 'error'
  800. }).then(async () => {
  801. await _that.deleteExcelshu(data.id)
  802. _that.$refs.trees.remove(node) //删除界面上的节点
  803. }).catch(() => {
  804. });
  805. },
  806. //#endregion
  807. //#region 弹框属性
  808. handleClose() {//关闭弹框触发事件
  809. this.excelForm = {
  810. nodeName: '',//清表名称
  811. tabType: '',//清表类型
  812. id: '',//清表Id,编辑时用
  813. parentId: '',//清表Id,添加时用
  814. wbsId: '',//WBS模板Id
  815. wbsType: '',//WBS模板类型
  816. }
  817. this.wbsform = {
  818. id: '',
  819. wbsType: '',
  820. wbsName: '',
  821. }//wbs树选中的值
  822. this.wbsdata = [] //wbs树数据
  823. this.tableData = []//弹框table数据
  824. this.tableList = []//关联取消关联的数据
  825. this.dialogTap = false
  826. },
  827. wbsmodelchange(val) {//wbs模板change事件
  828. if (val) {
  829. this.wbsmodel.forEach((da) => {
  830. if (da.id == val) {
  831. this.excelForm.wbsType = da.wbsType
  832. }
  833. })
  834. }
  835. window.setTimeout(() => {
  836. this.wbstree();
  837. }, 100)
  838. this.tableData = [];
  839. this.tableList = [];
  840. },
  841. nodeClickExcel(data) {//wbs树点击事件
  842. console.log(this.excelId, "xxxxxxxxx");
  843. console.log(this.excelForm.id, "yyyyyyyy");
  844. this.wbsform.id = data.id
  845. this.wbsform.wbsType = data.type
  846. this.wbsform.wbsName = data.nodeName
  847. if (this.tableList == '') {
  848. this.selectByNodeTable(data.id, data.type, this.excelForm.id, this.excelForm.wbsId)
  849. } else {
  850. let tag = true
  851. this.tableList.forEach((val) => {
  852. if (val.id == data.id) {
  853. this.tableData = val.arrs
  854. tag = false
  855. }
  856. })
  857. if (tag) {
  858. this.selectByNodeTable(data.id, data.type, this.excelForm.id, this.excelForm.wbsId)
  859. }
  860. }
  861. },
  862. relation(key) {//关联
  863. this.tableData[key].isLinkTable = 2
  864. let tap = this.tableList.find((val) => {
  865. return val.id == this.wbsform.id
  866. })
  867. if (!tap) {
  868. this.tableList.push({
  869. id: this.wbsform.id,
  870. wbsType: this.wbsform.wbsType,
  871. wbsName: this.wbsform.wbsName,
  872. arrs: this.tableData
  873. })
  874. }
  875. },
  876. Disassociate(key) {//取消关联
  877. this.tableData[key].isLinkTable = 1
  878. const tap = this.tableList.find((val) => {
  879. return val.id == this.wbsform.id
  880. })
  881. if (!tap) {
  882. this.tableList.push({
  883. id: this.wbsform.id,
  884. wbsType: this.wbsform.wbsType,
  885. wbsName: this.wbsform.wbsName,
  886. arrs: this.tableData
  887. })
  888. }
  889. },
  890. saveExcel() {//保存按钮
  891. this.$refs.excelForm.validate(async (valid) => {
  892. if (valid) {
  893. let linkDataInfo = []
  894. if (this.tableList.length > 0) {
  895. this.tableList.forEach(val => {
  896. let linkIds = ''
  897. val.arrs.forEach(da => {
  898. if (da.isLinkTable != da.changeTable) {
  899. linkIds = `${linkIds}${linkIds != '' ? ',' : ''}${da.pkeyId}_${da.isLinkTable}`
  900. }
  901. })
  902. if (linkIds != '') {
  903. linkDataInfo.push({
  904. id: val.id,
  905. linkIds: linkIds,
  906. wbsName: val.wbsName,
  907. wbsType: val.wbsType
  908. })
  909. }
  910. })
  911. }
  912. this.saveExcelLoad = true;
  913. try {
  914. if (this.excelForm.parentId && !this.excelForm.id) {
  915. await this.Excelmodify({
  916. nodeName: this.excelForm.nodeName,
  917. tabType: this.excelForm.tabType,
  918. parentId: this.excelForm.parentId,
  919. linkDataInfo: linkDataInfo
  920. })
  921. } else {
  922. await this.Excelmodify({
  923. nodeName: this.excelForm.nodeName,
  924. tabType: this.excelForm.tabType,
  925. id: this.excelForm.id,
  926. linkDataInfo: linkDataInfo
  927. })
  928. }
  929. this.dialogTap = false
  930. } catch (error) {
  931. console.log(error)
  932. }
  933. this.saveExcelLoad = false;
  934. }
  935. });
  936. },
  937. //#endregion
  938. //搜索树
  939. treeFilter() {
  940. if (this.filterText) {
  941. this.allTreeShow = true;
  942. if (!this.allTreeData.length) {
  943. this.treeloading = true;
  944. tabLazytreeAll({
  945. modeId: this.$route.params.id,
  946. name: '',
  947. }).then((res) => {
  948. this.treeloading = false;
  949. this.allTreeData = res.data.data;
  950. this.$nextTick(() => {
  951. this.$refs.treeall.filter(this.filterText);
  952. })
  953. })
  954. } else {
  955. this.$refs.treeall.filter(this.filterText);
  956. }
  957. } else {
  958. this.allTreeShow = false;
  959. }
  960. },
  961. filterNode(value, data) {
  962. if (!value) return true;
  963. return data.name.indexOf(value) !== -1;
  964. },
  965. uploadcoverfileExcel(file) {
  966. console.log('上传导入模板');
  967. this.from.templateExtension = false
  968. let formData = new FormData()
  969. formData.append('file', file.raw)
  970. formData.append('nodeId', this.from.id)
  971. this.from.templateExtension = file.raw.name
  972. // console.log(file.raw)
  973. const loading = this.$loading({
  974. lock: true,
  975. text: 'Loading',
  976. spinner: 'el-icon-loading',
  977. background: 'rgba(0, 0, 0, 0.7)'
  978. });
  979. uploadcoverfileExcel(formData).then(() => {
  980. this.$message({
  981. message: '上传文件成功',
  982. type: 'success'
  983. })
  984. // this.detailExcel(this.from.id)
  985. loading.close();
  986. }).catch(() => {
  987. loading.close();
  988. });
  989. this.$refs.file3.clearFiles();
  990. this.$forceUpdate()
  991. },
  992. //上传
  993. uploadMoudle(data) {
  994. console.log('上传');
  995. this.uploadId=data.id
  996. this.curTreeData = data;
  997. this.exceldialogVisible = true
  998. },
  999. excelhandleChange(file, fileList) {
  1000. this.dataList = fileList
  1001. },
  1002. deleteHandle(uid) {
  1003. let arr = this.dataList.filter((item) => {
  1004. return item.uid !== uid
  1005. })
  1006. this.$nextTick(() => {
  1007. this.dataList = arr
  1008. })
  1009. },
  1010. aumbitexcelmoudel() {
  1011. let formData = new FormData()
  1012. this.dataList.forEach((item) => {
  1013. formData.append('file', item.raw,item.name)
  1014. })
  1015. formData.append('id',this.uploadId)
  1016. const loading = this.$loading({
  1017. lock: true,
  1018. text: 'Loading',
  1019. spinner: 'el-icon-loading',
  1020. background: 'rgba(0, 0, 0, 0.7)'
  1021. });
  1022. batchUploadExcelTab(formData).then(() => {
  1023. this.$message({
  1024. message: '上传文件成功',
  1025. type: 'success'
  1026. })
  1027. this.exceldialogVisible=false
  1028. this.refreshTree()
  1029. loading.close();
  1030. }).catch(() => {
  1031. loading.close();
  1032. });
  1033. this.$refs.excelmoudelupload.clearFiles();
  1034. this.cancleexceldialog()
  1035. },
  1036. //更改上传文件顺序
  1037. upSortFile(row,index){
  1038. const data= this.dataList
  1039. if(index!==0){
  1040. const tmp = data.splice(index - 1, 1);
  1041. this.dataList.splice(index, 0, tmp[0]);
  1042. }else{
  1043. this.$message.warning('已经处于置顶,无法上移')
  1044. }
  1045. },
  1046. downSortFile(row,index){
  1047. const indexs = index + 1
  1048. const data = this.dataList
  1049. if (indexs !== data.length) {
  1050. const tmp = data.splice(indexs, 1);
  1051. this.dataList.splice(index, 0, tmp[0]);
  1052. } else {
  1053. this.$message.warning('已经处于置底,无法下移')
  1054. }
  1055. },
  1056. cancleexceldialog(){
  1057. this.exceldialogVisible=false
  1058. this.dataList=[]
  1059. this.excelfileList=[]
  1060. },
  1061. handleDataChange(data) {
  1062. // 处理数据变化
  1063. console.log('表格数据已更新:', data)
  1064. // 可以在这里将数据发送到后端保存
  1065. },
  1066. async getInitialData(){
  1067. this.initLoad=true
  1068. const { data: res } = await getExcelJson(
  1069. {
  1070. url: this.from.fileUrl,
  1071. })
  1072. this.initLoad=false
  1073. if (res.code == 200) {
  1074. this.initialData = JSON.parse(res.data)
  1075. }else{
  1076. this.$message.error(res.msg)
  1077. this.initialData=[]
  1078. }
  1079. },
  1080. //保存表格数据
  1081. async saveExcelInfo() {
  1082. const saveData = await this.$refs.luckySheet.getData();
  1083. this.saveDataInfo = saveData
  1084. this.saveExcelJsonLoad = true; // 开始加载
  1085. try {
  1086. const { data: res } = await getTempExcelFileUrl({
  1087. key: this.from.id,
  1088. jsonExcel: JSON.stringify(saveData)
  1089. });
  1090. if (res.code === 200) {
  1091. console.log(res.data,'data');
  1092. this.pdfDataUrl = res.data;
  1093. this.saveExcelInfoPdfUrL()
  1094. } else {
  1095. this.pdfDataUrl=''
  1096. this.$message.error(res.msg);
  1097. }
  1098. } catch (error) {
  1099. } finally {
  1100. // 无论成功还是失败,最终都会执行这里
  1101. this.saveExcelJsonLoad = false;
  1102. }
  1103. },
  1104. async saveExcelInfoPdfUrL() {
  1105. const { data: res } = await getExcelPdf({
  1106. key: this.from.id,
  1107. url: this.pdfDataUrl
  1108. });
  1109. console.log(res.data,'res1');
  1110. this.$nextTick(() => {
  1111. this.$refs.pdfDrawerExcelRef.show(res.data,true)
  1112. })
  1113. },
  1114. async saveExcelInfoPdf() {
  1115. this.saveExcelJsonLoadPdf = true; // 开始加载
  1116. console.log(this.saveDataInfo ,'this.saveDataInfo ');
  1117. try {
  1118. // const saveData = await this.$refs.luckySheet.getData();
  1119. const { data: res } = await saveExcelJson({
  1120. key: this.from.id,
  1121. jsonExcel: JSON.stringify(this.saveDataInfo )
  1122. });
  1123. if (res.code === 200) {
  1124. this.$message({
  1125. message: '保存成功',
  1126. type: 'success'
  1127. });
  1128. } else {
  1129. this.$message.error(res.msg);
  1130. this.getInitialData();
  1131. }
  1132. } catch (error) {
  1133. } finally {
  1134. // 无论成功还是失败,最终都会执行这里
  1135. this.saveExcelJsonLoadPdf = false;
  1136. }
  1137. },
  1138. //预览pdf
  1139. async preViewInfoPdf(){
  1140. console.log('预览');
  1141. this.pdfLoad = true; // 开始加载
  1142. try {
  1143. const { data: res } = await getExcelPdf({
  1144. key: this.from.id,
  1145. });
  1146. if (res.code === 200) {
  1147. console.log(res.data,'data');
  1148. this.$nextTick(() => {
  1149. this.$refs.pdfDrawerExcelRef.show(res.data,false)
  1150. })
  1151. } else {
  1152. this.$message.error(res.msg);
  1153. }
  1154. } catch (error) {
  1155. } finally {
  1156. // 无论成功还是失败,最终都会执行这里
  1157. this.pdfLoad = false;
  1158. }
  1159. }
  1160. },
  1161. created() {
  1162. this.excelType()//清表类型
  1163. },
  1164. mounted() {
  1165. // this.heightss = this.$refs.rulesss.clientHeight
  1166. }
  1167. }
  1168. </script>
  1169. <style scoped lang="scss">
  1170. .marleft10 {
  1171. margin-left: 10px;
  1172. }
  1173. ::v-deep.el-tree-node__expand-icon {
  1174. font-size: 16px;
  1175. }
  1176. .colorblue {
  1177. color: rgb(0, 82, 217);
  1178. }
  1179. .treecontent ::v-deep.el-scrollbar {
  1180. height: 100%;
  1181. }
  1182. .el-scrollbar {
  1183. height: 100%;
  1184. }
  1185. .rightHeader {
  1186. display: flex;
  1187. justify-content: flex-start;
  1188. align-items: top;
  1189. font-size: 14px;
  1190. background-color: #fff;
  1191. .excelname {
  1192. box-sizing: border-box;
  1193. min-width: 200px;
  1194. height: 28px;
  1195. border: 1px solid rgb(220, 220, 220);
  1196. padding: 0 10px;
  1197. border-radius: 3px;
  1198. display: flex;
  1199. justify-content: space-between;
  1200. align-items: center;
  1201. }
  1202. }
  1203. .dialogModel {
  1204. .dialogBox {
  1205. .middle {
  1206. display: flex;
  1207. .left {
  1208. border: 1px solid rgb(220, 220, 220);
  1209. border-radius: 3px;
  1210. height: 500px;
  1211. width: 49%;
  1212. .select {
  1213. box-sizing: border-box;
  1214. display: flex;
  1215. justify-content: center;
  1216. padding: 5px 0;
  1217. border-bottom: 1px solid #e0e0e0;
  1218. }
  1219. .leftscroll {
  1220. height: 450px;
  1221. overflow-y: scroll;
  1222. }
  1223. }
  1224. .right {
  1225. height: auto;
  1226. height: 60px;
  1227. max-height: 500px;
  1228. margin-left: 2%;
  1229. // height: 500px;
  1230. border-radius: 3px;
  1231. td {
  1232. box-sizing: border-box;
  1233. padding: 5px 10px;
  1234. height: 30px;
  1235. line-height: 30px;
  1236. }
  1237. }
  1238. }
  1239. }
  1240. .btbox {
  1241. margin-top: 20px;
  1242. display: flex;
  1243. justify-content: center;
  1244. }
  1245. }
  1246. .rightBox {
  1247. flex: 1;
  1248. }
  1249. .boxswai {
  1250. height: 100%;
  1251. box-sizing: border-box;
  1252. padding-bottom: 10px;
  1253. }
  1254. .text-hover{
  1255. cursor: pointer;
  1256. color: #409EFF;
  1257. }
  1258. </style>