zouyu
2023-09-05 305b8976e9ad666e52c157ebc79f05c2fe03d1ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
<template>
  <div class="specificationDetail-main">
    <div class="page-header-tips">
      <div class="search-bar">
        <span :style="{marginRight:'12px', color:'#409EFF'}"> 项目名称:{{ detailInfo.projectClassification }}</span>
        <!-- <el-tag type="primary"><i class="el-icon-info" :style="{marginRight:'4px', color:'#409EFF'}" />V12</el-tag> -->
      </div>
      <div class="serve-btn">
        <!-- <el-button type="primary" icon="el-icon-plus">编辑</el-button>
        <el-button type="primary" icon="el-icon-plus">删除</el-button> -->
      </div>
    </div>
    <div class="content-main">
      <div class="specificationDetail-bom">
        <div class="bom-item">
          <div class="bom-item-search">
            <el-row>
              <el-col :span="19">
                <el-input
                  v-model="searchData.keyword"
                  placeholder="输入关键字进行过滤"
                />
              </el-col>
              <el-col :span="5">
                <el-button type="primary" size="small" @click="materialFormVisible = true"><i class="el-icon-plus" /></el-button>
              </el-col>
            </el-row>
          </div>
          <el-tree
            ref="tree"
            class="filter-tree"
            :data="materialTree"
            default-expand-all
            :filter-node-method="filterNode"
            :highlight-current="true"
            node-key="id"
            :default-expanded-keys="materialTreeDefault"
            @node-click="materialTreeClick"
          >
 
            <span slot-scope="{ node, data }" class="custom-tree-node">
              <span>{{ node.label }}</span>
              <span>
                <el-popover
                  placement="top"
                  width="30"
                  trigger="click"
                >
                  <div style="text-align: center; margin: 0">
                    <div>
                      <el-button size="mini" type="text" @click="showChangeMaterial(data)">编辑</el-button>
                    </div>
                    <div>
                      <el-button size="mini" type="text" @click="delmaterialFormVisible=true">删除</el-button>
                    </div>
                  </div>
                  <el-button
                    slot="reference"
                    type="text"
                    size="mini"
                  ><i class="el-icon-more" /></el-button>
                </el-popover>
              </span>
            </span>
          </el-tree>
        </div>
        <div class="bom-item">
          <div class="bom-item-search">
            <el-row>
              <el-col :span="19">
                <div class="tips">
                  <span />
                  <div>项目/子项目</div>
                </div>
              </el-col>
              <el-col :span="5">
                <el-button type="primary" size="small" plain @click="projectFormVisible = true"><i class="el-icon-plus" /></el-button>
              </el-col>
            </el-row>
          </div>
          <el-tree
            ref="tree"
            class="filter-tree"
            :data="projectTree"
            default-expand-all
            :highlight-current="true"
            :default-expanded-keys="projectTreeDefault"
            @node-click="projectTreeClick"
          >
            <span slot-scope="{ node,data }" class="custom-tree-node">
              <span>{{ node.label }}</span>
              <span>
                <el-popover
                  placement="top"
                  width="30"
                  trigger="click"
                >
                  <div style="text-align: center; margin: 0">
                    <div>
                      <el-button size="mini" type="text" @click="showChangeProject(data)">编辑</el-button>
                    </div>
                    <div>
                      <el-button size="mini" type="text" @click="delProductFormVisible = true">删除</el-button>
                    </div>
                  </div>
                  <el-button
                    slot="reference"
                    type="text"
                    size="mini"
                  ><i class="el-icon-more" /></el-button>
                </el-popover>
              </span>
            </span>
          </el-tree>
        </div>
      </div>
      <div class="specificationDetail-card">
        <div class="card-main">
          <div class="tips-main">
            <div class="tips">
              <span />
              <div>项目详情</div>
            </div>
            <!-- <div class="tips-btn">
              <span><i class="el-icon-edit" />操作:</span>
              <el-button type="text">编辑</el-button>
            </div> -->
          </div>
          <div class="message">
            <div class="message-item"><span><i class="el-icon-edit" />试验方法:{{ detailInfo.method }}</span></div>
            <div class="message-item">
              <span><i class="el-icon-edit" />项目分类:{{ detailInfo.projectClassification }}</span>
            </div>
            <div class="message-item">
              <span><i class="el-icon-edit" />更新人:{{ detailInfo.userName }}</span></div>
            <div class="message-item">
              <span><i class="el-icon-edit" />更新时间:{{ detailInfo.updateTime }}</span></div>
          </div>
        </div>
        <div class="card-main">
          <div class="tips-main">
            <div class="tips">
              <span />
              <div>测试标准</div>
            </div>
          </div>
          <div class="message">
            <div class="message-item">
              <el-tag type="primary"><i class="el-icon-info" :style="{marginRight:'4px', color:'#409EFF'}" />单位:欧姆</el-tag>
            </div>
            <div class="message-item">
              <span><i class="el-icon-edit" />招标人员要求:{{ detailInfo.required }}</span>
            </div>
            <div class="message-item">
              <span><i class="el-icon-edit" />内控值:{{ detailInfo.internal }}</span></div>
          </div>
        </div>
      </div>
    </div>
    <!-- 添加以及修改的模态框 -->
    <el-dialog title="添加物料" :visible.sync="materialFormVisible" width="35%">
      <el-form :model="addMaterialForm">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="物料ID:" label-width="100px">
              <el-input v-model="addMaterialForm.id" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="物料名称:" label-width="100px">
              <el-input v-model="addMaterialForm.name" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="批次:" label-width="100px">
              <el-input v-model="addMaterialForm.batch" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="存放地:" label-width="100px">
              <el-input v-model="addMaterialForm.location" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="盘号:" label-width="100px">
              <el-input v-model="addMaterialForm.reelNumber" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="数量:" label-width="100px">
              <el-input v-model="addMaterialForm.num" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <!-- <el-form-item label="关联规格:" label-width="100px">
              <el-input v-model="addMaterialForm.specificationsId" autocomplete="off" />
            </el-form-item> -->
          </el-col>
          <el-col :span="12">
            <el-form-item label="供应商:" label-width="100px">
              <el-input v-model="addMaterialForm.supplier" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="addNewMaterial">确 定</el-button>
        <el-button @click="dialogFormVisible = false">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog title="添加子项目" :visible.sync="projectFormVisible" width="35%">
      <el-form :model="addProjectForm">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="父项目:" label-width="100px">
              <el-select
                v-model="addProjectForm.father"
                clearable
                filterable
                :allow-create="true"
                placeholder="请选择或输入父项目"
                @blur="productSelect"
              >
                <el-option
                  v-for="item in fatherOpetions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.label"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="关联物料:" label-width="100px">
              <el-select
                v-model="addProjectForm.materialId"
                clearable
                placeholder="请选择或输入父项目"
              >
                <el-option
                  v-for="item in materialTree"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="项目名称:" label-width="100px">
              <el-input v-model="addProjectForm.name" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单位:" label-width="100px">
              <el-input v-model="addProjectForm.unit" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="招标人要求值:" label-width="100px">
              <el-input v-model="addProjectForm.required" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="内控值:" label-width="100px">
              <el-input v-model="addProjectForm.internal" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="试验方法:" label-width="100px">
              <el-input v-model="addProjectForm.method" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="addNewProject">确 定</el-button>
        <el-button @click="projectFormVisible = false">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog title="修改物料" :visible.sync="changeMaterialFormVisible" width="35%">
      <el-form :model="changeMaterialForm">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="物料名称:" label-width="100px">
              <el-input v-model="changeMaterialForm.name" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="供应商:" label-width="100px">
              <el-input v-model="changeMaterialForm.supplier" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="批次:" label-width="100px">
              <el-input v-model="changeMaterialForm.batch" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="存放地:" label-width="100px">
              <el-input v-model="changeMaterialForm.location" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="盘号:" label-width="100px">
              <el-input v-model="changeMaterialForm.reelNumber" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="数量:" label-width="100px">
              <el-input v-model="changeMaterialForm.num" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="changeMaterial">确 定</el-button>
        <el-button @click="changeMaterialFormVisible = false">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog title="修改子项目" :visible.sync="changeProjectFormVisible" width="35%">
      <el-form :model="changeProjectForm">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="父项目:" label-width="100px">
              <el-select
                v-model="changeProjectForm.father"
                clearable
                filterable
                :allow-create="true"
                placeholder="请选择或输入父项目"
                @blur="productSelect"
              >
                <el-option
                  v-for="item in fatherOpetions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.label"
                />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="项目名称:" label-width="100px">
              <el-input v-model="changeProjectForm.name" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单位:" label-width="100px">
              <el-input v-model="changeProjectForm.unit" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="招标人要求值:" label-width="100px">
              <el-input v-model="changeProjectForm.required" autocomplete="off" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="内控值:" label-width="100px">
              <el-input v-model="changeProjectForm.internal" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="试验方法:" label-width="100px">
              <el-input v-model="changeProjectForm.method" autocomplete="off" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="changeProject">确 定</el-button>
        <el-button @click="projectFormVisible = false">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog
      title="提示"
      :visible.sync="delmaterialFormVisible"
      width="30%"
    >
      <span>确认删除该物料吗?</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deleteMaterial">确 定</el-button>
        <el-button @click="delmaterialFormVisible = false">取 消</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="提示"
      :visible.sync="delProductFormVisible"
      width="30%"
    >
      <span>确认删除该子项目吗?</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deleleProduct">确 定</el-button>
        <el-button @click="delProductFormVisible = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>
 
