index.vue 45 KB

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