index.vue 45 KB

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