<script>
import { getMaterialList, getProductProductId, addMaterial, addProduct, getMaterialDetail, updateMaterial, updateProduct, deleteMaterial, deleteProduct } from '@/api/standardLibrary'
export default {
  name: 'SpecificationDetail',
  data() {
    return {
      // 查找对应详情id
      specificationsId: '',
      // 默认值
      materialDefaultProps: {
        children: 'children',
        label: 'label'
      },
      // 物料tree数据
      materialTree: [],
      // 标准详情分类
      projectTree: [],
      searchData: {
        keyword: ''
      },
      // 详情信息
      detailInfo: {},
      // 物料tree默认选中值
      materialTreeDefault: [],
      projectTreeDefault: [],
      materialFormVisible: false,
      delmaterialFormVisible: false,
      changeMaterialFormVisible: false,
      projectFormVisible: false,
      changeProjectFormVisible: false,
      delProductFormVisible: false,
      addMaterialForm: {},
      changeMaterialForm: {},
      addProjectForm: {},
      changeProjectForm: {},
      fatherOpetions: [],
      materialId: '',
      productId: ''
    }
  },
  // 为了选中第一层级下的第一个节点
  watch: {
    projectTreeDefault(newVal, oldVal) {
      // console.log(newVal)
      if (newVal) {
        this.$nextTick(() => {
          // console.log(document.querySelector('.el-tree-node__children .el-tree-node__content'))
 
          document
            .querySelector('.el-tree-node__children .el-tree-node__content')
            ?.click()
        })
      }
    },
    materialTreeDefault(newVal, oldVal) {
      // console.log(newVal)
      if (newVal) {
        this.$nextTick(() => {
          // console.log(document.querySelector('.el-tree-node__content'))
          document
            .querySelector('.el-tree-node__content')
            ?.click()
        })
      }
    }
  },
  created() {
    // console.log(this.$route.params)
    // 这里加一个校验,如果没有params.id 返回标准库页面
    this.specificationsId = this.$route.params.id
    this.addMaterialForm.specificationsId = this.$route.params.id
    this.refreshData()
  },
  methods: {
    productSelect(e) {
      const value = e.target.value // 输入框值
      if (value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空
        this.addProjectForm.pcode = value
      }
    },
    // 刷新或初次获得数据
    refreshData() {
      this.getMaterialTreeData()
    },
    // tree树的过滤查询
    filterNode(value, data) {
      if (!value) return true
      return data.label.indexOf(value) !== -1
    },
    // 获取物料tree
    async getMaterialTreeData() {
      const { data } = await getMaterialList({ specificationsId: this.specificationsId })
      // console.log(data)
      this.materialTree = data.map(item => ({ ...item, label: item.name }))
      this.materialTreeDefault = [this.materialTree[0].id]
      console.log(this.materialTree, this.materialTreeDefault)
    },
    // 物料库的节点点击
    materialTreeClick(data, node, element) {
      // 点击物料节点,查询对应的项目tree数据
      console.log(data)
      // 得到物料Id
      this.materialId = data.id
    },
    // 项目库的节点点击
    async projectTreeClick(data, node, element) {
      // 先判断点击的是父节点还是子节点
      if (('children' in data)) return
      console.log('子项目节点', data)
      this.productId = data.id
      //
      const { data: detailInfo } = await getProductProductId({ productId: data.id })
      // console.log('详情信息', detailInfo)
      this.detailInfo = detailInfo
      this.changeProjectForm = { ...detailInfo }
    },
    // 新增物料
    async addNewMaterial() {
      // console.log('产看添加物料参数:', this.addMaterialForm)
      // const res = await addMaterial(this.addMaterialForm)
      await addMaterial(this.addMaterialForm)
      // console.log(res)
      this.$message.success('添加物料成功')
      this.materialFormVisible = false
      this.refreshData()
    },
    // 新增项目
    async addNewProject() {
      console.log('查看添加的子项目参数', this.addProjectForm)
      const res = await addProduct(this.addProjectForm)
      console.log(res)
      this.$message.success('添加新项目成功')
      this.projectFormVisible = false
      this.refreshData()
    },
    // 修改物料
    async changeMaterial() {
      console.log('修改物料参数', this.changeMaterialForm)
      const res = await updateMaterial(this.changeMaterialForm)
      this.changeMaterialFormVisible = false
      this.$message.success('修改成功')
      this.refreshData()
      console.log(res)
    },
    // 修改项目
    async changeProject() {
      console.log('修改项目参数', this.changeProjectForm)
      const { data } = await updateProduct(this.changeProjectForm)
      console.log(data)
      this.changeMaterialFormVisible = false
      this.$message.success('修改成功')
      this.refreshData()
    },
    // 显示修改物料模态框同时获取需要修改物料信息
    async  showChangeMaterial(data) {
      const { data: materialInfo } = await getMaterialDetail({ materialId: data.id })
      for (const key in materialInfo) {
        // console.log(key, materialInfo[key])
        if (!materialInfo[key]) {
          // console.log(materialInfo[key])
          delete materialInfo[key]
        }
      }
      console.log(materialInfo)
      this.changeMaterialForm = materialInfo
      this.changeMaterialFormVisible = true
    },
    // 显示修改项目模态框
    showChangeProject(data) {
      // console.log('修改前', this.changeProjectForm)
      this.changeProjectForm.name = data.name
      // console.log('修改后', this.changeMaterialForm)
      this.changeProjectFormVisible = true
    },
    async deleteMaterial() {
      await deleteMaterial({ materialId: this.materialId })
      this.delmaterialFormVisible = false
    },
    async deleleProduct() {
      // console.log('productId', this.productId)
      await deleteProduct({ productId: this.productId })
      this.delProductFormVisible = false
    }
  }
}
</script>
 
