| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575 |
- <template>
- <div class="index_box">
- <!-- <div class="menu-container">
- <div
- v-for="(item, index) in menuItems"
- :key="item.label"
- class="menu-item"
- :class="{ active: isOpen }"
- :style="getItemStyle(index)"
- @click="handleItemClick(item)"
- >
- {{ item.label }}
- </div>
- <button class="toggle-btn" @click="toggleMenu">
- {{ isOpen ? 'X' : '≡' }}
- </button>
- </div> -->
- <div class="content_box">
- <!-- @tab-click="handleClick" -->
- <!-- 工序名称 -->
- <!-- <Search></Search> -->
- <div class="content_box_tab">
- <el-input
- style="width: 160px"
- clearable
- v-model="name"
- placeholder="请输入筛选项"
- @input="seekInput"
- />
- <el-button type="text" @click="updataTaskList">刷新</el-button>
- <el-tabs
- v-model="activeName"
- type="card"
- stretch
- @tab-click="tabClickValue"
- >
- <!-- :render-content="renderContent"-->
- <el-tab-pane label="工单" name="0">
- <div class="custom-tree-node">
- <el-tree
- :data="produceTaskList"
- :props="defaultProps"
- node-key="id"
- :highlight-current="true"
- @node-click="handleNodeClick"
- ref="taskListRef"
- :key="treeKey"
- >
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span>{{ node.label }}</span>
- <span
- style="color: red; font-weight: 700"
- v-if="data.number != '0' && data.number"
- >({{ data.number >= 100 ? '99+' : data.number }})</span
- >
- </span>
- </el-tree>
- </div>
- </el-tab-pane>
- <el-tab-pane label="任务" name="1">
- <div class="custom-tree-node">
- <el-tree
- :data="produceTaskList"
- :props="defaultProps"
- node-key="id"
- :highlight-current="true"
- @node-click="handleNodeClick"
- ref="taskListRef"
- :key="treeKey"
- >
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span>{{ node.label }}</span>
- <span
- style="color: red; font-weight: 700"
- v-if="data.number != '0' && data.number"
- >({{ data.number >= 100 ? '99+' : data.number }})</span
- >
- </span>
- </el-tree>
- </div>
- <!-- <AssetTree @handleNodeClick="handleNodeClickNew" @setRootId="setRootId" id="0" :paramsType="'type'"
- ref="treeList" eqDevice="sb" /> -->
- <!-- <el-tree
- :data="factoryworkstationList"
- :props="defaultPropsTow"
- node-key="id"
- :highlight-current="true"
- @node-click="handleNodeClick"
- >
- </el-tree>-->
- </el-tab-pane>
- </el-tabs>
- </div>
- <div style="width: calc(100% - 220px)">
- <div class="seek-list" style="background-color: #157a2c">
- <div>
- <el-input
- style="width: 180px; margin-right: 5px"
- clearable
- v-model="keyWord"
- placeholder="请输入关键字"
- @clear="handleSearch"
- />
- <!-- <el-input style="width: 180px" clearable v-model="taskName" placeholder="请输入工序进度" /> -->
- <!-- -->
- <el-button
- size="mini"
- type="primary"
- style="margin: 0 5px"
- @click="handleSearch"
- >查询</el-button
- >
- <template>
- <el-popover
- placement="top-start"
- width="200"
- trigger="hover"
- content="支持工单编码,产品编码,产品名称,产品规格,牌号,型号,批次号查询。"
- >
- <i
- class="el-icon-question"
- slot="reference"
- style="color: #40a9ff; font-size: 14px"
- ></i>
- <!-- <el-button slot="reference">hover 激活</el-button> -->
- </el-popover></template
- >
- <!--
- <span>支持工单编码,产品编码,产品名称,产品规格,牌号,型号,批次号查询</span
- > -->
- </div>
- <div
- style="
- width: 55%;
- color: #fff;
- display: flex;
- justify-content: space-between;
- "
- >
- <div>
- <b style="margin-right: 50px">当前工序:{{ title }}</b>
- <b>下道工序:{{ title1 }}</b>
- </div>
- <div> 操作员:{{ info.name }} </div>
- </div>
- </div>
- <!-- :right-style="{ overflow: 'hidden' }" -->
- <ele-split-layout
- space="0px"
- width="45%"
- :resizable="true"
- :min-size="200"
- :max-size="-200"
- :left-style="{
- overflow: 'hidden',
- width: '100%'
- }"
- :responsive="false"
- style="height: calc(100vh - 70px - 50px - 90px)"
- >
- <!-- 左侧 工单列表 -->
- <div class="left_main">
- <div class="top">
- <!-- /工单列表 -->
- <produceOrder
- v-if="produceTaskList.length != 0 && activeName == '0'"
- @workSelect="workSelect"
- @rowClick="rowClick"
- ref="produceOrder"
- @getTaskName="getTaskName"
- :produceTaskInfo="produceTaskInfo"
- >
- </produceOrder>
- <task-work-list
- v-if="produceTaskList.length != 0 && activeName == '1'"
- @taskSelect="taskSelect"
- @rowTaskClick="rowTaskClick"
- ref="produceOrder"
- @getTaskName="getTaskName"
- :produceTaskInfo="produceTaskInfo"
- >
- </task-work-list>
- </div>
- <!-- <div class="bottom">
- <productionResource :BomObj="BomObj"></productionResource>
- </div> -->
- </div>
- <!-- 右侧 详情 -->
- <template v-slot:content>
- <div class="right_main">
- <!-- 领料 -->
- <!-- <div v-if="operationType == 'pick'"> -->
- <div v-if="operationType == 'pick' && activeName == '0'">
- <pickDetails
- ref="pickListRef"
- :workTaskId="workTaskId"
- :taskId="taskObj.id"
- @pickAdd="pickAdd"
- ></pickDetails>
- </div>
- <div v-if="operationType == 'feed' && activeName == '0'">
- <!-- 投料 -->
- <feeding
- :workListIds="workListIds"
- :feedNeedEquipment="feedNeedEquipment"
- @reload="reloadFeeding"
- ></feeding>
- </div>
- <div v-if="operationType == 'job'">
- <!-- // 报工列表 入库 -->
- <warehousing
- v-if="taskObj.id == -1 && activeName == '0'"
- :workListIds="workListIds"
- ref="wareRef"
- :workPlanType="workPlanType"
- ></warehousing>
- <!-- // 设备 入库 -->
- <!-- 普通报工 -->
- <!-- <jobBooking
- v-else
- :workListIds="workListIds"
- ref="jobRef"
- :reportNeedFeed="reportNeedFeed"
- ></jobBooking> -->
- <jobBooking
- v-else-if="isFinalCheckProduction && activeName == '0'"
- :workListIds="workListIds"
- ref="jobRef"
- :reportNeedFeed="reportNeedFeed"
- :workPlanType="workPlanType"
- ></jobBooking>
- <task-report
- ref="taskReportRef"
- v-if="activeName == '1' && isFinalCheckProduction"
- style="background: #fff"
- @success="successTask"
- />
- <!-- <workPlan
- style="width: 100%"
- v-else
- :workListIds="workListIds"
- ref="jobRef"
- :reportNeedFeed="reportNeedFeed"
- >
- </workPlan> -->
- </div>
- <!-- 工步 -->
- <div v-if="operationType == 'workStep'"> </div>
- <!-- 质检工序 -->
- <div v-if="operationType == 'inspection'">
- <inspection
- :workListIds="workListIds"
- ref="inspectionRef"
- ></inspection>
- </div>
- <!-- 委外 -->
- <div
- v-if="operationType == 'Outsourcing' && isType == '3'"
- class="right_main_box"
- >
- <outsourcingDetails
- ref="outsourcingListRef"
- @outsourcingAdd="outsourcingAdd"
- v-if="!isStep && !isOutsource && !isPleaseEntrust"
- :chooseType="chooseType"
- ></outsourcingDetails>
- <outsourcing
- :outsourceFormVal="outsourceForm"
- :taskObj="taskObj"
- :workListIds="workListIds[0]"
- :workData="workData"
- @changePlugIn="changePlugIn"
- @changeCancel="changeCancel"
- :chooseType="chooseType"
- v-if="isStep"
- ></outsourcing>
- <!-- -->
- <outsourceList
- :workData="workData"
- :taskObj="taskObj"
- :outsourceFormVal="outsourceForm"
- :chooseType="chooseType"
- @closeForm="closeForm"
- @outScucc="outScucc"
- v-if="isOutsource"
- ></outsourceList>
- <!--
- <outsourceList
- :outsourceFormVal="outObj"
- @closeForm="closeForm"
- @outScucc="outScucc"
- v-if="isOutsource"
- ></outsourceList> -->
- <pleaseEntrust
- :outsourceFormVal="outObj"
- @closeForm="closeForm"
- @outScucc="outScucc"
- v-if="isPleaseEntrust"
- ></pleaseEntrust>
- </div>
- <!-- <div class="menu-container">
- <div class="main-btn" @click="toggleMenu">
- <span>+</span>
- </div>
- <transition-group name="fan" tag="div">
- <div
- v-for="(btn, index) in buttons"
- :key="btn.label"
- class="sub-btn"
- :style="getBtnStyle(index)"
- v-show="isOpen"
- >
- {{ btn.label }}
- </div>
- </transition-group>
- </div> -->
- </div>
- </template>
- </ele-split-layout>
- <footBtn
- @footBtn="footBtn"
- :type="type"
- :singleReportInspection="singleReportInspection"
- style="background: rgba(223, 250, 222, 0.6); padding: 10px"
- :isPreProductionResult="isPreProductionResult"
- :activeName="activeName"
- ></footBtn>
- <!-- <div class="box"> -->
- <!-- </div> -->
- </div>
- <!-- <footBtn @footBtn="footBtn"></footBtn> -->
- </div>
- <!--领料弹框 -->
- <picking
- v-if="pickingShow"
- @close="pickingClose"
- :workListIds="workListIds"
- ></picking>
- <!-- 工艺文件 -->
- <wokePopup ref="wokePopupRef"></wokePopup>
- <!-- 检验报工 -->
- <workPlan ref="jobRefs" @closeWorkPlan="closeWorkPlan"> </workPlan>
- <!-- <workes ref="jobRefs"> </workes> -->
- <!-- :workListIds="workListIds" :taskId="taskObj.id" -->
- <!-- 工步 -->
- <workStep ref="workStepRef" />
- <!-- 任务 -->
- <TaskDialog ref="taskDialogRef" />
- <!-- 异常 -->
- <createError ref="createErrorRef" />
- <!-- 设备列表 -->
- <device ref="deviceRef" />
- <!-- 周转车列表 -->
- <turnover ref="turnoverRef" />
- <!-- BOM详情 -->
- <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
- <!-- 产前准备 、 过程控制 、产后检测 -->
- <prenatalExamination
- ref="prenatalExaminationRef"
- @close="closePrenatalExamination"
- />
- <!-- 新增请托 -->
- <addPlease ref="addPleaseRef" @refresh="refreshPlease"></addPlease>
- <!-- qualityInspection -->
- <qualityInspection ref="qualityInspectionRef"></qualityInspection>
- </div>
- </template>
- <script>
- import TaskDialog from '@/views/produce/components/taskDialog/index.vue';
- import Search from './components/search.vue';
- import footBtn from './components/footBtn.vue';
- // import produceOrder from './components/produceOrder.vue';
- import produceOrder from './components/new_produceOrder.vue';
- import productionResource from './components/productionResource/index.vue';
- import outsourcing from './components/outsourcing/index.vue';
- import picking from './components/picking/index.vue';
- import wokePopup from './components/picking/wokePopup.vue';
- import inspection from './components/inspection/newIndex.vue';
- // import inspection from './components/inspection/index.vue';
- import pickDetails from './components/picking/details.vue';
- import AssetTree from '@/components/AssetTree/joobIndex.vue';
- import feeding from './components/feeding/index.vue';
- import jobBooking from './components/jobBooking/index.vue';
- import workPlan from './components/workPlan/index.vue';
- import workes from './components/workPlan/components/work.vue';
- import warehousing from './components/warehousing/index.vue';
- // import outsourceList from './components/outsourcing/outsourceList.vue';
- import outsourceList from './components/outsourcing/new_outsourceList.vue';
- import pleaseEntrust from './components/outsourcing/pleaseEntrust.vue';
- import workStep from './components/workStep/index.vue';
- import createError from './components/createError.vue';
- import device from './components/device/index.vue';
- import turnover from './components/turnover/index.vue';
- import outsourcingDetails from './components/outsourcing/details.vue';
- import BomDetailsPop from './components/bom/detailsPop.vue';
- import { parameterGetByCode } from '@/api/system/dictionary-data';
- import addPlease from './components/outsourcing/addPlease.vue';
- import {
- getByTaskId,
- pcCheckOutsource,
- getTaskInstanceById,
- checkOutsourceMaterial,
- listTask,
- factoryworkstationPage,
- nextTask,
- singleListTask,
- pleaseEntrustManagement,
- checkPleaseEntrust,
- checkRepeatPick
- } from '@/api/produce/index';
- import prenatalExamination from './components/prenatalExamination/index.vue';
- import { workorderPage2 } from '@/api/produce/workOrder.js';
- import { checkProductionResult } from '@/api/producetaskrulerecord/index.js';
- import qualityInspection from './components/qualityInspection/index.vue';
- import { pageByCurrentUser } from '@/api/workOrderList';
- import taskWorkList from './components/taskWorkList.vue';
- import taskReport from './components/taskReport.vue';
- import { getProduceTaskList } from '@/api/aps';
- export default {
- components: {
- Search,
- footBtn,
- wokePopup,
- produceOrder,
- productionResource,
- outsourcing,
- picking,
- pickDetails,
- outsourceList,
- feeding,
- AssetTree,
- jobBooking,
- inspection,
- warehousing,
- workStep,
- workPlan,
- TaskDialog,
- createError,
- device,
- turnover,
- outsourcingDetails,
- BomDetailsPop,
- prenatalExamination,
- pleaseEntrust,
- addPlease,
- qualityInspection,
- taskWorkList,
- taskReport
- },
- data() {
- return {
- name: '',
- activeName: '0',
- taskName: '',
- keyWord: '', //搜索
- title: '',
- type: '',
- loading: false,
- operationType: null,
- popupType: '', // 弹窗
- workListIds: [],
- factoryworkstationList: [],
- title1: '',
- arr: [],
- arrTow: [],
- produceTaskList: [],
- taskDataList: [],
- produceTaskInfo: null,
- isType: '',
- isStep: false,
- outsourceForm: {},
- outObj: {},
- pickingShow: false,
- wokePopup: false,
- workPlanType: '',
- isOutsource: false,
- isPleaseEntrust: false,
- BomObj: {},
- defaultProps: {
- children: 'children',
- label: 'newName'
- },
- defaultPropsTow: {
- children: 'children',
- label: 'name',
- value: 'code'
- },
- feedNeedEquipment: 0, //投料是否要添加生产设备1是0否
- reportNeedFeed: 0, //生产质检是否需要处置再报工1是0否
- singleReportInspection: null, //获取选中的工单是单个还是批量
- workTaskId: null, //选中的工单工序id
- workStepQueryParam: {
- taskId: null,
- workOrderId: null,
- bomCategoryId: null
- },
- isFinalCheckProduction: true,
- isOpen: false,
- buttons: [
- { label: '按钮1' },
- { label: '按钮2' },
- { label: '按钮3' },
- { label: '按钮4' }
- ],
- radius: 120, // 按钮展开的半径
- isOpen: false,
- lastClicked: '无',
- menuItems: [
- { label: 'BOM', action: 'Add' },
- { label: '周转车', action: 'Bold' },
- { label: '设备', action: 'Copy' },
- { label: '产前准备', action: 'Delete' },
- { label: '过程检测', action: 'Edit' },
- { label: '产后检查', action: 'Favorite' }
- ],
- isPreProductionResult: null,
- chooseType: '1',
- isUpdataTask: false,
- treeKey: '1',
- taskData: null,
- taskRequestController: null
- };
- },
- computed: {
- taskObj() {
- return this.$store.state.user.taskObj;
- },
- info() {
- return this.$store.state.user.info;
- },
- rightShow() {
- return (type) => {};
- },
- actionMap() {
- return {
- job: this.handleJob,
- pick: this.handlePick,
- workStep: this.handleWorkStep,
- task: this.handleTask,
- work: this.handleWork,
- device: this.handleDevice,
- bom: this.handleBom,
- error: this.handleError,
- Outsourcing: this.handleOutsourcing,
- qualityInspection: this.handleQualityInspection,
- prenatalExamination: () => this.handleInspection(1),
- processDetection: () => this.handleInspection(2),
- postpartumExamination: () => this.handleInspection(3)
- };
- }
- },
- created() {
- this.init();
- this.getTaskList();
- this.getFactoryworkstationPageList();
- this.operationType = null;
- this.workListIds = [];
- },
- methods: {
- tabClickValue() {
- this.abortTaskRequest();
- this.isFinalCheckProduction = false;
- this.operationType = '';
- this.getTaskList();
- this.name = '';
- this.seekInput();
- },
- toggleMenu() {
- this.isOpen = !this.isOpen;
- },
- handleItemClick(item) {
- this.lastClicked = item.action;
- // console.log(`Clicked: ${item.label} - ${item.action}`);
- },
- getItemStyle(index) {
- if (!this.isOpen) {
- return {};
- }
- const radius = 120;
- let angle = -180 + (120 / (this.menuItems.length - 1)) * index;
- let rad = (angle * Math.PI) / 180;
- let tx = Math.cos(rad) * radius;
- let ty = Math.sin(rad) * radius;
- return {
- '--tx': `${tx}px`,
- '--ty': `${ty}px`,
- 'transition-delay': `${index * 0.05}s`
- };
- },
- abortTaskRequest() {
- if (this.taskRequestController) {
- this.taskRequestController.abort();
- this.taskRequestController = null;
- }
- },
- // 前端筛选
- seekInput() {
- // console.log(activeName);
- if (this.activeName == '0') {
- if (!this.name) return (this.produceTaskList = this.arr);
- this.produceTaskList = this.produceTaskList.filter((item) => {
- return item.name.indexOf(this.name) > -1;
- });
- } else {
- if (!this.name) return (this.factoryworkstationList = this.arrTow);
- this.factoryworkstationList = this.factoryworkstationList.filter(
- (item) => {
- return item.name.indexOf(this.name) > -1;
- }
- );
- }
- },
- // 折叠悬浮中样式调整
- init() {
- this.$store.dispatch('theme/setCollapse', true);
- },
- async getTaskName(value) {
- if (value.length > 0) {
- let res = await nextTask({
- taskId: this.taskObj.id,
- workOrderIds: value.map((item) => item.id)
- });
- this.title1 = res.data.map((item) => item.taskTypeName).toString();
- } else {
- this.title1 = '';
- }
- },
- handleSearch() {
- let obj = {
- keyWord: this.keyWord,
- taskName: this.taskName
- };
- this.$refs.produceOrder.handleSearch(obj);
- },
- handleNodeClickNew(info) {
- let current = { id: info.id };
- this.$store.commit('user/currentObj', current);
- },
- setRootId(id) {
- this.rootId = id;
- },
- // 点击工序
- handleNodeClick(data) {
- this.feedNeedEquipment = data.feedNeedEquipment;
- this.reportNeedFeed = data.reportNeedFeed;
- this.produceTaskInfo = data;
- // 重置按钮 禁用
- if (this.produceTaskInfo && this.produceTaskInfo.id != data.id) {
- this.isPreProductionResult = null;
- }
- let obj = {
- 1: `${data.workCenterName}-${data.name}(普通工序)`,
- 3: `${data.workCenterName}-${data.name}(质检工序)`,
- 4: `${data.workCenterName}-${data.name}(包装工序)`,
- 5: `${data.workCenterName}-${data.name}(入库工序)`,
- 6: `${data.workCenterName}-${data.name}(质检工序)`
- };
- this.title = obj[data.type] || '';
- this.type = data.type;
- let taskObj = {};
- taskObj = this.produceTaskList.find((item) => item.id === data.id);
- taskObj.isOrderListData = false;
- this.$store.commit('user/setTaskObj', taskObj);
- },
- handleChoose(val) {
- console.log(val);
- },
- // 获取工序列表
- getTaskList() {
- if (localStorage.getItem('singleUserInfo') == '1') {
- singleListTask(
- JSON.parse(localStorage.getItem('chooseUserInfo'))
- ).then((res) => {
- this.handleTaskList(res);
- });
- } else {
- listTask().then((res) => {
- this.handleTaskList(res);
- if (this.activeName === '0') {
- this.getTaskWorkNumber();
- } else if (this.activeName === '1') {
- this.getTaskWorkList();
- }
- });
- }
- // if (localStorage.getItem('singleUserInfo') == '1') {
- // singleListTask(
- // JSON.parse(localStorage.getItem('chooseUserInfo'))
- // ).then((res) => {
- // res.map((v) => {
- // v.newName = `${v.workCenterName}-${v.name}`;
- // });
- // this.produceTaskList = res;
- // this.arr = JSON.parse(JSON.stringify(this.produceTaskList));
- // if (this.produceTaskList?.length) {
- // this.$store.commit('user/setTaskObj', this.produceTaskList[0]);
- // this.$nextTick(() => {
- // this.$refs.taskListRef?.setCurrentKey(
- // this.produceTaskList[0].id
- // );
- // });
- // this.produceTaskInfo = this.produceTaskList[0];
- // }
- // });
- // } else {
- // listTask().then((res) => {
- // res.map((v) => {
- // v.newName = `${v.workCenterName}-${v.name}`;
- // });
- // this.produceTaskList = res;
- // this.taskDataList = res;
- // this.arr = JSON.parse(JSON.stringify(this.produceTaskList));
- // if (this.produceTaskList?.length) {
- // this.$store.commit('user/setTaskObj', this.produceTaskList[0]);
- // this.$nextTick(() => {
- // this.$refs.taskListRef?.setCurrentKey(
- // this.produceTaskList[0].id
- // );
- // });
- // this.produceTaskInfo = this.produceTaskList[0];
- // }
- // if (this.activeName == '0') {
- // this.getTaskWorkNumber();
- // } else if (this.activeName == '1') {
- // this.getTaskWorkList();
- // }
- // });
- // }
- },
- handleTaskList(res) {
- res.forEach((v) => {
- v.newName = `${v.workCenterName}-${v.name}`;
- });
- this.produceTaskList = res;
- this.taskDataList = res;
- this.arr = JSON.parse(JSON.stringify(res));
- // 默认选中第一个
- if (res?.length) {
- this.$store.commit('user/setTaskObj', res[0]);
- this.produceTaskInfo = res[0];
- this.$nextTick(() => {
- this.$refs.taskListRef?.setCurrentKey(res[0].id);
- });
- }
- },
- async fetchTaskWorkCount(apiFn) {
- this.taskRequestController = new AbortController();
- const signal = this.taskRequestController.signal;
- try {
- const requests = this.taskDataList.map((item) =>
- apiFn(
- {
- pageNum: 1,
- size: 5000,
- taskId: item.id
- },
- { signal }
- )
- );
- const results = await Promise.all(requests);
- this.taskDataList = this.taskDataList.map((item, index) => ({
- ...item,
- number: results[index]?.count || 0
- }));
- this.produceTaskList = this.taskDataList;
- this.treeKey = Date.now();
- } catch (err) {
- if (err?.name == 'CanceledError' || err?.name == 'AbortError') {
- return;
- }
- console.error(err);
- }
- },
- //获取工序下所有的工单集合
- async getTaskWorkNumber() {
- await this.fetchTaskWorkCount(workorderPage2);
- // for (const [index, item] of this.taskDataList.entries()) {
- // await workorderPage2({
- // pageNum: 1,
- // size: 5000,
- // taskId: item.id
- // }).then((res) => {
- // this.taskDataList[index].number = res.count;
- // });
- // }
- // this.produceTaskList = this.taskDataList;
- // this.treeKey = Date.now();
- },
- //获取工序下所有的任务集合
- async getTaskWorkList() {
- await this.fetchTaskWorkCount(pageByCurrentUser);
- // for (const [index, item] of this.taskDataList.entries()) {
- // await pageByCurrentUser({
- // pageNum: 1,
- // size: 5000,
- // taskId: item.id
- // }).then((res) => {
- // this.taskDataList[index].number = res.count;
- // });
- // }
- // this.produceTaskList = this.taskDataList;
- // this.treeKey = Date.now();
- },
- // 获取工位
- getFactoryworkstationPageList() {
- factoryworkstationPage({ pageNum: 1, size: 99999999 }).then((res) => {
- this.factoryworkstationList = res.list;
- this.arrTow = JSON.parse(JSON.stringify(this.factoryworkstationList));
- // newName
- });
- },
- changeCancel(activeType) {
- this.isStep = false;
- this.chooseType = activeType;
- // this.$nextTick(() => {
- // this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
- // });
- if (this.chooseType == '1') {
- this.$nextTick(() => {
- this.$refs.outsourcingListRef.getDataList(
- this.workData.list[0].code
- );
- });
- } else if (this.chooseType == '2') {
- this.$nextTick(() => {
- this.$refs.outsourcingListRef.getPleaseData(
- this.workData.list[0].code
- );
- });
- }
- },
- closeForm() {
- this.isOutsource = false;
- this.isPleaseEntrust = false;
- this.$nextTick(() => {
- this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
- });
- },
- outScucc() {
- // this.operationType = null;
- this.isOutsource = false;
- this.isPleaseEntrust = false;
- this.$nextTick(() => {
- this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
- });
- },
- updataTaskList() {
- this.isUpdataTask = true;
- this.getTaskList();
- },
- // 切换组件
- async changePlugIn(e, index) {
- if (index == '1') {
- this.outObj = e;
- let req = {
- taskId: e.taskId,
- taskIds: e.taskIds,
- workOrderId: e.workOrderId,
- quantity: e.formedNumLast
- };
- const URL =
- index == '1' ? checkOutsourceMaterial : checkPleaseEntrust;
- const res = await URL(req);
- this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
- this.isStep = false;
- this.isOutsource = true;
- } else if (index == '2') {
- this.outObj = e;
- let req = {
- taskId: e.taskId,
- taskIds: e.taskIds,
- workOrderId: e.workOrderId,
- quantity: e.formedNumLast
- };
- const res = await checkPleaseEntrust(req);
- this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
- this.isStep = false;
- this.isPleaseEntrust = true;
- // this.isOutsource = true;
- console.log(res, '请托的结果');
- }
- },
- renderContent(h, { node, data, store }) {
- // Use createElement syntax instead of JSX
- return h('span', { class: 'custom-tree-node' }, [
- // h('span', node.label),
- h(
- 'el-badge',
- {
- props: {
- value: data.number != '0' ? data.number : '',
- max: 99
- },
- class: 'item'
- },
- [h('span', node.label)]
- )
- ]);
- },
- workSelect(data) {
- this.workTaskId = data.list.length > 0 ? data.list[0].taskId : null;
- this.workStepQueryParam.taskId =
- data.list.length > 0 ? data.list[0].taskId : null;
- this.workStepQueryParam.workOrderId =
- data.list.length > 0 ? data.list[0].id : null;
- this.workStepQueryParam.bomCategoryId =
- data.list.length > 0 ? data.list[0].bomCategoryId : null;
- this.singleReportInspection =
- data.list.length > 0 ? data.list[0].singleReport : null; //获取选中的工单是单个还是批量
- this.isStep = false;
- this.operationType = null;
- this.workListIds = data.ids;
- this.workData = data;
- this.checkProductionResult();
- },
- taskSelect(data) {
- this.taskData = data.list[0];
- },
- pickingWokeClose() {
- this.wokePopup = false;
- },
- async getCodeData(req) {
- await parameterGetByCode({ code: 'enable_quality_plus' }).then(
- (res) => {
- if (res.value == '1') {
- this.$refs.jobRefs.open(req);
- }
- }
- );
- },
- closeWorkPlan(type) {
- this.workPlanType = type;
- },
- async checkQualityResult() {
- if (
- this.produceTaskInfo &&
- this.workListIds.length > 0 &&
- this.produceTaskInfo.id != -1
- ) {
- // 判断是否要求先完成 产前准备等事项
- const result = await checkProductionResult({
- produceTaskId: this.produceTaskInfo.id,
- workOrderIds: this.workListIds
- });
- return result;
- }
- },
- // async footBtn(t) {
- // this.workPlanType = '';
- // if ((t == 'work' || t == 'workStep', t === 'task')) {
- // this.popupType = t;
- // } else {
- // this.operationType = t;
- // }
- // if (
- // Object.keys(this.$store.state.user.taskObj).length === 0 &&
- // this.$store.state.user.taskObj.constructor === Object
- // ) {
- // this.$message.warning('请选择工序');
- // return true;
- // }
- // if (['pick', 'feed', 'job', 'work', 'workStep', 'task'].includes(t)) {
- // if (this.activeName == '0') {
- // if (this.workListIds.length == 0) {
- // this.$message.warning('请选择工单列表');
- // return false;
- // }
- // }
- // }
- // if (t === 'job') {
- // let resultValue = '0';
- // await parameterGetByCode({
- // code: 'first_article_dual_inspection_for_report'
- // }).then((res) => {
- // resultValue = res.value;
- // });
- // if (this.activeName == '1') {
- // if (!this.taskData) {
- // this.isFinalCheckProduction = false;
- // return this.$message.warning('请选择一条任务单进行报工');
- // } else {
- // this.isFinalCheckProduction = true;
- // }
- // const row = this.taskData;
- // if (resultValue == '1') {
- // if (row.totalFirstArticleDualInspectionStatus != 2) {
- // this.isFinalCheckProduction = false;
- // return this.$message.warning('请先完成首件两检再报工');
- // }
- // } else {
- // this.isFinalCheckProduction = true;
- // }
- // let currentRow = {
- // assignCode: row.assignCode,
- // mesWorkOrderCode: row.mesWorkOrderCode,
- // workOrderCode: row.workOrderCode,
- // productionPlanCode: row.productionPlanCode,
- // produceRoutingName: row.produceRoutingName,
- // formingNum: row.formingNum,
- // assignTeamName: row.assignTeamName,
- // formingWeight: row.formingWeight,
- // planStartTime: row.planStartTime,
- // planCompleteTime: row.planCompleteTime,
- // startTime: row.startTime,
- // firstTaskId: row.firstTaskId,
- // endTime: row.endTime,
- // taskName: row.taskName,
- // firstTaskName: row.firstTaskName,
- // assigneeType: row.assigneeType ? row.assigneeType.desc : '',
- // assigneeName: row.assigneeName,
- // weight: row.weight,
- // quantity: row.quantity,
- // durationText: row.durationText,
- // apsAssigneeId: row.id,
- // batchNo: row.batchNo,
- // productCode: row.productCode,
- // productName: row.productName,
- // specification: row.specification,
- // newWeightUnit: row.newWeightUnit,
- // measuringUnit: row.measuringUnit
- // };
- // let form = {
- // realEndTime: row.realEndTime,
- // realStartTime: row.realStartTime,
- // unqualifiedWeight: row.unqualifiedWeight,
- // unqualifiedQuantity: row.unqualifiedQuantity,
- // qualifiedWeight: row.qualifiedWeight,
- // remark: row.assigneeRemark,
- // qualifiedQuantity: row.qualifiedQuantity,
- // reportQuantity: row.reportQuantity,
- // lossQuantity: row.lossQuantity
- // };
- // this.$nextTick(() => {
- // this.$refs.taskReportRef.open('repoort', currentRow, form);
- // });
- // } else {
- // this.isFinalCheckProduction = true;
- // let req = {
- // taskId: this.taskObj.id,
- // workOrderId: this.workListIds[0],
- // data: this.workData.list
- // };
- // if (resultValue == '1') {
- // const result = await this.checkQualityResult();
- // if (!result) return;
- // const firstArticleResult =
- // result.firstArticleDualInspectionResult ?? true;
- // this.isFinalCheckProduction = firstArticleResult;
- // if (!firstArticleResult) {
- // return this.$message.warning('请完成首件两检再报工!');
- // }
- // }
- // if (
- // this.taskObj.type == 2 ||
- // this.taskObj.type == 3 ||
- // this.taskObj.type == 6
- // ) {
- // this.getCodeData(req);
- // }
- // }
- // }
- // if (t == 'pick') {
- // if (this.activeName == '0') {
- // this.$nextTick(() => {
- // console.log(this.taskObj);
- // this.$refs.pickListRef.getList(this.workListIds);
- // });
- // }
- // }
- // // 工步
- // if (t === 'workStep') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('工步只能选择一个工单!');
- // }
- // this.$refs.workStepRef.open(this.workStepQueryParam);
- // }
- // }
- // if (t === 'task') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('任务只能选择一个工单!');
- // }
- // this.$refs.taskDialogRef.open(
- // this.workStepQueryParam,
- // this.workData.list[0]
- // );
- // }
- // }
- // if (t === 'error') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('异常只能选择一个工单!');
- // } else if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // }
- // this.$refs.createErrorRef.open('add', this.workData.list[0]);
- // }
- // }
- // // 工艺路线 *** 修改 判断只能选择一个
- // // if (t === 'work') {
- // // let req = {
- // // taskId: this.taskObj.id,
- // // workOrderId: this.workListIds[0]
- // // };
- // // this.$refs.wokePopupRef.open(req);
- // // }
- // if (t === 'work') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('工艺文件只能选择一个工单!');
- // } else if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // }
- // await parameterGetByCode({
- // code: 'mes_craft_file_by_category_code'
- // }).then((res) => {
- // console.log(this.workData.list, 'this.workData.list');
- // if (res.value == '1') {
- // let req = {
- // taskId: this.taskObj.id,
- // workOrderId: this.workListIds[0],
- // productCode: this.workData.list[0].productCode
- // };
- // this.$refs.wokePopupRef.openTwo(req);
- // } else {
- // let req = {
- // taskId: this.taskObj.id,
- // workOrderId: this.workListIds[0]
- // };
- // this.$refs.wokePopupRef.open(req);
- // }
- // });
- // }
- // }
- // if (t == 'feed') {
- // }
- // if (t == 'device') {
- // if (this.activeName == '0') {
- // if (this.taskObj.id) {
- // this.$refs.deviceRef.open(this.taskObj.id);
- // } else {
- // this.$message.warning('请选择工序');
- // }
- // }
- // }
- // if (t == 'turnover') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // } else {
- // const codeListData = [];
- // this.workData.list.forEach((it) => {
- // codeListData.push(it.code);
- // });
- // this.$refs.turnoverRef.open(codeListData);
- // }
- // }
- // }
- // if (t == 'bom') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('查看BOM详情只能选择一个工单!');
- // } else if (this.workListIds.length < 1)
- // return this.$message.warning('请选择工单!');
- // else {
- // console.log(this.workData);
- // const row = this.workData.list[0];
- // let rowData = {
- // categoryId: row.categoryId,
- // categoryName: row.bomCategoryName,
- // code: row.code,
- // versions: row.bomCategoryVersions,
- // rootPathIdParent: row.categoryLevelPathIdParent || '',
- // isProduct: true,
- // bomType: Number(row.bomType),
- // isTemp: 0
- // };
- // this.$refs.bomDrawer.open(rowData);
- // }
- // }
- // }
- // // 委外
- // if (t == 'Outsourcing') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('委外请托工序只能选择一个工单!');
- // } else if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // } else {
- // console.log(this.workData, 'this.workData');
- // // /
- // this.handOutsource(this.workListIds[0]);
- // }
- // }
- // }
- // // 产前准备 过程控制 产后检查
- // if (
- // t == 'prenatalExamination' ||
- // t == 'processDetection' ||
- // t == 'postpartumExamination'
- // ) {
- // if (this.activeName == '0') {
- // if (this.workListIds.length > 1) {
- // if (t == 'prenatalExamination') {
- // return this.$message.warning('产前准备只能选择一个工单!');
- // }
- // if (t == 'processDetection') {
- // return this.$message.warning('过程控制只能选择一个工单!');
- // }
- // return this.$message.warning('产后检查只能选择一个工单!');
- // }
- // if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // }
- // let reportWorkType = 1;
- // switch (t) {
- // case 'prenatalExamination':
- // reportWorkType = 1;
- // break;
- // case 'processDetection':
- // reportWorkType = 2;
- // break;
- // default:
- // reportWorkType = 3;
- // break;
- // }
- // this.$refs.prenatalExaminationRef.open(
- // this.workData.list[0],
- // this.produceTaskInfo,
- // reportWorkType
- // );
- // }
- // }
- // // 首件两检
- // if (t == 'qualityInspection') {
- // if (this.activeName == '0') {
- // if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // }
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('首件两检只能选择一个工单!');
- // }
- // this.$refs.qualityInspectionRef.open(
- // this.workData.list[0],
- // this.produceTaskInfo
- // );
- // } else {
- // if (!this.taskData) {
- // return this.$message.warning('请选择一条任务单首件两检');
- // }
- // this.selfRequest(this.taskData);
- // }
- // }
- // },
- // async footBtn(t) {
- // this.initOperationType(t);
- // if (!this.checkTaskSelected()) return;
- // if (!this.checkWorkOrderSelected(t)) return;
- // switch (t) {
- // case 'job':
- // await this.handleJob();
- // break;
- // case 'pick':
- // this.handlePick();
- // break;
- // case 'workStep':
- // this.handleWorkStep();
- // break;
- // case 'task':
- // this.handleTask();
- // break;
- // case 'error':
- // this.handleError();
- // break;
- // case 'work':
- // await this.handleWork();
- // break;
- // case 'device':
- // this.handleDevice();
- // break;
- // case 'turnover':
- // this.handleTurnover();
- // break;
- // case 'bom':
- // this.handleBom();
- // break;
- // case 'Outsourcing':
- // this.handleOutsourcing();
- // break;
- // case 'prenatalExamination':
- // case 'processDetection':
- // case 'postpartumExamination':
- // this.handleInspection(t);
- // break;
- // case 'qualityInspection':
- // this.handleQualityInspection();
- // break;
- // default:
- // break;
- // }
- // },
- // initOperationType(t) {
- // this.workPlanType = '';
- // if (['work', 'workStep', 'task'].includes(t)) {
- // this.popupType = t;
- // } else {
- // this.operationType = t;
- // }
- // },
- // checkTaskSelected() {
- // const taskObj = this.$store.state.user.taskObj;
- // if (!taskObj || Object.keys(taskObj).length === 0) {
- // this.$message.warning('请选择工序');
- // return false;
- // }
- // return true;
- // },
- // checkWorkOrderSelected(t) {
- // const needCheck = ['pick', 'feed', 'job', 'work', 'workStep', 'task'];
- // if (!needCheck.includes(t)) return true;
- // if (this.activeName === '0' && this.workListIds.length === 0) {
- // this.$message.warning('请选择工单列表');
- // return false;
- // }
- // return true;
- // },
- // async needFirstArticleCheck() {
- // const res = await parameterGetByCode({
- // code: 'first_article_dual_inspection_for_report'
- // });
- // return res?.value === '1';
- // },
- // async handleJob() {
- // const needCheck = await this.needFirstArticleCheck();
- // if (this.activeName === '1') {
- // this.handleSingleTaskJob(needCheck);
- // } else {
- // await this.handleBatchJob(needCheck);
- // }
- // },
- // handleSingleTaskJob(needCheck) {
- // if (!this.taskData) {
- // this.isFinalCheckProduction = false;
- // return this.$message.warning('请选择一条任务单进行报工');
- // }
- // const row = this.taskData;
- // if (needCheck && row.totalFirstArticleDualInspectionStatus !== 2) {
- // this.isFinalCheckProduction = false;
- // return this.$message.warning('请先完成首件两检再报工');
- // }
- // this.isFinalCheckProduction = true;
- // const currentRow = this.buildTaskRow(row);
- // const form = this.buildTaskForm(row);
- // this.$nextTick(() => {
- // this.$refs.taskReportRef.open('repoort', currentRow, form);
- // });
- // },
- // async handleBatchJob(needCheck) {
- // this.isFinalCheckProduction = true;
- // const req = {
- // taskId: this.taskObj.id,
- // workOrderId: this.workListIds[0],
- // data: this.workData.list
- // };
- // if (needCheck) {
- // const result = await this.checkQualityResult();
- // const ok = result?.firstArticleDualInspectionResult ?? true;
- // if (!ok) {
- // this.isFinalCheckProduction = false;
- // return this.$message.warning('请完成首件两检再报工!');
- // }
- // }
- // if ([2, 3, 6].includes(this.taskObj.type)) {
- // this.getCodeData(req);
- // }
- // },
- // buildTaskRow(row) {
- // return {
- // assignCode: row.assignCode,
- // mesWorkOrderCode: row.mesWorkOrderCode,
- // workOrderCode: row.workOrderCode,
- // productionPlanCode: row.productionPlanCode,
- // produceRoutingName: row.produceRoutingName,
- // formingNum: row.formingNum,
- // assignTeamName: row.assignTeamName,
- // formingWeight: row.formingWeight,
- // planStartTime: row.planStartTime,
- // planCompleteTime: row.planCompleteTime,
- // startTime: row.startTime,
- // firstTaskId: row.firstTaskId,
- // endTime: row.endTime,
- // taskName: row.taskName,
- // firstTaskName: row.firstTaskName,
- // assigneeType: row.assigneeType?.desc || '',
- // assigneeName: row.assigneeName,
- // weight: row.weight,
- // quantity: row.quantity,
- // durationText: row.durationText,
- // apsAssigneeId: row.id,
- // batchNo: row.batchNo,
- // productCode: row.productCode,
- // productName: row.productName,
- // specification: row.specification,
- // newWeightUnit: row.newWeightUnit,
- // measuringUnit: row.measuringUnit
- // };
- // },
- // buildTaskForm(row) {
- // return {
- // realEndTime: row.realEndTime,
- // realStartTime: row.realStartTime,
- // unqualifiedWeight: row.unqualifiedWeight,
- // unqualifiedQuantity: row.unqualifiedQuantity,
- // qualifiedWeight: row.qualifiedWeight,
- // remark: row.assigneeRemark,
- // qualifiedQuantity: row.qualifiedQuantity,
- // reportQuantity: row.reportQuantity,
- // lossQuantity: row.lossQuantity
- // };
- // },
- // handlePick() {
- // this.$nextTick(() => {
- // this.$refs.pickListRef.getList(this.workListIds);
- // });
- // },
- // handleWorkStep() {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('工步只能选择一个工单!');
- // }
- // this.$refs.workStepRef.open(this.workStepQueryParam);
- // },
- // handleTask() {
- // if (this.workListIds.length > 1) {
- // return this.$message.warning('任务只能选择一个工单!');
- // }
- // this.$refs.taskDialogRef.open(
- // this.workStepQueryParam,
- // this.workData.list[0]
- // );
- // },
- // handleError() {
- // if (this.workListIds.length !== 1) {
- // return this.$message.warning('异常只能选择一个工单!');
- // }
- // this.$refs.createErrorRef.open('add', this.workData.list[0]);
- // },
- // async handleWork() {
- // if (this.workListIds.length !== 1) {
- // return this.$message.warning('工艺文件只能选择一个工单!');
- // }
- // const res = await parameterGetByCode({
- // code: 'mes_craft_file_by_category_code'
- // });
- // const baseReq = {
- // taskId: this.taskObj.id,
- // workOrderId: this.workListIds[0]
- // };
- // if (res?.value === '1') {
- // this.$refs.wokePopupRef.openTwo({
- // ...baseReq,
- // productCode: this.workData.list[0].productCode
- // });
- // } else {
- // this.$refs.wokePopupRef.open(baseReq);
- // }
- // },
- // handleDevice() {
- // if (!this.taskObj.id) {
- // return this.$message.warning('请选择工序');
- // }
- // this.$refs.deviceRef.open(this.taskObj.id);
- // },
- // handleTurnover() {
- // if (this.workListIds.length < 1) {
- // return this.$message.warning('请选择工单!');
- // }
- // const codes = this.workData.list.map((it) => it.code);
- // this.$refs.turnoverRef.open(codes);
- // },
- // handleBom() {
- // if (this.workListIds.length !== 1) {
- // return this.$message.warning('查看BOM只能选择一个工单!');
- // }
- // const row = this.workData.list[0];
- // this.$refs.bomDrawer.open({
- // categoryId: row.categoryId,
- // categoryName: row.bomCategoryName,
- // code: row.code,
- // versions: row.bomCategoryVersions,
- // rootPathIdParent: row.categoryLevelPathIdParent || '',
- // isProduct: true,
- // bomType: Number(row.bomType),
- // isTemp: 0
- // });
- // },
- // handleOutsourcing() {
- // if (this.workListIds.length !== 1) {
- // return this.$message.warning('委外只能选择一个工单!');
- // }
- // this.handOutsource(this.workListIds[0]);
- // },
- // handleInspection(t) {
- // if (this.workListIds.length !== 1) {
- // const map = {
- // prenatalExamination: '产前准备',
- // processDetection: '过程控制',
- // postpartumExamination: '产后检查'
- // };
- // return this.$message.warning(`${map[t]}只能选择一个工单!`);
- // }
- // const typeMap = {
- // prenatalExamination: 1,
- // processDetection: 2,
- // postpartumExamination: 3
- // };
- // this.$refs.prenatalExaminationRef.open(
- // this.workData.list[0],
- // this.produceTaskInfo,
- // typeMap[t]
- // );
- // },
- // handleQualityInspection() {
- // if (this.activeName === '0') {
- // if (this.workListIds.length !== 1) {
- // return this.$message.warning('首件两检只能选择一个工单!');
- // }
- // this.$refs.qualityInspectionRef.open(
- // this.workData.list[0],
- // this.produceTaskInfo
- // );
- // } else {
- // if (!this.taskData) {
- // return this.$message.warning('请选择一条任务单首件两检');
- // }
- // this.selfRequest(this.taskData);
- // }
- // },
- async footBtn(t) {
- this.workPlanType = '';
- if (['work', 'workStep', 'task'].includes(t)) {
- this.popupType = t;
- } else {
- this.operationType = t;
- }
- if (!this.checkTaskSelected()) return;
- const handler = this.actionMap[t];
- if (handler) {
- await handler.call(this);
- }
- },
- checkTaskSelected() {
- const taskObj = this.$store.state.user.taskObj;
- if (!taskObj || Object.keys(taskObj).length === 0) {
- this.$message.warning('请选择工序');
- return false;
- }
- return true;
- },
- checkWorkOrder({ min = 1, max = Infinity, msg = {} }) {
- const len = this.workListIds.length;
- if (len < min) {
- this.$message.warning(msg.min || '请选择工单!');
- return false;
- }
- if (len > max) {
- this.$message.warning(msg.max || '只能选择一个工单!');
- return false;
- }
- return true;
- },
- async getFirstArticleConfig() {
- const res = await parameterGetByCode({
- code: 'first_article_dual_inspection_for_report'
- });
- return res.value;
- },
- /* ================== job ================== */
- async handleJob() {
- const resultValue = await this.getFirstArticleConfig();
- if (this.activeName == '1') {
- return this.handleTaskJob(resultValue);
- }
- return this.handleWorkOrderJob(resultValue);
- },
- async handleTaskJob(resultValue) {
- if (!this.taskData) {
- this.isFinalCheckProduction = false;
- return this.$message.warning('请选择一条任务单进行报工');
- }
- if (this.taskData.disposalStatus == '0') {
- return this.$message.warning('请先接收任务再做首件两检');
- }
- if (this.taskData.disposalStatus == '2') {
- return this.$message.warning('该任务单已被拒绝');
- }
- const row = this.taskData;
- if (
- resultValue === '1' &&
- row.totalFirstArticleDualInspectionStatus !== 2
- ) {
- this.isFinalCheckProduction = false;
- return this.$message.warning('请先完成首件两检再报工');
- }
- this.isFinalCheckProduction = true;
- const currentRow = {
- assignCode: row.assignCode,
- mesWorkOrderCode: row.mesWorkOrderCode,
- workOrderCode: row.workOrderCode,
- productionPlanCode: row.productionPlanCode,
- produceRoutingName: row.produceRoutingName,
- formingNum: row.formingNum,
- assignTeamName: row.assignTeamName,
- formingWeight: row.formingWeight,
- planStartTime: row.planStartTime,
- planCompleteTime: row.planCompleteTime,
- startTime: row.startTime,
- firstTaskId: row.firstTaskId,
- endTime: row.endTime,
- taskName: row.taskName,
- firstTaskName: row.firstTaskName,
- assigneeType: row.assigneeType?.desc || '',
- assigneeName: row.assigneeName,
- weight: row.weight,
- quantity: row.quantity,
- durationText: row.durationText,
- apsAssigneeId: row.id,
- batchNo: row.batchNo,
- productCode: row.productCode,
- productName: row.productName,
- specification: row.specification,
- newWeightUnit: row.newWeightUnit,
- measuringUnit: row.measuringUnit
- };
- const form = {
- realEndTime: row.realEndTime,
- realStartTime: row.realStartTime,
- unqualifiedWeight: row.unqualifiedWeight,
- unqualifiedQuantity: row.unqualifiedQuantity,
- qualifiedWeight: row.qualifiedWeight,
- remark: row.assigneeRemark,
- qualifiedQuantity: row.qualifiedQuantity,
- reportQuantity: row.reportQuantity,
- lossQuantity: row.lossQuantity
- };
- this.$nextTick(() => {
- this.$refs.taskReportRef.open('repoort', currentRow, form);
- });
- },
- async handleWorkOrderJob(resultValue) {
- if (!this.checkWorkOrder({ min: 1 })) return;
- if (resultValue === '1') {
- const result = await this.checkQualityResult();
- if (!result?.firstArticleDualInspectionResult) {
- return this.$message.warning('请完成首件两检再报工!');
- }
- }
- if ([2, 3, 6].includes(this.taskObj.type)) {
- this.getCodeData({
- taskId: this.taskObj.id,
- workOrderId: this.workListIds[0],
- data: this.workData.list
- });
- }
- },
- /* ================== pick ================== */
- handlePick() {
- if (this.activeName != '0') return;
- if (!this.checkWorkOrder({ min: 1 })) return;
- this.$nextTick(() => {
- this.$refs.pickListRef.getList(this.workListIds);
- });
- },
- /* ================== workStep ================== */
- handleWorkStep() {
- if (this.activeName != '0') return;
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1,
- msg: { max: '工步只能选择一个工单!' }
- })
- )
- return;
- this.$refs.workStepRef.open(this.workStepQueryParam);
- },
- /* ================== task ================== */
- handleTask() {
- if (this.activeName != '0') return;
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1,
- msg: { max: '任务只能选择一个工单!' }
- })
- )
- return;
- this.$refs.taskDialogRef.open(
- this.workStepQueryParam,
- this.workData.list[0]
- );
- },
- /* ================== work ================== */
- async handleWork() {
- if (this.activeName != '0') return;
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1,
- msg: { max: '工艺文件只能选择一个工单!' }
- })
- )
- return;
- const res = await parameterGetByCode({
- code: 'mes_craft_file_by_category_code'
- });
- const req = {
- taskId: this.taskObj.id,
- workOrderId: this.workListIds[0],
- productCode: this.workData.list[0].productCode
- };
- res.value === '1'
- ? this.$refs.wokePopupRef.openTwo(req)
- : this.$refs.wokePopupRef.open(req);
- },
- /* ================== device ================== */
- handleDevice() {
- if (this.activeName != '0') return;
- if (!this.taskObj.id) {
- return this.$message.warning('请选择工序');
- }
- this.$refs.deviceRef.open(this.taskObj.id);
- },
- /* ================== bom ================== */
- handleBom() {
- if (this.activeName == '0') {
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1,
- msg: { max: '查看BOM详情只能选择一个工单!' }
- })
- )
- return;
- const row = this.workData.list[0];
- this.$refs.bomDrawer.open({
- categoryId: row.categoryId,
- categoryName: row.bomCategoryName,
- code: row.code,
- versions: row.bomCategoryVersions,
- rootPathIdParent: row.categoryLevelPathIdParent || '',
- isProduct: true,
- bomType: Number(row.bomType),
- isTemp: 0
- });
- } else if (this.activeName == '1') {
- if (!this.taskData) {
- return this.$message.warning('请选择一条任务单');
- }
- const row = this.taskData;
- this.$refs.bomDrawer.open({
- categoryId: row.categoryId,
- categoryName: row.bomCategoryName,
- code: row.code ? row.code : '',
- versions: row.bomCategoryVersions,
- rootPathIdParent: row.categoryLevelPathIdParent || '',
- isProduct: true,
- bomType: Number(row.bomType),
- isTemp: 0
- });
- }
- },
- /* ================== Outsourcing ================== */
- handleOutsourcing() {
- if (this.activeName != '0') return;
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1,
- msg: { max: '委外请托工序只能选择一个工单!' }
- })
- )
- return;
- this.handOutsource(this.workListIds[0]);
- },
- /* ================== 产前 / 过程 / 产后 ================== */
- handleInspection(type) {
- if (this.activeName != '0') return;
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1
- })
- )
- return;
- this.$refs.prenatalExaminationRef.open(
- this.workData.list[0],
- this.produceTaskInfo,
- type
- );
- },
- /* ================== error ================== */
- handleError() {
- if (this.activeName == '0') {
- if (this.workListIds.length !== 1) {
- return this.$message.warning('异常只能选择一个工单!');
- }
- this.$refs.createErrorRef.open('add', this.workData.list[0]);
- }
- },
- /* ================== 首件两检 ================== */
- handleQualityInspection() {
- if (this.activeName == '0') {
- if (
- !this.checkWorkOrder({
- min: 1,
- max: 1,
- msg: { max: '首件两检只能选择一个工单!' }
- })
- )
- return;
- this.$refs.qualityInspectionRef.open(
- this.workData.list[0],
- this.produceTaskInfo
- );
- } else {
- if (!this.taskData) {
- return this.$message.warning('请选择一条任务单进行首件两检');
- }
- if (this.taskData.disposalStatus == '0') {
- return this.$message.warning('请先接收任务再做首件两检');
- }
- if (this.taskData.disposalStatus == '2') {
- return this.$message.warning('该任务单已被拒绝');
- }
- this.selfRequest(this.taskData);
- }
- },
- successTask() {
- this.isFinalCheckProduction = false;
- },
- async selfRequest(row) {
- let params = {
- routingId: row.produceRoutingId,
- pageNum: 1,
- size: -1,
- isDetail: true
- };
- const result = await getProduceTaskList(params);
- const taskData = result.list.find(
- (item) => item.sourceTaskId === row.taskId
- );
- this.$refs.qualityInspectionRef.open(row, taskData, 1);
- },
- outsourcingAdd(type, activeName) {
- this.chooseType = activeName;
- this.getTaskInstanceByIdFn(this.workListIds[0]);
- if (this.chooseType == '2') {
- this.isStep = true;
- } else {
- this.isOutsource = true;
- }
- },
- refreshPlease() {
- this.$nextTick(() => {
- this.$refs.outsourcingListRef.getPleaseData(
- this.workData.list[0].code
- );
- });
- },
- handOutsource(workOrderId) {
- this.isType = '';
- // return
- let param = {
- taskId: this.taskObj.id,
- workOrderId: workOrderId
- };
- pcCheckOutsource(param).then((res) => {
- this.outsourceForm = {
- ...res.data
- };
- // this.outsourceForm.name = this.taskObj.name + '委外';
- this.isStep = false;
- this.isOutsource = false;
- this.isPleaseEntrust = false;
- if (res.data.outsource) {
- this.isType = '3';
- if (!this.isStep && !this.isOutsource && !this.isPleaseEntrust) {
- this.$nextTick(() => {
- this.$refs.outsourcingListRef.getDataList(
- this.workData.list[0].code
- );
- });
- }
- // this.getTaskInstanceByIdFn(workOrderId);
- // this.$refs.outsourceListRef.getList(workOrderId);
- // console.log(this.workData[0].list, 'this.workData.list');
- } else {
- return this.$message.warning('此工序不能委外/请托');
- }
- });
- },
- //获取工单列表
- getTaskInstanceByIdFn(workOrderId) {
- getTaskInstanceById(workOrderId).then((res) => {
- let { data } = res;
- if (data.length) {
- data = data.filter((item) => item.taskId != -2);
- let arr = data.findIndex(
- (item) => item.sourceTaskId == this.taskObj.id
- );
- if (arr != -1) {
- data.splice(0, arr);
- }
- this.$set(this.outsourceForm, 'newStepsList', data);
- }
- });
- },
- pickAdd() {
- if (this.workListIds.length > 1) {
- return this.$message.warning('领料只能选择一个工单!');
- } else if (this.workListIds.length < 1) {
- return this.$message.warning('请选择工单!');
- }
- this.checkPick();
- // this.pickingShow = true;
- },
- async checkPick() {
- await checkRepeatPick({
- workOrderId: this.workListIds[0]
- }).then((res) => {
- if (res.data == 0) {
- this.pickingShow = true;
- } else {
- this.$confirm('已经有领料是否继续重复领料?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- this.pickingShow = true;
- })
- .catch(() => {});
- }
- });
- },
- // 关闭领料弹窗
- pickingClose(val) {
- if (val) {
- this.$nextTick(() => {
- this.$refs.pickListRef.getList(this.workListIds);
- });
- }
- this.pickingShow = false;
- },
- rowClick(row, taskId) {
- if (taskId) {
- let params = {
- categoryId: row.categoryId,
- taskId: taskId
- };
- getByTaskId(params).then((res) => {
- this.BomObj = res.data;
- this.$forceUpdate();
- });
- }
- },
- rowTaskClick() {
- if (taskId) {
- let params = {
- categoryId: row.categoryId,
- taskId: taskId
- };
- getByTaskId(params).then((res) => {
- this.BomObj = res.data;
- this.$forceUpdate();
- });
- }
- },
- closePrenatalExamination() {
- this.checkProductionResult();
- },
- //是否完成 产前准备 限制按钮
- async checkProductionResult() {
- if (
- this.produceTaskInfo &&
- this.workListIds.length > 0 &&
- this.produceTaskInfo.id != -1
- ) {
- // 判断是否要求先完成 产前准备等事项
- const result = await checkProductionResult({
- produceTaskId: this.produceTaskInfo.id,
- workOrderIds: this.workListIds
- });
- this.isPreProductionResult = result;
- }
- },
- // 投料后 重新检测按钮状态
- reloadFeeding() {
- this.checkProductionResult();
- }
- },
- mounted() {
- this.$nextTick(() => {
- const targetElements =
- document.getElementsByClassName('ele-admin-tabs');
- if (targetElements.length > 0) {
- // 遍历所有具有 'ele-admin-tabs' 类的元素
- Array.from(targetElements).forEach((element) => {
- // 对每个元素添加 'new-ele-admin-tabs' 类
- element.classList.add('new-ele-admin-tabs');
- });
- }
- });
- },
- destroyed() {
- this.$nextTick(() => {
- const targetElements =
- document.getElementsByClassName('ele-admin-tabs');
- if (targetElements.length > 0) {
- Array.from(targetElements).forEach((element) => {
- element.classList.remove('new-ele-admin-tabs');
- });
- }
- });
- }
- };
- </script>
- <style lang="scss">
- .content_box {
- display: flex;
- }
- .content_box_tab {
- width: 220px;
- padding: 5px;
- height: calc(100vh - 73px);
- background-color: #fff;
- overflow-y: auto;
- }
- .footBtn {
- position: absolute;
- bottom: 20px;
- left: 0;
- }
- .new-ele-admin-tabs {
- display: none !important;
- }
- .c_title {
- color: #157a2c;
- font-size: 16px;
- font-weight: bold;
- }
- .tableZ_box {
- border: 1px solid #e3e5e5;
- margin: 6px 0;
- &:last-child {
- border-bottom: none;
- }
- .row {
- width: 100%;
- display: flex;
- }
- .col {
- width: calc(100% / 5);
- display: flex;
- align-items: center;
- // min-width: 200px;
- min-height: 32px;
- border-bottom: 1px solid #e3e5e5;
- border-right: 1px solid #e3e5e5;
- &:last-child {
- border-right: none;
- }
- .name {
- display: flex;
- align-items: center;
- padding: 4px;
- width: 60px;
- height: 100%;
- background-color: #d0e4d5;
- color: #000;
- }
- .content {
- padding: 4px 6px;
- color: #000;
- }
- }
- .pd6 {
- padding: 0 6px;
- }
- }
- </style>
- <style lang="scss" scoped>
- .seek-list {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10px 10px;
- }
- .right_main_box {
- background-color: #fff;
- height: 100%;
- box-sizing: border-box;
- }
- .index_box {
- position: relative;
- padding: 10px;
- padding-bottom: 0;
- width: 100%;
- box-sizing: border-box;
- min-width: 1280px !important;
- height: calc(100vh - 60px);
- // overflow-x: auto;
- /* 当内容超出宽度时,允许水平滚动 */
- white-space: nowrap;
- /* 防止内部文本换行,确保所有内容都在一行显示 */
- scrollbar-width: thin;
- /* 设置滚动条宽度(浏览器兼容性可能有所不同) */
- scrollbar-color: #40a9ff transparent;
- /* 设置滚动条颜色和轨道颜色(同样,浏览器兼容性) */
- }
- .main {
- width: 100%;
- min-width: 1280px;
- height: calc(100vh - 70px - 50px - 80px);
- display: flex;
- justify-content: space-between;
- }
- .left_main {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- min-width: 640px;
- .top {
- width: 100%;
- height: 100%;
- overflow: hidden;
- }
- // .bottom {
- // width: 100%;
- // min-height: calc((100vh - 70px - 50px - 80px - 20px) / 2);
- // overflow: hidden;
- // }
- }
- ::v-deep .el-tabs__item.is-active {
- background-color: #dffade;
- /* 蓝色背景 */
- color: #333;
- }
- ::v-deep .is-active {
- color: #dffade;
- }
- .right_main {
- min-width: 640px;
- padding-bottom: 12px;
- height: calc((100vh - 70px - 50px - 80px - 12px));
- background: #f0f3f3;
- }
- ::v-deep .el-tree-node__content > .el-tree-node__expand-icon {
- padding: 0 !important;
- }
- // .menu-container {
- // position: relative;
- // width: 200px;
- // height: 200px;
- // margin: 100px;
- // }
- /* 主按钮 */
- // .main-btn {
- // width: 60px;
- // height: 60px;
- // background: #3498db;
- // border-radius: 50%;
- // color: #fff;
- // font-size: 30px;
- // text-align: center;
- // line-height: 60px;
- // cursor: pointer;
- // position: absolute;
- // left: 0;
- // bottom: 0;
- // box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
- // transition: transform 0.3s;
- // }
- // .main-btn:hover {
- // transform: rotate(90deg);
- // }
- /* 子按钮 */
- // .sub-btn {
- // width: 40px;
- // height: 40px;
- // background: #e74c3c;
- // border-radius: 50%;
- // color: #fff;
- // font-size: 14px;
- // text-align: center;
- // line-height: 50px;
- // position: absolute;
- // left: 5px;
- // bottom: 5px;
- // box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
- // transform: translate(0, 0);
- // transition: all 0.4s ease;
- // opacity: 1;
- // }
- /* 动画进入/离开 */
- // .fan-enter-active,
- // .fan-leave-active {
- // transition: all 0.4s ease;
- // }
- // .fan-enter,
- // .fan-leave-to {
- // opacity: 0;
- // transform: translate(0, 0);
- // }
- // .box {
- // position: relative;
- // }
- .menu-container {
- position: fixed;
- right: 0;
- margin-top: 42.5%;
- width: 235px;
- height: 100px;
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 999;
- }
- .toggle-btn {
- position: absolute;
- width: 55px;
- height: 55px;
- background: #2196f3;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: white;
- font-size: 30px;
- font-weight: bold;
- cursor: pointer;
- box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
- z-index: 100;
- transition: all 0.3s ease;
- border: none;
- left: 60%;
- top: 60%;
- transform: translate(-50%, -50%);
- }
- .toggle-btn:hover {
- transform: translate(-50%, -50%) scale(1.05);
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
- }
- .toggle-btn:active {
- transform: translate(-50%, -50%) scale(0.95);
- }
- .menu-item {
- position: absolute;
- width: 50px;
- height: 50px;
- background: #4caf50;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: white;
- font-size: 12px;
- font-weight: bold;
- box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
- transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
- transform: translate(-50%, -50%) scale(0);
- opacity: 0;
- pointer-events: none;
- z-index: 90;
- left: 55%;
- top: 60%;
- }
- .menu-item.active {
- opacity: 1;
- pointer-events: auto;
- transform: translate(var(--tx), var(--ty)) scale(1);
- }
- .menu-item:hover {
- transform: translate(var(--tx), var(--ty)) scale(1.15) !important;
- box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
- background: #66bb6a;
- cursor: pointer;
- }
- .instructions {
- margin-top: 2rem;
- color: white;
- text-align: center;
- background: rgba(255, 255, 255, 0.1);
- padding: 1rem;
- border-radius: 10px;
- max-width: 500px;
- backdrop-filter: blur(5px);
- }
- .custom-tree-node {
- // position: absolute;
- // flex: 1;
- // display: flex;
- // align-items: center;
- // justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
- }
- .item {
- margin-top: 10px;
- margin-right: 40px;
- }
- </style>
|