index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. <template>
  2. <div class="ele-body">
  3. <el-card v-loading="loading" shadow="never">
  4. <order-search ref="searchRef" @search="reload"></order-search>
  5. <!-- <el-tabs v-model="activeName" type="card">
  6. <el-tab-pane label="未完成工单" name="first"></el-tab-pane>
  7. <el-tab-pane label="已完成工单" name="second"></el-tab-pane>
  8. </el-tabs> -->
  9. <!-- 数据表格 -->
  10. <!-- <plan-statistics></plan-statistics> -->
  11. <!-- <ele-pro-table
  12. ref="table"
  13. :columns="newColumns"
  14. :datasource="datasource"
  15. cache-key="workOrderTable"
  16. row-key="code"
  17. @sort-change="onSortChange"
  18. height="calc(100vh - 380px)"
  19. autoAmendPage
  20. :parse-data="parseData"
  21. > -->
  22. <ele-pro-table
  23. ref="table"
  24. :cache-key="cacheKeyUrl"
  25. :columns="newColumns"
  26. :datasource="datasource"
  27. :parse-data="parseData"
  28. autoAmendPage
  29. cache-key="workOrderTable"
  30. row-key="id"
  31. @sort-change="onSortChange"
  32. @columns-change="handleColumnChange"
  33. >
  34. <!-- :key="activeName" -->
  35. <!-- :selection.sync="selection" -->
  36. <!-- @update:selection="handleSelectionChange" -->
  37. <template v-slot:toolbar>
  38. <el-button
  39. class="ele-btn-icon"
  40. icon="el-icon-truck"
  41. size="small"
  42. type="primary"
  43. v-if="$hasPermission('aps:batchReleaseWorkOrder:release')"
  44. @click="batchDispatch"
  45. >批量派单
  46. <!-- -->
  47. </el-button>
  48. </template>
  49. <template v-slot:selection="{ row }">
  50. <el-checkbox
  51. :disabled="!dispatchPermission(row)"
  52. :value="checkRowData(row)"
  53. class="batch_checked"
  54. @change="(e) => selectRow(e, row)"
  55. ></el-checkbox>
  56. </template>
  57. <template v-slot:code="{ row }">
  58. <el-link type="primary" :underline="false" style="padding-left: 16px">
  59. <el-tag type="success" size="mini" v-if="row.originalCode">
  60. 拆</el-tag
  61. >
  62. {{ row.code }}
  63. </el-link>
  64. </template>
  65. <template v-slot:formingWeight="{ row }">
  66. {{ row.formingWeight }} {{ row.newWeightUnit }}
  67. </template>
  68. <template v-slot:priority="{ row }">
  69. <div style="display: flex">
  70. <el-input
  71. v-model="row.priority"
  72. :max="10"
  73. :min="0"
  74. size="mini"
  75. style="width: 80px"
  76. type="number"
  77. @change="priorityChange(row)"
  78. ></el-input>
  79. <el-popover
  80. content="数值越大优先级越高(0-3普通, 4-6优先, 7-10紧急)"
  81. placement="right"
  82. trigger="hover"
  83. width="200"
  84. >
  85. <div slot="reference" class="sort-wrap">
  86. <i class="el-icon-caret-top" @click="sortTop(row)"></i>
  87. <i class="el-icon-caret-bottom" @click="sortBottom(row)"></i>
  88. </div>
  89. </el-popover>
  90. </div>
  91. </template>
  92. <template v-slot:status="{ row }">
  93. <span :class="{ 'ele-text-danger': row.status == 3 }">
  94. {{ statusFormatter(row.status) }}
  95. </span>
  96. </template>
  97. <!-- 操作列 -->
  98. <template v-slot:action="{ row }">
  99. <el-link
  100. v-if="unpackShow(row)"
  101. :underline="false"
  102. type="primary"
  103. @click="toUnpack(row)"
  104. >
  105. 拆单
  106. </el-link>
  107. <el-link
  108. v-if="dispatchPermission(row)"
  109. :underline="false"
  110. icon="el-icon-truck"
  111. type="primary"
  112. @click="toReleaseOpen(row)"
  113. >
  114. 派单
  115. </el-link>
  116. <el-popconfirm
  117. class="ele-action"
  118. title="确定要删除此子单吗?"
  119. @confirm="remove(row)"
  120. v-if="row.originalCode"
  121. >
  122. <template v-slot:reference>
  123. <el-link type="danger" :underline="false" icon="el-icon-delete">
  124. 删除
  125. </el-link>
  126. </template>
  127. </el-popconfirm>
  128. </template>
  129. </ele-pro-table>
  130. </el-card>
  131. <!-- <el-dialog :visible.sync="visible" title="派单" width="500px">-->
  132. <!-- <el-form-->
  133. <!-- ref="form"-->
  134. <!-- :model="form"-->
  135. <!-- :rules="rules"-->
  136. <!-- label-position="left"-->
  137. <!-- label-width="100px"-->
  138. <!-- >-->
  139. <!-- <el-form-item label="报工类型:" prop="singleReport">-->
  140. <!-- <el-radio-group v-model="form.singleReport">-->
  141. <!-- <el-radio v-if="clientEnvironmentId != 2" :label="1"-->
  142. <!-- >单件报工-->
  143. <!-- </el-radio>-->
  144. <!-- <el-radio :label="0">批量报工</el-radio>-->
  145. <!-- </el-radio-group>-->
  146. <!-- </el-form-item>-->
  147. <!-- <el-form-item label="指定:" prop="assignType">-->
  148. <!-- <el-radio-group-->
  149. <!-- v-model="form.assignType"-->
  150. <!-- size="mini"-->
  151. <!-- @change="assignTypeFn"-->
  152. <!-- >-->
  153. <!-- <el-radio-button :label="1">工位</el-radio-button>-->
  154. <!-- <el-radio-button :label="2">人员</el-radio-button>-->
  155. <!-- </el-radio-group>-->
  156. <!-- </el-form-item>-->
  157. <!-- <el-form-item label="班组:" prop="teamId">-->
  158. <!-- <el-select-->
  159. <!-- v-model="form.teamId"-->
  160. <!-- class="ele-block"-->
  161. <!-- filterable-->
  162. <!-- placeholder="请选择班组"-->
  163. <!-- size="mini"-->
  164. <!-- @change="stationChange"-->
  165. <!-- >-->
  166. <!-- <el-option-->
  167. <!-- v-for="item in teamsList"-->
  168. <!-- :key="item.id"-->
  169. <!-- :label="item.name + '(' + item.code + ')'"-->
  170. <!-- :value="item.id"-->
  171. <!-- >-->
  172. <!-- </el-option>-->
  173. <!-- </el-select>-->
  174. <!-- </el-form-item>-->
  175. <!-- <el-form-item-->
  176. <!-- v-if="form.assignType == 1"-->
  177. <!-- label="工位:"-->
  178. <!-- prop="workstationIds"-->
  179. <!-- >-->
  180. <!-- <el-select-->
  181. <!-- v-model="form.workstationIds"-->
  182. <!-- class="ele-block"-->
  183. <!-- filterable-->
  184. <!-- multiple-->
  185. <!-- placeholder="请选择工位"-->
  186. <!-- size="mini"-->
  187. <!-- >-->
  188. <!-- <el-option-->
  189. <!-- v-for="item in stationList"-->
  190. <!-- :key="item.id"-->
  191. <!-- :label="item.name + '(' + item.code + ')'"-->
  192. <!-- :value="item.id"-->
  193. <!-- >-->
  194. <!-- </el-option>-->
  195. <!-- </el-select>-->
  196. <!-- </el-form-item>-->
  197. <!-- <el-form-item v-if="form.assignType == 2" label="人员:" prop="crewIds">-->
  198. <!-- <el-select-->
  199. <!-- v-model="form.crewIds"-->
  200. <!-- class="ele-block"-->
  201. <!-- filterable-->
  202. <!-- multiple-->
  203. <!-- placeholder="请选择人员"-->
  204. <!-- size="mini"-->
  205. <!-- >-->
  206. <!-- <el-option-->
  207. <!-- v-for="item in crewList"-->
  208. <!-- :key="item.id"-->
  209. <!-- :label="item.name"-->
  210. <!-- :value="item.id"-->
  211. <!-- >-->
  212. <!-- </el-option>-->
  213. <!-- </el-select>-->
  214. <!-- </el-form-item>-->
  215. <!-- </el-form>-->
  216. <!-- <div slot="footer" class="footer">-->
  217. <!-- <el-button @click="close">取消</el-button>-->
  218. <!-- <el-button v-click-once type="primary" @click="confirm">确定</el-button>-->
  219. <!-- </div>-->
  220. <!-- </el-dialog>-->
  221. <unpackDialog ref="unpackRef" @success="createSuccess" />
  222. <releaseDialog
  223. v-if="dispatchVisible"
  224. ref="releaseRef"
  225. :current="dispatchRow"
  226. :dispatchVisible.sync="dispatchVisible"
  227. @createSuccess="createSuccess"
  228. />
  229. <BatchDialog ref="batchRef" @createSuccess="createSuccess" />
  230. </div>
  231. </template>
  232. <script>
  233. import {
  234. getList,
  235. releaseWorkOrder,
  236. updatePriority,
  237. unpackDel
  238. } from '@/api/workOrder/index.js';
  239. import {
  240. listByFirstTaskId,
  241. listByWorkCenterId,
  242. listUserByIds
  243. } from '@/api/mainData/index.js';
  244. import OrderSearch from './components/order-search.vue';
  245. import unpackDialog from './components/unpackDialog.vue';
  246. import releaseDialog from './components/releaseDialog.vue';
  247. import { fieldModel } from '@/api/saleOrder';
  248. import { debounce } from 'lodash';
  249. import PlanStatistics from '@/components/statistics/PlanStatistics.vue';
  250. import tabMixins from '@/mixins/tableColumnsMixin';
  251. import BatchDialog from '@/views/workOrder/components/batchDialog.vue';
  252. export default {
  253. mixins: [tabMixins],
  254. components: {
  255. PlanStatistics,
  256. OrderSearch,
  257. unpackDialog,
  258. releaseDialog,
  259. BatchDialog
  260. },
  261. data() {
  262. return {
  263. visible: false,
  264. loading: false,
  265. form: {
  266. assignType: 1,
  267. crewIds: '',
  268. workstationIds: '',
  269. teamId: '',
  270. singleReport: ''
  271. },
  272. rules: {
  273. singleReport: [
  274. {
  275. required: true,
  276. message: '请选择报工类型',
  277. trigger: ['blur', 'change']
  278. }
  279. ],
  280. workstationIds: [
  281. {
  282. required: true,
  283. message: '请选择工位',
  284. trigger: ['blur']
  285. }
  286. ],
  287. teamId: [
  288. {
  289. required: true,
  290. message: '请选择班组',
  291. trigger: ['blur']
  292. }
  293. ]
  294. },
  295. teamList: [],
  296. statusOpt: [
  297. { label: '待生产', value: 4 },
  298. { label: '生产中', value: 5 },
  299. { label: '待下达', value: 8 }
  300. ],
  301. newColumns: [],
  302. stationList: [],
  303. teamsList: [],
  304. crewList: [],
  305. current: null,
  306. cacheKeyUrl: '3cbbdff9-aps-workOrder',
  307. columnsVersion: 1,
  308. dispatchRow: {},
  309. dispatchVisible: false,
  310. selectionMap: {}
  311. };
  312. },
  313. computed: {
  314. dispatchPermission() {
  315. return (row) => {
  316. if (!row.firstTaskId) {
  317. return false;
  318. }
  319. return (
  320. (row.isSplit != 1 &&
  321. this.clientEnvironmentId != '4' &&
  322. row.status == 8) ||
  323. (this.clientEnvironmentId == '4' &&
  324. !row.productName.includes('板材') &&
  325. row.status == 8)
  326. );
  327. };
  328. },
  329. // 拆单按钮显示
  330. unpackShow() {
  331. return (row) => {
  332. if (row.originalCode) return false;
  333. return (
  334. (this.clientEnvironmentId != '4' && row.status == 8) ||
  335. (this.clientEnvironmentId == '4' &&
  336. !row.productName.includes('板材') &&
  337. row.status == 8)
  338. );
  339. };
  340. },
  341. teamId() {
  342. return this.$store.state.user.info.teamId;
  343. },
  344. clientEnvironmentId() {
  345. return this.$store.state.user.info.clientEnvironmentId;
  346. },
  347. // 表格列配置
  348. columns() {
  349. // const num = this.columnsVersion;
  350. return [
  351. {
  352. width: 45,
  353. type: 'selection',
  354. columnKey: 'selection',
  355. align: 'center',
  356. slot: 'selection',
  357. fixed: 'left'
  358. // selectable: (row, index) => {
  359. // if (row.children) {
  360. // }
  361. // return this.dispatchPermission(row);
  362. // }
  363. },
  364. {
  365. columnKey: 'index',
  366. slot: 'index',
  367. label: '序号',
  368. type: 'index',
  369. width: 55,
  370. align: 'center',
  371. showOverflowTooltip: true,
  372. fixed: 'left'
  373. },
  374. {
  375. slot: 'code',
  376. label: '生产订单号',
  377. align: 'center',
  378. minWidth: 220,
  379. sortable: true
  380. },
  381. {
  382. prop: 'taskName',
  383. action: 'taskName',
  384. label: '工序进度',
  385. align: 'center',
  386. minWidth: 160
  387. },
  388. {
  389. prop: 'productionPlanCode',
  390. label: '计划编号',
  391. align: 'center',
  392. minWidth: 150
  393. },
  394. {
  395. prop: 'produceRoutingName',
  396. label: '工艺路线',
  397. align: 'center',
  398. minWidth: 170
  399. },
  400. {
  401. prop: 'productCode',
  402. label: '编码',
  403. align: 'center',
  404. minWidth: 120
  405. },
  406. {
  407. prop: 'productName',
  408. label: '名称',
  409. align: 'center',
  410. minWidth: 170
  411. },
  412. {
  413. prop: 'productionCodes',
  414. label: '生产编号',
  415. align: 'center',
  416. minWidth: 150,
  417. showOverflowTooltip: true
  418. },
  419. {
  420. prop: 'brandNo',
  421. label: '牌号',
  422. align: 'center'
  423. },
  424. {
  425. prop: 'batchNo',
  426. label: '批次号',
  427. align: 'center',
  428. minWidth: 100,
  429. showOverflowTooltip: true
  430. },
  431. {
  432. prop: 'model',
  433. label: '型号',
  434. align: 'center',
  435. showOverflowTooltip: true
  436. },
  437. {
  438. prop: 'priority',
  439. label: '优先级',
  440. align: 'center',
  441. minWidth: 120,
  442. slot: 'priority',
  443. sortable: 'custom'
  444. },
  445. {
  446. prop: 'formingNum',
  447. label: '要求生产数量',
  448. align: 'center',
  449. showOverflowTooltip: true,
  450. minWidth: 110
  451. },
  452. {
  453. prop: 'formingWeight',
  454. label: '要求生产重量',
  455. align: 'center',
  456. showOverflowTooltip: true,
  457. minWidth: 110,
  458. slot: 'formingWeight'
  459. },
  460. {
  461. prop: 'planStartTime',
  462. label: '计划开始时间',
  463. align: 'center',
  464. showOverflowTooltip: true,
  465. minWidth: 110
  466. },
  467. {
  468. prop: 'planCompleteTime',
  469. label: '计划结束时间',
  470. align: 'center',
  471. showOverflowTooltip: true,
  472. minWidth: 110
  473. },
  474. {
  475. prop: 'workCenterName',
  476. label: '工作中心',
  477. align: 'center',
  478. minWidth: 110,
  479. showOverflowTooltip: true
  480. },
  481. {
  482. prop: 'firstTaskName',
  483. label: '首工序',
  484. align: 'center',
  485. minWidth: 110,
  486. showOverflowTooltip: true
  487. },
  488. {
  489. prop: 'createTime',
  490. label: '创建时间',
  491. align: 'center',
  492. showOverflowTooltip: true,
  493. minWidth: 110,
  494. sortable: 'custom'
  495. },
  496. {
  497. slot: 'status',
  498. label: '状态',
  499. align: 'center',
  500. formatter: (row) => {
  501. const obj = this.statusOpt.find((i) => i.value == row.status);
  502. return obj && obj.label;
  503. }
  504. },
  505. {
  506. prop: 'customerName',
  507. label: '客户名称',
  508. align: 'center',
  509. showOverflowTooltip: true
  510. },
  511. {
  512. prop: 'serialNo',
  513. label: '客户代号',
  514. align: 'center',
  515. showOverflowTooltip: true
  516. },
  517. {
  518. prop: 'simpleName',
  519. label: '客户简称',
  520. align: 'center',
  521. showOverflowTooltip: true
  522. }
  523. ];
  524. },
  525. checkRowData() {
  526. return (row) => {
  527. return row.checkedata ? true : false;
  528. };
  529. }
  530. },
  531. created() {
  532. this.getFieldModel();
  533. },
  534. methods: {
  535. // 单选数据
  536. selectRow(e, row) {
  537. this.$set(row, 'checkedata', e);
  538. if (e) {
  539. this.selectionMap[row.id] = {
  540. id: row.id,
  541. firstTaskId: row.firstTaskId,
  542. productName: row.productName,
  543. productCode: row.productCode,
  544. code: row.code,
  545. productionPlanCode: row.productionPlanCode,
  546. batchNo: row.batchNo,
  547. formingNum: row.formingNum
  548. };
  549. } else {
  550. delete this.selectionMap[row.id];
  551. }
  552. },
  553. // 批量派单
  554. batchDispatch() {
  555. let list = Object.values(this.selectionMap);
  556. if (list.length === 0) {
  557. this.$message.warning('请至少选择一条派单的数据');
  558. }
  559. this.$refs.batchRef.open(list);
  560. },
  561. // 删除拆单数据
  562. remove(row) {
  563. unpackDel(row.id).then((res) => {
  564. if (res) {
  565. this.$message.success('操作成功');
  566. this.createSuccess();
  567. }
  568. });
  569. },
  570. // assignTypeFn(e) {},
  571. statusFormatter(status) {
  572. const obj = this.statusOpt.find((i) => i.value == status);
  573. return obj && obj.label;
  574. },
  575. /* 表格数据源 */
  576. datasource({ page, limit, where }) {
  577. this.selectionMap = {};
  578. if (where.status) {
  579. where.statusList = [];
  580. where.statusList.push(where.status);
  581. }
  582. return getList({
  583. pageNum: page,
  584. size: limit,
  585. ...where,
  586. ...this.sort
  587. });
  588. },
  589. /* 数据转为树形结构 */
  590. parseData(data) {
  591. const obj = {
  592. ...data,
  593. list: this.$util.toTreeData({
  594. data: data.list,
  595. count: data.total,
  596. idField: 'code',
  597. parentIdField: 'originalCode'
  598. })
  599. };
  600. return obj;
  601. },
  602. getFieldModel() {
  603. fieldModel({ fieldModel: 't_main_category' }).then((res) => {
  604. const privateColumn = [
  605. {
  606. columnKey: 'action',
  607. label: '操作',
  608. width: 140,
  609. align: 'center',
  610. resizable: false,
  611. fixed: 'right',
  612. slot: 'action'
  613. }
  614. ];
  615. let newRes = res.map((m) => {
  616. return {
  617. prop: 'extField.' + m.prop,
  618. label: m.label,
  619. align: 'center',
  620. showOverflowTooltip: true
  621. };
  622. });
  623. this.newColumns = [...this.columns, ...newRes, ...privateColumn];
  624. this.$forceUpdate();
  625. });
  626. },
  627. // 下达
  628. toRelease(row) {
  629. this.current = row;
  630. this.visible = true;
  631. this.FirstTaskIdFn();
  632. this.WorkCenterIdFn();
  633. this.form.singleReport = this.clientEnvironmentId == 2 ? 0 : 1;
  634. },
  635. // 下达
  636. confirm() {
  637. this.$refs.form.validate((valid) => {
  638. if (valid) {
  639. const loading = this.$loading({ text: '加载中...' });
  640. if (this.form.assignType * 1 == 2) {
  641. this.form.workstationIds = [];
  642. } else {
  643. this.form.crewIds = [];
  644. }
  645. releaseWorkOrder({
  646. id: this.current.id,
  647. ...this.form
  648. })
  649. .then((res) => {
  650. if (res) {
  651. this.$message.success('成功');
  652. this.reData();
  653. this.reload();
  654. this.visible = false;
  655. }
  656. })
  657. .finally(() => {
  658. loading.close();
  659. });
  660. }
  661. });
  662. },
  663. close() {
  664. this.visible = false;
  665. this.reData();
  666. },
  667. reData() {
  668. this.form = {
  669. assignType: 1,
  670. crewIds: '',
  671. workstationIds: '',
  672. teamId: '',
  673. singleReport: this.clientEnvironmentId == 2 ? 0 : 1
  674. };
  675. },
  676. /* 刷新表格 */
  677. reload(where) {
  678. this.$nextTick(() => {
  679. this.$refs.table.reload({ page: 1, where });
  680. });
  681. },
  682. onSortChange(e) {
  683. let sort = {
  684. orderBy: e.order,
  685. sortName: e.prop
  686. };
  687. this.sort = sort;
  688. this.reload();
  689. },
  690. sortTop(row) {
  691. row.priority = Number(row.priority) + 1;
  692. this.priorityChange(row);
  693. },
  694. sortBottom(row) {
  695. if (row.priority <= 1) {
  696. return;
  697. }
  698. row.priority = Number(row.priority) - 1;
  699. this.priorityChange(row);
  700. },
  701. FirstTaskIdFn() {
  702. listByFirstTaskId(this.current.firstTaskId).then((res) => {
  703. this.stationList = res;
  704. });
  705. },
  706. WorkCenterIdFn() {
  707. listByWorkCenterId(this.current.workCenterId).then((res) => {
  708. this.teamsList = res;
  709. this.$nextTick(() => {
  710. if (this.teamId) {
  711. this.$set(this.form, 'teamId', this.teamId);
  712. this.stationChange();
  713. }
  714. // this.$refs.form.clearValidate();
  715. });
  716. });
  717. },
  718. // 拆分
  719. toUnpack(row) {
  720. this.$refs.unpackRef.open(row);
  721. },
  722. //派单
  723. toReleaseOpen(row) {
  724. this.dispatchRow = { ...row };
  725. this.dispatchRow.initialWeight = row.formingWeight
  726. ? row.formingWeight + row.newWeightUnit
  727. : '';
  728. this.dispatchVisible = true;
  729. // getTaskIdByInstanceId(row.firstTaskId)
  730. // .then((res) => {
  731. // if (res) {
  732. // }
  733. // })
  734. // .catch((err) => {
  735. // this.$message.error(err.message);
  736. // });
  737. },
  738. createSuccess() {
  739. this.reload();
  740. },
  741. stationChange() {
  742. this.crewList = [];
  743. this.crewIds = [];
  744. listUserByIds([this.form.teamId]).then((res) => {
  745. this.crewList = res;
  746. });
  747. },
  748. priorityChange(row) {
  749. if (row.priority > 10) {
  750. row.priority = 10; // 如果大于 10,则设置为 10
  751. } else if (row.priority < 0) {
  752. row.priority = 0; // 如果小于 0,则设置为 0
  753. }
  754. this.priorityFn(row);
  755. },
  756. priorityFn: debounce(function (row) {
  757. let params = {
  758. id: row.id,
  759. priority: row.priority
  760. };
  761. updatePriority(params).then((res) => {});
  762. }, 800)
  763. }
  764. };
  765. </script>
  766. <style lang="scss" scoped>
  767. // ::v-deep .el-table__row {
  768. // height: 51px !important;
  769. // }
  770. ::v-deep thead {
  771. .cell {
  772. .el-checkbox {
  773. display: none;
  774. }
  775. }
  776. }
  777. </style>