123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731 |
- <template>
- <view>
- <form @submit="submit">
- <form @submit="addMachine">
- <view class="title"> 机器</view>
- <view class="body">
- <input class="input" style="display:none;" name="coding" :value=coding />
- 机器编码:<input class="input" v-model="coding" />
- <button type="primary" @click="saoma('coding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMachine(coding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="bodyname">
- 名称:<input class="input" name="name" :value="name" />
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- </view>
- <view class="body">
- 机身铭牌:<input class="input" name="nameplate" :value="nameplate" />
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- </view>
- <view class="body">
- 设备编号:<input class="input" name="clientId" :value="clientId" />
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- </view>
- <view class="body">
- <!-- 订单编号:<input class="input" name="orderNo" :value="orderNo" /> -->
- <input class="input" style="display:none;" name="orderNo" :value=orderNo />
- 订单编号:<input class="input" v-model="orderNo" />
- <button type="primary" @click="saoma('orderNo')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <!-- <button type="primary" @click="getMessage(orderNo)" class="button1">
- <p class="p">获取</p>
- </button> -->
- </view>
- <view class="body">
- 客户编号:<input class="input" name="customerNo" :value="customerNo" />
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- </view>
- <view class="body">
- <input class="input" style="display:none;" name="cardReader" :value=cardReader />
- 刷卡器:<input class="input" v-model="cardReader" />
- <button type="primary" @click="saoma('cardReader')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- </view>
- </form>
- <view class="line"></view>
- <view class="">
- <uni-list-item title="添加工序" @click="gongxu()" />
- </view>
- <view class="line"></view>
- <form @submit="jike" @reset="jikeReset">
- <view class="modules">
- <view class="title">机壳</view>
- <view class="body">
- <input class="input" style="display:none;" name="jikeCoding" :value=jikeCoding />
- 编码:<input class="input" v-model="jikeCoding" />
- <button type="primary" @click="saoma('jikeCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(jikeCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="jikeName" :value="jikeName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="jikeVersion" :value="jikeVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(jikeCoding,'jike')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="lutou" @reset="lutouReset">
- <view class="modules">
- <view class="title">炉头</view>
- <view class="body">
- <input class="input" style="display:none;" name="lutouCoding" :value=lutouCoding />
- 编码:<input class="input" v-model="lutouCoding" />
- <button type="primary" @click="saoma('lutouCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(lutouCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="lutouName" :value="lutouName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="lutouVersion" :value="lutouVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(lutouCoding,'lutou')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="jiashiqi" @reset="jiashiqiReset">
- <view class="modules">
- <view class="title">加湿器</view>
- <view class="body">
- <input class="input" style="display:none;" name="jiashiqiCoding" :value=jiashiqiCoding />
- 编码:<input class="input" v-model="jiashiqiCoding" />
- <button type="primary" @click="saoma('jiashiqiCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(jiashiqiCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="jiashiqiName" :value="jiashiqiName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="jiashiqiVersion" :value="jiashiqiVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(jiashiqiCoding,'jiashiqi')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="anzhuoping" @reset="anzhuopingReset">
- <view class="modules">
- <view class="title">安卓屏</view>
- <view class="body">
- <input class="input" style="display:none;" name="anzhuopingCoding" :value=anzhuopingCoding />
- 编码:<input class="input" v-model="anzhuopingCoding" />
- <button type="primary" @click="saoma('anzhuopingCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(anzhuopingCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="anzhuopingName" :value="anzhuopingName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="anzhuopingVersion" :value="anzhuopingVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(anzhuopingCoding,'anzhuoping')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="plc" @reset="plcReset">
- <view class="modules">
- <view class="title">plc</view>
- <view class="body">
- <input class="input" style="display:none;" name="plcCoding" :value=plcCoding />
- 编码:<input class="input" v-model="plcCoding" />
- <button type="primary" @click="saoma('plcCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(plcCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="plcName" :value="plcName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="plcVersion" :value="plcVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(plcCoding,'plc')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="jiareban" @reset="jiarebanReset">
- <view class="modules">
- <view class="title">加热板</view>
- <view class="body">
- <input class="input" style="display:none;" name="jiarebanCoding" :value=jiarebanCoding />
- 编码:<input class="input" v-model="jiarebanCoding" />
- <button type="primary" @click="saoma('jiarebanCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(jiarebanCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="jiarebanName" :value="jiarebanName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="jiarebanVersion" :value="jiarebanVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(jiarebanCoding,'jiareban')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="chugun" @reset="chugunReset">
- <view class="modules">
- <view class="title">出棍模块</view>
- <view class="body">
- <input class="input" style="display:none;" name="chugunCoding" :value=chugunCoding />
- 编码:<input class="input" v-model="chugunCoding" />
- <button type="primary" @click="saoma('chugunCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(chugunCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="chugunName" :value="chugunName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="chugunVersion" :value="chugunVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(chugunCoding,'chugun')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="diangui" @reset="dianguiReset">
- <view class="modules">
- <view class="title">电柜模块</view>
- <view class="body">
- <input class="input" style="display:none;" name="dianguiCoding" :value=dianguiCoding />
- 编码:<input class="input" v-model="dianguiCoding" />
- <button type="primary" @click="saoma('dianguiCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(dianguiCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="dianguiName" :value="dianguiName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="dianguiVersion" :value="dianguiVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(dianguiCoding,'diangui')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="xiazai" @reset="xiazaiReset">
- <view class="modules">
- <view class="title">远程下载模块</view>
- <view class="body">
- <input class="input" style="display:none;" name="xiazaiCoding" :value=xiazaiCoding />
- 编码:<input class="input" v-model="xiazaiCoding" />
- <button type="primary" @click="saoma('xiazaiCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(xiazaiCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="xiazaiName" :value="xiazaiName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="xiazaiVersion" :value="xiazaiVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(xiazaiCoding,'xiazai')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="jixieshou" @reset="jixieshouReset">
- <view class="modules">
- <view class="title">机械手</view>
- <view class="body">
- <input class="input" style="display:none;" name="jixieshouCoding" :value=jixieshouCoding />
- 编码:<input class="input" v-model="jixieshouCoding" />
- <button type="primary" @click="saoma('jixieshouCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(jixieshouCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="jixieshouName" :value="jixieshouName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="jixieshouVersion" :value="jixieshouVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(jixieshouCoding,'jixieshou')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="yaxingdao" @reset="yaxingdaoReset">
- <view class="modules">
- <view class="title">压型刀</view>
- <view class="body">
- <input class="input" style="display:none;" name="yaxingdaoCoding" :value=yaxingdaoCoding />
- 编码:<input class="input" v-model="yaxingdaoCoding" />
- <button type="primary" @click="saoma('yaxingdaoCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(yaxingdaoCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="yaxingdaoName" :value="yaxingdaoName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="yaxingdaoVersion" :value="yaxingdaoVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(yaxingdaoCoding,'yaxingdao')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="songtang" @reset="yaxingdaoReset">
- <view class="modules">
- <view class="title">送糖模块</view>
- <view class="body">
- <input class="input" style="display:none;" name="songtangCoding" :value=songtangCoding />
- 编码:<input class="input" v-model="songtangCoding" />
- <button type="primary" @click="saoma('songtangCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(songtangCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="songtangName" :value="songtangName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="songtangVersion" :value="songtangVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(songtangCoding,'songtang')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="qibeng" @reset="yaxingdaoReset">
- <view class="modules">
- <view class="title">气泵</view>
- <view class="body">
- <input class="input" style="display:none;" name="qibengCoding" :value=qibengCoding />
- 编码:<input class="input" v-model="qibengCoding" />
- <button type="primary" @click="saoma('qibengCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(qibengCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="qibengName" :value="qibengName" />
- </view>
- <!-- <view class="body">
- 版本:<input class="input" name="qibengVersion" :value="qibengVersion" />
- </view> -->
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(qibengCoding,'qibeng')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="zidongdoor" @reset="zidongdoorReset">
- <view class="modules">
- <view class="title">自动门</view>
- <view class="body">
- <input class="input" style="display:none;" name="zidongdoorCoding" :value=zidongdoorCoding />
- 编码:<input class="input" v-model="zidongdoorCoding" />
- <button type="primary" @click="saoma('zidongdoorCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(zidongdoorCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="zidongdoorName" :value="zidongdoorName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="zidongdoorVersion" :value="zidongdoorVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(zidongdoorCoding,'zidongdoor')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="shuibeng" @reset="shuibengReset">
- <view class="modules">
- <view class="title">蒸汽发生器</view>
- <view class="body">
- <input class="input" style="display:none;" name="shuibengCoding" :value=shuibengCoding />
- 编码:<input class="input" v-model="shuibengCoding" />
- <button type="primary" @click="saoma('shuibengCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(shuibengCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="shuibengName" :value="shuibengName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="shuibengVersion" :value="shuibengVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(shuibengCoding,'shuibeng')" class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <form @submit="shoudongdoor" @reset="shoudongdoorReset">
- <view class="modules">
- <view class="title">手动门</view>
- <view class="body">
- <input class="input" style="display:none;" name="shoudongdoorCoding"
- :value=shoudongdoorCoding />
- 编码:<input class="input" v-model="shoudongdoorCoding" />
- <button type="primary" @click="saoma('shoudongdoorCoding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(shoudongdoorCoding)" class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="shoudongdoorName" :value="shoudongdoorName" />
- </view>
- <view class="body">
- 版本:<input class="input" name="shoudongdoorVersion" :value="shoudongdoorVersion" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(shoudongdoorCoding,'shoudongdoor')"
- class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <!-- 循环风机1 -->
- <view class="line"></view>
- <form @submit="circulationFan1" @reset="circulationFan1Reset">
- <view class="modules">
- <view class="title">循环风机1</view>
- <view class="body">
- <input class="input" style="display:none;" name="circulationFan1Coding"
- :value=circulationFan1Coding />
- 编码:<input class="input" v-model="circulationFan1Coding" />
- <button type="primary" @click="saoma('circulationFan1Coding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(circulationFan1Coding, 'circulationFan1')"
- class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="circulationFan1Name" :value="circulationFan1Name" />
- </view>
- <view class="body">
- 版本:<input class="input" name="circulationFan1Version" :value="circulationFan1Version" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(circulationFan1Coding,'circulationFan1')"
- class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <!-- 循环风机2 -->
- <view class="line"></view>
- <form @submit="circulationFan2" @reset="circulationFan2Reset">
- <view class="modules">
- <view class="title">循环风机2</view>
- <view class="body">
- <input class="input" style="display:none;" name="circulationFan2Coding"
- :value=circulationFan2Coding />
- 编码:<input class="input" v-model="circulationFan2Coding" />
- <button type="primary" @click="saoma('circulationFan2Coding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(circulationFan2Coding, 'circulationFan2')"
- class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="circulationFan2Name" :value="circulationFan2Name" />
- </view>
- <view class="body">
- 版本:<input class="input" name="circulationFan2Version" :value="circulationFan2Version" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(circulationFan2Coding,'circulationFan2')"
- class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <!-- 循环风机3 -->
- <view class="line"></view>
- <form @submit="circulationFan3" @reset="circulationFan3Reset">
- <view class="modules">
- <view class="title">循环风机3</view>
- <view class="body">
- <input class="input" style="display:none;" name="circulationFan3Coding"
- :value=circulationFan3Coding />
- 编码:<input class="input" v-model="circulationFan3Coding" />
- <button type="primary" @click="saoma('circulationFan3Coding')" class="button1">
- <p class="p">扫码</p>
- </button>
- <button type="primary" @click="getMessage(circulationFan3Coding, 'circulationFan3')"
- class="button1">
- <p class="p">获取</p>
- </button>
- </view>
- <view class="body">
- 名称:<input class="input" name="circulationFan3Name" :value="circulationFan3Name" />
- </view>
- <view class="body">
- 版本:<input class="input" name="circulationFan3Version" :value="circulationFan3Version" />
- </view>
- <view class="modulesButton">
- <button type="primary" form-type="submit" class="button1">
- <p class="p">确认</p>
- </button>
- <button type="primary" @click="updateModules(circulationFan3Coding,'circulationFan3')"
- class="button1">
- <p class="p">更换</p>
- </button>
- </view>
- </view>
- </form>
- <view class="line"></view>
- <view class="">
- <button type="primary" @click="jiancha()" class="button">
- <p class="p1">检查</p>
- </button>
- </view>
- <view class="">
- {{weiname}} </br>
- {{Modulesname}}
- </view>
- </form>
- <view class="line"></view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapActions,
- mapMutations
- } from 'vuex';
- import timeSelector from '@/components/wing-time-selector/wing-time-selector.vue';
- export default {
- components: {
- timeSelector
- },
- data() {
- return {
- produceDate: '',
- coding: '',
- lutouCoding: null,
- jiashiqiCoding: null,
- name: null,
- jiashiqiName: null,
- lutouName: null,
- nameplate: null,
- clientId: null,
- orderNo: null,
- cardReader: null,
- customerNo: null,
- producePersonnel: null,
- jiashiqiVersion: null,
- lutouVersion: null,
- jikeCoding: null,
- jikeName: null,
- jikeVersion: null,
- circulationFan1Coding: null,
- circulationFan1Name: null,
- circulationFan1Version: null,
- circulationFan2Coding: null,
- circulationFan2Name: null,
- circulationFan2Version: null,
- circulationFan3Coding: null,
- circulationFan3Name: null,
- circulationFan3Version: null,
- shuibengCoding: null,
- shuibengName: null,
- shuibengVersion: null,
- chugunCoding: null,
- chugunName: null,
- chugunVersion: null,
- dianguiCoding: null,
- dianguiName: null,
- dianguiVersion: null,
- zidongdoorCoding: null,
- zidongdoorName: null,
- zidongdoorVersion: null,
- jixieshouCoding: null,
- jixieshouName: null,
- jixieshouVersion: null,
- yaxingdaoCoding: null,
- yaxingdaoName: null,
- yaxingdaoVersion: null,
- qibengCoding: null,
- qibengName: null,
- qibengVersion: null,
- songtangCoding: null,
- songtangName: null,
- songtangVersion: null,
- shoudongdoorCoding: null,
- shoudongdoorName: null,
- shoudongdoorVersion: null,
- anzhuopingCoding: null,
- anzhuopingName: null,
- anzhuopingVersion: null,
- plcCoding: null,
- plcName: null,
- plcVersion: null,
- jiarebanCoding: null,
- jiarebanName: null,
- jiarebanVersion: null,
- xiazaiCoding: null,
- xiazaiName: null,
- xiazaiVersion: null,
- weiname: '',
- Modulesname: ''
- }
- },
- methods: {
- btnConfirm0(e) {
- // console.log('确定时间为:', e);
- this.produceDate = e.key;
- },
- btnCancel0() {
- this.produceDate = '';
- },
- gongxu() {
- var item = {
- coding: null,
- type: 'add'
- };
- var coding = this.coding;
- item.coding = coding;
- uni.navigateTo({
- url: 'workingProcedure?item=' + encodeURIComponent(JSON.stringify(item))
- });
- },
- saoma(cod) {
- var that = this;
- // 允许从相机和相册扫码
- uni.scanCode({
- success(res) {
- // console.log('条码类型:' + res.scanType);
- // console.log('条码内容:' + res.result);
- if (cod == 'coding') {
- that.coding = res.result;
- }
- if (cod == 'lutouCoding') {
- that.lutouCoding = res.result;
- }
- if (cod == 'jiashiqiCoding') {
- that.jiashiqiCoding = res.result;
- }
- if (cod == 'shuibengCoding') {
- that.shuibengCoding = res.result;
- }
- if (cod == 'chugunCoding') {
- that.chugunCoding = res.result;
- }
- if (cod == 'dianguiCoding') {
- that.dianguiCoding = res.result;
- }
- if (cod == 'zidongdoorCoding') {
- that.zidongdoorCoding = res.result;
- }
- if (cod == 'jixieshouCoding') {
- that.jixieshouCoding = res.result;
- }
- if (cod == 'yaxingdaoCoding') {
- that.yaxingdaoCoding = res.result;
- }
- if (cod == 'qibengCoding') {
- that.qibengCoding = res.result;
- }
- if (cod == 'songtangCoding') {
- that.songtangCoding = res.result;
- }
- if (cod == 'shoudongdoorCoding') {
- that.shoudongdoorCoding = res.result;
- }
- if (cod == 'anzhuopingCoding') {
- that.anzhuopingCoding = res.result;
- }
- if (cod == 'plcCoding') {
- that.plcCoding = res.result;
- }
- if (cod == 'jiarebanCoding') {
- that.jiarebanCoding = res.result;
- }
- if (cod == 'jikeCoding') {
- that.jikeCoding = res.result;
- }
- if (cod == 'circulationFan1Coding') {
- that.circulationFan1Coding = res.result;
- }
- if (cod == 'circulationFan2Coding') {
- that.circulationFan2Coding = res.result;
- }
- if (cod == 'circulationFan3Coding') {
- that.circulationFan3Coding = res.result;
- }
- if (cod == 'xiazaiCoding') {
- that.xiazaiCoding = res.result;
- }
- if (cod == 'orderNo') {
- that.orderNo = res.result;
- }
- if (cod == 'cardReader') {
- that.cardReader = res.result;
- }
- }
- });
- },
- //获取机器详细信息
- getMachine(coding) {
- var that = this;
- that.jiashiqiName = null;
- that.jiashiqiCoding = null;
- that.jiashiqiVersion = null;
- that.lutouName = null;
- that.lutouCoding = null;
- that.lutouVersion = null;
- that.shuibengName = null;
- that.shuibengCoding = null;
- that.shuibengVersion = null;
- that.chugunName = null;
- that.chugunCoding = null;
- that.chugunVersion = null;
- that.dianguiName = null;
- that.dianguiCoding = null;
- that.dianguiVersion = null;
- that.jikeName = null;
- that.jikeCoding = null;
- that.jikeVersion = null;
- that.circulationFan1Name = null;
- that.circulationFan1Coding = null;
- that.circulationFan1Version = null;
- that.circulationFan2Name = null;
- that.circulationFan2Coding = null;
- that.circulationFan2Version = null;
- that.circulationFan3Name = null;
- that.circulationFan3Coding = null;
- that.circulationFan3Version = null;
- that.zidongdoorName = null;
- that.zidongdoorCoding = null;
- that.zidongdoorVersion = null;
- that.shoudongdoorName = null;
- that.shoudongdoorCoding = null;
- that.shoudongdoorVersion = null;
- that.jixieshouName = null;
- that.jixieshouCoding = null;
- that.jixieshouVersion = null;
- that.yaxingdaoName = null;
- that.yaxingdaoCoding = null;
- that.yaxingdaoVersion = null;
- that.songtangName = null;
- that.songtangCoding = null;
- that.songtangVersion = null;
- that.songtangVersion = null;
- that.qibengName = null;
- that.qibengCoding = null;
- that.qibengVersion = null;
- that.anzhuopingName = null;
- that.anzhuopingCoding = null;
- that.anzhuopingVersion = null;
- that.plcName = null;
- that.plcCoding = null;
- that.plcVersion = null;
- that.jiarebanName = null;
- that.jiarebanCoding = null;
- that.jiarebanVersion = null;
- that.xiazaiName = null;
- that.xiazaiCoding = null;
- that.xiazaiVersion = null;
- var serverUrl = that.serverurl;
- var token = uni.getStorageSync("token");
- uni.request({
- url: serverUrl + "/TMachine/getMachine?coding=" + coding,
- method: "GET",
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == true) {
- //当机器已录入时,会先把所有录入模块给列出来
- if (res.data.message == 'all') {
- var tmachine = res.data.data.tmachine;
- that.name = tmachine.name;
- that.nameplate = tmachine.nameplate;
- that.clientId = tmachine.clientId;
- that.customerNo = tmachine.customerNo;
- that.orderNo = tmachine.orderNo;
- that.cardReader = tmachine.cardReader;
- // that.producePersonnel = uni.getStorageSync("name");
- var modulesList = res.data.data.modulesList;
- var modules;
- for (var i = 0; i < modulesList.length; i++) {
- // console.log(modulesList[i]);
- var coding = modulesList[i].coding;
- //排除标准件
- if (coding.substring(0, 4) != '1000') {
- //半成品
- if (coding.substring(0, 2) == '15') {
- //电柜模块
- if (coding.substring(5, 7) == '01') {
- that.dianguiName = modulesList[i].name;
- that.dianguiCoding = modulesList[i].coding;
- that.dianguiVersion = modulesList[i].coding.substring(8, 10);
- }
- //机械手
- if (coding.substring(5, 7) == '02') {
- that.jixieshouName = modulesList[i].name;
- that.jixieshouCoding = modulesList[i].coding;
- that.jixieshouVersion = modulesList[i].coding.substring(8, 10);
- }
- //压型刀
- if (coding.substring(5, 7) == '03') {
- that.yaxingdaoName = modulesList[i].name;
- that.yaxingdaoCoding = modulesList[i].coding;
- that.yaxingdaoVersion = modulesList[i].coding.substring(8, 10);
- }
- //炉头
- if (coding.substring(5, 7) == '04') {
- that.lutouName = modulesList[i].name;
- that.lutouCoding = modulesList[i].coding;
- that.lutouVersion = modulesList[i].coding.substring(8, 10);
- }
- //送糖
- if (coding.substring(5, 7) == '05') {
- that.songtangName = modulesList[i].name;
- that.songtangCoding = modulesList[i].coding;
- that.songtangVersion = modulesList[i].coding.substring(8, 10);
- }
- //出棍模块
- if (coding.substring(5, 7) == '06') {
- that.chugunName = modulesList[i].name;
- that.chugunCoding = modulesList[i].coding;
- that.chugunVersion = modulesList[i].coding.substring(8, 10);
- }
- //"加湿器"
- if (coding.substring(5, 7) == '07') {
- that.jiashiqiName = modulesList[i].name;
- that.jiashiqiCoding = modulesList[i].coding;
- that.jiashiqiVersion = modulesList[i].coding.substring(8, 10);
- }
- //水泵 -> 蒸汽发生器
- if (coding.substring(5, 7) == '08') {
- that.shuibengName = modulesList[i].name;
- that.shuibengCoding = modulesList[i].coding;
- that.shuibengVersion = modulesList[i].coding.substring(8, 10);
- }
- //机壳
- if (coding.substring(5, 7) == '09') {
- that.jikeName = modulesList[i].name;
- that.jikeCoding = modulesList[i].coding;
- that.jikeVersion = modulesList[i].coding.substring(8, 10);
- }
- // // 循环风机1
- // if (coding.substring(5, 7) == '10') {
- // that.circulationFan1Name = modulesList[i].name;
- // that.circulationFan1Coding = modulesList[i].coding;
- // that.circulationFan1Version = modulesList[i].coding.substring(
- // 8, 10);
- // }
- // // 循环风机2
- // if (coding.substring(5, 7) == '10') {
- // that.circulationFan2Name = modulesList[i].name;
- // that.circulationFan2Coding = modulesList[i].coding;
- // that.circulationFan2Version = modulesList[i].coding.substring(
- // 8, 10);
- // }
- // //循环风机3
- // if (coding.substring(5, 7) == '10') {
- // that.circulationFan3Name = modulesList[i].name;
- // that.circulationFan3Coding = modulesList[i].coding;
- // that.circulationFan3Version = modulesList[i].coding.substring(
- // 8, 10);
- // }
- if (coding.substring(5, 7) == '10') {
- if (!this.circulationFan1Coding) {
- this.circulationFan1Name = modulesList[i].name;
- this.circulationFan1Coding = modulesList[i].coding;
- this.circulationFan1Version = modulesList[i].coding
- .substring(8, 10);
- } else if (!this.circulationFan2Coding) {
- this.circulationFan2Name = modulesList[i].name;
- this.circulationFan2Coding = modulesList[i].coding;
- this.circulationFan2Version = modulesList[i].coding
- .substring(8, 10);
- } else if (!this.circulationFan3Coding) {
- that.circulationFan3Name = modulesList[i].name;
- that.circulationFan3Coding = modulesList[i].coding;
- that.circulationFan3Version = modulesList[i].coding
- .substring(8, 10);
- }
- }
- //手动门
- if (coding.substring(5, 7) == '11') {
- that.shoudongdoorName = modulesList[i].name;
- that.shoudongdoorCoding = modulesList[i].coding;
- that.shoudongdoorVersion = modulesList[i].coding.substring(
- 8,
- 10);
- }
- //自动门
- if (coding.substring(5, 7) == '12') {
- that.zidongdoorName = modulesList[i].name;
- that.zidongdoorCoding = modulesList[i].coding;
- that.zidongdoorVersion = modulesList[i].coding.substring(8,
- 10);
- }
- //远程下载模块
- if (coding.substring(5, 7) == '13') {
- that.xiazaiName = modulesList[i].name;
- that.xiazaiCoding = modulesList[i].coding;
- that.xiazaiVersion = modulesList[i].coding.substring(8,
- 10);
- }
- //加热板
- if (coding.substring(5, 7) == '14') {
- that.jiarebanName = modulesList[i].name;
- // that.qibengCoding = modulesList[i].coding.substring(0, 10);
- that.jiarebanCoding = modulesList[i].coding;
- that.jiarebanVersion = modulesList[i].coding.substring(8,
- 10);
- }
- //安卓屏
- if (coding.substring(5, 7) == '15') {
- that.anzhuopingName = modulesList[i].name;
- that.anzhuopingCoding = modulesList[i].coding;
- that.anzhuopingVersion = modulesList[i].coding.substring(8,
- 10);
- }
- //plc
- if (coding.substring(5, 7) == '16') {
- that.plcName = modulesList[i].name;
- that.plcCoding = modulesList[i].coding;
- that.plcVersion = modulesList[i].coding.substring(8, 10);
- }
- }
- } else {
- //气泵
- if (coding.substring(8, 10) == '39') {
- that.qibengName = modulesList[i].name;
- // that.qibengCoding = modulesList[i].coding.substring(0, 10);
- that.qibengCoding = modulesList[i].coding;
- that.qibengVersion = modulesList[i].coding.substring(8, 10);
- }
- }
- }
- } else {
- var codes = res.data.data;
- that.name = codes.name;
- that.nameplate = codes.nameplate;
- that.clientId = codes.clientId;
- that.customerNo = codes.customerNo;
- that.orderNo = codes.orderNo;
- that.cardReader = codes.cardReader;
- that.producePersonnel = uni.getStorageSync("name");
- }
- } else {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- }
- });
- },
- getMessage(coding, fanType) {
- var that = this;
- var serverUrl = that.serverurl;
- var token = uni.getStorageSync("token");
- uni.request({
- url: serverUrl + "/TModules/getMessage?coding=" + coding,
- method: "GET",
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == true) {
- var codes = res.data.data;
- var coding = codes.code;
- //排除标准件
- if (coding.substring(0, 4) != '1000') {
- //半成品
- if (coding.substring(0, 2) == '15') {
- //电柜模块
- if (coding.substring(5, 7) == '01') {
- that.dianguiName = codes.name;
- that.dianguiCoding = codes.coding;
- that.dianguiVersion = codes.code.substring(8, 10);
- }
- //机械手
- if (coding.substring(5, 7) == '02') {
- that.jixieshouName = codes.name;
- that.jixieshouCoding = codes.coding;
- that.jixieshouVersion = codes.code.substring(8, 10);
- }
- //压型刀
- if (coding.substring(5, 7) == '03') {
- that.yaxingdaoName = codes.name;
- that.yaxingdaoCoding = codes.coding;
- that.yaxingdaoVersion = codes.code.substring(8, 10);
- }
- //炉头
- if (coding.substring(5, 7) == '04') {
- that.lutouName = codes.name;
- that.lutouCoding = codes.coding;
- that.lutouVersion = codes.code.substring(8, 10);
- }
- //送糖
- if (coding.substring(5, 7) == '05') {
- that.songtangName = codes.name;
- that.songtangCoding = codes.coding;
- that.songtangVersion = codes.code.substring(8, 10);
- }
- //出棍模块
- if (coding.substring(5, 7) == '06') {
- that.chugunName = codes.name;
- that.chugunCoding = codes.coding;
- that.chugunVersion = codes.code.substring(8, 10);
- }
- //"加湿器"
- if (coding.substring(5, 7) == '07') {
- that.jiashiqiName = codes.name;
- that.jiashiqiCoding = codes.coding;
- that.jiashiqiVersion = codes.code.substring(8, 10);
- }
- //水泵 -> 蒸汽发生器
- if (coding.substring(5, 7) == '08') {
- that.shuibengName = codes.name;
- that.shuibengCoding = codes.coding;
- that.shuibengVersion = codes.code.substring(8, 10);
- }
- //机壳
- if (coding.substring(5, 7) == '09') {
- that.jikeName = codes.name;
- that.jikeCoding = codes.coding;
- that.jikeVersion = codes.code.substring(8, 10);
- }
- //循环风机1
- // if (coding.substring(5, 7) == '10') {
- // that.circulationFan1Name = codes.name;
- // that.circulationFan1Coding = codes.coding;
- // that.circulationFan1Version = codes.code.substring(8, 10);
- // }
- //循环风机2
- // if (coding.substring(5, 7) == '10') {
- // that.circulationFan2Name = codes.name;
- // that.circulationFan2Coding = codes.coding;
- // that.circulationFan2Version = codes.code.substring(8, 10);
- // }
- //循环风机3
- // if (coding.substring(5, 7) == '10') {
- // that.circulationFan3Name = codes.name;
- // that.circulationFan3Coding = codes.coding;
- // that.circulationFan3Version = codes.code.substring(8, 10);
- // }
- if (coding.substring(5, 7) == '10') {
- if (fanType === 'circulationFan1') {
- that.circulationFan1Name = codes.name;
- that.circulationFan1Coding = codes.coding;
- that.circulationFan1Version = codes.code.substring(8, 10);
- } else if (fanType === 'circulationFan2') {
- that.circulationFan2Name = codes.name;
- that.circulationFan2Coding = codes.coding;
- that.circulationFan2Version = codes.code.substring(8, 10);
- } else if (fanType === 'circulationFan3') {
- that.circulationFan3Name = codes.name;
- that.circulationFan3Coding = codes.coding;
- that.circulationFan3Version = codes.code.substring(8, 10);
- }
- }
- //手动门
- if (coding.substring(5, 7) == '11') {
- that.shoudongdoorName = codes.name;
- that.shoudongdoorCoding = codes.coding;
- that.shoudongdoorVersion = codes.code.substring(8, 10);
- }
- //自动门
- if (coding.substring(5, 7) == '12') {
- that.zidongdoorName = codes.name;
- that.zidongdoorCoding = codes.coding;
- that.zidongdoorVersion = codes.code.substring(8, 10);
- }
- //远程下载模块
- if (coding.substring(5, 7) == '13') {
- that.xiazaiName = codes.name;
- that.xiazaiCoding = codes.coding;
- that.xiazaiVersion = codes.code.substring(8, 10);
- }
- //加热板
- if (coding.substring(5, 7) == '14') {
- that.jiarebanName = codes.name;
- that.jiarebanCoding = codes.coding;
- that.jiarebanVersion = codes.code.substring(8, 10);
- }
- //安卓屏
- if (coding.substring(5, 7) == '15') {
- that.anzhuopingName = codes.name;
- that.anzhuopingCoding = codes.coding;
- that.anzhuopingVersion = codes.code.substring(8, 10);
- }
- //plc
- if (coding.substring(5, 7) == '16') {
- that.plcName = codes.name;
- that.plcCoding = codes.coding;
- that.plcVersion = codes.code.substring(8, 10);
- }
- }
- } else {
- //气泵
- if (coding.substring(8, 10) == '39') {
- that.qibengName = codes.name;
- that.qibengCoding = codes.coding;
- that.qibengVersion = codes.versions;
- }
- }
- } else {
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- }
- });
- },
- //机器修改
- addMachine(event) {
- var serverUrl = this.serverurl;
- const {
- value: modules
- } = event.detail;
- // console.log("3");
- var token = uni.getStorageSync("token");
- var createPersonnel = uni.getStorageSync("name");
- uni.request({
- url: serverUrl + "/TMachine/add",
- method: "POST",
- data: {
- "coding": modules.coding,
- "name": modules.name,
- "nameplate": modules.nameplate,
- "clientId": modules.clientId,
- "customerNo": modules.customerNo,
- "orderNo": modules.orderNo,
- "cardReader": modules.cardReader,
- "createPersonnel": createPersonnel
- },
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- });
- },
- lutou(event) { // 4炉头
- var serverUrl = this.serverurl;
- var machineCoding = this.coding;
- const {
- value: modules
- } = event.detail;
- // console.log(event.detail.value);
- var token = uni.getStorageSync("token");
- var createPersonnel = uni.getStorageSync("name");
- uni.request({
- url: serverUrl + "/TModules/update",
- method: "POST",
- data: {
- "machineCoding": machineCoding,
- "coding": modules.lutouCoding,
- "name": modules.lutouName,
- "installPersonnel": createPersonnel
- },
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == true) {
- }
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- });
- },
- objToStrMap(obj) {
- let strMap = new Map();
- for (let k of Object.keys(obj)) {
- strMap.set(k, obj[k]);
- }
- return strMap;
- },
- diangui(event) { // 1电柜
- this.tijiao(event, "diangui");
- },
- jixieshou(event) { // 2机械手
- this.tijiao(event, "jixieshou");
- },
- yaxingdao(event) { // 3压型刀
- this.tijiao(event, "yaxingdao");
- },
- // 4炉头
- songtang(event) { // 5送糖
- this.tijiao(event, "songtang");
- },
- chugun(event) { // 6出棍
- this.tijiao(event, "chugun");
- },
- jiashiqi(event) { // 7加湿器
- this.tijiao(event, "jiashiqi");
- },
- shuibeng(event) { // 8水泵-蒸汽发生器
- this.tijiao(event, "shuibeng");
- },
- jike(event) { // 9机壳
- this.tijiao(event, "jike");
- },
- circulationFan1(event) { // 10循环风机1
- this.tijiao(event, "circulationFan1");
- },
- circulationFan2(event) { // 10循环风机2
- this.tijiao(event, "circulationFan2");
- },
- circulationFan3(event) { // 10循环风机3
- this.tijiao(event, "circulationFan3");
- },
- shoudongdoor(event) { // 11手动门
- this.tijiao(event, "shoudongdoor");
- },
- zidongdoor(event) { // 12自动门
- this.tijiao(event, "zidongdoor");
- },
- xiazai(event) { // 13远程下载
- this.tijiao(event, "xiazai");
- },
- jiareban(event) { // 14加热板
- this.tijiao(event, "jiareban");
- },
- anzhuoping(event) { // 15安卓屏
- this.tijiao(event, "anzhuoping");
- },
- plc(event) { // 16plc
- this.tijiao(event, "plc");
- },
- qibeng(event) { // 39气泵
- this.tijiao(event, "qibeng");
- },
- tijiao(event, sname) {
- var serverUrl = this.serverurl;
- var machineCoding = this.coding;
- const {
- value: modules
- } = event.detail;
- var eValue = event.detail.value;
- //将value对象转为map
- var mapValue = this.objToStrMap(eValue);
- var coding = mapValue.get(sname + "Coding");
- var name = mapValue.get(sname + "Name");
- // console.log(coding+"---"+name);
- var token = uni.getStorageSync("token");
- var createPersonnel = uni.getStorageSync("name");
- uni.request({
- url: serverUrl + "/TModules/update",
- method: "POST",
- data: {
- "machineCoding": machineCoding,
- "coding": coding,
- "name": name,
- "installPersonnel": createPersonnel
- },
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == true) {
- }
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- });
- },
- updateModules(code, name) {
- var that = this;
- uni.setStorageSync("updateModules", code);
- uni.setStorageSync("updateMachineCode", that.coding);
- uni.showModal({
- title: '提示',
- content: '是否要更换?',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: 'updateModules',
- });
- if (name == "diangui") { // 1电柜模块
- that.dianguiName = null;
- that.dianguiCoding = null;
- that.dianguiVersion = null;
- }
- if (name == "jixieshou") { // 2机械手
- that.jixieshouName = null;
- that.jixieshouCoding = null;
- that.jixieshouVersion = null;
- }
- if (name == "yaxingdao") { // 3压型刀模块
- that.yaxingdaoName = null;
- that.yaxingdaoCoding = null;
- that.yaxingdaoVersion = null;
- }
- if (name == "lutou") { // 4炉头模块
- that.lutouName = null;
- that.lutouCoding = null;
- that.lutouVersion = null;
- }
- if (name == "songtang") { // 5送糖模块
- that.songtangName = null;
- that.songtangCoding = null;
- that.songtangVersion = null;
- }
- if (name == "chugun") { // 6出棍模块
- that.chugunName = null;
- that.chugunCoding = null;
- that.chugunVersion = null;
- }
- if (name == "jiashiqi") { // 7加湿器
- that.jiashiqiName = null;
- that.jiashiqiCoding = null;
- that.jiashiqiVersion = null;
- }
- if (name == "shuibeng") { // 8水泵
- that.shuibengName = null;
- that.shuibengCoding = null;
- that.shuibengVersion = null;
- }
- if (name == "jike") { // 9机壳
- that.jikeName = null;
- that.jikeCoding = null;
- that.jikeVersion = null;
- }
- if (name == "circulationFan1") { // 10循环风机1
- that.circulationFan1Name = null;
- that.circulationFan1Coding = null;
- that.circulationFan1Version = null;
- }
- if (name == "circulationFan2") { // 10循环风机2
- that.circulationFan2Name = null;
- that.circulationFan2Coding = null;
- that.circulationFan2Version = null;
- }
- if (name == "circulationFan3") { // 10循环风机3
- that.circulationFan3Name = null;
- that.circulationFan3Coding = null;
- that.circulationFan3Version = null;
- }
- if (name == "shoudongdoor") { // 11手动门
- that.shoudongdoorName = null;
- that.shoudongdoorCoding = null;
- that.shoudongdoorVersion = null;
- }
- if (name == "zidongdoor") { // 12自动门
- that.zidongdoorName = null;
- that.zidongdoorCoding = null;
- that.zidongdoorVersion = null;
- }
- if (name == "xiazai") { // 13远程下载
- that.xiazaiName = null;
- that.xiazaiCoding = null;
- that.xiazaiVersion = null;
- }
- if (name == "jiareban") { // 14加热板
- that.jiarebanName = null;
- that.jiarebanCoding = null;
- that.jiarebanVersion = null;
- }
- if (name == "anzhuoping") { // 15安卓屏
- that.anzhuopingName = null;
- that.anzhuopingCoding = null;
- that.anzhuopingVersion = null;
- }
- if (name == "plc") { // 16plc
- that.plcName = null;
- that.plcCoding = null;
- that.plcVersion = null;
- }
- if (name == "qibeng") { // 39气泵
- that.qibengName = null;
- that.qibengCoding = null;
- that.qibengVersion = null;
- }
- } else if (res.cancel) {}
- }
- });
- },
- submit(event) {
- var serverUrl = this.serverurl;
- var machineCoding = this.coding;
- const {
- value: modules
- } = event.detail;
- var token = uni.getStorageSync("token");
- var createPersonnel = uni.getStorageSync("name");
- uni.request({
- url: serverUrl + "/TMachine/submit",
- method: "POST",
- data: {
- "coding": machineCoding,
- checkPersonnel: createPersonnel
- },
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == true) {
- }
- uni.showModal({
- title: '提示',
- content: res.data.message,
- });
- }
- });
- },
- jiancha() {
- var token = uni.getStorageSync("token");
- uni.request({
- url: this.serverurl + "/TWorkingProcedure/jiancha",
- method: "POST",
- data: {
- "machineCoding": this.coding
- },
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == false) {
- var re = res.data.data.toString();
- this.weiname = '工序:' + re + '未安装';
- } else {
- this.weiname = '工序已全部安装';
- }
- this.jianchaModules();
- }
- });
- },
- jianchaModules() {
- var token = uni.getStorageSync("token");
- uni.request({
- url: this.serverurl + "/TModules/jianchaModules?machineCoding=" + this.coding,
- method: "GET",
- header: {
- 'token': token
- },
- success: (Result) => {
- var res = Result;
- if (res.data.code == false) {
- var re = res.data.data.toString();
- this.Modulesname = '模块:' + re + '未安装';
- } else {
- this.Modulesname = '模块已全部安装';
- }
- }
- });
- }
- }
- }
- </script>
- <style>
- .body {
- background-color: #FFFFFF;
- padding: 20upx 20upx 20upx 20upx;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- }
- .bodyname {
- background-color: #FFFFFF;
- padding: 20upx 20upx 20upx 70upx;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- }
- .input {
- /* padding: 10upx 20upx 10upx 0upx; */
- padding-left: 20upx;
- padding-top: 10upx;
- background-color: #FFFFFF;
- width: 400upx;
- height: 50upx;
- box-shadow: 0upx 0upx 20upx #D3D3D3;
- border-radius: 5upx;
- }
- .button {
- margin: auto;
- width: 60%;
- height: 100upx;
- }
- .button1 {
- margin: auto;
- width: 75upx;
- height: 50upx;
- }
- .p {
- /* #ifdef H5 */
- top: -13%;
- /* #endif */
- width: 50upx;
- height: 30upx;
- font-size: 25upx;
- padding-right: 9upx;
- padding-top: 6upx;
- /* #ifndef H5 */
- /* padding-top: 10upx; */
- /* #endif */
- position: absolute;
- /* 水平居中 */
- left: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- }
- .p1 {
- /* #ifdef H5 */
- top: -13%;
- /* #endif */
- width: 80upx;
- height: 60upx;
- font-size: 40upx;
- padding-top: 6upx;
- /* #ifndef H5 */
- padding-top: 10upx;
- /* #endif */
- position: absolute;
- /* 水平居中 */
- left: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- }
- .radio {
- padding-top: 20upx;
- padding-left: 30upx;
- }
- .line {
- background: #ECECEC;
- height: 10upx;
- }
- .title {
- font-size: 35upx;
- }
- .modulesButton {
- background-color: #FFFFFF;
- padding: 20upx 20upx 20upx 20upx;
- display: flex;
- width: 250upx;
- margin: auto;
- flex-direction: row;
- justify-content: flex-start;
- }
- .modules {
- width: 95%;
- margin: auto;
- }
- </style>
|