permitAdd.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507
  1. <template>
  2. <ele-modal
  3. :title="dialogTitle"
  4. :visible.sync="visible"
  5. :before-close="handleClose"
  6. :close-on-click-modal="false"
  7. :close-on-press-escape="false"
  8. width="80%"
  9. :maxable="true"
  10. append-to-body
  11. destroy-on-close
  12. >
  13. <el-form
  14. label-width="115px"
  15. :model="formData"
  16. :rules="formRules"
  17. ref="formRef"
  18. v-loading="loading"
  19. :disabled="type == 'detail'"
  20. >
  21. <el-row style="margin-bottom: 10px">
  22. <el-col :span="8">
  23. <el-form-item label="记录规则类型" prop="classify" required>
  24. <el-select
  25. style="width: 100%"
  26. v-model="formData.classify"
  27. placeholder="请选择"
  28. >
  29. <el-option
  30. v-for="item in recordSheet"
  31. :key="item.value"
  32. :label="item.label"
  33. :value="item.value"
  34. >
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="8">
  40. <el-form-item label="记录规则编码" prop="code">
  41. <el-input
  42. v-model="formData.code"
  43. :disabled="true"
  44. placeholder="系统自动生成"
  45. ></el-input>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="8">
  49. <el-form-item label="记录规则版本">
  50. <el-input
  51. :value="versionText"
  52. disabled
  53. placeholder="系统自动生成"
  54. ></el-input>
  55. </el-form-item>
  56. </el-col>
  57. </el-row>
  58. <el-row style="margin-bottom: 10px">
  59. <el-col :span="8">
  60. <el-form-item label="记录规则名称" prop="name">
  61. <el-input v-model="formData.name" placeholder="请输入"></el-input>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="8">
  65. <el-form-item label="启用日期" required prop="startDate">
  66. <el-date-picker
  67. v-model="formData.startDate"
  68. type="date"
  69. placeholder="请选择启用日期"
  70. style="width: 100%"
  71. ></el-date-picker>
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="8">
  75. <el-form-item label="停用日期" required prop="stopDate">
  76. <el-date-picker
  77. v-model="formData.stopDate"
  78. type="date"
  79. placeholder="请选择停用日期"
  80. style="width: 100%"
  81. />
  82. </el-form-item>
  83. </el-col>
  84. <el-col v-if="formData.classify == 3" :span="8">
  85. <el-form-item label="关联设备" prop="deviceName" required>
  86. <el-input
  87. v-model="formData.deviceName"
  88. placeholder="请选择设备"
  89. :readonly="true"
  90. >
  91. <template #append>
  92. <el-button @click="selectDeviceId">选择设备</el-button>
  93. </template>
  94. </el-input>
  95. </el-form-item>
  96. </el-col>
  97. </el-row>
  98. <el-row style="margin-bottom: 10px">
  99. <el-col :span="8">
  100. <el-form-item label="模块分类" required prop="reportWorkType">
  101. <dict-selection
  102. v-model="formData.reportWorkType"
  103. dictName="记录规则报工类型"
  104. placeholder="请选择模块"
  105. :clearable="false"
  106. ></dict-selection>
  107. </el-form-item>
  108. </el-col>
  109. <el-col v-if="formData.reportWorkType == 2" :span="8">
  110. <el-form-item label="关联工序">
  111. <el-input
  112. v-model="formData.produceTaskConfigBatchSavePo.produceTaskName"
  113. @click.native="openProduceTaskDialog"
  114. readonly
  115. placeholder="关联工序"
  116. clearable
  117. >
  118. <i
  119. v-if="formData.produceTaskConfigBatchSavePo.produceTaskName"
  120. slot="suffix"
  121. class="el-input__icon el-icon-close"
  122. size="24"
  123. @click.stop="clearProductTask"
  124. ></i>
  125. </el-input>
  126. </el-form-item>
  127. </el-col>
  128. <el-col v-if="formData.reportWorkType == 2" :span="8">
  129. <el-form-item label="是否有执行方式" label-width="130px">
  130. <el-radio-group
  131. v-model="formData.isExecuteMethod"
  132. @change="executeMethodChange"
  133. >
  134. <el-radio :label="1">是</el-radio>
  135. <el-radio :label="0">否</el-radio>
  136. </el-radio-group>
  137. </el-form-item>
  138. </el-col>
  139. </el-row>
  140. <el-row
  141. v-if="
  142. formData.reportWorkType != 0 &&
  143. formData.produceTaskConfigBatchSavePo.produceTaskId
  144. "
  145. style="margin-bottom: 10px"
  146. >
  147. <el-col
  148. v-if="
  149. formData.reportWorkType == 2 &&
  150. formData.produceTaskConfigBatchSavePo.produceTaskId
  151. "
  152. :span="8"
  153. >
  154. <el-form-item
  155. label="关联产品方式"
  156. required
  157. prop="relateProductMethod"
  158. >
  159. <el-select
  160. v-model="formData.relateProductMethod"
  161. placeholder="请选择关联产品方式"
  162. style="width: 100%"
  163. >
  164. <el-option
  165. v-for="item in relateProductMethodOpeions"
  166. :key="item.value"
  167. :label="item.label"
  168. :value="item.value"
  169. >
  170. </el-option>
  171. </el-select>
  172. </el-form-item>
  173. </el-col>
  174. <el-col v-if="formData.relateProductMethod == 1" :span="8">
  175. <el-form-item label="关联产品分类" required prop="categoryLevels">
  176. <ele-tree-select
  177. multiple
  178. clearable
  179. :data="productCategory"
  180. v-model="formData.categoryLevels"
  181. placeholder="请选择关联产品分类"
  182. default-expand-all
  183. labelKey="name"
  184. valueKey="id"
  185. />
  186. </el-form-item>
  187. </el-col>
  188. </el-row>
  189. <el-row style="margin-bottom: 10px">
  190. <el-col :span="24">
  191. <el-form-item label="周期" prop="frequencyValue" required>
  192. <rule-cycle
  193. ref="cycleMultipleRef"
  194. :formData="formData"
  195. :pageType="type"
  196. />
  197. </el-form-item>
  198. </el-col>
  199. </el-row>
  200. <template v-if="formData.relateProductMethod == 2">
  201. <div style="margin-bottom: 20px">
  202. <header-title title="关联产品">
  203. <el-button
  204. size="mini"
  205. type="primary"
  206. icon="el-icon-plus"
  207. class="ele-btn-icon"
  208. @click="relateProductSelect"
  209. >
  210. 添加产品
  211. </el-button>
  212. </header-title>
  213. <ele-pro-table
  214. ref="productTableRef"
  215. :columns="productColumns"
  216. :datasource="formData.categories"
  217. :needPage="false"
  218. row-key="id"
  219. >
  220. <template v-slot:action="{ row }">
  221. <el-link
  222. type="danger"
  223. :underline="false"
  224. icon="el-icon-delete"
  225. @click="productColumnsDeleteRow(row)"
  226. >
  227. 删除
  228. </el-link>
  229. </template>
  230. </ele-pro-table>
  231. </div>
  232. </template>
  233. <header-title v-if="formData.isExecuteMethod" title="执行方式">
  234. <el-button type="primary" @click="addExecuteMethod"
  235. >添加执行方式</el-button
  236. >
  237. </header-title>
  238. <div v-if="formData.isExecuteMethod" class="executeMethodlist">
  239. <div
  240. class="executeMethodItem"
  241. v-for="i in formData.executeMethodList"
  242. :key="i"
  243. :class="{
  244. executeMethodItemActive: i == formData.executeMethodTitle
  245. }"
  246. @click="formData.executeMethodTitle = i"
  247. >
  248. <span> {{ i }}</span>
  249. <i
  250. class="el-icon-error"
  251. size="24"
  252. @click="deleteExecuteMethod(i)"
  253. ></i>
  254. </div>
  255. </div>
  256. <header-title title="规则明细"></header-title>
  257. <ele-pro-table
  258. ref="table"
  259. :columns="bankColumns"
  260. :datasource="formData.details"
  261. :need-page="false"
  262. row-key="id"
  263. class="table_list"
  264. >
  265. <template v-slot:toolbar>
  266. <el-button
  267. type="primary"
  268. icon="el-icon-plus"
  269. class="ele-btn-icon"
  270. @click="addRow"
  271. >
  272. 新建
  273. </el-button>
  274. </template>
  275. <template v-slot:paramType="{ row }">
  276. <el-select
  277. v-model="row.paramType"
  278. placeholder="请选择参数类型"
  279. size="mini"
  280. required
  281. >
  282. <el-option label="数值" :value="1" />
  283. <el-option label="选择" :value="2" />
  284. <el-option label="上下限" :value="3" />
  285. <el-option label="规格" :value="4" />
  286. <el-option label="时间" :value="5" />
  287. <el-option label="范围" :value="6" />
  288. <el-option label="文本" :value="7" />
  289. <!-- <el-option label="枚举" :value="8" /> -->
  290. </el-select>
  291. </template>
  292. <template v-slot:paramValue="{ row }">
  293. <!-- 根据参数类型渲染不同的输入组件 -->
  294. <el-link
  295. v-if="formData.classify == '4'"
  296. :underline="false"
  297. style="cursor: pointer"
  298. >
  299. <div class="ele-cell">
  300. <div @click="selectChooseModalProduct(row)">
  301. {{ row.productName ? row.productName : '请选择产品' }}
  302. </div>
  303. <i
  304. v-if="row.tools.length == 0"
  305. class="el-icon-arrow-down"
  306. @click="selectChooseModalProduct(row)"
  307. ></i>
  308. <i v-else class="el-icon-close" @click="clearProduct(row)"></i>
  309. </div>
  310. </el-link>
  311. <el-input
  312. v-else
  313. v-model="row.paramValue"
  314. placeholder="请输入参数内容"
  315. size="mini"
  316. ></el-input>
  317. </template>
  318. <template v-slot:defaultValue="{ row }">
  319. <el-row>
  320. <el-col :span="12">
  321. <!-- <el-select
  322. v-if="row.paramType != 7"
  323. v-model="row.symbol"
  324. placeholder="请选择"
  325. size="mini"
  326. >
  327. <el-option label=">" value=">"> </el-option>
  328. <el-option label="<" value="<"> </el-option>
  329. <el-option label="!=" value="!="> </el-option>
  330. <el-option label=">=" value=">="> </el-option>
  331. <el-option label="<=" value="<="> </el-option>
  332. <el-option label="~~" value="~~"> </el-option>
  333. <el-option label="+-" value="+-"> </el-option>
  334. <el-option label="......" value="......"> </el-option>
  335. </el-select> -->
  336. <DictSelection
  337. v-if="row.paramType != 7"
  338. clearable
  339. dictName="数学字符"
  340. v-model="row.symbol"
  341. placeholder="请选择逻辑"
  342. size="mini"
  343. ></DictSelection>
  344. </el-col>
  345. <el-col :span="row.paramType != 7 ? 12 : 24">
  346. <el-input
  347. v-model="row.defaultValue"
  348. placeholder="请输入默认值"
  349. size="mini"
  350. ></el-input>
  351. </el-col>
  352. </el-row>
  353. </template>
  354. <template v-slot:maxValue="{ row }">
  355. <el-input
  356. v-if="row.paramType == 3 || row.paramType == 6"
  357. v-model="row.maxValue"
  358. placeholder="请输入参数上限"
  359. size="mini"
  360. ></el-input>
  361. </template>
  362. <template v-slot:minValue="{ row }">
  363. <el-input
  364. v-if="row.paramType == 3 || row.paramType == 6"
  365. v-model="row.minValue"
  366. placeholder="请输入参数下限"
  367. size="mini"
  368. ></el-input>
  369. </template>
  370. <template v-slot:unitName="{ row }">
  371. <!-- <el-input
  372. v-model="row.unitName"
  373. placeholder="请输入参数单位"
  374. size="mini"
  375. ></el-input> -->
  376. <DictSelection
  377. v-if="row.paramType != 7"
  378. dictName="工艺参数单位"
  379. clearable
  380. filterable
  381. v-model="row.unitName"
  382. size="mini"
  383. >
  384. </DictSelection>
  385. </template>
  386. <template v-slot:toolName="{ row }">
  387. <el-link :underline="false" style="cursor: pointer">
  388. <div class="ele-cell">
  389. <div @click="handleAdd(row)">
  390. {{
  391. row.tools && row.tools.length > 0
  392. ? row.tools.map((i) => i.toolName).join(',')
  393. : '请选择'
  394. }}
  395. </div>
  396. <i
  397. v-if="row.tools.length == 0"
  398. class="el-icon-arrow-down"
  399. @click="handleAdd(row)"
  400. ></i>
  401. <i v-else class="el-icon-close" @click="clearTool(row)"></i>
  402. </div>
  403. </el-link>
  404. </template>
  405. <template v-slot:toolCodes="{ row }">
  406. <el-input
  407. :value="
  408. row.tools && row.tools.length > 0
  409. ? row.tools.map((i) => i.toolCode).join(',')
  410. : ''
  411. "
  412. placeholder="工具自动带出"
  413. disabled
  414. size="mini"
  415. ></el-input>
  416. </template>
  417. <template v-slot:remark="{ row }">
  418. <el-input
  419. v-model="row.remark"
  420. placeholder="请输入"
  421. size="mini"
  422. ></el-input>
  423. </template>
  424. <template v-slot:action="{ row }">
  425. <el-link
  426. type="danger"
  427. :underline="false"
  428. icon="el-icon-delete"
  429. @click="deleteRow(row)"
  430. >
  431. 删除
  432. </el-link>
  433. </template>
  434. </ele-pro-table>
  435. </el-form>
  436. <template v-slot:footer>
  437. <el-button
  438. v-if="type != 'detail'"
  439. :loading="btnLoading"
  440. type="primary"
  441. @click="saveAndPublish"
  442. >
  443. 保存并发布
  444. </el-button>
  445. <el-button
  446. v-if="type != 'detail'"
  447. :loading="btnLoading"
  448. type="primary"
  449. @click="confirm"
  450. >
  451. 保存
  452. </el-button>
  453. <el-button :loading="btnLoading" @click="handleClose">取消</el-button>
  454. </template>
  455. <toolModal ref="toolModalRef" @chooseModal="chooseModal" />
  456. <toolModal ref="toolModalTowRef" @chooseModal="chooseModalProduct" />
  457. <MaterialAdd
  458. ref="deviceSelectDialog"
  459. selectType="single"
  460. @chooseEquipment="chooseEquipment"
  461. />
  462. <ProductModal
  463. ref="ProductModalRef"
  464. @changeProduct="changeProduct"
  465. ></ProductModal>
  466. <ProductModal
  467. ref="ProductModalCorrelationRef"
  468. @changeProduct="changeRelateProduct"
  469. multiple
  470. ></ProductModal>
  471. <processModal
  472. ref="processModalRef"
  473. @chooseProcess="processChooseProcess"
  474. ></processModal>
  475. </ele-modal>
  476. </template>
  477. <script>
  478. import { getByCode } from '@/api/system/dictionary-data';
  479. // import RuleCycle from '../../matterRules/components/rule-cycle.vue';
  480. import RuleCycle from './rule-cycle.vue';
  481. import OperationGuideDialog from '@/views/rulesManagement/matterRules/components/operationGuideDialog.vue';
  482. import Details from './details.vue';
  483. import dictMixins from '@/mixins/dictMixins';
  484. import toolModal from './toolModal.vue';
  485. import MaterialAdd from '../../components/MaterialAdd.vue';
  486. import {
  487. recordrulesSave,
  488. recordrulesDetailPage,
  489. recordrulesUpdate,
  490. recordrulesPublish,
  491. recordrulesSaveAndPublish,
  492. recordrulesUpdateVersion,
  493. recordrulesCyclePage,
  494. recordrulesGetById
  495. } from '@/api/recordrules/index';
  496. import ProductModal from '@/components/selectProduct/ProductModal.vue';
  497. import { getTreeByPid } from '@/api/classifyManage';
  498. import processModal from './processModal.vue';
  499. export default {
  500. components: {
  501. OperationGuideDialog,
  502. RuleCycle,
  503. Details,
  504. ProductModal,
  505. MaterialAdd,
  506. toolModal,
  507. processModal
  508. },
  509. mixins: [dictMixins],
  510. computed: {
  511. bankColumns() {
  512. return [
  513. {
  514. width: 110,
  515. type: 'index',
  516. columnKey: 'index',
  517. align: 'center',
  518. label: '序号'
  519. },
  520. // {
  521. // prop: 'executeMethodTitle',
  522. // label: '执行方式',
  523. // align: 'center',
  524. // minWidth: 110
  525. // },
  526. {
  527. prop: 'paramType',
  528. label: '参数类型',
  529. align: 'center',
  530. slot: 'paramType',
  531. minWidth: 110
  532. },
  533. {
  534. prop: 'paramValue',
  535. label: '参数内容',
  536. align: 'center',
  537. slot: 'paramValue',
  538. minWidth: 180
  539. },
  540. {
  541. prop: 'defaultValue',
  542. label: '默认值',
  543. align: 'center',
  544. slot: 'defaultValue',
  545. minWidth: 150
  546. },
  547. {
  548. prop: 'maxValue',
  549. label: '参数上限',
  550. align: 'center',
  551. slot: 'maxValue',
  552. minWidth: 110
  553. },
  554. {
  555. prop: 'minValue',
  556. label: '参数下限',
  557. align: 'center',
  558. slot: 'minValue',
  559. minWidth: 110
  560. },
  561. {
  562. prop: 'unitName',
  563. label: '参数单位',
  564. align: 'center',
  565. slot: 'unitName',
  566. minWidth: 110
  567. },
  568. {
  569. prop: 'toolName',
  570. label: '工具名称',
  571. align: 'center',
  572. slot: 'toolName',
  573. minWidth: 110
  574. },
  575. {
  576. prop: 'toolCodes',
  577. label: '工具编码',
  578. align: 'center',
  579. slot: 'toolCodes',
  580. minWidth: 110
  581. },
  582. {
  583. prop: 'remark',
  584. label: '备注',
  585. align: 'center',
  586. slot: 'remark',
  587. minWidth: 110
  588. },
  589. {
  590. columnKey: 'action',
  591. label: '操作',
  592. width: 110,
  593. align: 'center',
  594. resizable: false,
  595. slot: 'action',
  596. fixed: 'right'
  597. }
  598. ];
  599. },
  600. versionText() {
  601. if (this.type == 'clone') {
  602. return '系统自动生成';
  603. }
  604. return (
  605. this.formData.bigVersion +
  606. this.formData.versionMark +
  607. this.formData.smallVersion
  608. );
  609. },
  610. productColumns() {
  611. return [
  612. {
  613. columnKey: 'index',
  614. type: 'index',
  615. width: 45,
  616. align: 'center',
  617. reserveSelection: true
  618. },
  619. {
  620. prop: 'code',
  621. label: '产品编码'
  622. },
  623. {
  624. prop: 'name',
  625. label: '产品名称',
  626. showOverflowTooltip: true
  627. },
  628. {
  629. prop: 'brandNum',
  630. label: '牌号'
  631. },
  632. {
  633. prop: 'modelType',
  634. label: '型号'
  635. },
  636. {
  637. prop: 'measuringUnit',
  638. label: '计量单位'
  639. },
  640. {
  641. prop: 'packingUnit',
  642. label: '包装单位'
  643. },
  644. {
  645. columnKey: 'action',
  646. label: '操作',
  647. width: 110,
  648. align: 'center',
  649. resizable: false,
  650. slot: 'action',
  651. fixed: 'right'
  652. }
  653. ];
  654. }
  655. },
  656. data() {
  657. const formDateBase = {
  658. id: null,
  659. classify: null,
  660. deviceId: null,
  661. deviceName: '',
  662. frequencyUnit: 2,
  663. frequencyValue: null,
  664. name: '',
  665. details: [],
  666. recordRulesCycleList: [],
  667. startDate: null,
  668. stopDate: null,
  669. version: 1,
  670. code: '',
  671. fromId: null,
  672. // 模块分类 参考字典项:record_rules_report_work_type
  673. reportWorkType: '1',
  674. // 关联产品方式,0-不关联,1-关联分类,2-关联产品
  675. relateProductMethod: 0,
  676. // 关联分类
  677. categoryLevels: [],
  678. // 关联产品
  679. categories: [],
  680. // 执行方式
  681. isExecuteMethod: 0,
  682. produceTaskConfigs: [],
  683. // 关联工序
  684. produceTaskConfigBatchSavePo: {
  685. addPOs: [],
  686. deletedIds: [],
  687. produceTaskId: '',
  688. produceTaskName: '',
  689. updatePOs: []
  690. },
  691. // 执行方式列表
  692. executeMethodList: [],
  693. // 执行方式 活跃项
  694. executeMethodTitle: '',
  695. bigVersion: '',
  696. versionMark: '',
  697. smallVersion: ''
  698. };
  699. return {
  700. dialogTitle: '',
  701. visible: false,
  702. formDateBase,
  703. formData: JSON.parse(JSON.stringify(formDateBase)),
  704. formRules: {
  705. name: [
  706. { required: true, message: '请输入规则名称', trigger: 'blur' }
  707. ],
  708. frequencyValue: [
  709. { required: true, message: '请选择周期', trigger: 'blur' },
  710. { required: true, message: '请选择周期', trigger: 'change' }
  711. ],
  712. frequencyUnit: [
  713. { required: true, message: '请选择频率单位', trigger: 'change' }
  714. ],
  715. classify: [
  716. { required: true, message: '请选择规则类型', trigger: 'change' }
  717. ],
  718. // startDate 启用日期要大于当前时间
  719. // stopDate 停用时间要大于当前时间并且大于启用日期
  720. startDate: [
  721. { required: true, message: '请选择启用日期', trigger: 'blur' },
  722. { required: true, message: '请选择启用日期', trigger: 'change' },
  723. { validator: this.validateStartDate, trigger: 'change' }
  724. ],
  725. stopDate: [
  726. { required: true, message: '请选择停用时间', trigger: 'change' },
  727. { validator: this.validateStopDate, trigger: 'change' }
  728. ],
  729. deviceName: [
  730. { required: true, message: '请输入选择设备', trigger: 'blur' }
  731. ],
  732. reportWorkType: [
  733. { required: true, message: '请选择模块分类', trigger: 'change' },
  734. { required: true, message: '请选择模块分类', trigger: 'blur' }
  735. ],
  736. categoryLevels: [
  737. {
  738. required: true,
  739. message: '请选择关联产品分类',
  740. trigger: 'change'
  741. },
  742. { required: true, message: '请选择关联产品分类', trigger: 'blur' }
  743. ]
  744. },
  745. recordSheet: [], // 记录表
  746. current: {},
  747. dataIndex: null,
  748. showEdit: false,
  749. btnLoading: false,
  750. currentRow: null,
  751. type: '',
  752. relateProductMethodOpeions: [
  753. { label: '不关联', value: 0 },
  754. { label: '关联分类', value: 1 },
  755. { label: '关联产品', value: 2 }
  756. ],
  757. // 产品分类
  758. productCategory: [],
  759. loading: false
  760. };
  761. },
  762. mounted() {
  763. this.getByCodeData();
  764. this.getProductCategory();
  765. console.log('this.formData 2233', this.formData);
  766. },
  767. methods: {
  768. open(row, type, title) {
  769. this.dialogTitle = title;
  770. this.type = type;
  771. console.log('type', type, row);
  772. if (type == 'edit' || type == 'detail') {
  773. this.getDetils(row.id);
  774. }
  775. if (type == 'clone') {
  776. this.getDetils(row.id);
  777. }
  778. if (type == 'add') {
  779. this.formData.version = 1;
  780. // 启用日期 默认为 今天
  781. this.formData.startDate = new Date();
  782. // 停用日期 默认为 2099-12-31
  783. this.formData.stopDate = new Date('2099-12-31 00:00:00');
  784. }
  785. this.visible = true;
  786. console.log('this.formData', this.formData);
  787. },
  788. async getDetils(id) {
  789. this.loading = true;
  790. try {
  791. const data = await recordrulesGetById(id);
  792. if (data.relateProductMethod == 1) {
  793. data.categoryLevels = data.produceTaskConfigs
  794. .map((i) => i.categoryLevelId)
  795. .filter((i) => i != null);
  796. } else {
  797. data.categoryLevels = [];
  798. }
  799. if (data.relateProductMethod == 2) {
  800. // 产品
  801. data.categories = data.produceTaskConfigs.map((i) => {
  802. return {
  803. id: i.productId,
  804. code: i.productCode,
  805. name: i.productName,
  806. brandNum: i.brandNum,
  807. modelType: i.modelType,
  808. measuringUnit: i.measuringUnit,
  809. packingUnit: i.packingUnit
  810. };
  811. });
  812. } else {
  813. data.categories = [];
  814. }
  815. data.produceTaskConfigBatchSavePo = {
  816. addPOs: [],
  817. deletedIds: [],
  818. produceTaskId: data.produceTaskConfigs[0]?.produceTaskId,
  819. produceTaskName: data.produceTaskConfigs[0]?.produceTaskName,
  820. updatePOs: []
  821. };
  822. if (data.isExecuteMethod) {
  823. data.executeMethodList = Object.keys(data.detailMap);
  824. data.details = Object.values(data.detailMap).flat();
  825. data.executeMethodTitle = data.executeMethodList[0] || '';
  826. } else {
  827. data.executeMethodList = [];
  828. data.details = data.details || [];
  829. data.executeMethodTitle = '';
  830. }
  831. this.$util.assignObject(this.formData, data);
  832. this.$nextTick(() => {
  833. this.$refs.cycleMultipleRef?.setRecordRulesCycleList(
  834. this.formData.recordRulesCycleList
  835. );
  836. });
  837. this.formData.startDate = new Date(data.startDate);
  838. this.formData.stopDate = new Date(data.stopDate);
  839. this.formData.classify = this.formData.classify + '';
  840. this.formData.reportWorkType = this.formData.reportWorkType + '';
  841. if (this.type == 'clone') {
  842. this.formData.name = this.formData.name + '-副本';
  843. this.formData.fromId = id;
  844. this.formData.id = null;
  845. }
  846. this.loading = false;
  847. } catch (error) {
  848. this.loading = false;
  849. }
  850. },
  851. async getByCodeData() {
  852. let res = await getByCode('record_sheet');
  853. let list = res.data.map((item) => {
  854. let values = Object.keys(item);
  855. return {
  856. value: values[0],
  857. label: item[values[0]]
  858. };
  859. });
  860. this.recordSheet = list;
  861. },
  862. itemDel(index) {
  863. this.formData.details.splice(index, 1);
  864. },
  865. /* 打开操作手册编辑款 */
  866. openOperationGuideDialogDialog(row, index) {
  867. this.$refs.operationGuideDialog.open(row, index);
  868. },
  869. handleClose() {
  870. // 清空表单数据
  871. this.formData = JSON.parse(JSON.stringify(this.formDateBase));
  872. this.$refs['formRef'].resetFields();
  873. this.visible = false;
  874. },
  875. // 保存
  876. confirm() {
  877. console.log('this.formData', this.formData);
  878. // 验证表单规则
  879. this.$refs.formRef.validate(async (valid) => {
  880. if (!valid) {
  881. return false;
  882. }
  883. if (this.formData.details.length == 0) {
  884. return this.$message.warning('至少条件一条规则项');
  885. }
  886. if (this.formData.isExecuteMethod) {
  887. // 判断 formData.executeMethodList中的item 是否在details中有一条executeMethodTitle的数据
  888. if (this.formData.executeMethodList.length == 0) {
  889. return this.$message.warning(`请添加执行方式`);
  890. }
  891. for (const item of this.formData.executeMethodList) {
  892. const exists = this.formData.details.some(
  893. (detail) => detail.executeMethodTitle === item
  894. );
  895. if (!exists) {
  896. this.$message.warning(
  897. `请为执行方式 "${item}" 添加至少一条规则项`
  898. );
  899. return false;
  900. }
  901. }
  902. }
  903. if (this.formData.relateProductMethod == 2) {
  904. // 关联分类
  905. if (this.formData.categories.length == 0) {
  906. return this.$message.warning('请选择关联产品');
  907. }
  908. }
  909. try {
  910. this.btnLoading = true;
  911. const body = this.formatBody();
  912. if (this.type == 'add') {
  913. await recordrulesSave(body);
  914. } else if (this.type == 'clone') {
  915. await recordrulesUpdateVersion(body);
  916. } else {
  917. // 编辑
  918. body.fromId = null;
  919. await recordrulesUpdate(body);
  920. }
  921. this.btnLoading = false;
  922. this.$message.success('操作成功');
  923. this.handleClose();
  924. this.$emit('reload');
  925. } catch (error) {
  926. this.btnLoading = false;
  927. }
  928. });
  929. },
  930. // 保存并发布
  931. saveAndPublish() {
  932. // 验证表单规则
  933. this.$refs.formRef.validate(async (valid) => {
  934. if (!valid) {
  935. return false;
  936. }
  937. if (this.formData.details.length == 0) {
  938. return this.$message.warning('至少条件一条规则项');
  939. }
  940. if (this.formData.isExecuteMethod) {
  941. // 判断 formData.executeMethodList中的item 是否在details中有一条executeMethodTitle的数据
  942. if (this.formData.executeMethodList.length == 0) {
  943. return this.$message.warning(`请添加执行方式`);
  944. }
  945. for (const item of this.formData.executeMethodList) {
  946. const exists = this.formData.details.some(
  947. (detail) => detail.executeMethodTitle === item
  948. );
  949. if (!exists) {
  950. this.$message.warning(
  951. `请为执行方式 "${item}" 添加至少一条规则项`
  952. );
  953. return false;
  954. }
  955. }
  956. }
  957. if (this.formData.relateProductMethod == 2) {
  958. // 关联分类
  959. if (this.formData.categories.length == 0) {
  960. return this.$message.warning('请选择关联产品');
  961. }
  962. }
  963. try {
  964. this.btnLoading = true;
  965. const body = this.formatBody();
  966. await recordrulesSaveAndPublish(body);
  967. this.btnLoading = false;
  968. this.$message.success('操作成功');
  969. this.handleClose();
  970. this.$emit('reload');
  971. } catch (error) {
  972. this.btnLoading = false;
  973. }
  974. });
  975. },
  976. // 数据格式化
  977. formatBody() {
  978. this.formData.recordRulesCycleList =
  979. this.$refs.cycleMultipleRef.recordRulesCycleList
  980. .map((i) => {
  981. // 根据月日时分排序计算权重排序
  982. let sortNum = 0;
  983. if (i.month) {
  984. sortNum += i.month * 60 * 24 * 30;
  985. }
  986. if (i.day) {
  987. sortNum += i.day * 60 * 24;
  988. }
  989. if (i.hour) {
  990. sortNum += i.hour * 60;
  991. }
  992. if (i.minute) {
  993. sortNum += i.minute * 1;
  994. }
  995. return { ...i, sortNum };
  996. })
  997. .sort((a, b) => a.sortNum - b.sortNum)
  998. .map((i, index) => {
  999. return { ...i, sortNum: index + 1 };
  1000. });
  1001. const body = { ...this.formData };
  1002. body.startDate = this.$util.toDateString(
  1003. body.startDate,
  1004. 'yyyy-MM-dd HH:mm:ss'
  1005. );
  1006. body.stopDate = this.$util.toDateString(
  1007. body.stopDate,
  1008. 'yyyy-MM-dd HH:mm:ss'
  1009. );
  1010. if (this.type == 'edit') {
  1011. if (body.produceTaskConfigBatchSavePo.produceTaskId) {
  1012. // 修改工序
  1013. if (body.relateProductMethod == 1) {
  1014. debugger;
  1015. // 分类
  1016. body.categoryLevels.forEach((categoryId) => {
  1017. // 判断是否已经存在
  1018. const exist = body.produceTaskConfigs.find(
  1019. (i) => i.categoryLevelId == categoryId
  1020. );
  1021. if (!exist) {
  1022. body.produceTaskConfigBatchSavePo.addPOs.push({
  1023. executeMethod: 2,
  1024. itemType: 1,
  1025. produceTaskId:
  1026. body.produceTaskConfigBatchSavePo.produceTaskId,
  1027. produceTaskName:
  1028. body.produceTaskConfigBatchSavePo.produceTaskName,
  1029. categoryLevelId: categoryId,
  1030. reportWorkType: this.formData.reportWorkType
  1031. });
  1032. }
  1033. });
  1034. // 删除取消的分类
  1035. body.produceTaskConfigs.forEach((config) => {
  1036. if (
  1037. !body.categoryLevels.includes(config.categoryLevelId) &&
  1038. config.id
  1039. ) {
  1040. body.produceTaskConfigBatchSavePo.deletedIds.push(config.id);
  1041. }
  1042. });
  1043. }
  1044. if (body.relateProductMethod == 2) {
  1045. // 产品
  1046. body.categories.forEach((product) => {
  1047. // 判断是否已经存在
  1048. const exist = body.produceTaskConfigs.find(
  1049. (i) => i.productId == product.id
  1050. );
  1051. if (!exist) {
  1052. body.produceTaskConfigBatchSavePo.addPOs.push({
  1053. executeMethod: 2,
  1054. itemType: 2,
  1055. produceTaskId:
  1056. body.produceTaskConfigBatchSavePo.produceTaskId,
  1057. produceTaskName:
  1058. body.produceTaskConfigBatchSavePo.produceTaskName,
  1059. productCode: product.code,
  1060. productId: product.id || product.productId,
  1061. productName: product.name || product.productName,
  1062. reportWorkType: this.formData.reportWorkType
  1063. });
  1064. }
  1065. });
  1066. // 删除取消的产品
  1067. body.produceTaskConfigs.forEach((config) => {
  1068. const exist = body.categories.find((product) => {
  1069. return product.id == config.productId;
  1070. });
  1071. if (!exist && config.id) {
  1072. body.produceTaskConfigBatchSavePo.deletedIds.push(config.id);
  1073. }
  1074. });
  1075. }
  1076. } else {
  1077. // 删除工序 全删
  1078. body.produceTaskConfigBatchSavePo.deletedIds =
  1079. this.formData.produceTaskConfigs.map((i) => i.id);
  1080. }
  1081. } else {
  1082. // 新增工序
  1083. if (
  1084. body.reportWorkType != 0 &&
  1085. body.produceTaskConfigBatchSavePo.produceTaskId
  1086. ) {
  1087. if (body.relateProductMethod == 1) {
  1088. // 分类
  1089. body.categoryLevels.forEach((categoryId) => {
  1090. body.produceTaskConfigBatchSavePo.addPOs.push({
  1091. executeMethod: 2,
  1092. itemType: 1,
  1093. produceTaskId:
  1094. body.produceTaskConfigBatchSavePo.produceTaskId,
  1095. produceTaskName:
  1096. body.produceTaskConfigBatchSavePo.produceTaskName,
  1097. categoryLevelId: categoryId,
  1098. reportWorkType: this.formData.reportWorkType
  1099. });
  1100. });
  1101. }
  1102. if (body.relateProductMethod == 2) {
  1103. // 产品
  1104. body.categories.forEach((product) => {
  1105. body.produceTaskConfigBatchSavePo.addPOs.push({
  1106. executeMethod: 2,
  1107. itemType: 2,
  1108. produceTaskId:
  1109. body.produceTaskConfigBatchSavePo.produceTaskId,
  1110. produceTaskName:
  1111. body.produceTaskConfigBatchSavePo.produceTaskName,
  1112. productCode: product.code,
  1113. productId: product.id || product.productId,
  1114. productName: product.name || product.productName,
  1115. reportWorkType: this.formData.reportWorkType
  1116. });
  1117. });
  1118. }
  1119. }
  1120. body.produceTaskConfigBatchSavePo.updatePOs = [];
  1121. }
  1122. return body;
  1123. },
  1124. // startDate 启用日期要大于当前时间
  1125. validateStartDate(rule, value, callback) {
  1126. const startDate = this.formData.startDate;
  1127. if (!startDate) {
  1128. return callback(new Error('启用日期不能为空'));
  1129. }
  1130. // 启用日期大于等于今天
  1131. // const today = new Date();
  1132. // today.setHours(0, 0, 0, 0); // 设置为当天的开始时间
  1133. // if (new Date(startDate) < today) {
  1134. // return callback(new Error('启用日期必须大于等于当前日期'));
  1135. // }
  1136. callback();
  1137. },
  1138. // stopDate 停用时间要大于当前时间并且大于启用日期
  1139. validateStopDate(rule, value, callback) {
  1140. const startDate = this.formData.startDate;
  1141. const stopDate = this.formData.stopDate;
  1142. if (
  1143. stopDate &&
  1144. startDate &&
  1145. new Date(stopDate) <= new Date(startDate)
  1146. ) {
  1147. return callback(new Error('停用时间必须大于启用日期'));
  1148. }
  1149. callback();
  1150. },
  1151. // 去选择设备
  1152. selectDeviceId() {
  1153. this.$refs.deviceSelectDialog.open([]);
  1154. },
  1155. // 选择设备回调
  1156. chooseEquipment(data, index, categoryId) {
  1157. console.log('data', data, index, categoryId);
  1158. this.formData.deviceId = data[0]?.id || null;
  1159. this.formData.deviceName = data[0]?.name || '';
  1160. },
  1161. // 添加
  1162. addRow() {
  1163. if (
  1164. this.formData.isExecuteMethod &&
  1165. !this.formData.executeMethodTitle
  1166. ) {
  1167. return this.$message.warning('请先选择执行方式');
  1168. }
  1169. this.formData.details.push({
  1170. id: new Date().getTime(),
  1171. defaultValue: '',
  1172. maxValue: null,
  1173. minValue: null,
  1174. paramType: null,
  1175. paramValue: null,
  1176. remark: '',
  1177. symbol: null,
  1178. tools: [],
  1179. unitName: null,
  1180. productName: '',
  1181. productCode: '',
  1182. executeMethodTitle: this.formData.executeMethodTitle
  1183. });
  1184. },
  1185. deleteRow(row) {
  1186. const index = this.formData.details.indexOf(row);
  1187. if (index !== -1) {
  1188. this.formData.details.splice(index, 1);
  1189. }
  1190. },
  1191. // 删除关联产品
  1192. productColumnsDeleteRow(row) {
  1193. this.formData.categories = this.formData.categories.filter((i) => {
  1194. return i.id !== row.id;
  1195. });
  1196. },
  1197. handleAdd(row) {
  1198. this.currentRow = row;
  1199. this.$refs.toolModalRef.open(row.toolCodes);
  1200. },
  1201. chooseModal(data) {
  1202. console.log('data', data);
  1203. this.currentRow.tools = data.map((i) => {
  1204. return {
  1205. toolCode: i.code,
  1206. toolName: i.name
  1207. // rulesDetailId: this.currentRow.id,
  1208. // rulesId: this.formData.id
  1209. };
  1210. });
  1211. },
  1212. // 规则明细表
  1213. async recordrulesDetailPage(row) {
  1214. const { list } = await recordrulesDetailPage({
  1215. // deptId: row.deptId,
  1216. pageNum: 1,
  1217. rulesId: row.id,
  1218. size: 9999
  1219. });
  1220. console.log('list 数据', list);
  1221. this.formData.details = list;
  1222. },
  1223. // 清空工具
  1224. clearTool(row) {
  1225. row.tools = [];
  1226. },
  1227. // 查询 recordrulesCyclePage
  1228. async recordrulesCyclePage(row) {
  1229. const { list } = await recordrulesCyclePage({
  1230. pageNum: 1,
  1231. size: 9999,
  1232. recordRulesId: row.id,
  1233. orderBy: 'descending'
  1234. });
  1235. console.log('list 周期数据', list);
  1236. this.formData.recordRulesCycleList = list;
  1237. this.$nextTick(() => {
  1238. this.$refs.cycleMultipleRef.setRecordRulesCycleList(list);
  1239. });
  1240. },
  1241. // 去选择产品
  1242. selectProduct(row) {
  1243. this.currentRow = row;
  1244. this.$refs.ProductModalRef.open();
  1245. },
  1246. // 选择产品
  1247. changeProduct(current) {
  1248. console.log('current', current);
  1249. this.currentRow.productName = current.name;
  1250. this.currentRow.productCode = current.code;
  1251. },
  1252. // 选择物品 产品、物料等
  1253. selectChooseModalProduct(row) {
  1254. this.currentRow = row;
  1255. this.$refs.toolModalTowRef.open([], '选择物品');
  1256. },
  1257. chooseModalProduct(current) {
  1258. console.log('current', current);
  1259. this.currentRow.productName = current[0].name;
  1260. this.currentRow.productCode = current[0].code;
  1261. console.log('this.currentRow', this.currentRow);
  1262. },
  1263. // 清空产品
  1264. clearProduct(row) {
  1265. row.productName = '';
  1266. row.productCode = '';
  1267. },
  1268. // 关联产品
  1269. relateProductSelect() {
  1270. this.$refs.ProductModalCorrelationRef.open();
  1271. },
  1272. changeRelateProduct(array) {
  1273. console.log('this.formData.categories ', array);
  1274. const productList = array.filter(
  1275. (i) => !this.formData.categories.some((cat) => cat.id === i.id)
  1276. );
  1277. this.formData.categories = [
  1278. ...this.formData.categories,
  1279. ...productList
  1280. ];
  1281. },
  1282. /// 获取产品分类
  1283. async getProductCategory() {
  1284. let { data } = await getTreeByPid(9);
  1285. console.log('产品分类', data);
  1286. this.productCategory = data;
  1287. },
  1288. // 选择工序
  1289. openProduceTaskDialog() {
  1290. if (this.formData.produceTaskConfigs) {
  1291. // 其中包含 isUsing 为 true 则不能修改
  1292. const some = this.formData.produceTaskConfigs.some((i) => i.isUsing);
  1293. if (some) {
  1294. return this.$message.warning(
  1295. '当前规则关联的工序有执行中的记录,不能更改!'
  1296. );
  1297. }
  1298. }
  1299. this.$refs.processModalRef.open();
  1300. },
  1301. // 工序
  1302. processChooseProcess(process) {
  1303. console.log('选择的工序', process);
  1304. this.formData.produceTaskConfigBatchSavePo.produceTaskId = process.id;
  1305. this.formData.produceTaskConfigBatchSavePo.produceTaskName =
  1306. process.name;
  1307. },
  1308. // 添加执行方式
  1309. addExecuteMethod() {
  1310. this.$prompt('', '请输入执行方式', {
  1311. confirmButtonText: '确定',
  1312. cancelButtonText: '取消'
  1313. })
  1314. .then(({ value }) => {
  1315. if (this.formData.executeMethodList.includes(value)) {
  1316. return this.$message.warning('执行方式已存在!');
  1317. }
  1318. this.formData.executeMethodList.push(value);
  1319. if (this.formData.executeMethodList.length == 1) {
  1320. // 默认高亮
  1321. this.formData.executeMethodTitle = value;
  1322. }
  1323. })
  1324. .catch((err) => {});
  1325. },
  1326. // 删除执行方式
  1327. deleteExecuteMethod(item) {
  1328. // 如果this.formData.details总包含item 则不能删除
  1329. const exists = this.formData.details.some(
  1330. (detail) => detail.executeMethodTitle === item
  1331. );
  1332. if (exists) {
  1333. return this.$message.warning(
  1334. `执行方式 "${item}" 已被规则项使用,不能删除`
  1335. );
  1336. }
  1337. this.formData.executeMethodList =
  1338. this.formData.executeMethodList.filter((i) => i != item);
  1339. },
  1340. // 是否有执行方式改变
  1341. executeMethodChange() {
  1342. if (!this.formData.isExecuteMethod) {
  1343. this.formData.details = this.formData.details.map((i) => {
  1344. return {
  1345. ...i,
  1346. executeMethodTitle: ''
  1347. };
  1348. });
  1349. }
  1350. },
  1351. clearProductTask() {
  1352. // 如果有执行中的记录 则不能清空
  1353. if (
  1354. this.formData.produceTaskConfigs &&
  1355. this.formData.produceTaskConfigs[0] &&
  1356. this.formData.produceTaskConfigs[0].isUsing
  1357. ) {
  1358. return this.$message.warning(
  1359. '当前规则关联的工序有执行中的记录,不能更改!'
  1360. );
  1361. }
  1362. this.formData.produceTaskConfigBatchSavePo.produceTaskId = '';
  1363. this.formData.produceTaskConfigBatchSavePo.produceTaskName = '';
  1364. this.formData.relateProductMethod = 0;
  1365. this.formData.categoryLevels = [];
  1366. this.formData.categories = [];
  1367. }
  1368. }
  1369. };
  1370. </script>
  1371. <style scoped lang="scss">
  1372. .operationGuide_box {
  1373. width: 100%;
  1374. height: 48px;
  1375. display: flex;
  1376. overflow: hidden;
  1377. cursor: pointer;
  1378. box-sizing: border-box;
  1379. padding: 5px 10px;
  1380. .left_content {
  1381. width: 50%;
  1382. padding: 10px;
  1383. box-sizing: border-box;
  1384. border: 1px solid #c0c4cc;
  1385. border-radius: 10px;
  1386. margin-right: 10px;
  1387. overflow-y: auto;
  1388. }
  1389. .right_content {
  1390. flex: 1;
  1391. padding: 10px;
  1392. box-sizing: border-box;
  1393. border: 1px solid #c0c4cc;
  1394. border-radius: 10px;
  1395. overflow-y: auto;
  1396. }
  1397. }
  1398. ::v--deep .table_list {
  1399. .el-form-item {
  1400. .el-form-item__content {
  1401. margin-left: 0;
  1402. }
  1403. }
  1404. }
  1405. .executeMethodlist {
  1406. display: flex;
  1407. flex-flow: row wrap;
  1408. margin-bottom: 20px;
  1409. gap: 20px;
  1410. .executeMethodItem {
  1411. border: 1px solid #333;
  1412. padding: 10px 10px;
  1413. display: flex;
  1414. gap: 4px;
  1415. align-items: center;
  1416. justify-content: space-between;
  1417. background: #fff;
  1418. cursor: pointer;
  1419. &Active {
  1420. border-color: #409eff;
  1421. background: #409eff;
  1422. color: #fff;
  1423. }
  1424. }
  1425. }
  1426. </style>