<style lang="scss" scoped>
 .specificationDetail-main{
      // 页面头部条件搜索
  .page-header-tips{
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 0 24px 12px 24px;
     .search-bar{
      .el-radio-button.is-active{
        color: #409EFF !important;
        background: #ecf5ff !important;
        border-color: #b3d8ff !important;
      }
      >span{
        font-size: 20px;
      }
    }
  }
    // 页面中心内容区域
    .content-main{
        display: flex;
        height: 100%;
        min-height: calc(100vh - 88px);
        // .specificationDetail-bom,.specificationDetail-card{
        //     padding: 20px;
        //     background: #fff;
        // }
        .specificationDetail-bom{
            flex: 50%;
            margin-right: 12px;
            display: flex;
                >div:nth-child(1){
                   flex: 43%;
 
                    margin-right: 12px;
                    padding: 20px;
                    background: #fff;
                }
                >div:nth-child(2){
                    flex: 57%;
 
                    margin-left: 12px;
                    background: #fff;
                    padding: 20px;
 
                }
            .bom-item{
                flex: 50%;
                .bom-item-search{
                    margin-bottom: 12px;
                    ::v-deep .el-input{
                        input{
                            height: 33px;
                            line-height: 33px;
                        }
                    }
                    .tips{
                        height: 33px !important;
                        display: flex;
                        height: 24px;
                        align-items: center;
                        font-size: 16px;
                        // margin-bottom: 12px;
                        >span{
                            display: inline-block;
                            margin-right: 10px;
                            width: 4px;
                            height: 16px;
                            background: #0077DB;
                        }
                        >div{
                            height: 100%;
                            line-height: 36px;
                        }
                        .el-button{
                            padding: 0;
                        }
                        }
                }
                .bom-item-search .el-row{
                    // display: flex;
                    .el-col{
                        text-align: right;
                    }
                }
            }
        }
        .specificationDetail-card{
            flex: 50%;
            margin-left: 12px;
            .card-main{
            background: #fff;
            // padding: 10px 20px 10px 20px;
            margin: 0;
            margin-bottom: 12px;
            border-radius: 6px;
            overflow: hidden;
            .tips-main{
            // margin: ;
            padding: 10px 20px 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 50px;
            // height: ;
            &:hover{
                background: #85bff810;
                .tips-btn{
                display: block;
                left: 0;
                opacity:1;
                }
            }
            .tips-btn{
                height: 100%;
                // display: none;
                position: relative;
                opacity:0;
                left: 100px;
                transition: all 0.3s ease-in-out;
            }
            .tips{
            height: 100%;
            display: flex;
            height: 24px;
            align-items: center;
            font-size: 16px;
            // margin-bottom: 12px;
            >span{
                display: inline-block;
                margin-right: 10px;
                width: 4px;
                height: 16px;
                background: #0077DB;
            }
            >div{
                height: 100%;
                line-height: 26px;
            }
            .el-button{
                padding: 0;
            }
            }
            }
 
            // 基本信息和企业信息的每一个信息项样式
            .message{
            padding: 0px 20px 10px 20px;
 
            display: flex;
            flex-wrap: wrap;
            border-top: 1px solid #F2F6FC;
            // border-top: 1px solid #F2F6FC;
            >div{
                flex: 50%;
                max-width: 50%;
                padding: 8px;
                color: #606266;
                align-items: center;
                // height: 65px;
                font-size: 12px;
                height: 52px;
                display: flex;
                align-items: center;
                >span{
                color: #303133;
                font-size: 16px;
                //
                >i{
                    margin-right: 8px;
                }
                }
            }
            // >div:nth-child(5){
            //   flex: 60%;
            //   max-width: 60%;
            // }
            }
        }
        }
    }
}
 
// 树节点的样式
.custom-tree-node {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    padding-right: 8px;
    &>:nth-child(2){
      display: none;
    }
    &:hover >:nth-child(2){
      display: block;
    }
  }
</style>