index.vue 46 KB

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