edit.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <!-- 用户编辑弹窗 -->
  2. <template>
  3. <el-dialog
  4. class="ele-dialog-form"
  5. :title="title"
  6. :visible.sync="visible"
  7. :before-close="handleClose"
  8. :close-on-click-modal="false"
  9. :close-on-press-escape="false"
  10. width="1200px"
  11. >
  12. <el-form ref="form" :model="form" :rules="rules" label-width="110px">
  13. <el-card
  14. shadow="never"
  15. header="基本信息"
  16. body-style="padding: 22px 22px 0 22px;"
  17. >
  18. <el-row>
  19. <el-col :span="8">
  20. <el-form-item label="工位编码:" prop="code">
  21. <el-input
  22. clearable
  23. @click.native="openCode"
  24. v-model="form.code"
  25. placeholder="请输入"
  26. />
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="8">
  30. <el-form-item label="工位名称:" prop="name">
  31. <el-input
  32. clearable
  33. :maxlength="20"
  34. v-model="form.name"
  35. placeholder="请输入"
  36. />
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="8">
  40. <el-form-item label="工位类型:" prop="extInfo.type">
  41. <el-select
  42. class="ele-fluid"
  43. v-model="form.extInfo.type"
  44. >
  45. <el-option
  46. label="设备"
  47. :value="1"
  48. @click.native="form.extInfo.teamId = null"
  49. />
  50. <el-option
  51. label="工位"
  52. :value="3"
  53. @click.native="
  54. form.extInfo.assetName = null;
  55. form.extInfo.assetCode = null;
  56. "
  57. />
  58. </el-select>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="8">
  62. <el-form-item
  63. label="设备编码:"
  64. prop="extInfo.assetCode"
  65. v-if="form.extInfo.type == 1"
  66. >
  67. <el-input
  68. v-model="form.extInfo.assetCode"
  69. readonly
  70. @click.native="chooseAsset"
  71. />
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="8">
  75. <el-form-item
  76. label="设备名称:"
  77. prop="extInfo.assetName"
  78. v-if="form.extInfo.type == 1"
  79. >
  80. <el-input disabled v-model="form.extInfo.assetName" />
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="8">
  84. <el-form-item
  85. label="班组:"
  86. prop="extInfo.teamId"
  87. v-if="form.extInfo.type == 3"
  88. >
  89. <el-select
  90. style="width: 100%"
  91. v-model="form.extInfo.teamId"
  92. clearable
  93. :filterable="true"
  94. >
  95. <el-option
  96. v-for="item in teamPagerList"
  97. :key="item.id"
  98. :label="item.name"
  99. :value="item.id"
  100. />
  101. </el-select>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="8">
  105. <el-form-item label="所属区域:" prop="location_city">
  106. <area-select
  107. v-model="form.areaId"
  108. @checkedKeys="getAreaInfo"
  109. :data="areaTreeList"
  110. ref="tree"
  111. />
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="8">
  115. <el-form-item label="所属工厂:" prop="extInfo.factoryId">
  116. <el-select
  117. v-model="form.extInfo.factoryId"
  118. placeholder="请选择"
  119. @change="change_factoryId"
  120. style="width: 100%"
  121. >
  122. <el-option
  123. v-for="item in factoryList"
  124. :key="item.id"
  125. :label="item.name"
  126. :value="item.id"
  127. >
  128. </el-option>
  129. </el-select>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="8">
  133. <el-form-item label="所属厂房:" prop="extInfo.workshopPlanId">
  134. <el-select
  135. v-model="form.extInfo.workshopPlanId"
  136. placeholder="请选择"
  137. @change="getListWorkshopByParentId(false)"
  138. style="width: 100%"
  139. >
  140. <el-option
  141. v-for="item in workshopPlanList"
  142. :key="item.id"
  143. :label="item.workshopPlanName"
  144. :value="item.id"
  145. >
  146. </el-option>
  147. </el-select>
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="8">
  151. <el-form-item label="所属车间:" prop="extInfo.workshopId">
  152. <el-select
  153. v-model="form.extInfo.workshopId"
  154. placeholder="请选择"
  155. style="width: 100%"
  156. @change="change_workshop"
  157. >
  158. <el-option
  159. v-for="item in options.workshopId"
  160. :key="item.id"
  161. :label="item.name"
  162. :value="item.id"
  163. >
  164. </el-option>
  165. </el-select>
  166. </el-form-item>
  167. </el-col>
  168. <el-col :span="8">
  169. <el-form-item label="所属产线:" prop="productionLineId">
  170. <el-select
  171. v-model="form.productionLineId"
  172. placeholder="请选择"
  173. style="width: 100%"
  174. @change="change_productionLineId"
  175. >
  176. <el-option
  177. v-for="item in options.productionLineId"
  178. :key="item.id"
  179. :label="item.name"
  180. :value="item.id"
  181. >
  182. </el-option>
  183. </el-select>
  184. </el-form-item>
  185. </el-col>
  186. <el-col :span="8">
  187. <el-form-item label="负责人部门:" prop="extInfo.principalDep">
  188. <ele-tree-select
  189. clearable
  190. :data="groupList"
  191. filterable
  192. v-model="form.extInfo.principalDep"
  193. valueKey="id"
  194. labelKey="name"
  195. placeholder="请选择"
  196. @change="change_principalDep"
  197. default-expand-all
  198. />
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="8">
  202. <el-form-item label="负责人:" prop="leaderId">
  203. <el-select
  204. v-model="form.leaderId"
  205. placeholder="请选择"
  206. style="width: 100%"
  207. >
  208. <el-option
  209. v-for="item in options.leaderId"
  210. :key="item.id"
  211. :label="item.name"
  212. :value="item.id"
  213. >
  214. </el-option>
  215. </el-select>
  216. </el-form-item>
  217. </el-col>
  218. <el-col :span="8">
  219. <el-form-item label="所属工作中心:" prop="extInfo.workCenterId">
  220. <el-select
  221. v-model="form.extInfo.workCenterId"
  222. filterable
  223. placeholder="请选择"
  224. style="width: 100%"
  225. >
  226. <el-option
  227. v-for="item in options.workCenterList"
  228. :key="item.id"
  229. :label="item.name"
  230. :value="item.id"
  231. >
  232. </el-option>
  233. </el-select>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="16">
  237. <el-form-item label="可执行工序:" prop="taskNames">
  238. <el-input
  239. :value="form.taskNames"
  240. placeholder="请选择"
  241. @click.native="handleProduce"
  242. ></el-input>
  243. </el-form-item>
  244. </el-col>
  245. <el-col :span="8">
  246. <el-form-item label="状态:" prop="enabled">
  247. <el-select
  248. v-model="form.enabled"
  249. placeholder="请选择"
  250. style="width: 100%"
  251. >
  252. <el-option
  253. v-for="item in options.enabled"
  254. :key="item.value"
  255. :label="item.label"
  256. :value="item.value"
  257. >
  258. </el-option>
  259. </el-select>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :span="14">
  263. <el-form-item label="节拍时间:" prop="extInfo.meterTime">
  264. <div class="workMeter-warp">
  265. <el-input
  266. class="s1"
  267. clearable
  268. :maxlength="20"
  269. v-model="form.extInfo.meterTime"
  270. placeholder="请输入"
  271. />
  272. <DictSelection
  273. style="width: 30%"
  274. dictName="计量单位"
  275. clearable
  276. v-model="form.extInfo.meterMeasuringUnit"
  277. >
  278. </DictSelection>
  279. <span class="s3">/</span>
  280. <el-select
  281. class="s2"
  282. v-model="form.extInfo.meterTimeUnit"
  283. placeholder="请选择"
  284. >
  285. <el-option
  286. v-for="item in options.meterTimeUnit"
  287. :key="item.value"
  288. :label="item.label"
  289. :value="item.value"
  290. >
  291. </el-option>
  292. </el-select>
  293. </div>
  294. </el-form-item>
  295. </el-col>
  296. <el-col :span="24">
  297. <el-form-item label="备注:" prop="remark">
  298. <el-input
  299. clearable
  300. :maxlength="100"
  301. type="textarea"
  302. v-model="form.remark"
  303. placeholder="请输入"
  304. />
  305. </el-form-item>
  306. </el-col>
  307. </el-row>
  308. </el-card>
  309. <!-- <el-card
  310. shadow="never"
  311. header="关联设备"
  312. body-style="padding: 22px 22px 0 22px;"
  313. >
  314. <equipmentTable ref="equipmentTable"></equipmentTable>
  315. </el-card> -->
  316. </el-form>
  317. <template v-slot:footer>
  318. <el-button @click="handleClose">取消</el-button>
  319. <el-button type="primary" :loading="loading" @click="save">
  320. 保存
  321. </el-button>
  322. </template>
  323. <!-- 选择设备 -->
  324. <ProductModal
  325. ref="productRefs"
  326. :isLedger="true"
  327. @changeProduct="determineChoose"
  328. />
  329. <ProduceDialog ref="produceRef" @changeProduct="produceConfirm" />
  330. <!-- 自定义编码 -->
  331. <CodeDialog
  332. ref="codeRefs"
  333. v-if="codeShow"
  334. @close="codeShow = false"
  335. @chooseCode="chooseCode"
  336. ></CodeDialog>
  337. </el-dialog>
  338. </template>
  339. <script>
  340. import {
  341. listWorkshopByParentId,
  342. saveOrUpdate_gw,
  343. listFactoryLine,
  344. getById
  345. } from '@/api/factoryModel';
  346. import { getUserPage } from '@/api/system/organization';
  347. import ProductModal from './ProductModal.vue';
  348. import producetask from '@/api/technology/production';
  349. import work from '@/api/technology/work';
  350. import ProduceDialog from './ProduceDialog';
  351. import CodeDialog from './codeDialog.vue';
  352. import AreaSelect from '@/views/enterpriseModel/regionalManage/components/area-cascader.vue';
  353. import { basicAreaPageAPI } from '@/api/regionalManage';
  354. import { listOrganizations } from '@/api/system/organization';
  355. import { getFactoryarea } from '@/api/factoryModel';
  356. import { getteampage } from '@/api/workforceManagement/team';
  357. export default {
  358. components: {
  359. AreaSelect,
  360. ProductModal,
  361. ProduceDialog,
  362. CodeDialog
  363. },
  364. props: {
  365. options_groupId: Array
  366. },
  367. watch: {
  368. options_groupId(nval) {
  369. this.toTreeData(nval);
  370. }
  371. },
  372. data() {
  373. const defaultForm = function () {
  374. return {
  375. code: '',
  376. enabled: 1,
  377. extInfo: {
  378. factoryId: '', // 工厂
  379. workshopPlanId: '', // 厂房
  380. workshopId: '', // 车间
  381. principalDep: '', // 负责人部门
  382. meterTimeUnit: '时', // 节拍时间单位
  383. meterTime: '', // 节拍时间
  384. assetCode: '', //设备编码
  385. assetName: '', //设备名称
  386. meterMeasuringUnit: '', // 节拍计量单位
  387. workCenterId: null, //所属工作中心
  388. produceId: null, //可执行工序
  389. type: null,
  390. teamId: null
  391. },
  392. id: '',
  393. leaderId: '', // 负责人
  394. name: '',
  395. productionLineId: '',
  396. remark: '',
  397. taskIds: [],
  398. taskNames: [],
  399. workstationSubstanceList: []
  400. };
  401. };
  402. return {
  403. defaultForm,
  404. // 表单数据
  405. form: defaultForm(),
  406. factoryList: [],
  407. workshopPlanList: [],
  408. areaTreeList: [],
  409. teamPagerList: [],
  410. // 表单验证规则
  411. rules: {
  412. code: [{ required: true, message: '请输入', trigger: 'blur' }],
  413. name: [{ required: true, message: '请输入', trigger: 'blur' }],
  414. workCenterId: [
  415. { required: true, message: '请选择', trigger: 'change' }
  416. ],
  417. processId: [{ required: true, message: '请选择', trigger: 'change' }],
  418. 'extInfo.factoryId': [
  419. { required: true, message: '请输入', trigger: 'change' }
  420. ],
  421. 'extInfo.workshopPlanId': [
  422. { required: true, message: '请输入', trigger: 'change' }
  423. ],
  424. 'extInfo.principalDep': [
  425. { required: true, message: '请输入', trigger: 'change' }
  426. ],
  427. 'extInfo.assetCode': [
  428. { required: true, message: '请选择', trigger: 'change' }
  429. ],
  430. 'extInfo.assetName': [
  431. { required: true, message: '请选择', trigger: 'change' }
  432. ],
  433. 'extInfo.workshopId': {
  434. required: true,
  435. message: '请输入',
  436. trigger: 'change'
  437. },
  438. 'extInfo.workCenterId': {
  439. required: true,
  440. message: '请输入',
  441. trigger: 'change'
  442. },
  443. taskNames: {
  444. required: true,
  445. message: '请选择',
  446. trigger: 'change'
  447. },
  448. productionLineId: {
  449. required: true,
  450. message: '请输入',
  451. trigger: 'change'
  452. },
  453. leaderId: {
  454. required: true,
  455. message: '请输入',
  456. trigger: 'change'
  457. }
  458. },
  459. visible: false,
  460. type: '', // add/edit
  461. loading: false,
  462. codeShow: false,
  463. options: {
  464. leaderId: [],
  465. workshopId: [],
  466. workCenterList: [],
  467. produceList: [],
  468. enabled: [
  469. {
  470. label: '生效',
  471. value: 1
  472. },
  473. {
  474. label: '未生效',
  475. value: 0
  476. }
  477. ],
  478. meterTimeUnit: [
  479. {
  480. value: '时',
  481. label: '时'
  482. },
  483. {
  484. value: '分',
  485. label: '分'
  486. },
  487. {
  488. value: '秒',
  489. label: '秒'
  490. },
  491. {
  492. value: '日',
  493. label: '日'
  494. }
  495. ],
  496. productionLineId: [],
  497. areaList: []
  498. },
  499. groupList: []
  500. };
  501. },
  502. computed: {
  503. title() {
  504. switch (this.type) {
  505. case 'add':
  506. return '新增工位';
  507. case 'edit':
  508. return '编辑工位';
  509. default:
  510. break;
  511. }
  512. }
  513. },
  514. created() {
  515. this.getGs();
  516. this.getFactoryList();
  517. this.getBasicAreaList();
  518. this.getteampagerList();
  519. },
  520. methods: {
  521. chooseAsset() {
  522. this.$refs.productRefs.open(this.form.extInfo, '选择设备', '4');
  523. },
  524. // 选择可执行工序
  525. handleProduce() {
  526. let param = {
  527. taskIds: this.form.taskIds && this.form.taskIds[0],
  528. taskNames: this.form.taskNames && this.form.taskNames[0]
  529. };
  530. this.$refs.produceRef.open(param);
  531. },
  532. produceConfirm(data) {
  533. this.form.taskIds = [data.id];
  534. this.form.taskNames = [data.name];
  535. },
  536. determineChoose(title, row) {
  537. if (title == '选择设备') {
  538. this.form.extInfo.assetCode = row.code;
  539. this.form.extInfo.assetName = row.name;
  540. this.form.extInfo.assetId = row.id;
  541. }
  542. },
  543. openCode() {
  544. this.codeShow = true;
  545. },
  546. chooseCode(code) {
  547. this.$set(this.form, 'code', code);
  548. this.codeShow = false;
  549. this.$forceUpdate();
  550. },
  551. open(type, row) {
  552. this.type = type;
  553. this.visible = true;
  554. if (type == 'edit') {
  555. for (const key of Object.keys(this.form)) {
  556. if (key !== 'extInfo') {
  557. this.form[key] = row[key];
  558. } else {
  559. for (const el of Object.keys(this.form.extInfo)) {
  560. this.form.extInfo[el] = row.extInfo[el];
  561. }
  562. }
  563. }
  564. this.getData(row.id);
  565. // 请求下拉数据
  566. if (this.form.extInfo.factoryId) {
  567. this.getlistCf();
  568. }
  569. if (this.form.extInfo.workshopPlanId) {
  570. this.getListWorkshopByParentId(true);
  571. }
  572. if (this.form.extInfo.workshopId) {
  573. this.getlistFactoryLineByParentId();
  574. }
  575. if (this.form.extInfo.principalDep) {
  576. this.getUserPage();
  577. }
  578. }
  579. this.getListWorkCenter();
  580. this.getListProduce();
  581. },
  582. getteampagerList() {
  583. let param = {
  584. pageNum: 1,
  585. size: -1
  586. };
  587. getteampage(param).then((res) => {
  588. this.teamPagerList = res.list || [];
  589. });
  590. },
  591. async getFactoryList() {
  592. const { list } = await getFactoryarea({
  593. pageNum: 1,
  594. size: 999,
  595. type: 1
  596. });
  597. this.factoryList = list || [];
  598. },
  599. /* 获取区域集合 */
  600. async getBasicAreaList() {
  601. this.areaList = await basicAreaPageAPI({
  602. pageNum: 1,
  603. size: 9999
  604. });
  605. this.areaTreeList = this.$util.toTreeData({
  606. data: this.areaList,
  607. idField: 'id',
  608. parentIdField: 'parentId'
  609. });
  610. },
  611. getAreaInfo(nodeInfo) {
  612. this.form.areaName = nodeInfo[0]?.pathLabels.join('/') || '';
  613. this.form.areaId = this.form.areaId || '';
  614. },
  615. /* 保存编辑 */
  616. save() {
  617. this.$refs.form.validate((valid) => {
  618. if (!valid) {
  619. return false;
  620. }
  621. this.loading = true;
  622. if (this.type == 'add') {
  623. delete this.form.id;
  624. }
  625. // this.form.workstationSubstanceList =
  626. // this.$refs.equipmentTable.datasource.map((n) => {
  627. // return {
  628. // type: 1,
  629. // substanceId: n.id
  630. // };
  631. // });
  632. this.form.workstationSubstanceList = [
  633. {
  634. type: 1,
  635. substanceId: this.form.extInfo.assetId
  636. }
  637. ];
  638. saveOrUpdate_gw(this.form)
  639. .then((msg) => {
  640. this.loading = false;
  641. this.$message.success(msg);
  642. this.handleClose();
  643. this.$emit('done');
  644. })
  645. .catch((e) => {
  646. this.loading = false;
  647. this.$message.error(e.message);
  648. });
  649. });
  650. },
  651. restForm() {
  652. this.form = { ...this.defaultForm() };
  653. this.$nextTick(() => {
  654. this.$refs.form.clearValidate();
  655. });
  656. },
  657. handleClose() {
  658. this.restForm();
  659. this.loading = false;
  660. this.visible = false;
  661. },
  662. // 格式化公司数据
  663. toTreeData(val) {
  664. this.options.principalDep = this.$util.toTreeData({
  665. data: JSON.parse(JSON.stringify(val)),
  666. idField: 'id',
  667. parentIdField: 'parentId'
  668. });
  669. },
  670. // 获取工作中心
  671. getListWorkCenter() {
  672. work.list({ pageNum: 1, size: -1 }).then((res) => {
  673. this.options.workCenterList = res.list;
  674. });
  675. },
  676. // 获取工序
  677. getListProduce() {
  678. producetask.list({ pageNum: 1, size: -1 }).then((res) => {
  679. this.options.produceList = res.list;
  680. });
  681. },
  682. // 获取车间
  683. getListWorkshopByParentId(bol) {
  684. if (!bol) {
  685. this.form.extInfo.workshopId = '';
  686. this.options.workshopId = [];
  687. this.form.productionLineId = '';
  688. this.options.productionLineId = [];
  689. }
  690. listWorkshopByParentId(this.form.extInfo.workshopPlanId).then((res) => {
  691. this.options.workshopId = res;
  692. });
  693. },
  694. // 获取产线
  695. getlistFactoryLineByParentId() {
  696. listFactoryLine([this.form.extInfo.workshopId]).then((res) => {
  697. console.log(res);
  698. this.options.productionLineId = res;
  699. });
  700. },
  701. // 获取人员
  702. getUserPage() {
  703. if (!this.form.extInfo.principalDep)
  704. return (this.options.leaderId = []);
  705. let par = {
  706. groupId: this.form.extInfo.principalDep,
  707. size: 999
  708. };
  709. getUserPage(par).then((res) => {
  710. this.options.leaderId = res.list;
  711. });
  712. },
  713. // 选择工厂
  714. change_factoryId() {
  715. this.form.extInfo.workshopPlanId = '';
  716. this.workshopPlanList = [];
  717. this.form.extInfo.workshopId = '';
  718. this.options.workshopId = [];
  719. this.form.productionLineId = '';
  720. this.options.productionLineId = [];
  721. this.getlistCf();
  722. },
  723. getlistCf() {
  724. let par = {
  725. type: 2,
  726. parentId: this.form.extInfo.factoryId,
  727. size: 9999
  728. };
  729. getFactoryarea(par).then((res) => {
  730. this.workshopPlanList = res.list;
  731. });
  732. },
  733. // 选择负责人部门
  734. change_principalDep() {
  735. this.form.leaderId = '';
  736. this.getUserPage();
  737. },
  738. // 选择车间
  739. change_workshop() {
  740. this.form.leaderId = '';
  741. this.options.leaderId = [];
  742. this.getlistFactoryLineByParentId();
  743. },
  744. // 获取公司数据
  745. getGs() {
  746. listOrganizations().then((list) => {
  747. this.groupList = this.$util.toTreeData({
  748. data: list,
  749. idField: 'id',
  750. parentIdField: 'parentId'
  751. });
  752. });
  753. },
  754. // 选择产线
  755. change_productionLineId() {},
  756. // 请求详情
  757. getData(id) {
  758. getById(id).then((res) => {
  759. if (
  760. res.workstationSubstanceList &&
  761. res.workstationSubstanceList.length > 0
  762. ) {
  763. let list = res.workstationSubstanceList.map((n) => {
  764. return n.substance;
  765. });
  766. // if (list.length > 0) {
  767. // this.$refs.equipmentTable.datasource = list;
  768. // }
  769. }
  770. this.form = Object.assign({}, this.form, res);
  771. if (res.taskList?.length) {
  772. this.form.taskNames = res.taskList.map((i) => i.name);
  773. }
  774. });
  775. }
  776. }
  777. };
  778. </script>
  779. <style lang="scss" scoped>
  780. .location-warp {
  781. display: flex;
  782. .detail {
  783. margin-left: 10px;
  784. }
  785. }
  786. .workMeter-warp {
  787. .s1 {
  788. width: 30%;
  789. margin-right: 10px;
  790. }
  791. .s2 {
  792. width: 20%;
  793. margin-left: 10px;
  794. }
  795. .s3 {
  796. margin-left: 10px;
  797. }
  798. }
  799. :deep(
  800. .el-dialog:not(.ele-dialog-form)
  801. .el-dialog__body
  802. .el-form
  803. .el-form-item:last-child
  804. ) {
  805. margin-bottom: 22px;
  806. }
  807. </style>