DieFa.vue 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908
  1. <template>
  2. <div style="display: flex; height: calc(100vh - 120px)">
  3. <Aside
  4. :resultArr="resultArr"
  5. :fujianArr="fujianArr"
  6. @refresh="resultRefresh"
  7. ></Aside>
  8. <div class="drawer__panel">
  9. <div class="my-steps">
  10. <a-steps :current="active - 1" style="margin-bottom: 10px">
  11. <a-step
  12. :title="$t(item.title)"
  13. v-for="(item, index) in items"
  14. :key="index"
  15. >
  16. <i
  17. slot="icon"
  18. class="iconfont"
  19. style="font-size: 32px; color: #3874f6 !important"
  20. v-if="active > index + 1"
  21. >&#xe6fd;</i
  22. >
  23. </a-step>
  24. </a-steps>
  25. </div>
  26. <!--选光头-->
  27. <div class="dialog-content" v-show="active == 1">
  28. <div class="option-line">
  29. <MySelect
  30. type="radius"
  31. :isClear="false"
  32. :options="[
  33. { remarks: '自动选配', value: '自动选配' },
  34. { remarks: '手动输入', value: '手动输入' },
  35. ]"
  36. v-model="mode"
  37. ></MySelect>
  38. </div>
  39. <div v-show="mode == '自动选配'">
  40. <div class="option-line">
  41. <div class="item">
  42. <div class="label">{{ $t("搜索") }}:</div>
  43. <el-input
  44. :placeholder="$t(`名称/料号`)"
  45. v-model="guangtouParam.content.where.condition"
  46. clearable
  47. @clear="Search('guangtouParam')"
  48. size="small"
  49. @keyup.enter.native="Search('guangtouParam')"
  50. >
  51. </el-input>
  52. </div>
  53. </div>
  54. <div class="option-line">
  55. <div class="item">
  56. <div class="label">{{ $t("驱动方式") }}:</div>
  57. <MySelect
  58. :isClear="false"
  59. @click="
  60. ($event) => {
  61. guangtouChange($event);
  62. Search('guangtouParam', 'drivetype');
  63. }
  64. "
  65. :options="drivetype"
  66. v-model="guangtouParam.content.where.drivetype"
  67. ></MySelect>
  68. </div>
  69. </div>
  70. <div class="option-line">
  71. <div class="item">
  72. <div class="label">{{ $t("公称通径") }}:</div>
  73. <el-select
  74. filterable
  75. v-model="guangtouParam.content.where.caliber"
  76. :placeholder="$t(`请选择公称通径`)"
  77. size="small"
  78. style="width: 100%"
  79. clearable
  80. @change="Search('guangtouParam', 'caliber')"
  81. >
  82. <el-option
  83. v-for="item in caliber"
  84. :key="item.value"
  85. :value="item.value"
  86. :label="$t(item.value)"
  87. ></el-option>
  88. </el-select>
  89. </div>
  90. <div class="item">
  91. <div class="label">{{ $t("公称压力") }}:</div>
  92. <el-select
  93. filterable
  94. @change="Search('guangtouParam', 'nominalpressure')"
  95. :disabled="!guangtouParam.content.where.caliber"
  96. v-model="guangtouParam.content.where.nominalpressure"
  97. :placeholder="$t(`请选择公称压力`)"
  98. size="small"
  99. style="width: 100%"
  100. clearable
  101. >
  102. <el-option
  103. v-for="item in nominalpressure"
  104. :key="item.value"
  105. :value="item.value"
  106. :label="$t(item.remarks)"
  107. ></el-option>
  108. </el-select>
  109. </div>
  110. </div>
  111. <div class="option-line">
  112. <div class="item">
  113. <div class="label">{{ $t("连接方式") }}:</div>
  114. <MySelect
  115. @click="Search('guangtouParam', 'connection')"
  116. :disabled="!guangtouParam.content.where.nominalpressure"
  117. :options="connection"
  118. v-model="guangtouParam.content.where.connection"
  119. ></MySelect>
  120. </div>
  121. </div>
  122. <div class="option-line">
  123. <div class="item">
  124. <div class="label">{{ $t("阀体材质") }}:</div>
  125. <el-select
  126. filterable
  127. @change="Search('guangtouParam', 'bodymaterial')"
  128. :disabled="!guangtouParam.content.where.connection"
  129. v-model="guangtouParam.content.where.bodymaterial"
  130. :placeholder="$t(`请选择阀体材质`)"
  131. size="small"
  132. style="width: 100%"
  133. clearable
  134. >
  135. <el-option
  136. v-for="item in bodymaterial"
  137. :key="item.value"
  138. :value="item.value"
  139. :label="$t(item.remarks)"
  140. ></el-option>
  141. </el-select>
  142. </div>
  143. <div class="item">
  144. <div class="label">{{ $t("阀杆材质") }}:</div>
  145. <el-select
  146. filterable
  147. @change="Search('guangtouParam', 'stemmaterial')"
  148. :disabled="!guangtouParam.content.where.bodymaterial"
  149. v-model="guangtouParam.content.where.stemmaterial"
  150. :placeholder="$t(`请选择阀杆材质`)"
  151. size="small"
  152. style="width: 100%"
  153. clearable
  154. >
  155. <el-option
  156. v-for="item in stemmaterial"
  157. :key="item.value"
  158. :value="item.value"
  159. :label="$t(item.remarks)"
  160. ></el-option>
  161. </el-select>
  162. </div>
  163. <div class="item">
  164. <div class="label">{{ $t("阀座材质") }}:</div>
  165. <el-select
  166. filterable
  167. @change="Search('guangtouParam', 'plinthmaterial')"
  168. :disabled="!guangtouParam.content.where.stemmaterial"
  169. v-model="guangtouParam.content.where.plinthmaterial"
  170. :placeholder="$t(`请选择阀座材质`)"
  171. size="small"
  172. style="width: 100%"
  173. clearable
  174. >
  175. <el-option
  176. v-for="item in plinthmaterial"
  177. :key="item.value"
  178. :value="item.value"
  179. :label="$t(item.remarks)"
  180. ></el-option>
  181. </el-select>
  182. </div>
  183. </div>
  184. <!--光头-->
  185. <MyTable
  186. :height="tableHeight"
  187. ref="guangtouRef"
  188. fixedName="operation"
  189. :layout="tool.tabelCol($route.name)['guangtouTable'].tablecols"
  190. :param="guangtouParam"
  191. :opwidth="200"
  192. :custom="true"
  193. style="margin-top: 14px"
  194. >
  195. <template v-slot:customcol="scope">
  196. <span v-if="scope.column.columnname != 'operation'">{{
  197. $t(scope.column.data[scope.column.columnname])
  198. }}</span>
  199. </template>
  200. <template v-slot:opreation="scope">
  201. <el-button
  202. type="text"
  203. size="mini"
  204. @click="selectTarget(scope.data, '主阀')"
  205. :disabled="!guangtouParam.content.where.drivetype"
  206. >{{ $t("选择") }}</el-button
  207. >
  208. </template>
  209. </MyTable>
  210. </div>
  211. <div class="write" style="margin-top: 10px" v-show="mode == '手动输入'">
  212. <el-row :gutter="10">
  213. <el-form
  214. :model="guangtouParam.content.where"
  215. ref="ruleForm"
  216. :label-width="tool.onlyZh('130px')"
  217. >
  218. <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="6">
  219. <el-form-item
  220. :label="$t(`驱动方式`) + ':'"
  221. prop="drivetype"
  222. :rules="{
  223. required: true,
  224. message: $t('请选择驱动方式'),
  225. trigger: 'blur',
  226. }"
  227. >
  228. <el-select
  229. filterable
  230. v-model="guangtouParam.content.where.drivetype"
  231. :placeholder="$t(`请选择驱动方式`)"
  232. size="small"
  233. style="width: 100%"
  234. >
  235. <el-option
  236. v-for="item in drivetype"
  237. :key="item.value"
  238. :value="item.value"
  239. :label="$t(item.remarks)"
  240. ></el-option>
  241. </el-select>
  242. </el-form-item>
  243. </el-col>
  244. <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="6">
  245. <el-form-item
  246. :label="$t(`扭矩`) + ':'"
  247. prop="torque"
  248. :rules="{
  249. required: true,
  250. message: $t('请输入扭矩'),
  251. trigger: 'blur',
  252. }"
  253. >
  254. <el-input
  255. v-model="guangtouParam.content.where.torque"
  256. size="small"
  257. :placeholder="$t(`请输入扭矩`)"
  258. ></el-input>
  259. </el-form-item>
  260. </el-col>
  261. <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="6">
  262. <el-form-item
  263. :label="$t(`法兰号`) + ':'"
  264. prop="flh"
  265. :rules="{
  266. required: true,
  267. message: $t('请选择法兰号'),
  268. trigger: 'blur',
  269. }"
  270. >
  271. <el-select
  272. filterable
  273. v-model="guangtouParam.content.where.flh"
  274. :placeholder="$t(`请选择法兰号`)"
  275. size="small"
  276. style="width: 100%"
  277. >
  278. <el-option
  279. v-for="item in flh"
  280. :key="item.value"
  281. :value="item.value"
  282. :label="$t(item.remarks)"
  283. ></el-option>
  284. </el-select>
  285. </el-form-item>
  286. </el-col>
  287. <el-col
  288. :xs="12"
  289. :sm="12"
  290. :md="12"
  291. :lg="12"
  292. :xl="6"
  293. v-if="!guangtouParam.content.where.maxrounddiameter"
  294. >
  295. <el-form-item
  296. :label="$t(`方阀杆最大宽度`) + ':'"
  297. prop="maxsquarewidth"
  298. :rules="{
  299. required: true,
  300. message: $t('请输入方阀杆最大宽度'),
  301. trigger: 'blur',
  302. }"
  303. >
  304. <el-input
  305. size="small"
  306. v-model="guangtouParam.content.where.maxsquarewidth"
  307. :placeholder="$t(`请输入方阀杆最大宽度`)"
  308. ></el-input>
  309. </el-form-item>
  310. </el-col>
  311. <el-col
  312. :xs="12"
  313. :sm="12"
  314. :md="12"
  315. :lg="12"
  316. :xl="6"
  317. v-if="!guangtouParam.content.where.maxsquarewidth"
  318. >
  319. <el-form-item
  320. :label="$t(`圆阀杆最大直径`) + ':'"
  321. prop="maxrounddiameter"
  322. :rules="{
  323. required: true,
  324. message: $t('请输入圆阀杆最大直径'),
  325. trigger: 'blur',
  326. }"
  327. >
  328. <el-input
  329. size="small"
  330. v-model="guangtouParam.content.where.maxrounddiameter"
  331. :placeholder="$t(`请输入圆阀杆最大直径`)"
  332. ></el-input>
  333. </el-form-item>
  334. </el-col>
  335. <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="6">
  336. <el-form-item :label="$t(`公称通径`) + ':'" prop="caliber">
  337. <el-select
  338. filterable
  339. v-model="guangtouParam.content.where.caliber"
  340. :placeholder="$t(`请选择公称通径`)"
  341. size="small"
  342. style="width: 100%"
  343. clearable=""
  344. >
  345. <el-option
  346. v-for="item in caliber"
  347. :key="item.value"
  348. :value="item.value"
  349. :label="$t(item.value)"
  350. ></el-option>
  351. </el-select>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="6">
  355. <el-form-item
  356. :label="$t(`公称压力`) + ':'"
  357. prop="nominalpressure"
  358. >
  359. <el-select
  360. filterable
  361. v-model="guangtouParam.content.where.nominalpressure"
  362. :placeholder="$t(`请选择公称压力`)"
  363. size="small"
  364. style="width: 100%"
  365. clearable=""
  366. >
  367. <el-option
  368. v-for="item in nominalpressure"
  369. :key="item.value"
  370. :value="item.value"
  371. :label="$t(item.remarks)"
  372. ></el-option>
  373. </el-select>
  374. </el-form-item>
  375. </el-col>
  376. </el-form>
  377. </el-row>
  378. </div>
  379. </div>
  380. <!--选执行器-->
  381. <div class="dialog-content" v-show="active == 2">
  382. <div class="option-line">
  383. <div class="item">
  384. <div class="label">{{ $t("执行器") }}:</div>
  385. <el-input
  386. :placeholder="$t(`型号/料号`)"
  387. v-model="excelParam.content.where.condition1"
  388. clearable
  389. @clear="Search('excelParam')"
  390. size="small"
  391. @keyup.enter.native="Search('excelParam')"
  392. >
  393. </el-input>
  394. </div>
  395. <div
  396. class="item"
  397. v-if="guangtouParam.content.where.drivetype != '气动'"
  398. >
  399. <div class="label">{{ $t("减速箱") }}:</div>
  400. <el-input
  401. :placeholder="$t(`型号/料号`)"
  402. v-model="excelParam.content.where.condition2"
  403. clearable
  404. @clear="Search('excelParam')"
  405. size="small"
  406. @keyup.enter.native="Search('excelParam')"
  407. >
  408. </el-input>
  409. </div>
  410. </div>
  411. <div
  412. class="option-line"
  413. v-if="guangtouParam.content.where.drivetype == '气动'"
  414. >
  415. <div class="item">
  416. <div class="label">{{ $t("驱动方式") }}:</div>
  417. <MySelect
  418. :isClear="false"
  419. :options="[
  420. { remarks: '气动调节', value: '气动调节' },
  421. { remarks: '气动开关', value: '气动开关' },
  422. ]"
  423. v-model="excelParam.content.where.drivetype"
  424. ></MySelect>
  425. </div>
  426. </div>
  427. <div
  428. class="option-line"
  429. v-if="guangtouParam.content.where.drivetype == '电动'"
  430. >
  431. <div class="item">
  432. <div class="label">{{ $t("驱动方式") }}:</div>
  433. <MySelect
  434. @click="
  435. Search('excelParam', 'actuatordrivetype');
  436. calcTableHieght('excelRef');
  437. "
  438. :options="[
  439. { remarks: '电动开关', value: '电动开关' },
  440. { remarks: '电动调节', value: '电动调节' },
  441. ]"
  442. v-model="excelParam.content.where.actuatordrivetype"
  443. ></MySelect>
  444. </div>
  445. </div>
  446. <div
  447. class="option-line"
  448. v-if="guangtouParam.content.where.drivetype == '电动'"
  449. >
  450. <div class="item">
  451. <div class="label">{{ $t("品牌") }}:</div>
  452. <MySelect
  453. @click="
  454. Search('excelParam', 'actuatorbrand');
  455. calcTableHieght('excelRef');
  456. "
  457. :disabled="!excelParam.content.where.actuatordrivetype"
  458. :options="actuatorbrand"
  459. v-model="excelParam.content.where.actuatorbrand"
  460. ></MySelect>
  461. </div>
  462. </div>
  463. <div class="option-line" v-else>
  464. <div class="item">
  465. <div class="label">{{ $t("品牌") }}:</div>
  466. <MySelect
  467. @click="Search('excelParam', 'actuatorbrand')"
  468. :options="actuatorbrand"
  469. v-model="excelParam.content.where.actuatorbrand"
  470. ></MySelect>
  471. </div>
  472. </div>
  473. <div
  474. v-if="
  475. guangtouParam.content.where.drivetype == '电动' &&
  476. excelParam.content.where.actuatorbrand &&
  477. actuatorname.length
  478. "
  479. >
  480. <div class="option-line">
  481. <div class="item">
  482. <div class="label" style="width: 80px">
  483. {{ $t("执行器类型") }}:
  484. </div>
  485. <span
  486. style="font-size: 14px; font-weight: bold; color: #3874f6"
  487. >{{ $t(excelParam.content.where.actuatorname) || "--" }}</span
  488. >
  489. </div>
  490. </div>
  491. <SelectBar
  492. style="margin: 20px 0"
  493. v-model="excelParam.content.where.actuatorname"
  494. :options="
  495. actuatorname.map((v) => {
  496. return {
  497. url: v.url,
  498. remarks: v.remarks.split('-').pop(),
  499. value: v.remarks,
  500. };
  501. })
  502. "
  503. @change="Search('excelParam', 'actuatorname')"
  504. ></SelectBar>
  505. </div>
  506. <div
  507. class="option-line"
  508. v-if="guangtouParam.content.where.drivetype == '电动'"
  509. >
  510. <div class="item">
  511. <div class="label">{{ $t("电源电压") }}:</div>
  512. <MySelect
  513. @click="Search('excelParam', 'supplyvoltage')"
  514. :disabled="!excelParam.content.where.actuatorname"
  515. :options="supplyvoltage"
  516. v-model="excelParam.content.where.supplyvoltage"
  517. ></MySelect>
  518. </div>
  519. <div class="item">
  520. <div class="label">{{ $t("信号类型") }}:</div>
  521. <MySelect
  522. @click="Search('excelParam', 'actuatorsignal')"
  523. :disabled="!excelParam.content.where.supplyvoltage"
  524. :options="actuatorsignal"
  525. v-model="excelParam.content.where.actuatorsignal"
  526. ></MySelect>
  527. </div>
  528. </div>
  529. <!-- <div class="option-line">
  530. <div class="item">
  531. <div class="label" style="width: 75px;">{{$t('执行器类型')}}:</div>
  532. <el-select filterable @change="Search('excelParam','actuatorname')" :disabled="!excelParam.content.where.actuatorbrand" v-model="excelParam.content.where.actuatorname" :placeholder="$t(`请选择执行器类型`)" size="small" style="width:100%" clearable>
  533. <el-option v-for="item in actuatorname" :key="item.value" :value="item.value" :label="$t(item.remarks)"></el-option>
  534. </el-select>
  535. </div>
  536. </div> -->
  537. <div
  538. class="option-line"
  539. v-show="guangtouParam.content.where.drivetype == '气动'"
  540. >
  541. <div class="item">
  542. <div class="label">{{ $t("功能") }}:</div>
  543. <MySelect
  544. :disabled="!excelParam.content.where.actuatorname"
  545. @click="Search('excelParam', 'func')"
  546. :options="func"
  547. v-model="excelParam.content.where.func"
  548. ></MySelect>
  549. </div>
  550. </div>
  551. <div
  552. class="option-line"
  553. v-show="guangtouParam.content.where.drivetype == '气动'"
  554. >
  555. <div class="item">
  556. <div class="label">{{ $t("结构") }}:</div>
  557. <MySelect
  558. :disabled="!excelParam.content.where.func"
  559. @click="Search('excelParam', 'bodystructure')"
  560. :options="bodystructure"
  561. v-model="excelParam.content.where.bodystructure"
  562. ></MySelect>
  563. </div>
  564. </div>
  565. <div
  566. class="tips"
  567. v-if="
  568. guangtouParam.content.where.drivetype == '电动' && resultArr.length
  569. "
  570. style="color: #3874f6; margin-top: 10px"
  571. >
  572. <i class="el-icon-warning" style="margin-right: 5px"></i
  573. >{{ $t("建议开关阀时间")
  574. }}{{
  575. caliber.filter((v) => v.value == resultArr[0].caliber).length
  576. ? caliber
  577. .filter((v) => v.value == resultArr[0].caliber)[0]
  578. .remarks.split(";")[0]
  579. : "-"
  580. }}{{ $t("秒") }}
  581. </div>
  582. <!--执行器-->
  583. <div v-if="guangtouParam.content.where.drivetype == '电动'">
  584. <MyTable
  585. fixedName="operation"
  586. :height="tableHeight"
  587. :noQuery="true"
  588. ref="excelRef"
  589. :layout="tool.tabelCol($route.name)['excelTable1'].tablecols"
  590. :param="excelParam"
  591. :custom="true"
  592. style="margin-top: 14px"
  593. >
  594. <template v-slot:customcol="scope">
  595. <span
  596. v-if="scope.column.columnname == 'matchratio'"
  597. style="color: red"
  598. >{{ $t(scope.column.data[scope.column.columnname]) }}</span
  599. >
  600. <span v-else-if="scope.column.columnname == 'maxsquarewidth'">{{
  601. scope.column.data[scope.column.columnname].join(",")
  602. }}</span>
  603. <span v-else-if="scope.column.columnname != 'operation'">{{
  604. $t(scope.column.data[scope.column.columnname])
  605. }}</span>
  606. </template>
  607. <template v-slot:opreation="scope">
  608. <el-button
  609. type="text"
  610. size="mini"
  611. @click="selectTarget(scope.data, '执行器')"
  612. :disabled="
  613. loading ||
  614. (guangtouParam.content.where.drivetype == '电动' &&
  615. resultArr.length == 2)
  616. "
  617. >{{ $t("选择") }}</el-button
  618. >
  619. </template>
  620. </MyTable>
  621. </div>
  622. <MyTable
  623. v-else
  624. :height="tableHeight"
  625. fixedName="operation"
  626. :noQuery="true"
  627. ref="excelRef"
  628. :layout="tool.tabelCol($route.name)['excelTable2'].tablecols"
  629. :param="excelParam"
  630. :custom="true"
  631. style="margin-top: 14px"
  632. >
  633. <template v-slot:customcol="scope">
  634. <span
  635. v-if="scope.column.columnname == 'matchratio'"
  636. style="color: red"
  637. >{{ $t(scope.column.data[scope.column.columnname]) }}</span
  638. >
  639. <span v-else-if="scope.column.columnname == 'maxsquarewidth'">{{
  640. scope.column.data[scope.column.columnname].join(",")
  641. }}</span>
  642. <span v-else-if="scope.column.columnname != 'operation'">{{
  643. $t(scope.column.data[scope.column.columnname])
  644. }}</span>
  645. </template>
  646. <template v-slot:opreation="scope">
  647. <el-button
  648. type="text"
  649. size="mini"
  650. @click="selectTarget(scope.data, '执行器')"
  651. :disabled="
  652. loading ||
  653. (guangtouParam.content.where.drivetype == '电动' &&
  654. resultArr.length == 2)
  655. "
  656. >{{ $t("选择") }}</el-button
  657. >
  658. </template>
  659. </MyTable>
  660. </div>
  661. <!--选辅件-->
  662. <div class="dialog-content" v-show="active == 3">
  663. <MyTable
  664. :noQuery="true"
  665. ref="fujianRef"
  666. fixedName="operation"
  667. :height="tableHeight"
  668. :layout="tool.tabelCol($route.name)['itemList'].tablecols"
  669. :param="fujianParam"
  670. :opwidth="200"
  671. :custom="true"
  672. style="margin-top: 14px"
  673. >
  674. <template v-slot:customcol="scope">
  675. <span v-if="scope.column.columnname != 'operation'">{{
  676. $t(scope.column.data[scope.column.columnname])
  677. }}</span>
  678. </template>
  679. <template v-slot:opreation="scope">
  680. <el-button
  681. type="text"
  682. size="mini"
  683. @click="selectTarget(scope.data, '辅件')"
  684. :disabled="loading"
  685. >{{ $t("选择") }}</el-button
  686. >
  687. </template>
  688. </MyTable>
  689. </div>
  690. <div class="dialog-content" v-if="active == 4">
  691. <table
  692. bgcolor="#FAFAFA"
  693. cellpadding="0"
  694. style="width: 100%"
  695. class="result"
  696. >
  697. <tr style="width: 100px">
  698. <td class="title">{{ $t("光头") }}</td>
  699. <td>
  700. <div class="text1" style="margin-bottom: 8px">
  701. <el-tag
  702. style="margin-right: 10px"
  703. size="small"
  704. type="warning"
  705. >{{ resultArr[0] && resultArr[0].actuatorbrand }}</el-tag
  706. >
  707. <span style="margin-bottom: 8px">{{
  708. resultArr[0] && resultArr[0].itemname
  709. }}</span>
  710. </div>
  711. <div class="descript">
  712. <div
  713. class="item"
  714. v-if="resultArr.length && resultArr[0].itemno"
  715. >
  716. <span style="color: #888888">{{ $t("料号") }}:</span
  717. >{{ resultArr[0].itemno }}
  718. </div>
  719. <div
  720. class="item"
  721. v-if="resultArr.length && resultArr[0].torque"
  722. >
  723. <span style="color: #888888">{{ $t("扭矩") }}:</span
  724. >{{ resultArr[0].torque }}
  725. </div>
  726. <div class="item" v-if="resultArr.length && resultArr[0].flh">
  727. <span style="color: #888888">{{ $t("法兰号") }}:</span
  728. >{{ resultArr[0].flh }}
  729. </div>
  730. <div
  731. class="item"
  732. v-if="resultArr.length && resultArr[0].caliber"
  733. >
  734. <span style="color: #888888">{{ $t("公称通径") }}:</span
  735. >{{ resultArr[0].caliber }}
  736. </div>
  737. <div
  738. class="item"
  739. v-if="resultArr.length && resultArr[0].nominalpressure"
  740. >
  741. <span style="color: #888888">{{ $t("公称压力") }}:</span
  742. >{{ resultArr[0].nominalpressure.join(",") }}
  743. </div>
  744. <div
  745. class="item"
  746. v-if="resultArr.length && resultArr[0].stemmaterial"
  747. >
  748. <span style="color: #888888">{{ $t("阀杆材质") }}:</span
  749. >{{ resultArr[0].stemmaterial }}
  750. </div>
  751. <div
  752. class="item"
  753. v-if="resultArr.length && resultArr[0].mainmaterial"
  754. >
  755. <span style="color: #888888">{{ $t("主体材质") }}:</span
  756. >{{ resultArr[0].mainmaterial }}
  757. </div>
  758. </div>
  759. </td>
  760. </tr>
  761. <tr>
  762. <td class="title">{{ $t("执行器") }}</td>
  763. <td>
  764. <div class="text1" style="margin-bottom: 8px">
  765. <el-tag
  766. style="margin-right: 10px"
  767. size="small"
  768. type="warning"
  769. >{{ resultArr[1] && resultArr[1].actuatorbrand }}</el-tag
  770. >
  771. <span style="margin-bottom: 8px"
  772. >{{ resultArr[1] && resultArr[1].actuatormodel }}
  773. {{
  774. guangtouParam.content.where.drivetype == "电动" &&
  775. resultArr[1] &&
  776. resultArr[1].gearboxname
  777. ? ` + ${$t('减速箱')}:${resultArr[1] && resultArr[1].gearboxname}`
  778. : ""
  779. }}</span
  780. >
  781. </div>
  782. <div class="descript">
  783. <div
  784. class="item"
  785. v-if="resultArr.length >= 2 && resultArr[1].actuatorno"
  786. >
  787. <span style="color: #888888">{{ $t("执行器料号") }}:</span
  788. >{{ resultArr[1].actuatorno }}
  789. </div>
  790. <div
  791. class="item"
  792. v-if="resultArr.length >= 2 && resultArr[1].actuatorname"
  793. >
  794. <span style="color: #888888">{{ $t("执行器名称") }}:</span
  795. >{{ resultArr[1].actuatorname }}
  796. </div>
  797. <div
  798. class="item"
  799. v-if="resultArr.length >= 2 && resultArr[1].actuatortype"
  800. >
  801. <span style="color: #888888">{{ $t("执行器类型") }}:</span
  802. >{{ resultArr[1].actuatortype }}
  803. </div>
  804. <div
  805. class="item"
  806. v-if="resultArr.length >= 2 && resultArr[1].flh.length"
  807. >
  808. <span style="color: #888888">{{ $t("法兰号") }}:</span
  809. >{{ resultArr[1].flh.join(",") }}
  810. </div>
  811. <div
  812. class="item"
  813. v-if="resultArr.length >= 2 && resultArr[1].bodystructure"
  814. >
  815. <span style="color: #888888">{{ $t("执行器结构") }}:</span
  816. >{{ resultArr[1].bodystructure }}
  817. </div>
  818. <div
  819. class="item"
  820. v-if="resultArr.length >= 2 && resultArr[1].torque"
  821. >
  822. <span style="color: #888888">{{ $t("输出扭矩") }}:</span
  823. >{{ resultArr[1].torque }}(Nm)
  824. </div>
  825. <div
  826. class="item"
  827. v-if="resultArr.length >= 2 && resultArr[1].maxruntime"
  828. >
  829. <span style="color: #888888">{{ $t("开关时间") }}:</span
  830. >{{ resultArr[1].maxruntime }}(s)
  831. </div>
  832. <div
  833. class="item"
  834. v-if="resultArr.length >= 2 && resultArr[1].speed"
  835. >
  836. <span style="color: #888888">{{ $t("转速") }}:</span
  837. >{{ resultArr[1].speed }}(rpm)
  838. </div>
  839. <div
  840. class="item"
  841. v-if="resultArr.length >= 2 && resultArr[1].handwheelratio"
  842. >
  843. <span style="color: #888888">{{ $t("减速比") }}:</span
  844. >{{ resultArr[1].ratio }}
  845. </div>
  846. <div
  847. class="item"
  848. v-if="resultArr.length >= 2 && resultArr[1].supplyvoltage"
  849. >
  850. <span style="color: #888888">{{ $t("电压") }}:</span
  851. >{{ resultArr[1].supplyvoltage }}(V)
  852. </div>
  853. <div
  854. class="item"
  855. v-if="resultArr.length >= 2 && resultArr[1].ratedcurrent"
  856. >
  857. <span style="color: #888888">{{ $t("电流") }}:</span
  858. >{{ resultArr[1].ratedcurrent }}(A)
  859. </div>
  860. <div
  861. class="item"
  862. v-if="resultArr.length >= 2 && resultArr[1].ratedpower"
  863. >
  864. <span style="color: #888888">{{ $t("功率") }}:</span
  865. >{{ resultArr[1].ratedpower }}(KW)
  866. </div>
  867. <div
  868. class="item"
  869. v-if="
  870. resultArr.length >= 2 &&
  871. resultArr[1].actuatorsignal_choose
  872. "
  873. >
  874. <span style="color: #888888">{{ $t("信号类型") }}:</span
  875. >{{ resultArr[1].actuatorsignal_choose }}
  876. </div>
  877. </div>
  878. </td>
  879. </tr>
  880. <tr v-if="fujianArr.length">
  881. <td class="title">{{ $t("辅件") }}</td>
  882. <td style="padding: 0">
  883. <tr style="border-bottom: 1px solid #dddddd" class="custom-table">
  884. <div>{{ $t("定位器") }}</div>
  885. <div class="text1">
  886. <el-tag
  887. style="margin-right: 10px"
  888. size="small"
  889. type="warning"
  890. v-if="
  891. fujianArr.filter((item) => item.itemname == '定位器')
  892. .length
  893. "
  894. >{{
  895. fujianArr.filter((item) => item.itemname == "定位器")[0]
  896. .actuatorbrand
  897. }}</el-tag
  898. >
  899. <span>{{
  900. fujianArr.filter((item) => item.itemname == "定位器").length
  901. ? fujianArr.filter((item) => item.itemname == "定位器")[0]
  902. .model
  903. : "-"
  904. }}</span>
  905. </div>
  906. <div>{{ $t("电磁阀") }}</div>
  907. <div class="text1">
  908. <el-tag
  909. style="margin-right: 10px"
  910. size="small"
  911. type="warning"
  912. v-if="
  913. fujianArr.filter((item) => item.itemname == '电磁阀')
  914. .length
  915. "
  916. >{{
  917. fujianArr.filter((item) => item.itemname == "电磁阀")[0]
  918. .actuatorbrand
  919. }}</el-tag
  920. >
  921. <span>{{
  922. fujianArr.filter((item) => item.itemname == "电磁阀").length
  923. ? fujianArr.filter((item) => item.itemname == "电磁阀")[0]
  924. .model
  925. : "-"
  926. }}</span>
  927. </div>
  928. </tr>
  929. <tr class="custom-table">
  930. <div>{{ $t("限位开关") }}</div>
  931. <div class="text1">
  932. <el-tag
  933. style="margin-right: 10px"
  934. size="small"
  935. type="warning"
  936. v-if="
  937. fujianArr.filter((item) => item.itemname == '限位开关')
  938. .length
  939. "
  940. >{{
  941. fujianArr.filter((item) => item.itemname == "限位开关")[0]
  942. .actuatorbrand
  943. }}</el-tag
  944. >
  945. <span>{{
  946. fujianArr.filter((item) => item.itemname == "限位开关")
  947. .length
  948. ? fujianArr.filter(
  949. (item) => item.itemname == "限位开关"
  950. )[0].model
  951. : "-"
  952. }}</span>
  953. </div>
  954. <div>{{ $t("过滤减压阀") }}</div>
  955. <div class="text1">
  956. <el-tag
  957. style="margin-right: 10px"
  958. size="small"
  959. type="warning"
  960. v-if="
  961. fujianArr.filter((item) => item.itemname == '过滤减压阀')
  962. .length
  963. "
  964. >{{
  965. fujianArr.filter(
  966. (item) => item.itemname == "过滤减压阀"
  967. )[0].actuatorbrand
  968. }}</el-tag
  969. >
  970. <span>{{
  971. fujianArr.filter((item) => item.itemname == "过滤减压阀")
  972. .length
  973. ? fujianArr.filter(
  974. (item) => item.itemname == "过滤减压阀"
  975. )[0].model
  976. : "-"
  977. }}</span>
  978. </div>
  979. </tr>
  980. </td>
  981. </tr>
  982. <tr>
  983. <td class="title">{{ $t("成品料号") }}</td>
  984. <td class="text1">
  985. {{ Object.keys(product).length ? product.itemno || "-" : "" }}
  986. </td>
  987. </tr>
  988. <tr>
  989. <td class="title" style="padding: 0" colspan="2">
  990. <tr class="price-tr">
  991. <td class="title" style="width: 120px !important">
  992. {{ $t(product.itemno ? "牌价" : "最低经销价") }}
  993. </td>
  994. <td class="text2">
  995. ¥{{
  996. Object.keys(product).length
  997. ? tool.formatAmount(product.price, 2)
  998. : "xxxxxx"
  999. }}
  1000. <div style="color:#1C1919;font-weight: normal;font-size: 12px;">*{{$t('非标准产品,当前价格仅供参考')}}!</div>
  1001. </td>
  1002. <td class="title">{{$t('成本价格')}}</td>
  1003. <td class="text2">
  1004. ¥{{
  1005. Object.keys(product).length
  1006. ? tool.formatAmount(product.marketprice, 2)
  1007. : "xxxxxx"
  1008. }}
  1009. </td>
  1010. </tr>
  1011. </td>
  1012. </tr>
  1013. </table>
  1014. </div>
  1015. <div
  1016. class="fixed__btn__panel"
  1017. v-if="(active == 1 && mode == '手动输入') || active == 3 || active == 4"
  1018. >
  1019. <el-button
  1020. size="small"
  1021. type="primary"
  1022. @click="next"
  1023. class="normal-btn-width"
  1024. v-if="active == 1 && mode == '手动输入'"
  1025. >{{$t('下一步')}}</el-button
  1026. >
  1027. <el-button
  1028. size="small"
  1029. type="primary"
  1030. @click="close"
  1031. class="normal-btn-width"
  1032. v-if="active == 4"
  1033. >{{$t('完成')}}</el-button
  1034. >
  1035. </div>
  1036. </div>
  1037. </div>
  1038. </template>
  1039. <script>
  1040. import "@/optionSystem/valveOption/index.css";
  1041. import MySelect from "@/optionSystem/FProductManage/modules/select.vue";
  1042. import MyTable from "@/optionSystem/FProductManage/modules/table.vue";
  1043. import SelectBar from "@/optionSystem/FProductManage/modules/selectBar.vue";
  1044. import Aside from "@/optionSystem/FProductManage/modules/aside.vue";
  1045. export default {
  1046. props: ["position"],
  1047. components: { MySelect, MyTable, SelectBar, Aside },
  1048. data() {
  1049. return {
  1050. items: [
  1051. { title: "选光头", value: "光头" },
  1052. { title: "选执行器", value: "执行器" },
  1053. { title: "选辅件", value: "辅件" },
  1054. { title: "确认配置", value: "配置" },
  1055. ],
  1056. mode: "自动选配",
  1057. active: 1,
  1058. tableHeight: "400px",
  1059. excel: "",
  1060. gangtou: "",
  1061. resultArr: [],
  1062. caliber: [],
  1063. nominalpressure: [],
  1064. connection: [],
  1065. bodymaterial: [],
  1066. stemmaterial: [],
  1067. plinthmaterial: [],
  1068. actuatorbrand: [],
  1069. actuatorname: [],
  1070. actuatordrivetype: [],
  1071. actuatorsignal: [],
  1072. supplyvoltage: [],
  1073. flh: [],
  1074. drivetype: [],
  1075. bodystructure: [],
  1076. func: [],
  1077. guangtouList: [],
  1078. isFujianShow: false, //辅件是否显示
  1079. form: {
  1080. itemid: 0,
  1081. plm_itemextendid: 0,
  1082. valvetype: "蝶阀", //阀门类型(固定)
  1083. itemno: "", //产品编码(必填,唯一)
  1084. itemname: "", //产品名称(必填)
  1085. erpitemno: "", //erp品号(必填)
  1086. erpitemname: "", //erp品名(必填)
  1087. spec: "", //规格尺寸(必填)
  1088. model: "", //型号(必填)
  1089. material: "", //材质(必填,选项)
  1090. marketprice: "",
  1091. caliber: "", //公称通径
  1092. nominalpressure: [], //公称压力
  1093. connection: "",
  1094. drivetype: [], //驱动方式
  1095. valveplatematerial: "",
  1096. bodymaterial: "",
  1097. stemmaterial: "",
  1098. plinthmaterial: "",
  1099. torque: "", //
  1100. maxruntime: "", //90°最大运行时间
  1101. actuatorbrand: "", //执行器品牌
  1102. actuatordrivetype: "", //执行器类型
  1103. part_itemids: [],
  1104. },
  1105. guangtouParam: {
  1106. id: 20240718162102,
  1107. content: {
  1108. pageNumber: 1,
  1109. pageSize: 30,
  1110. where: {
  1111. condition: "",
  1112. caliber: "", //公称通径
  1113. nominalpressure: "", //公称压力
  1114. connection: "", //连接方式
  1115. bodymaterial: "", //阀体材质
  1116. stemmaterial: "", //阀杆材质
  1117. plinthmaterial: "", //阀座材质
  1118. drivetype: "电动", //驱动方式
  1119. },
  1120. },
  1121. },
  1122. excelList: [],
  1123. excelParam: {
  1124. id: 20240718162202,
  1125. content: {
  1126. itemid: "", //光头id
  1127. pageNumber: 1,
  1128. pageSize: 30,
  1129. where: {
  1130. actuatordrivetype: "电动开关", //驱动方式
  1131. condition1: "",
  1132. condition2: "",
  1133. torque: "", //阀门扭矩
  1134. flh: "", //法兰号
  1135. actuatorbrand: "", //品牌
  1136. actuatorname: "",
  1137. supplyvoltage: "",
  1138. actuatorsignal: "",
  1139. maxsquarewidth: "", //方阀杆最大宽度
  1140. maxrounddiameter: "", //圆阀杆最大直径
  1141. },
  1142. },
  1143. },
  1144. fujianList: [],
  1145. fujianArr: [],
  1146. loading: false,
  1147. fujianParam: {
  1148. id: 20240718162402,
  1149. content: {
  1150. othertypes: [],
  1151. pageNumber: 1,
  1152. pageSize: 300,
  1153. where: {
  1154. actuatorbrand: "", //品牌
  1155. },
  1156. },
  1157. },
  1158. timer: null,
  1159. product: {},
  1160. };
  1161. },
  1162. watch: {
  1163. // 'excelParam.content.where.actuatorbrand': {
  1164. // handler (val) {
  1165. // setTimeout(() => {
  1166. // this.calcTableHieght('excelRef')
  1167. // },500)
  1168. // }
  1169. // },
  1170. active(val) {
  1171. switch (val) {
  1172. case 1:
  1173. this.calcTableHieght("guangtouRef");
  1174. break;
  1175. case 2:
  1176. this.calcTableHieght("excelRef");
  1177. break;
  1178. case 3:
  1179. this.calcTableHieght("fujianRef");
  1180. break;
  1181. default:
  1182. break;
  1183. }
  1184. if (val == 4) {
  1185. if (this.guangtouParam.content.where.drivetype == "电动") {
  1186. if (this.resultArr[1].gearboxid)
  1187. this.resultArr.push({
  1188. parttype: "减速箱",
  1189. itemid: this.resultArr[1].gearboxid,
  1190. itemname: this.resultArr[1].gearboxname,
  1191. actuatorbrand: this.resultArr[1].gearboxbrand,
  1192. });
  1193. }
  1194. this.$api
  1195. .requested({
  1196. id: 2024071916224702,
  1197. content: {
  1198. part_itemids: this.resultArr.map((item) => {
  1199. return {
  1200. parttype: item.parttype,
  1201. itemid: item.itemid,
  1202. };
  1203. }),
  1204. },
  1205. })
  1206. .then((res) => {
  1207. this.product = res.data;
  1208. });
  1209. }
  1210. },
  1211. },
  1212. methods: {
  1213. resultRefresh(type) {
  1214. if (type == "光头") {
  1215. this.active = 1;
  1216. this.resultArr = [];
  1217. this.fujianArr = [];
  1218. } else if (type == "执行器") {
  1219. this.active = 2;
  1220. this.resultArr = this.resultArr.splice(0, 1);
  1221. this.fujianArr = [];
  1222. } else {
  1223. this.fujianArr = [];
  1224. this.resultArr = this.resultArr.splice(0, 2);
  1225. this.active = 3;
  1226. if (this.excelParam.content.where.drivetype == "气动调节") {
  1227. this.fujianParam.content.othertypes = ["定位器", "过滤减压阀"];
  1228. } else if (this.excelParam.content.where.drivetype == "气动开关") {
  1229. this.fujianParam.content.othertypes = [
  1230. "电磁阀",
  1231. "限位开关",
  1232. "过滤减压阀",
  1233. ];
  1234. }
  1235. this.$refs.fujianRef.listData();
  1236. }
  1237. },
  1238. //手动输入下一步
  1239. next() {
  1240. this.$refs.ruleForm.validate(async (val) => {
  1241. if (val) {
  1242. let data = JSON.parse(
  1243. JSON.stringify(this.guangtouParam.content.where)
  1244. );
  1245. this.selectTarget(data, "主阀");
  1246. }
  1247. });
  1248. },
  1249. close() {
  1250. this.active = 1;
  1251. this.guangtouParam.content.where.drivetype = "电动";
  1252. this.resultArr = [];
  1253. this.fujianArr = [];
  1254. if (this.$refs.ruleForm) {
  1255. this.$refs.ruleForm.resetFields();
  1256. this.guangtouParam.content.where.drivetype = "电动";
  1257. }
  1258. },
  1259. //搜索
  1260. Search(type, position) {
  1261. let index = 0;
  1262. let whereKeys = Object.keys(this[type].content.where);
  1263. if (position) {
  1264. index = whereKeys.indexOf(position) + 1;
  1265. }
  1266. if (type != "excelParam") {
  1267. for (let i = index; i < whereKeys.length - 1; i++) {
  1268. if (!position && whereKeys[i].indexOf("condition") != -1) continue;
  1269. this[type].content.where[whereKeys[i]] = "";
  1270. }
  1271. } else if (type == "excelParam") {
  1272. for (let i = index; i < whereKeys.length; i++) {
  1273. if (
  1274. whereKeys[i].indexOf("condition") != -1 ||
  1275. whereKeys[i].indexOf("flh") != -1 ||
  1276. whereKeys[i].indexOf("maxrounddiameter") != -1 ||
  1277. whereKeys[i].indexOf("maxsquarewidth") != -1 ||
  1278. whereKeys[i].indexOf("torque") != -1 ||
  1279. whereKeys[i].indexOf("drivetype") != -1
  1280. )
  1281. continue;
  1282. this[type].content.where[whereKeys[i]] = "";
  1283. }
  1284. }
  1285. switch (type) {
  1286. case "guangtouParam":
  1287. if (this.loading) return;
  1288. this.loading = true;
  1289. whereKeys = whereKeys.filter((item) => item != "caliber");
  1290. this.$refs.guangtouRef &&
  1291. this.$refs.guangtouRef.listData(_changeOption);
  1292. break;
  1293. case "excelParam":
  1294. if (this.loading) return;
  1295. this.loading = true;
  1296. this.$nextTick(() => {
  1297. this.$refs.excelRef && this.$refs.excelRef.listData(_changeOption2);
  1298. });
  1299. break;
  1300. default:
  1301. break;
  1302. }
  1303. //更新选项列表
  1304. let that = this;
  1305. function _changeOption() {
  1306. that.loading = false;
  1307. let isbreak = false;
  1308. for (let i = 0; i < whereKeys.length; i++) {
  1309. if (isbreak) break;
  1310. if (whereKeys[i].indexOf("condition") == -1) {
  1311. if (that.$refs.guangtouRef.list.length) {
  1312. if (i >= index - 1 && whereKeys[i] != "drivetype") {
  1313. that[whereKeys[i]] =
  1314. that.$refs.guangtouRef.list[0].option[whereKeys[i]];
  1315. if (that[whereKeys[i]].length == 1) {
  1316. if (that.guangtouParam.content.where[position])
  1317. that.guangtouParam.content.where[whereKeys[i]] =
  1318. that[whereKeys[i]][0].value;
  1319. if (that.timer) clearTimeout(that.timer);
  1320. that.timer = setTimeout(() => {
  1321. that.$refs.guangtouRef && that.$refs.guangtouRef.listData();
  1322. });
  1323. } else if (that[whereKeys[i]].length > 1) {
  1324. that.guangtouParam.content.where[whereKeys[i]] = "";
  1325. }
  1326. if (
  1327. that.$refs.guangtouRef.list[0].option[whereKeys[i]].length > 1
  1328. ) {
  1329. isbreak = true;
  1330. }
  1331. }
  1332. } else {
  1333. if (i >= index && whereKeys[i] != "drivetype")
  1334. that[whereKeys[i]] = [];
  1335. }
  1336. }
  1337. }
  1338. }
  1339. function _changeOption2() {
  1340. that.loading = false;
  1341. let isbreak = false;
  1342. for (let i = 5; i < whereKeys.length; i++) {
  1343. if (isbreak) break;
  1344. if (whereKeys[i].indexOf("condition") == -1) {
  1345. if (that.$refs.excelRef.list.length) {
  1346. if (i >= index) {
  1347. if (whereKeys[i] != "drivetype")
  1348. that[whereKeys[i]] =
  1349. that.$refs.excelRef.list[0].option[whereKeys[i]];
  1350. if (that[whereKeys[i]].length == 1) {
  1351. if (that.excelParam.content.where[position])
  1352. that.excelParam.content.where[whereKeys[i]] =
  1353. that[whereKeys[i]][0].value;
  1354. if (that.timer) clearTimeout(that.timer);
  1355. that.timer = setTimeout(() => {
  1356. that.$refs.excelRef && that.$refs.excelRef.listData();
  1357. });
  1358. } else if (
  1359. that[whereKeys[i]].length > 1 &&
  1360. whereKeys[i] != "drivetype"
  1361. ) {
  1362. that.excelParam.content.where[whereKeys[i]] = "";
  1363. }
  1364. if (
  1365. that.$refs.excelRef.list[0].option[whereKeys[i]].length > 1
  1366. ) {
  1367. isbreak = true;
  1368. }
  1369. }
  1370. } else {
  1371. if (i >= index && whereKeys[i] != "drivetype")
  1372. that[whereKeys[i]] = [];
  1373. }
  1374. }
  1375. }
  1376. }
  1377. },
  1378. calcTableHieght(id) {
  1379. this.$nextTick(() => {
  1380. setTimeout(() => {
  1381. let target = this.$refs[id].$el.getBoundingClientRect();
  1382. let clientHeight = document.body.clientHeight;
  1383. this.tableHeight = clientHeight - target.top - 30 + "px";
  1384. this.$refs[id].$refs.table.doLayout();
  1385. }, 200);
  1386. });
  1387. },
  1388. guangtouChange(val) {
  1389. switch (val) {
  1390. case "电动":
  1391. this.excelParam = {
  1392. id: 20240718162202,
  1393. content: {
  1394. itemid: 0, //光头id
  1395. pageNumber: 1,
  1396. pageSize: 30,
  1397. where: {
  1398. actuatordrivetype: "电动开关", //驱动方式
  1399. condition1: "",
  1400. condition2: "",
  1401. torque: "", //阀门扭矩
  1402. flh: "", //法兰号
  1403. actuatorbrand: "", //品牌
  1404. actuatorname: "",
  1405. supplyvoltage: "",
  1406. actuatorsignal: "",
  1407. maxsquarewidth: "", //方阀杆最大宽度
  1408. maxrounddiameter: "", //圆阀杆最大直径
  1409. },
  1410. },
  1411. };
  1412. break;
  1413. case "气动":
  1414. this.excelParam = {
  1415. id: 20240718162302,
  1416. content: {
  1417. pageNumber: 1,
  1418. pageSize: 30,
  1419. where: {
  1420. condition1: "",
  1421. torque: "", //阀门扭矩
  1422. flh: "", //法兰号
  1423. maxsquarewidth: "", //方阀杆最大宽度
  1424. maxrounddiameter: "", //圆阀杆最大直径
  1425. actuatorbrand: "", //品牌
  1426. actuatorname: "",
  1427. func: "", //功能
  1428. bodystructure: "", //结构
  1429. drivetype: "气动调节",
  1430. },
  1431. },
  1432. };
  1433. break;
  1434. default:
  1435. break;
  1436. }
  1437. },
  1438. //选择目标
  1439. selectTarget(data, type) {
  1440. data.parttype = type;
  1441. this.resultArr.push(data);
  1442. if (type == "主阀") {
  1443. this.guangtouChange(this.guangtouParam.content.where.drivetype);
  1444. this.excelParam.content.itemid = data.itemid;
  1445. this.excelParam.content.where.torque = data.torque;
  1446. this.excelParam.content.where.flh = data.flh;
  1447. this.excelParam.content.where.maxsquarewidth = data.maxsquarewidth;
  1448. this.excelParam.content.where.maxrounddiameter = data.maxrounddiameter;
  1449. this.$nextTick(() => {
  1450. this.$refs.excelRef.listData(() => {
  1451. if (!this.$refs.excelRef.list.length) return;
  1452. this.actuatorbrand =
  1453. this.$refs.excelRef.list[0].option.actuatorbrand;
  1454. this.bodystructure =
  1455. this.$refs.excelRef.list[0].option.bodystructure;
  1456. this.func = this.$refs.excelRef.list[0].option.func;
  1457. });
  1458. });
  1459. this.active = 2;
  1460. } else if (type == "执行器") {
  1461. this.resultArr[1].itenname = this.resultArr[1].actuatorname;
  1462. this.resultArr[1].itemno = this.resultArr[1].actuatorno;
  1463. if (this.excelParam.content.where.drivetype == "气动调节") {
  1464. this.fujianParam.content.othertypes = ["定位器", "过滤减压阀"];
  1465. } else {
  1466. this.fujianParam.content.othertypes = [
  1467. "电磁阀",
  1468. "限位开关",
  1469. "过滤减压阀",
  1470. ];
  1471. }
  1472. data.itemid = data.actuatorid;
  1473. data.itemname = data.actuatorname;
  1474. if (this.guangtouParam.content.where.drivetype == "气动") {
  1475. this.active = 3;
  1476. this.$refs.fujianRef.listData();
  1477. } else {
  1478. this.active = 4;
  1479. }
  1480. } else {
  1481. if (this.fujianArr.filter((item) => item.itemid == data.itemid).length)
  1482. return;
  1483. this.fujianParam.content.othertypes.splice(
  1484. this.fujianParam.content.othertypes.indexOf(data.itemname),
  1485. 1
  1486. );
  1487. this.fujianArr.push(data);
  1488. if (!this.fujianParam.content.othertypes.length)
  1489. return (this.active = 4);
  1490. this.loading = true;
  1491. this.$refs.fujianRef.listData(() => {
  1492. this.loading = false;
  1493. });
  1494. }
  1495. this.resultArr[this.resultArr.length - 1] = data;
  1496. },
  1497. //重置
  1498. refresh() {
  1499. this.resultArr = [];
  1500. this.fujianArr = [];
  1501. this.dialogVisible = false;
  1502. this.active = 1;
  1503. this.items = this.items.splice(0, 2);
  1504. },
  1505. //选项
  1506. optionsList() {
  1507. this.$store.dispatch("optiontypeselect", "caliber").then((res) => {
  1508. this.caliber = res.data;
  1509. console.log(this.caliber, "公称通径");
  1510. });
  1511. this.$store.dispatch("optiontypeselect", "pressure").then((res) => {
  1512. this.nominalpressure = res.data;
  1513. console.log(this.nominalpressure, "公称压力");
  1514. });
  1515. this.$store.dispatch("optiontypeselect", "connection").then((res) => {
  1516. this.connection = res.data;
  1517. console.log(this.connection, "连接方式");
  1518. });
  1519. this.$store.dispatch("optiontypeselect", "bodymaterial").then((res) => {
  1520. this.bodymaterial = res.data;
  1521. console.log(this.bodymaterial, "阀体材质");
  1522. });
  1523. this.$store.dispatch("optiontypeselect", "stemmaterial").then((res) => {
  1524. this.stemmaterial = res.data;
  1525. console.log(this.stemmaterial, "阀杆材质");
  1526. });
  1527. this.$store.dispatch("optiontypeselect", "plinthmaterial").then((res) => {
  1528. this.plinthmaterial = res.data;
  1529. console.log(this.plinthmaterial, "阀座材质");
  1530. });
  1531. this.drivetype = [
  1532. { remarks: "电动", value: "电动" },
  1533. { remarks: "气动", value: "气动" },
  1534. ];
  1535. console.log(this.drivetype, "驱动方式");
  1536. this.$store.dispatch("optiontypeselect", "lectotypebrand").then((res) => {
  1537. this.actuatorbrand = res.data;
  1538. console.log(this.actuatorbrand, "执行器品牌");
  1539. });
  1540. this.$store
  1541. .dispatch("optiontypeselect", "actuatordrivetype")
  1542. .then((res) => {
  1543. this.actuatordrivetype = res.data;
  1544. console.log(this.actuatordrivetype, "执行器驱动方式");
  1545. });
  1546. this.$store.dispatch("optiontypeselect", "bodystructure").then((res) => {
  1547. this.bodystructure = res.data;
  1548. console.log(this.bodystructure, "结构");
  1549. });
  1550. this.$store.dispatch("optiontypeselect", "func").then((res) => {
  1551. this.func = res.data;
  1552. console.log(this.func, "功能");
  1553. });
  1554. this.$store.dispatch("optiontypeselect", "flh").then((res) => {
  1555. this.flh = res.data;
  1556. console.log(this.func, "法兰号");
  1557. });
  1558. this.$store.dispatch("optiontypeselect", "actuatorsignal").then((res) => {
  1559. this.actuatorsignal = res.data;
  1560. console.log(this.actuatorsignal, "信号");
  1561. });
  1562. this.$store.dispatch("optiontypeselect", "supplyvoltage").then((res) => {
  1563. this.supplyvoltage = res.data;
  1564. console.log(this.supplyvoltage, "电源电压");
  1565. });
  1566. },
  1567. },
  1568. created() {
  1569. this.optionsList();
  1570. },
  1571. mounted() {
  1572. this.calcTableHieght("guangtouRef");
  1573. },
  1574. };
  1575. </script>
  1576. <style scoped>
  1577. /deep/.ant-steps-item-finish
  1578. > .ant-steps-item-container
  1579. > .ant-steps-item-content
  1580. > .ant-steps-item-title::after {
  1581. background: #3874f6 !important;
  1582. }
  1583. /deep/.ant-steps-item-finish .ant-steps-item-icon {
  1584. background: none !important;
  1585. }
  1586. /deep/.ant-steps-item-icon {
  1587. background: #3874f6;
  1588. height: 32px !important;
  1589. }
  1590. /deep/.ant-steps-item-wait .ant-steps-item-icon {
  1591. background: none !important;
  1592. }
  1593. /deep/.ant-steps-item-active .ant-steps-item-title {
  1594. color: #3874f6 !important;
  1595. font-weight: bold;
  1596. }
  1597. .scroll {
  1598. height: calc(100vh - 60px);
  1599. overflow-y: scroll;
  1600. }
  1601. ::-webkit-scrollbar {
  1602. display: none;
  1603. }
  1604. .select-info {
  1605. background: #f5f6fa;
  1606. font-family: Microsoft YaHei, Microsoft YaHei;
  1607. width: 240px;
  1608. border-right: 1px #999999 solid;
  1609. z-index: 301;
  1610. flex-shrink: 0;
  1611. word-wrap: break-word;
  1612. }
  1613. .select-info .info-title {
  1614. font-weight: bold;
  1615. font-size: 20px;
  1616. color: #333333;
  1617. padding: 10px 20px;
  1618. border-bottom: 1px solid #d9d9d9;
  1619. }
  1620. .select-info .product-wrapper {
  1621. padding: 0 20px;
  1622. }
  1623. .select-info .product-wrapper .product {
  1624. padding-bottom: 20px;
  1625. border-bottom: #d9d9d9 1px solid;
  1626. }
  1627. .select-info .product-wrapper .product:last-child {
  1628. border-bottom: none !important;
  1629. }
  1630. .select-info .product-wrapper .product .product-header {
  1631. display: flex;
  1632. align-items: center;
  1633. align-content: center;
  1634. padding: 10px 0;
  1635. }
  1636. .select-info .product-wrapper .product .product-header span:last-child {
  1637. color: #3874f6;
  1638. margin-left: 18px;
  1639. cursor: pointer;
  1640. }
  1641. .select-info .product-wrapper .product .product-header .title {
  1642. font-weight: bold;
  1643. font-size: 14px;
  1644. color: #333333;
  1645. }
  1646. .select-info .product-wrapper .product .product-header img {
  1647. width: 12px;
  1648. height: 12px;
  1649. }
  1650. .select-info .product-wrapper .product .product-name {
  1651. font-weight: 400;
  1652. font-size: 14px;
  1653. color: #555555;
  1654. }
  1655. .select-info .product-wrapper .product .attrite {
  1656. display: flex;
  1657. justify-content: space-between;
  1658. align-items: center;
  1659. font-weight: 400;
  1660. font-size: 12px;
  1661. color: #999999;
  1662. padding-top: 10px;
  1663. }
  1664. .select-info .product-wrapper .product .attrite .attrite-title {
  1665. color: #555555;
  1666. }
  1667. .select-info .product-wrapper .product .attrite .attrite-value {
  1668. }
  1669. .select-info .product-wrapper .product .attrite2 {
  1670. display: flex;
  1671. flex-direction: column;
  1672. font-weight: 400;
  1673. font-size: 12px;
  1674. color: #999999;
  1675. padding-top: 10px;
  1676. }
  1677. .select-info .product-wrapper .product .attrite2 .attrite-title {
  1678. color: #555555;
  1679. margin-bottom: 5px;
  1680. }
  1681. .select-info .product-wrapper .product .attrite2 .attrite-value {
  1682. }
  1683. .select-info .product-wrapper .product {
  1684. display: flex;
  1685. flex-direction: column;
  1686. }
  1687. .drawer__panel {
  1688. font-family: Source Han Sans SC, Source Han Sans SC;
  1689. padding: 10px 40px !important;
  1690. flex: 1;
  1691. margin-bottom: 0 !important;
  1692. overflow: hidden;
  1693. }
  1694. .my-steps {
  1695. padding: 0px 68px;
  1696. }
  1697. .product-info {
  1698. padding: 10px 20px;
  1699. border: 1px solid #3874f6;
  1700. background: rgba(56, 116, 246, 0.08);
  1701. margin-top: 5px;
  1702. border-radius: 2px;
  1703. }
  1704. .product-info .title {
  1705. margin-bottom: 16px;
  1706. font-weight: bold;
  1707. color: #333333;
  1708. font-size: 16px !important;
  1709. }
  1710. .product-info .info-content {
  1711. display: flex;
  1712. flex-wrap: wrap;
  1713. }
  1714. .product-info .info-content .info-item {
  1715. display: flex;
  1716. flex-direction: column;
  1717. }
  1718. .product-info .info-content .info-item .info-title {
  1719. margin-bottom: 4px;
  1720. display: flex;
  1721. align-content: center;
  1722. align-items: center;
  1723. }
  1724. .product-info .info-content .info-item .info-title .title {
  1725. margin-bottom: 0px !important;
  1726. }
  1727. .product-info .info-content .info-item .info-title div {
  1728. margin-right: 20px;
  1729. font-size: 14px !important;
  1730. }
  1731. .product-info .info-content .info-item .info-title span {
  1732. font-size: 14px;
  1733. color: #3874f6 !important;
  1734. cursor: pointer;
  1735. display: inline-block;
  1736. display: flex;
  1737. align-items: center;
  1738. align-content: center;
  1739. }
  1740. .product-info .info-content .info-item .info-title span img {
  1741. width: 12px;
  1742. height: 12px;
  1743. margin-right: 4px;
  1744. }
  1745. .product-info .info-content .info-item .name {
  1746. font-weight: 400;
  1747. font-size: 14px;
  1748. color: #555555;
  1749. }
  1750. .product-info .info-content .info-item .names {
  1751. font-weight: 400;
  1752. font-size: 14px;
  1753. color: #555555;
  1754. display: flex;
  1755. }
  1756. .product-info .info-content .info-item .names div {
  1757. margin-right: 20px;
  1758. }
  1759. .product-info .info-content .info-item .names div span {
  1760. margin-right: 10px;
  1761. }
  1762. .product-content .block {
  1763. margin-top: 30px;
  1764. padding-left: 20px;
  1765. }
  1766. .product-content .block .header {
  1767. display: flex;
  1768. align-content: center;
  1769. align-items: center;
  1770. margin-bottom: 20px;
  1771. }
  1772. .product-content .block .header .title {
  1773. font-size: 16px;
  1774. font-weight: bold;
  1775. margin-right: 20px;
  1776. }
  1777. .product-content .block .header .handle {
  1778. display: flex;
  1779. }
  1780. .dialog-content {
  1781. }
  1782. .dialog-content .option-line {
  1783. display: flex;
  1784. margin-top: 10px;
  1785. }
  1786. .dialog-content .option-line .item {
  1787. display: flex;
  1788. align-items: center;
  1789. font-size: 14px;
  1790. font-weight: 500px;
  1791. margin-right: 20px;
  1792. }
  1793. .dialog-content .option-line .item .label {
  1794. width: 70px;
  1795. flex-shrink: 0;
  1796. text-align-last: justify;
  1797. margin-right: 15px;
  1798. color: #000000 !important;
  1799. }
  1800. .descript {
  1801. font-size: 12px;
  1802. color: red;
  1803. }
  1804. table,
  1805. td,
  1806. tr {
  1807. border-collapse: collapse;
  1808. }
  1809. td {
  1810. padding: 20px 20px;
  1811. }
  1812. table,
  1813. td {
  1814. border: 1px solid #dddddd;
  1815. }
  1816. .result {
  1817. margin-top: 20px;
  1818. margin-bottom: 70px;
  1819. }
  1820. .result .title {
  1821. font-family: Source Han Sans SC, Source Han Sans SC;
  1822. font-weight: bold;
  1823. font-size: 16px;
  1824. color: #333333;
  1825. padding: 20px 20px;
  1826. width: 120px;
  1827. }
  1828. .custom-table {
  1829. border: none;
  1830. display: flex;
  1831. height: 64px;
  1832. align-items: center;
  1833. align-content: center;
  1834. }
  1835. .custom-table div {
  1836. border-right: 1px solid #dddddd;
  1837. height: 100%;
  1838. display: flex;
  1839. align-items: center;
  1840. align-content: center;
  1841. padding-left: 20px;
  1842. }
  1843. .custom-table div:nth-child(1) {
  1844. width: 120px;
  1845. }
  1846. .custom-table div:nth-child(2) {
  1847. flex: 1;
  1848. }
  1849. .custom-table div:nth-child(3) {
  1850. width: 120px;
  1851. }
  1852. .custom-table div:nth-child(4) {
  1853. flex: 1;
  1854. }
  1855. .descript {
  1856. display: flex;
  1857. flex-wrap: wrap;
  1858. }
  1859. .descript .item {
  1860. font-family: Source Han Sans SC, Source Han Sans SC;
  1861. font-weight: 400;
  1862. font-size: 14px;
  1863. color: #333333;
  1864. margin-right: 40px;
  1865. margin-bottom: 5px;
  1866. }
  1867. .descript .item:last-child {
  1868. margin-right: 0 !important;
  1869. }
  1870. .text1 {
  1871. font-family: Source Han Sans SC, Source Han Sans SC;
  1872. font-weight: bold;
  1873. font-size: 16px;
  1874. color: #3874f6;
  1875. }
  1876. .text2 {
  1877. font-family: Source Han Sans SC, Source Han Sans SC;
  1878. font-weight: bold;
  1879. font-size: 16px;
  1880. color: #e80000;
  1881. }
  1882. .price-tr {
  1883. display: flex;
  1884. }
  1885. .price-tr td ~ td {
  1886. flex: 1;
  1887. }
  1888. .price-tr td {
  1889. border-left: none;
  1890. border-top: none;
  1891. border-bottom: none;
  1892. }
  1893. </style>