index.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654
  1. <template>
  2. <div class="index_box">
  3. <!-- <div class="menu-container">
  4. <div
  5. v-for="(item, index) in menuItems"
  6. :key="item.label"
  7. class="menu-item"
  8. :class="{ active: isOpen }"
  9. :style="getItemStyle(index)"
  10. @click="handleItemClick(item)"
  11. >
  12. {{ item.label }}
  13. </div>
  14. <button class="toggle-btn" @click="toggleMenu">
  15. {{ isOpen ? 'X' : '≡' }}
  16. </button>
  17. </div> -->
  18. <div class="content_box">
  19. <!-- @tab-click="handleClick" -->
  20. <!-- 工序名称 -->
  21. <!-- <Search></Search> -->
  22. <div class="content_box_tab">
  23. <el-input
  24. style="width: 160px"
  25. clearable
  26. v-model="name"
  27. placeholder="请输入筛选项"
  28. @input="seekInput"
  29. />
  30. <el-button type="text" @click="updataTaskList">刷新</el-button>
  31. <el-tabs
  32. v-model="activeName"
  33. type="card"
  34. stretch
  35. @tab-click="tabClickValue"
  36. >
  37. <!-- :render-content="renderContent"-->
  38. <el-tab-pane label="工单" name="0">
  39. <div class="custom-tree-node">
  40. <el-tree
  41. :data="produceTaskList"
  42. :props="defaultProps"
  43. node-key="id"
  44. :highlight-current="true"
  45. @node-click="handleNodeClick"
  46. ref="taskListRef"
  47. :key="treeKey"
  48. >
  49. <span class="custom-tree-node" slot-scope="{ node, data }">
  50. <span>{{ node.label }}</span>
  51. <span
  52. style="color: red; font-weight: 700"
  53. v-if="data.number != '0' && data.number"
  54. >({{ data.number >= 100 ? '99+' : data.number }})</span
  55. >
  56. </span>
  57. </el-tree>
  58. </div>
  59. </el-tab-pane>
  60. <el-tab-pane label="我的任务" name="second">
  61. <!-- <AssetTree @handleNodeClick="handleNodeClickNew" @setRootId="setRootId" id="0" :paramsType="'type'"
  62. ref="treeList" eqDevice="sb" /> -->
  63. <!-- <el-tree
  64. :data="factoryworkstationList"
  65. :props="defaultPropsTow"
  66. node-key="id"
  67. :highlight-current="true"
  68. @node-click="handleNodeClick"
  69. >
  70. </el-tree>-->
  71. </el-tab-pane>
  72. </el-tabs>
  73. </div>
  74. <div style="width: calc(100% - 220px)">
  75. <div class="seek-list" style="background-color: #157a2c">
  76. <div>
  77. <el-input
  78. style="width: 180px; margin-right: 5px"
  79. clearable
  80. v-model="keyWord"
  81. placeholder="请输入关键字"
  82. @clear="handleSearch"
  83. />
  84. <!-- <el-input style="width: 180px" clearable v-model="taskName" placeholder="请输入工序进度" /> -->
  85. <!-- -->
  86. <el-button
  87. size="mini"
  88. type="primary"
  89. style="margin: 0 5px"
  90. @click="handleSearch"
  91. >查询</el-button
  92. >
  93. <template>
  94. <el-popover
  95. placement="top-start"
  96. width="200"
  97. trigger="hover"
  98. content="支持工单编码,产品编码,产品名称,产品规格,牌号,型号,批次号查询。"
  99. >
  100. <i
  101. class="el-icon-question"
  102. slot="reference"
  103. style="color: #40a9ff; font-size: 14px"
  104. ></i>
  105. <!-- <el-button slot="reference">hover 激活</el-button> -->
  106. </el-popover></template
  107. >
  108. <!--
  109. <span>支持工单编码,产品编码,产品名称,产品规格,牌号,型号,批次号查询</span
  110. > -->
  111. </div>
  112. <div
  113. style="
  114. width: 55%;
  115. color: #fff;
  116. display: flex;
  117. justify-content: space-between;
  118. "
  119. >
  120. <div>
  121. <b style="margin-right: 50px">当前工序:{{ title }}</b>
  122. <b>下道工序:{{ title1 }}</b>
  123. </div>
  124. <div> 操作员:{{ info.name }} </div>
  125. </div>
  126. </div>
  127. <ele-split-layout
  128. space="0px"
  129. width="45%"
  130. :resizable="true"
  131. :min-size="200"
  132. :max-size="-200"
  133. :left-style="{
  134. overflow: 'hidden',
  135. width: '100%'
  136. }"
  137. :right-style="{ overflow: 'hidden' }"
  138. :responsive="false"
  139. style="height: calc(100vh - 70px - 50px - 90px)"
  140. >
  141. <!-- 左侧 工单列表 -->
  142. <div class="left_main">
  143. <div class="top">
  144. <!-- /工单列表 -->
  145. <produceOrder
  146. v-if="produceTaskList.length != 0"
  147. @workSelect="workSelect"
  148. @rowClick="rowClick"
  149. ref="produceOrder"
  150. @getTaskName="getTaskName"
  151. :produceTaskInfo="produceTaskInfo"
  152. >
  153. </produceOrder>
  154. </div>
  155. <!-- <div class="bottom">
  156. <productionResource :BomObj="BomObj"></productionResource>
  157. </div> -->
  158. </div>
  159. <!-- 右侧 详情 -->
  160. <template v-slot:content>
  161. <div class="right_main">
  162. <!-- 领料 -->
  163. <!-- <div v-if="operationType == 'pick'"> -->
  164. <div v-if="operationType == 'pick'">
  165. <pickDetails
  166. ref="pickListRef"
  167. :workTaskId="workTaskId"
  168. :taskId="taskObj.id"
  169. @pickAdd="pickAdd"
  170. ></pickDetails>
  171. </div>
  172. <div v-if="operationType == 'feed'">
  173. <!-- 投料 -->
  174. <feeding
  175. :workListIds="workListIds"
  176. :feedNeedEquipment="feedNeedEquipment"
  177. @reload="reloadFeeding"
  178. ></feeding>
  179. </div>
  180. <div v-if="operationType == 'job'">
  181. <!-- // 报工列表 入库 -->
  182. <warehousing
  183. v-if="taskObj.id == -1"
  184. :workListIds="workListIds"
  185. ref="wareRef"
  186. :workPlanType="workPlanType"
  187. ></warehousing>
  188. <!-- // 设备 入库 -->
  189. <!-- 普通报工 -->
  190. <!-- <jobBooking
  191. v-else
  192. :workListIds="workListIds"
  193. ref="jobRef"
  194. :reportNeedFeed="reportNeedFeed"
  195. ></jobBooking> -->
  196. <jobBooking
  197. v-else-if="isFinalCheckProduction"
  198. :workListIds="workListIds"
  199. ref="jobRef"
  200. :reportNeedFeed="reportNeedFeed"
  201. :workPlanType="workPlanType"
  202. ></jobBooking>
  203. <!-- <workPlan
  204. style="width: 100%"
  205. v-else
  206. :workListIds="workListIds"
  207. ref="jobRef"
  208. :reportNeedFeed="reportNeedFeed"
  209. >
  210. </workPlan> -->
  211. </div>
  212. <!-- 工步 -->
  213. <div v-if="operationType == 'workStep'"> </div>
  214. <!-- 质检工序 -->
  215. <div v-if="operationType == 'inspection'">
  216. <inspection
  217. :workListIds="workListIds"
  218. ref="inspectionRef"
  219. ></inspection>
  220. </div>
  221. <!-- 委外 -->
  222. <div
  223. v-if="operationType == 'Outsourcing' && isType == '3'"
  224. class="right_main_box"
  225. >
  226. <outsourcingDetails
  227. ref="outsourcingListRef"
  228. @outsourcingAdd="outsourcingAdd"
  229. v-if="!isStep && !isOutsource && !isPleaseEntrust"
  230. :chooseType="chooseType"
  231. ></outsourcingDetails>
  232. <outsourcing
  233. :outsourceFormVal="outsourceForm"
  234. :taskObj="taskObj"
  235. :workListIds="workListIds[0]"
  236. :workData="workData"
  237. @changePlugIn="changePlugIn"
  238. @changeCancel="changeCancel"
  239. :chooseType="chooseType"
  240. v-if="isStep"
  241. ></outsourcing>
  242. <!-- -->
  243. <outsourceList
  244. :workData="workData"
  245. :taskObj="taskObj"
  246. :outsourceFormVal="outsourceForm"
  247. :chooseType="chooseType"
  248. @closeForm="closeForm"
  249. @outScucc="outScucc"
  250. v-if="isOutsource"
  251. ></outsourceList>
  252. <!--
  253. <outsourceList
  254. :outsourceFormVal="outObj"
  255. @closeForm="closeForm"
  256. @outScucc="outScucc"
  257. v-if="isOutsource"
  258. ></outsourceList> -->
  259. <pleaseEntrust
  260. :outsourceFormVal="outObj"
  261. @closeForm="closeForm"
  262. @outScucc="outScucc"
  263. v-if="isPleaseEntrust"
  264. ></pleaseEntrust>
  265. </div>
  266. <!-- <div class="menu-container">
  267. <div class="main-btn" @click="toggleMenu">
  268. <span>+</span>
  269. </div>
  270. <transition-group name="fan" tag="div">
  271. <div
  272. v-for="(btn, index) in buttons"
  273. :key="btn.label"
  274. class="sub-btn"
  275. :style="getBtnStyle(index)"
  276. v-show="isOpen"
  277. >
  278. {{ btn.label }}
  279. </div>
  280. </transition-group>
  281. </div> -->
  282. </div>
  283. </template>
  284. </ele-split-layout>
  285. <footBtn
  286. @footBtn="footBtn"
  287. :type="type"
  288. :singleReportInspection="singleReportInspection"
  289. style="background: rgba(223, 250, 222, 0.6); padding: 10px"
  290. :isPreProductionResult="isPreProductionResult"
  291. ></footBtn>
  292. <!-- <div class="box"> -->
  293. <!-- </div> -->
  294. </div>
  295. <!-- <footBtn @footBtn="footBtn"></footBtn> -->
  296. </div>
  297. <!--领料弹框 -->
  298. <picking
  299. v-if="pickingShow"
  300. @close="pickingClose"
  301. :workListIds="workListIds"
  302. ></picking>
  303. <!-- 工艺文件 -->
  304. <wokePopup ref="wokePopupRef"></wokePopup>
  305. <!-- 检验报工 -->
  306. <workPlan ref="jobRefs" @closeWorkPlan="closeWorkPlan"> </workPlan>
  307. <!-- <workes ref="jobRefs"> </workes> -->
  308. <!-- :workListIds="workListIds" :taskId="taskObj.id" -->
  309. <!-- 工步 -->
  310. <workStep ref="workStepRef" />
  311. <!-- 任务 -->
  312. <TaskDialog ref="taskDialogRef" />
  313. <!-- 异常 -->
  314. <createError ref="createErrorRef" />
  315. <!-- 设备列表 -->
  316. <device ref="deviceRef" />
  317. <!-- 周转车列表 -->
  318. <turnover ref="turnoverRef" />
  319. <!-- BOM详情 -->
  320. <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
  321. <!-- 产前准备 、 过程控制 、产后检测 -->
  322. <prenatalExamination
  323. ref="prenatalExaminationRef"
  324. @close="closePrenatalExamination"
  325. />
  326. <!-- 新增请托 -->
  327. <addPlease ref="addPleaseRef" @refresh="refreshPlease"></addPlease>
  328. <!-- qualityInspection -->
  329. <qualityInspection ref="qualityInspectionRef"></qualityInspection>
  330. </div>
  331. </template>
  332. <script>
  333. import TaskDialog from '@/views/produce/components/taskDialog/index.vue';
  334. import Search from './components/search.vue';
  335. import footBtn from './components/footBtn.vue';
  336. // import produceOrder from './components/produceOrder.vue';
  337. import produceOrder from './components/new_produceOrder.vue';
  338. import productionResource from './components/productionResource/index.vue';
  339. import outsourcing from './components/outsourcing/index.vue';
  340. import picking from './components/picking/index.vue';
  341. import wokePopup from './components/picking/wokePopup.vue';
  342. import inspection from './components/inspection/newIndex.vue';
  343. // import inspection from './components/inspection/index.vue';
  344. import pickDetails from './components/picking/details.vue';
  345. import AssetTree from '@/components/AssetTree/joobIndex.vue';
  346. import feeding from './components/feeding/index.vue';
  347. import jobBooking from './components/jobBooking/index.vue';
  348. import workPlan from './components/workPlan/index.vue';
  349. import workes from './components/workPlan/components/work.vue';
  350. import warehousing from './components/warehousing/index.vue';
  351. // import outsourceList from './components/outsourcing/outsourceList.vue';
  352. import outsourceList from './components/outsourcing/new_outsourceList.vue';
  353. import pleaseEntrust from './components/outsourcing/pleaseEntrust.vue';
  354. import workStep from './components/workStep/index.vue';
  355. import createError from './components/createError.vue';
  356. import device from './components/device/index.vue';
  357. import turnover from './components/turnover/index.vue';
  358. import outsourcingDetails from './components/outsourcing/details.vue';
  359. import BomDetailsPop from './components/bom/detailsPop.vue';
  360. import { parameterGetByCode } from '@/api/system/dictionary-data';
  361. import addPlease from './components/outsourcing/addPlease.vue';
  362. import {
  363. getByTaskId,
  364. pcCheckOutsource,
  365. getTaskInstanceById,
  366. checkOutsourceMaterial,
  367. listTask,
  368. factoryworkstationPage,
  369. nextTask,
  370. singleListTask,
  371. pleaseEntrustManagement,
  372. checkPleaseEntrust,
  373. checkRepeatPick
  374. } from '@/api/produce/index';
  375. import prenatalExamination from './components/prenatalExamination/index.vue';
  376. import { workorderPage2 } from '@/api/produce/workOrder.js';
  377. import { checkProductionResult } from '@/api/producetaskrulerecord/index.js';
  378. import qualityInspection from './components/qualityInspection/index.vue';
  379. export default {
  380. components: {
  381. Search,
  382. footBtn,
  383. wokePopup,
  384. produceOrder,
  385. productionResource,
  386. outsourcing,
  387. picking,
  388. pickDetails,
  389. outsourceList,
  390. feeding,
  391. AssetTree,
  392. jobBooking,
  393. inspection,
  394. warehousing,
  395. workStep,
  396. workPlan,
  397. TaskDialog,
  398. createError,
  399. device,
  400. turnover,
  401. outsourcingDetails,
  402. BomDetailsPop,
  403. prenatalExamination,
  404. pleaseEntrust,
  405. addPlease,
  406. qualityInspection
  407. },
  408. data() {
  409. return {
  410. name: '',
  411. activeName: '0',
  412. taskName: '',
  413. keyWord: '', //搜索
  414. title: '',
  415. type: '',
  416. loading: false,
  417. operationType: null,
  418. popupType: '', // 弹窗
  419. workListIds: [],
  420. factoryworkstationList: [],
  421. title1: '',
  422. arr: [],
  423. arrTow: [],
  424. produceTaskList: [],
  425. taskDataList: [],
  426. produceTaskInfo: null,
  427. isType: '',
  428. isStep: false,
  429. outsourceForm: {},
  430. outObj: {},
  431. pickingShow: false,
  432. wokePopup: false,
  433. workPlanType: '',
  434. isOutsource: false,
  435. isPleaseEntrust: false,
  436. BomObj: {},
  437. defaultProps: {
  438. children: 'children',
  439. label: 'newName'
  440. },
  441. defaultPropsTow: {
  442. children: 'children',
  443. label: 'name',
  444. value: 'code'
  445. },
  446. feedNeedEquipment: 0, //投料是否要添加生产设备1是0否
  447. reportNeedFeed: 0, //生产质检是否需要处置再报工1是0否
  448. singleReportInspection: null, //获取选中的工单是单个还是批量
  449. workTaskId: null, //选中的工单工序id
  450. workStepQueryParam: {
  451. taskId: null,
  452. workOrderId: null,
  453. bomCategoryId: null
  454. },
  455. isFinalCheckProduction: true,
  456. isOpen: false,
  457. buttons: [
  458. { label: '按钮1' },
  459. { label: '按钮2' },
  460. { label: '按钮3' },
  461. { label: '按钮4' }
  462. ],
  463. radius: 120, // 按钮展开的半径
  464. isOpen: false,
  465. lastClicked: '无',
  466. menuItems: [
  467. { label: 'BOM', action: 'Add' },
  468. { label: '周转车', action: 'Bold' },
  469. { label: '设备', action: 'Copy' },
  470. { label: '产前准备', action: 'Delete' },
  471. { label: '过程检测', action: 'Edit' },
  472. { label: '产后检查', action: 'Favorite' }
  473. ],
  474. isPreProductionResult: null,
  475. chooseType: '1',
  476. isUpdataTask: false,
  477. treeKey: '1'
  478. };
  479. },
  480. computed: {
  481. taskObj() {
  482. return this.$store.state.user.taskObj;
  483. },
  484. info() {
  485. return this.$store.state.user.info;
  486. },
  487. rightShow() {
  488. return (type) => {};
  489. }
  490. },
  491. created() {
  492. this.init();
  493. this.getTaskList();
  494. this.getFactoryworkstationPageList();
  495. this.operationType = null;
  496. this.workListIds = [];
  497. },
  498. methods: {
  499. tabClickValue() {
  500. this.name = '';
  501. this.seekInput();
  502. },
  503. toggleMenu() {
  504. this.isOpen = !this.isOpen;
  505. },
  506. handleItemClick(item) {
  507. this.lastClicked = item.action;
  508. // console.log(`Clicked: ${item.label} - ${item.action}`);
  509. },
  510. getItemStyle(index) {
  511. if (!this.isOpen) {
  512. return {};
  513. }
  514. const radius = 120;
  515. let angle = -180 + (120 / (this.menuItems.length - 1)) * index;
  516. let rad = (angle * Math.PI) / 180;
  517. let tx = Math.cos(rad) * radius;
  518. let ty = Math.sin(rad) * radius;
  519. // const angle =
  520. // -180 +
  521. // ((index / (this.menuItems.length - 1)) * Math.PI) / 2 -
  522. // Math.PI / 4;
  523. // const radius = 120;
  524. // const tx = radius * Math.cos(angle);
  525. // const ty = -radius * Math.sin(angle);
  526. return {
  527. '--tx': `${tx}px`,
  528. '--ty': `${ty}px`,
  529. 'transition-delay': `${index * 0.05}s`
  530. };
  531. },
  532. // 前端筛选
  533. seekInput() {
  534. // console.log(activeName);
  535. if (this.activeName == '0') {
  536. if (!this.name) return (this.produceTaskList = this.arr);
  537. this.produceTaskList = this.produceTaskList.filter((item) => {
  538. return item.name.indexOf(this.name) > -1;
  539. });
  540. } else {
  541. if (!this.name) return (this.factoryworkstationList = this.arrTow);
  542. this.factoryworkstationList = this.factoryworkstationList.filter(
  543. (item) => {
  544. return item.name.indexOf(this.name) > -1;
  545. }
  546. );
  547. }
  548. },
  549. // 折叠悬浮中样式调整
  550. init() {
  551. this.$store.dispatch('theme/setCollapse', true);
  552. },
  553. async getTaskName(value) {
  554. if (value.length > 0) {
  555. let res = await nextTask({
  556. taskId: this.taskObj.id,
  557. workOrderIds: value.map((item) => item.id)
  558. });
  559. this.title1 = res.data.map((item) => item.taskTypeName).toString();
  560. } else {
  561. this.title1 = '';
  562. }
  563. },
  564. handleSearch() {
  565. let obj = {
  566. keyWord: this.keyWord,
  567. taskName: this.taskName
  568. };
  569. this.$refs.produceOrder.handleSearch(obj);
  570. //handleSearch(this.code);
  571. },
  572. handleNodeClickNew(info) {
  573. // this.current = info;
  574. let current = { id: info.id };
  575. this.$store.commit('user/currentObj', current);
  576. },
  577. setRootId(id) {
  578. this.rootId = id;
  579. },
  580. // 点击工序
  581. handleNodeClick(data) {
  582. this.feedNeedEquipment = data.feedNeedEquipment;
  583. this.reportNeedFeed = data.reportNeedFeed;
  584. this.produceTaskInfo = data;
  585. // 重置按钮 禁用
  586. if (this.produceTaskInfo && this.produceTaskInfo.id != data.id) {
  587. this.isPreProductionResult = null;
  588. }
  589. console.log(data, 'handleNodeClick');
  590. let obj = {
  591. 1: `${data.workCenterName}-${data.name}(普通工序)`,
  592. 3: `${data.workCenterName}-${data.name}(质检工序)`,
  593. 4: `${data.workCenterName}-${data.name}(包装工序)`,
  594. 5: `${data.workCenterName}-${data.name}(入库工序)`,
  595. 6: `${data.workCenterName}-${data.name}(质检工序)`
  596. };
  597. this.title = obj[data.type] || '';
  598. this.type = data.type;
  599. let taskObj = {};
  600. taskObj = this.produceTaskList.find((item) => item.id === data.id);
  601. taskObj.isOrderListData = false;
  602. this.$store.commit('user/setTaskObj', taskObj);
  603. },
  604. handleChoose(val) {
  605. console.log(val);
  606. },
  607. // 获取工序列表
  608. getTaskList() {
  609. // console.log(
  610. // localStorage.getItem('singleUserInfo'),
  611. // 'localStorage.getItem'
  612. // );
  613. // console.log(this.$store.state.user, 'this.$store.state.user.allInfo');
  614. if (localStorage.getItem('singleUserInfo') == '1') {
  615. singleListTask(
  616. JSON.parse(localStorage.getItem('chooseUserInfo'))
  617. ).then((res) => {
  618. res.map((v) => {
  619. v.newName = `${v.workCenterName}-${v.name}`;
  620. });
  621. this.produceTaskList = res;
  622. this.arr = JSON.parse(JSON.stringify(this.produceTaskList));
  623. //默认选择第一个工序
  624. if (this.produceTaskList?.length) {
  625. this.$store.commit('user/setTaskObj', this.produceTaskList[0]);
  626. this.$nextTick(() => {
  627. this.$refs.taskListRef?.setCurrentKey(
  628. this.produceTaskList[0].id
  629. );
  630. });
  631. this.produceTaskInfo = this.produceTaskList[0];
  632. }
  633. });
  634. } else {
  635. listTask().then((res) => {
  636. res.map((v) => {
  637. v.newName = `${v.workCenterName}-${v.name}`;
  638. });
  639. this.produceTaskList = res;
  640. this.taskDataList = res;
  641. this.arr = JSON.parse(JSON.stringify(this.produceTaskList));
  642. //默认选择第一个工序
  643. if (this.produceTaskList?.length) {
  644. this.$store.commit('user/setTaskObj', this.produceTaskList[0]);
  645. this.$nextTick(() => {
  646. this.$refs.taskListRef?.setCurrentKey(
  647. this.produceTaskList[0].id
  648. );
  649. });
  650. this.produceTaskInfo = this.produceTaskList[0];
  651. }
  652. this.getTaskWorkNumber();
  653. });
  654. }
  655. },
  656. //获取工序下所有的工单集合
  657. async getTaskWorkNumber() {
  658. for (const [index, item] of this.taskDataList.entries()) {
  659. await workorderPage2({
  660. pageNum: 1,
  661. size: 5000,
  662. taskId: item.id
  663. }).then((res) => {
  664. this.taskDataList[index].number = res.count;
  665. });
  666. }
  667. this.produceTaskList = this.taskDataList;
  668. this.treeKey = Date.now();
  669. },
  670. // 获取工位
  671. getFactoryworkstationPageList() {
  672. factoryworkstationPage({ pageNum: 1, size: 99999999 }).then((res) => {
  673. this.factoryworkstationList = res.list;
  674. this.arrTow = JSON.parse(JSON.stringify(this.factoryworkstationList));
  675. // newName
  676. });
  677. },
  678. changeCancel(activeType) {
  679. this.isStep = false;
  680. this.chooseType = activeType;
  681. // this.$nextTick(() => {
  682. // this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
  683. // });
  684. if (this.chooseType == '1') {
  685. this.$nextTick(() => {
  686. this.$refs.outsourcingListRef.getDataList(
  687. this.workData.list[0].code
  688. );
  689. });
  690. } else if (this.chooseType == '2') {
  691. this.$nextTick(() => {
  692. this.$refs.outsourcingListRef.getPleaseData(
  693. this.workData.list[0].code
  694. );
  695. });
  696. }
  697. },
  698. closeForm() {
  699. this.isOutsource = false;
  700. this.isPleaseEntrust = false;
  701. this.$nextTick(() => {
  702. this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
  703. });
  704. },
  705. outScucc() {
  706. // this.operationType = null;
  707. this.isOutsource = false;
  708. this.isPleaseEntrust = false;
  709. this.$nextTick(() => {
  710. this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
  711. });
  712. },
  713. updataTaskList() {
  714. this.isUpdataTask = true;
  715. this.getTaskList();
  716. },
  717. // 切换组件
  718. async changePlugIn(e, index) {
  719. if (index == '1') {
  720. this.outObj = e;
  721. let req = {
  722. taskId: e.taskId,
  723. taskIds: e.taskIds,
  724. workOrderId: e.workOrderId,
  725. quantity: e.formedNumLast
  726. };
  727. const URL =
  728. index == '1' ? checkOutsourceMaterial : checkPleaseEntrust;
  729. const res = await URL(req);
  730. this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
  731. this.isStep = false;
  732. this.isOutsource = true;
  733. } else if (index == '2') {
  734. this.outObj = e;
  735. let req = {
  736. taskId: e.taskId,
  737. taskIds: e.taskIds,
  738. workOrderId: e.workOrderId,
  739. quantity: e.formedNumLast
  740. };
  741. const res = await checkPleaseEntrust(req);
  742. this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
  743. this.isStep = false;
  744. this.isPleaseEntrust = true;
  745. // this.isOutsource = true;
  746. console.log(res, '请托的结果');
  747. }
  748. },
  749. renderContent(h, { node, data, store }) {
  750. // Use createElement syntax instead of JSX
  751. return h('span', { class: 'custom-tree-node' }, [
  752. // h('span', node.label),
  753. h(
  754. 'el-badge',
  755. {
  756. props: {
  757. value: data.number != '0' ? data.number : '',
  758. max: 99
  759. },
  760. class: 'item'
  761. },
  762. [h('span', node.label)]
  763. )
  764. ]);
  765. },
  766. workSelect(data) {
  767. this.workTaskId = data.list.length > 0 ? data.list[0].taskId : null;
  768. this.workStepQueryParam.taskId =
  769. data.list.length > 0 ? data.list[0].taskId : null;
  770. this.workStepQueryParam.workOrderId =
  771. data.list.length > 0 ? data.list[0].id : null;
  772. this.workStepQueryParam.bomCategoryId =
  773. data.list.length > 0 ? data.list[0].bomCategoryId : null;
  774. this.singleReportInspection =
  775. data.list.length > 0 ? data.list[0].singleReport : null; //获取选中的工单是单个还是批量
  776. this.isStep = false;
  777. this.operationType = null;
  778. this.workListIds = data.ids;
  779. this.workData = data;
  780. this.checkProductionResult();
  781. },
  782. pickingWokeClose() {
  783. this.wokePopup = false;
  784. },
  785. async getCodeData(req) {
  786. await parameterGetByCode({ code: 'enable_quality_plus' }).then(
  787. (res) => {
  788. if (res.value == '1') {
  789. this.$refs.jobRefs.open(req);
  790. }
  791. }
  792. );
  793. },
  794. closeWorkPlan(type) {
  795. this.workPlanType = type;
  796. },
  797. async checkQualityResult() {
  798. if (
  799. this.produceTaskInfo &&
  800. this.workListIds.length > 0 &&
  801. this.produceTaskInfo.id != -1
  802. ) {
  803. // 判断是否要求先完成 产前准备等事项
  804. const result = await checkProductionResult({
  805. produceTaskId: this.produceTaskInfo.id,
  806. workOrderIds: this.workListIds
  807. });
  808. return result;
  809. }
  810. },
  811. async footBtn(t) {
  812. this.workPlanType = '';
  813. // this.operationType = t;
  814. // 新增判断 *** 出现弹窗的时候不然右边数据消失
  815. if ((t == 'work' || t == 'workStep', t === 'task')) {
  816. this.popupType = t;
  817. } else {
  818. this.operationType = t;
  819. }
  820. if (
  821. Object.keys(this.$store.state.user.taskObj).length === 0 &&
  822. this.$store.state.user.taskObj.constructor === Object
  823. ) {
  824. this.$message.warning('请选择工序');
  825. return true;
  826. }
  827. if (['pick', 'feed', 'job', 'work', 'workStep', 'task'].includes(t)) {
  828. if (this.workListIds.length == 0) {
  829. this.$message.warning('请选择工单列表');
  830. return false;
  831. }
  832. }
  833. if (t === 'job') {
  834. let req = {
  835. taskId: this.taskObj.id,
  836. workOrderId: this.workListIds[0],
  837. data: this.workData.list
  838. };
  839. // const result = await this.checkQualityResult();
  840. // if (!result) return;
  841. // const firstArticleResult =
  842. // result.firstArticleDualInspectionResult ?? true;
  843. // this.isFinalCheckProduction = firstArticleResult;
  844. // if (!firstArticleResult) {
  845. // return this.$message.warning('请完成首件两检再报工!');
  846. // }
  847. if (
  848. this.taskObj.type == 2 ||
  849. this.taskObj.type == 3 ||
  850. this.taskObj.type == 6
  851. ) {
  852. this.getCodeData(req);
  853. }
  854. }
  855. if (t == 'pick') {
  856. this.$nextTick(() => {
  857. console.log(this.taskObj);
  858. this.$refs.pickListRef.getList(this.workListIds);
  859. });
  860. }
  861. // 工步
  862. if (t === 'workStep') {
  863. if (this.workListIds.length > 1) {
  864. return this.$message.warning('工步只能选择一个工单!');
  865. }
  866. this.$refs.workStepRef.open(this.workStepQueryParam);
  867. // let req = {
  868. // taskId: this.taskObj.id,
  869. // workOrderId: this.workListIds[0]
  870. // };
  871. // this.$refs.wokePopupRef.open(req);
  872. }
  873. if (t === 'task') {
  874. if (this.workListIds.length > 1) {
  875. return this.$message.warning('任务只能选择一个工单!');
  876. }
  877. this.$refs.taskDialogRef.open(
  878. this.workStepQueryParam,
  879. this.workData.list[0]
  880. );
  881. }
  882. if (t === 'error') {
  883. if (this.workListIds.length > 1) {
  884. return this.$message.warning('异常只能选择一个工单!');
  885. } else if (this.workListIds.length < 1) {
  886. return this.$message.warning('请选择工单!');
  887. }
  888. // console.log(this.workListIds, 'this.workListIds');
  889. this.$refs.createErrorRef.open('add', this.workData.list[0]);
  890. }
  891. // 工艺路线 *** 修改 判断只能选择一个
  892. // if (t === 'work') {
  893. // let req = {
  894. // taskId: this.taskObj.id,
  895. // workOrderId: this.workListIds[0]
  896. // };
  897. // this.$refs.wokePopupRef.open(req);
  898. // }
  899. if (t === 'work') {
  900. if (this.workListIds.length > 1) {
  901. return this.$message.warning('工艺文件只能选择一个工单!');
  902. } else if (this.workListIds.length < 1) {
  903. return this.$message.warning('请选择工单!');
  904. }
  905. await parameterGetByCode({
  906. code: 'mes_craft_file_by_category_code'
  907. }).then((res) => {
  908. // if (res.value == '1') {
  909. // this.$refs.jobRefs.open(req);
  910. // }
  911. console.log(this.workData.list, 'this.workData.list');
  912. if (res.value == '1') {
  913. let req = {
  914. taskId: this.taskObj.id,
  915. workOrderId: this.workListIds[0],
  916. productCode: this.workData.list[0].productCode
  917. };
  918. this.$refs.wokePopupRef.openTwo(req);
  919. } else {
  920. let req = {
  921. taskId: this.taskObj.id,
  922. workOrderId: this.workListIds[0]
  923. };
  924. this.$refs.wokePopupRef.open(req);
  925. }
  926. });
  927. }
  928. if (t == 'feed') {
  929. }
  930. if (t == 'device') {
  931. if (this.taskObj.id) {
  932. this.$refs.deviceRef.open(this.taskObj.id);
  933. } else {
  934. this.$message.warning('请选择工序');
  935. }
  936. }
  937. if (t == 'turnover') {
  938. if (this.workListIds.length < 1) {
  939. return this.$message.warning('请选择工单!');
  940. } else {
  941. const codeListData = [];
  942. this.workData.list.forEach((it) => {
  943. codeListData.push(it.code);
  944. });
  945. this.$refs.turnoverRef.open(codeListData);
  946. }
  947. }
  948. if (t == 'bom') {
  949. if (this.workListIds.length > 1) {
  950. return this.$message.warning('查看BOM详情只能选择一个工单!');
  951. } else if (this.workListIds.length < 1)
  952. return this.$message.warning('请选择工单!');
  953. else {
  954. console.log(this.workData);
  955. const row = this.workData.list[0];
  956. let rowData = {
  957. categoryId: row.categoryId,
  958. categoryName: row.bomCategoryName,
  959. code: row.code,
  960. versions: row.bomCategoryVersions,
  961. rootPathIdParent: row.categoryLevelPathIdParent || '',
  962. isProduct: true,
  963. bomType: Number(row.bomType),
  964. isTemp: 0
  965. };
  966. this.$refs.bomDrawer.open(rowData);
  967. // /
  968. // console.log(this.workData.list, 'this.workData.list');
  969. }
  970. // let rowData = {
  971. // categoryId: row.id,
  972. // categoryName: row.name,
  973. // code: row.code,
  974. // rootPathIdParent: row.categoryLevelPathIdParent,
  975. // isProduct: row.isProduct == 1
  976. // };
  977. }
  978. // 委外
  979. if (t == 'Outsourcing') {
  980. if (this.workListIds.length > 1) {
  981. return this.$message.warning('委外请托工序只能选择一个工单!');
  982. } else if (this.workListIds.length < 1) {
  983. return this.$message.warning('请选择工单!');
  984. } else {
  985. console.log(this.workData, 'this.workData');
  986. // /
  987. this.handOutsource(this.workListIds[0]);
  988. }
  989. }
  990. // 产前准备 过程控制 产后检查
  991. if (
  992. t == 'prenatalExamination' ||
  993. t == 'processDetection' ||
  994. t == 'postpartumExamination'
  995. ) {
  996. if (this.workListIds.length > 1) {
  997. if (t == 'prenatalExamination') {
  998. return this.$message.warning('产前准备只能选择一个工单!');
  999. }
  1000. if (t == 'processDetection') {
  1001. return this.$message.warning('过程控制只能选择一个工单!');
  1002. }
  1003. return this.$message.warning('产后检查只能选择一个工单!');
  1004. }
  1005. if (this.workListIds.length < 1) {
  1006. return this.$message.warning('请选择工单!');
  1007. }
  1008. let reportWorkType = 1;
  1009. console.log('this.workListIds', this.workListIds, t);
  1010. switch (t) {
  1011. case 'prenatalExamination':
  1012. reportWorkType = 1;
  1013. break;
  1014. case 'processDetection':
  1015. reportWorkType = 2;
  1016. break;
  1017. default:
  1018. reportWorkType = 3;
  1019. break;
  1020. }
  1021. // 产前准备
  1022. console.log('this.produceTaskInfo', this.produceTaskInfo);
  1023. this.$refs.prenatalExaminationRef.open(
  1024. this.workData.list[0],
  1025. this.produceTaskInfo,
  1026. // 报工类型,参考字典项:record_rules_report_work_type,1-产前准备,2-过程控制,3-产后检查
  1027. reportWorkType
  1028. );
  1029. }
  1030. // 首件两检
  1031. if (t == 'qualityInspection') {
  1032. if (this.workListIds.length < 1) {
  1033. return this.$message.warning('请选择工单!');
  1034. }
  1035. if (this.workListIds.length > 1) {
  1036. return this.$message.warning('首件两检只能选择一个工单!');
  1037. }
  1038. this.$refs.qualityInspectionRef.open(
  1039. this.workData.list[0],
  1040. this.produceTaskInfo
  1041. );
  1042. }
  1043. },
  1044. outsourcingAdd(type, activeName) {
  1045. this.chooseType = activeName;
  1046. this.getTaskInstanceByIdFn(this.workListIds[0]);
  1047. if (this.chooseType == '2') {
  1048. this.isStep = true;
  1049. } else {
  1050. this.isOutsource = true;
  1051. }
  1052. },
  1053. refreshPlease() {
  1054. this.$nextTick(() => {
  1055. this.$refs.outsourcingListRef.getPleaseData(
  1056. this.workData.list[0].code
  1057. );
  1058. });
  1059. },
  1060. handOutsource(workOrderId) {
  1061. this.isType = '';
  1062. // return
  1063. let param = {
  1064. taskId: this.taskObj.id,
  1065. workOrderId: workOrderId
  1066. };
  1067. pcCheckOutsource(param).then((res) => {
  1068. this.outsourceForm = {
  1069. ...res.data
  1070. };
  1071. // this.outsourceForm.name = this.taskObj.name + '委外';
  1072. this.isStep = false;
  1073. this.isOutsource = false;
  1074. this.isPleaseEntrust = false;
  1075. if (res.data.outsource) {
  1076. this.isType = '3';
  1077. if (!this.isStep && !this.isOutsource && !this.isPleaseEntrust) {
  1078. this.$nextTick(() => {
  1079. this.$refs.outsourcingListRef.getDataList(
  1080. this.workData.list[0].code
  1081. );
  1082. });
  1083. }
  1084. // this.getTaskInstanceByIdFn(workOrderId);
  1085. // this.$refs.outsourceListRef.getList(workOrderId);
  1086. // console.log(this.workData[0].list, 'this.workData.list');
  1087. } else {
  1088. return this.$message.warning('此工序不能委外/请托');
  1089. }
  1090. });
  1091. },
  1092. //获取工单列表
  1093. getTaskInstanceByIdFn(workOrderId) {
  1094. getTaskInstanceById(workOrderId).then((res) => {
  1095. let { data } = res;
  1096. if (data.length) {
  1097. data = data.filter((item) => item.taskId != -2);
  1098. let arr = data.findIndex(
  1099. (item) => item.sourceTaskId == this.taskObj.id
  1100. );
  1101. if (arr != -1) {
  1102. data.splice(0, arr);
  1103. }
  1104. this.$set(this.outsourceForm, 'newStepsList', data);
  1105. }
  1106. });
  1107. },
  1108. pickAdd() {
  1109. if (this.workListIds.length > 1) {
  1110. return this.$message.warning('领料只能选择一个工单!');
  1111. } else if (this.workListIds.length < 1) {
  1112. return this.$message.warning('请选择工单!');
  1113. }
  1114. this.checkPick();
  1115. // this.pickingShow = true;
  1116. },
  1117. async checkPick() {
  1118. await checkRepeatPick({
  1119. workOrderId: this.workListIds[0]
  1120. }).then((res) => {
  1121. if (res.data == 0) {
  1122. this.pickingShow = true;
  1123. } else {
  1124. this.$confirm('已经有领料是否继续重复领料?', '提示', {
  1125. confirmButtonText: '确定',
  1126. cancelButtonText: '取消',
  1127. type: 'warning'
  1128. })
  1129. .then(() => {
  1130. this.pickingShow = true;
  1131. })
  1132. .catch(() => {});
  1133. }
  1134. });
  1135. },
  1136. // 关闭领料弹窗
  1137. pickingClose(val) {
  1138. if (val) {
  1139. this.$nextTick(() => {
  1140. this.$refs.pickListRef.getList(this.workListIds);
  1141. });
  1142. }
  1143. this.pickingShow = false;
  1144. },
  1145. rowClick(row, taskId) {
  1146. if (taskId) {
  1147. let params = {
  1148. categoryId: row.categoryId,
  1149. taskId: taskId
  1150. };
  1151. getByTaskId(params).then((res) => {
  1152. this.BomObj = res.data;
  1153. this.$forceUpdate();
  1154. });
  1155. }
  1156. },
  1157. closePrenatalExamination() {
  1158. this.checkProductionResult();
  1159. },
  1160. //是否完成 产前准备 限制按钮
  1161. async checkProductionResult() {
  1162. if (
  1163. this.produceTaskInfo &&
  1164. this.workListIds.length > 0 &&
  1165. this.produceTaskInfo.id != -1
  1166. ) {
  1167. // 判断是否要求先完成 产前准备等事项
  1168. const result = await checkProductionResult({
  1169. produceTaskId: this.produceTaskInfo.id,
  1170. workOrderIds: this.workListIds
  1171. });
  1172. this.isPreProductionResult = result;
  1173. }
  1174. },
  1175. // 投料后 重新检测按钮状态
  1176. reloadFeeding() {
  1177. this.checkProductionResult();
  1178. }
  1179. },
  1180. mounted() {
  1181. this.$nextTick(() => {
  1182. const targetElements =
  1183. document.getElementsByClassName('ele-admin-tabs');
  1184. if (targetElements.length > 0) {
  1185. // 遍历所有具有 'ele-admin-tabs' 类的元素
  1186. Array.from(targetElements).forEach((element) => {
  1187. // 对每个元素添加 'new-ele-admin-tabs' 类
  1188. element.classList.add('new-ele-admin-tabs');
  1189. });
  1190. }
  1191. });
  1192. },
  1193. destroyed() {
  1194. this.$nextTick(() => {
  1195. const targetElements =
  1196. document.getElementsByClassName('ele-admin-tabs');
  1197. if (targetElements.length > 0) {
  1198. Array.from(targetElements).forEach((element) => {
  1199. element.classList.remove('new-ele-admin-tabs');
  1200. });
  1201. }
  1202. });
  1203. }
  1204. };
  1205. </script>
  1206. <style lang="scss">
  1207. .content_box {
  1208. display: flex;
  1209. }
  1210. .content_box_tab {
  1211. width: 220px;
  1212. padding: 5px;
  1213. height: calc(100vh - 73px);
  1214. background-color: #fff;
  1215. overflow-y: auto;
  1216. }
  1217. .footBtn {
  1218. position: absolute;
  1219. bottom: 20px;
  1220. left: 0;
  1221. }
  1222. .new-ele-admin-tabs {
  1223. display: none !important;
  1224. }
  1225. .c_title {
  1226. color: #157a2c;
  1227. font-size: 16px;
  1228. font-weight: bold;
  1229. }
  1230. .tableZ_box {
  1231. border: 1px solid #e3e5e5;
  1232. margin: 6px 0;
  1233. &:last-child {
  1234. border-bottom: none;
  1235. }
  1236. .row {
  1237. width: 100%;
  1238. display: flex;
  1239. }
  1240. .col {
  1241. width: calc(100% / 5);
  1242. display: flex;
  1243. align-items: center;
  1244. // min-width: 200px;
  1245. min-height: 32px;
  1246. border-bottom: 1px solid #e3e5e5;
  1247. border-right: 1px solid #e3e5e5;
  1248. &:last-child {
  1249. border-right: none;
  1250. }
  1251. .name {
  1252. display: flex;
  1253. align-items: center;
  1254. padding: 4px;
  1255. width: 60px;
  1256. height: 100%;
  1257. background-color: #d0e4d5;
  1258. color: #000;
  1259. }
  1260. .content {
  1261. padding: 4px 6px;
  1262. color: #000;
  1263. }
  1264. }
  1265. .pd6 {
  1266. padding: 0 6px;
  1267. }
  1268. }
  1269. </style>
  1270. <style lang="scss" scoped>
  1271. .seek-list {
  1272. display: flex;
  1273. justify-content: space-between;
  1274. align-items: center;
  1275. padding: 10px 10px;
  1276. }
  1277. .right_main_box {
  1278. background-color: #fff;
  1279. height: 100%;
  1280. box-sizing: border-box;
  1281. }
  1282. .index_box {
  1283. position: relative;
  1284. padding: 10px;
  1285. padding-bottom: 0;
  1286. width: 100%;
  1287. box-sizing: border-box;
  1288. min-width: 1280px !important;
  1289. height: calc(100vh - 60px);
  1290. // overflow-x: auto;
  1291. /* 当内容超出宽度时,允许水平滚动 */
  1292. white-space: nowrap;
  1293. /* 防止内部文本换行,确保所有内容都在一行显示 */
  1294. scrollbar-width: thin;
  1295. /* 设置滚动条宽度(浏览器兼容性可能有所不同) */
  1296. scrollbar-color: #40a9ff transparent;
  1297. /* 设置滚动条颜色和轨道颜色(同样,浏览器兼容性) */
  1298. }
  1299. .main {
  1300. width: 100%;
  1301. min-width: 1280px;
  1302. height: calc(100vh - 70px - 50px - 80px);
  1303. display: flex;
  1304. justify-content: space-between;
  1305. }
  1306. .left_main {
  1307. width: 100%;
  1308. height: 100%;
  1309. display: flex;
  1310. flex-direction: column;
  1311. justify-content: space-around;
  1312. min-width: 640px;
  1313. .top {
  1314. width: 100%;
  1315. height: 100%;
  1316. overflow: hidden;
  1317. }
  1318. // .bottom {
  1319. // width: 100%;
  1320. // min-height: calc((100vh - 70px - 50px - 80px - 20px) / 2);
  1321. // overflow: hidden;
  1322. // }
  1323. }
  1324. ::v-deep .el-tabs__item.is-active {
  1325. background-color: #dffade;
  1326. /* 蓝色背景 */
  1327. color: #333;
  1328. }
  1329. ::v-deep .is-active {
  1330. color: #dffade;
  1331. }
  1332. .right_main {
  1333. min-width: 640px;
  1334. padding-bottom: 12px;
  1335. height: calc((100vh - 70px - 50px - 80px - 12px));
  1336. background: #f0f3f3;
  1337. }
  1338. ::v-deep .el-tree-node__content > .el-tree-node__expand-icon {
  1339. padding: 0 !important;
  1340. }
  1341. // .menu-container {
  1342. // position: relative;
  1343. // width: 200px;
  1344. // height: 200px;
  1345. // margin: 100px;
  1346. // }
  1347. /* 主按钮 */
  1348. // .main-btn {
  1349. // width: 60px;
  1350. // height: 60px;
  1351. // background: #3498db;
  1352. // border-radius: 50%;
  1353. // color: #fff;
  1354. // font-size: 30px;
  1355. // text-align: center;
  1356. // line-height: 60px;
  1357. // cursor: pointer;
  1358. // position: absolute;
  1359. // left: 0;
  1360. // bottom: 0;
  1361. // box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  1362. // transition: transform 0.3s;
  1363. // }
  1364. // .main-btn:hover {
  1365. // transform: rotate(90deg);
  1366. // }
  1367. /* 子按钮 */
  1368. // .sub-btn {
  1369. // width: 40px;
  1370. // height: 40px;
  1371. // background: #e74c3c;
  1372. // border-radius: 50%;
  1373. // color: #fff;
  1374. // font-size: 14px;
  1375. // text-align: center;
  1376. // line-height: 50px;
  1377. // position: absolute;
  1378. // left: 5px;
  1379. // bottom: 5px;
  1380. // box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  1381. // transform: translate(0, 0);
  1382. // transition: all 0.4s ease;
  1383. // opacity: 1;
  1384. // }
  1385. /* 动画进入/离开 */
  1386. // .fan-enter-active,
  1387. // .fan-leave-active {
  1388. // transition: all 0.4s ease;
  1389. // }
  1390. // .fan-enter,
  1391. // .fan-leave-to {
  1392. // opacity: 0;
  1393. // transform: translate(0, 0);
  1394. // }
  1395. // .box {
  1396. // position: relative;
  1397. // }
  1398. .menu-container {
  1399. position: fixed;
  1400. right: 0;
  1401. margin-top: 42.5%;
  1402. width: 235px;
  1403. height: 100px;
  1404. display: flex;
  1405. justify-content: center;
  1406. align-items: center;
  1407. z-index: 999;
  1408. }
  1409. .toggle-btn {
  1410. position: absolute;
  1411. width: 55px;
  1412. height: 55px;
  1413. background: #2196f3;
  1414. border-radius: 50%;
  1415. display: flex;
  1416. justify-content: center;
  1417. align-items: center;
  1418. color: white;
  1419. font-size: 30px;
  1420. font-weight: bold;
  1421. cursor: pointer;
  1422. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  1423. z-index: 100;
  1424. transition: all 0.3s ease;
  1425. border: none;
  1426. left: 60%;
  1427. top: 60%;
  1428. transform: translate(-50%, -50%);
  1429. }
  1430. .toggle-btn:hover {
  1431. transform: translate(-50%, -50%) scale(1.05);
  1432. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  1433. }
  1434. .toggle-btn:active {
  1435. transform: translate(-50%, -50%) scale(0.95);
  1436. }
  1437. .menu-item {
  1438. position: absolute;
  1439. width: 50px;
  1440. height: 50px;
  1441. background: #4caf50;
  1442. border-radius: 50%;
  1443. display: flex;
  1444. justify-content: center;
  1445. align-items: center;
  1446. color: white;
  1447. font-size: 12px;
  1448. font-weight: bold;
  1449. box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  1450. transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  1451. transform: translate(-50%, -50%) scale(0);
  1452. opacity: 0;
  1453. pointer-events: none;
  1454. z-index: 90;
  1455. left: 55%;
  1456. top: 60%;
  1457. }
  1458. .menu-item.active {
  1459. opacity: 1;
  1460. pointer-events: auto;
  1461. transform: translate(var(--tx), var(--ty)) scale(1);
  1462. }
  1463. .menu-item:hover {
  1464. transform: translate(var(--tx), var(--ty)) scale(1.15) !important;
  1465. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  1466. background: #66bb6a;
  1467. cursor: pointer;
  1468. }
  1469. .instructions {
  1470. margin-top: 2rem;
  1471. color: white;
  1472. text-align: center;
  1473. background: rgba(255, 255, 255, 0.1);
  1474. padding: 1rem;
  1475. border-radius: 10px;
  1476. max-width: 500px;
  1477. backdrop-filter: blur(5px);
  1478. }
  1479. .custom-tree-node {
  1480. // position: absolute;
  1481. // flex: 1;
  1482. // display: flex;
  1483. // align-items: center;
  1484. // justify-content: space-between;
  1485. font-size: 14px;
  1486. padding-right: 8px;
  1487. }
  1488. .item {
  1489. margin-top: 10px;
  1490. margin-right: 40px;
  1491. }
  1492. </style>