zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
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
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<template>
  <a-form-model ref='form' :label-col='labelCol' :wrapper-col='wrapperCol' :model='model'
                :rules='validatorRules'>
    <a-list
      class='demo-loadmore-list'
      item-layout='horizontal'
      :data-source='model.weekList'
      style='padding-bottom: 20px'>
 
      <div v-if='showLoadingMore'
           slot='loadMore'
           :style="{ textAlign: 'center', marginTop: '12px', height: '32px', lineHeight: '32px' }">
        <a-spin v-if='loadingMore' />
        <a-button v-else-if='!loadingMore & showLoadModel' @click='onLoadMore'>
          前一周周报
        </a-button>
 
      </div>
      <a-list-item slot='renderItem' slot-scope='week, weekIndex'>
 
        <div style='width: 100%;'>
          <div class='head-week'>
                <span class='head-week-title'>{{ getDictText(week.username) }} {{ week.year }}年   第{{ week.week
                  }}周 {{ getThisWeek(week) }}</span>
            <a-button type='link' @click='exportXls(week)'>
              导出
            </a-button>
            <span :class="{ 'head-week-icon-up': week.show, 'head-week-icon-down':  !week.show }"
                  @click='showWeekItem(week)'></span>
          </div>
          <!--一周周报内容start-->
          <div v-show='week.show'>
 
 
            <!--本周完成内容start-->
            <div class='this-week-box'>
              <span class='this-week-text'>{{ week.typeList[0].name }} </span>
              <span class='this-week-date'> {{ week.startDateStr1 }}- {{ week.endDateStr1 }}  </span>
              <span style='margin-left: 20px'>总工时:<span style='color:#1890FF '>{{countGs([...week.typeList[0].wekList,...week.typeList[1].wekList])}}</span>小时</span>
            </div>
            <div class='week-form-box'>
              <!-- 主表单区域 -->
              <a-row class='row-title' type='flex' :gutter='16'>
                <a-col class='col-title' :span='2'></a-col>
                <a-col class='col-title' :span='2'>总结类型</a-col>
                <a-col class='col-title' :span='3'>项目</a-col>
                <a-col class='col-title' :span='3'>wbs</a-col>
                <a-col class='col-title' :span='6'>工作描述</a-col>
                <a-col class='col-title' :span='2'>进度</a-col>
                <a-col class='col-title' :span='2'>交付物</a-col>
                <a-col class='col-title' :span='2' >工时(<span style='color: #1890FF'>{{countGs(week.typeList[0].wekList) }}</span>)</a-col>
                <a-col v-if='showAction' class='col-title' :span='2'>操作</a-col>
              </a-row>
              <a-row class='row-text' type='flex' :gutter='16'
                     v-for='(rootItem, rootIndex) in week.typeList[0].wekList' :key="rootIndex + 'typeList0' ">
                <a-col class='col-text' :span='2'>
 
                  <div>
                    <a-popover v-model='rootItem.attach' placement='rightTop' trigger='click'>
                      <div slot='title'><span @click='uploadAttach(rootIndex)' class='upload-attach'>上传附件</span> <a
                        style='float: right;font-size: 12px' @click='rootItem.attach=false'>关闭</a></div>
                      <div slot='content'>
                        <j-upload :biz-path='getDate' :id="'upload'+rootIndex" ref='upload'
                                  v-model='rootItem.attachFiles'></j-upload>
                      </div>
                      <span :class="{ 'col-no-red': !rootItem.id , 'col-no-green': rootItem.id }">
                        <a-icon v-if='rootItem.attachFiles' style='color: #1890FF;cursor: pointer' type='link' />
                        <a-icon v-else style='cursor: pointer' type='link' />
                        {{ rootIndex + 1 }}
                      </span>
                    </a-popover>
 
                    <!--                    <span :class="{ 'col-no-red': !rootItem.id , 'col-no-green': rootItem.id }"> <a-icon type="link" /> {{ rootIndex + 1
                                          }}</span>-->
 
                  </div>
                  <a-input v-model='rootItem.id' class='hide-input-caret' v-show='false' readOnly />
                  <a-input v-model='rootItem.week' class='hide-input-caret' v-show='false' readOnly />
                  <a-input v-model='rootItem.year' class='hide-input-caret' v-show='false' readOnly />
                  <a-input v-model='rootItem.type' class='hide-input-caret' v-show='false' readOnly />
                </a-col>
                <a-col class='col-text' :span='2'>
                  <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                    <a-popover placement='rightTop' title='选择类型' trigger='focus'>
                      <template slot='content'>
                        <div class='list-box'>
                          <a-button v-for='(item, index) in subTypeList' @click='selectHelp(rootItem,item)'
                                    :key="index +'subTypeList1'"
                                    style=' text-align: start;margin: 5px 0'
                                    type='dashed'>
                            {{ item.value }}
                          </a-button>
                        </div>
                      </template>
 
                      <a-input v-model='rootItem.subTypeName' class='hide-input-caret text-ellipsis' readOnly />
 
                    </a-popover>
                  </a-form-model-item>
                </a-col>
 
                <!--有两种类型,一种是选择项目,一种是自己填写-->
                <template v-if='rootItem.subType == 1'>
 
                  <a-col class='col-text' :span='3'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                        <template slot='content'>
                          <div class='pro-list'>
 
                            <a-button v-for='(item, index) in filterProList' @click='selectPro(rootItem,item)'
                                      :key="index +'proList1'"
                                      style=' text-align: start;margin: 5px 0'
                                      type='dashed'>
                              {{ item.xmbh + ' - ' + item.xmmc }}
                            </a-button>
                          </div>
                        </template>
 
                        <a-tooltip placement='topLeft'>
                          <template slot='title'>
                            <span v-if='rootItem.xmName'>{{ rootItem.xmName }}</span>
                          </template>
                          <a-textarea v-model='rootItem.xmName' @focus='filterProFocus' @blur='filterProBlur(rootItem)'
                                      @change='filterProChange($event,rootItem)' class='text-ellipsis' />
                        </a-tooltip>
 
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
                  <a-col class='col-text' :span='3'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择项目WBS' trigger='focus'>
                        <template slot='content'>
                          <div class='pro-link-list'>
                            <a-button v-for='(item, index) in proLinklist' @click='selectProLinkWbs(rootItem,item)'
                                      :key="index+'proLinklist1'" style=' text-align: start;margin: 5px 0'
                                      type='dashed'>
                              {{ (item.sxh == null ? '' : item.sxh) + ' - ' + (item.xmhj == null ? '' : item.xmhj)
                              }}
                            </a-button>
                          </div>
                        </template>
 
                        <a-tooltip placement='topLeft'>
                          <template slot='title'>
                            <span v-if='rootItem.wbsName'>{{ rootItem.wbsName }}</span>
                          </template>
                          <a-textarea v-model='rootItem.wbsName' @focus='queryProLinkWbs(rootItem.xm)'
                                      class='hide-input-caret text-ellipsis' readOnly />
                        </a-tooltip>
 
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
                </template>
                <template v-else-if='rootItem.subType == 2'>
 
                  <a-col class='col-text' :span='3'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                        <template slot='content'>
                          <div class='list-box'>
                            <a-button v-for='(item, index) in extWorkList' @click='selectExtWork(rootItem,item)'
                                      :key="index+'extWorkList1'"
                                      style=' text-align: start;margin: 5px 0'
                                      type='dashed'>
                              {{ index + 1 + ' - ' + item.text }}
                            </a-button>
                          </div>
                        </template>
                        <a-input v-model='rootItem.extName' class='hide-input-caret' readOnly />
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
                  <a-col class='col-text' :span='3'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model='rootItem.wbsName'
                                  class='text-ellipsis' disabled />
                    </a-form-model-item>
                  </a-col>
 
                </template>
                <template v-else>
 
                  <a-col class='col-text' :span='3'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model='rootItem.xmName' class='hide-input-caret text-ellipsis' readOnly />
                    </a-form-model-item>
                  </a-col>
                  <a-col class='col-text' :span='3'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model='rootItem.wbsName'
                                  class='hide-input-caret text-ellipsis' readOnly />
                    </a-form-model-item>
                  </a-col>
 
                </template>
 
 
                <a-col class='col-text' :span='6'>
                  <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                    <a-textarea v-model.lazy='rootItem.gzms'   allow-clear auto-size  @blur='saveData(rootItem,null)'/>
                  </a-form-model-item>
                </a-col>
                <a-col class='col-text' :span='2'>
                  <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                    <a-popover placement='rightTop' title='选择工作进度' trigger='focus'>
                      <template slot='content'>
                        <div class='jd-list'>
                          <div class='jd-item' v-for='(item,index) in jdList ' :key="index+'jdList1'">
                            <a-button
                                       style='margin: 5px'
                                       @click='selectJd(rootItem,index)'
                                       type='dashed'>
                              {{ item }}
                            </a-button>
                          </div>
                        </div>
                      </template>
                      <a-input v-model='rootItem.jdName' class='hide-input-caret' readOnly />
                    </a-popover>
                  </a-form-model-item>
                </a-col>
                <a-col class='col-text' :span='2'>
                  <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                    <a-textarea v-model.lazy='rootItem.xmDeliver'  allow-clear auto-size  @blur='saveData(rootItem,null)'   class='text-ellipsis' />
                  </a-form-model-item>
                </a-col>
 
                <a-col class='col-text' :span='2'>
                  <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                    <a-popover placement='rightTop' title='选择工时' trigger='focus'>
                      <template slot='content'>
                        <div class='gs-list'>
                          <a-button v-for='(item,index) in gsList ' :key="index+'gsList1'"
                                    @click='selectGs(rootItem,index)' style='width: 30%;margin: 5px 0'
                                    type='dashed'>
                            {{ item }}
                          </a-button>
                        </div>
                      </template>
                      <a-input v-model='rootItem.gsName' class='hide-input-caret' readOnly />
                    </a-popover>
                  </a-form-model-item>
                </a-col>
 
 
                <a-col v-if='showAction' class='col-text' :span='2'>
                  <a-form-model-item>
                    <a-popconfirm v-if='rootItem.id' title='确定删除吗?'
                                  @confirm='() => delRowCustom(weekIndex,0,rootIndex)'>
                      <a-icon type='minus-circle' style='fontSize :20px' />
                    </a-popconfirm>
                    <a-icon v-else @click='delRowCustom(weekIndex,0,rootIndex)' type='minus-circle'
                            style='fontSize :20px' />
                  </a-form-model-item>
                </a-col>
              </a-row>
              <div v-if='showAction' style='display: flex;justify-content: center;border-top:1px solid #E9E9E9'>
                <a-button  type='link' style='width: 98%;margin-top: 10px'
                          @click='copyRowCustom(weekIndex,0)'>
                  <a-icon type='copy' />
                  复制上行
                </a-button>
                <a-button  type='link' style='width: 98%;margin-top: 10px'
                           @click='addRowCustom(weekIndex,0)'>
                  <a-icon type='plus' />
                  添加数据
                </a-button>
 
              </div>
              <a-button v-else type='link' style='width: 98%;margin-top: 10px;color:grey'>
                <a-icon style='color: grey' />
 
              </a-button>
            </div>
            <!--本周完成内容end-->
 
 
            <template v-if='week.showDetail'>
 
              <!--本周计划外start-->
              <div class='this-week-box borderLeft3'>
                <span class='this-week-text'>{{ week.typeList[1].name }}</span>
                <span class='this-week-date'>  </span>
              </div>
              <div class='week-form-box'>
                <!-- 主表单区域 -->
                <a-row class='row-title' type='flex' :gutter='16'>
                  <a-col class='col-title' :span='2'></a-col>
                  <a-col class='col-title' :span='2'>类型</a-col>
                  <a-col class='col-title' :span='3'>项目</a-col>
                  <a-col class='col-title' :span='3'>wbs</a-col>
                  <a-col class='col-title' :span='6'>工作描述</a-col>
                  <a-col class='col-title' :span='2'>进度</a-col>
                  <a-col class='col-title' :span='2'>交付物</a-col>
                  <a-col class='col-title' :span='2'>工时(<span style='color: #1890FF'>{{countGs(week.typeList[1].wekList) }}</span>)</a-col>
                  <a-col v-if='showAction' class='col-title' :span='2'>操作</a-col>
                </a-row>
                <a-row class='row-text' type='flex' :gutter='16'
                       v-for='(rootItem, rootIndex) in week.typeList[1].wekList' :key="rootIndex + 'typeList1' ">
                  <a-col class='col-text' :span='2'>
 
                    <div style='text-align: center'>
                    <span :class="{ 'col-no-red': !rootItem.id , 'col-no-green': rootItem.id }"> {{ rootIndex + 1
                      }}</span>
                    </div>
                    <a-input v-model='rootItem.id' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.week' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.year' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.type' class='hide-input-caret' v-show='false' readOnly />
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择类型' trigger='focus'>
                        <template slot='content'>
                          <div class='list-box'>
                            <a-button v-for='(item, index) in subTypeList' @click='selectHelp(rootItem,item)'
                                      :key="index +'subTypeList1'"
                                      style=' text-align: start;margin: 5px 0'
                                      type='dashed'>
                              {{ item.value }}
                            </a-button>
                          </div>
                        </template>
 
                        <a-input v-model='rootItem.subTypeName' class='hide-input-caret text-ellipsis' readOnly />
 
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
                  <!--有两种类型,一种是选择项目,一种是自己填写-->
                  <template v-if='rootItem.subType == 1'>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                          <template slot='content'>
                            <div class='pro-list'>
                              <a-button v-for='(item, index) in filterProList' @click='selectPro(rootItem,item)'
                                        :key="index +'proList1'"
                                        style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ item.xmbh + ' - ' + item.xmmc }}
                              </a-button>
                            </div>
                          </template>
 
                          <a-tooltip placement='topLeft'>
                            <template slot='title'>
                              <span v-if='rootItem.xmName'>{{ rootItem.xmName }}</span>
                            </template>
                            <a-textarea v-model='rootItem.xmName' @focus='filterProFocus'
                                        @blur='filterProBlur(rootItem)' @change='filterProChange($event,rootItem)'
                                        class='text-ellipsis' />
 
                          </a-tooltip>
 
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目WBS' trigger='focus'>
                          <template slot='content'>
                            <div class='pro-link-list'>
                              <a-button v-for='(item, index) in proLinklist' @click='selectProLinkWbs(rootItem,item)'
                                        :key="index+'proLinklist1'" style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ (item.sxh == null ? '' : item.sxh) + ' - ' + (item.xmhj == null ? '' : item.xmhj)
                                }}
                              </a-button>
                            </div>
                          </template>
 
                          <a-tooltip placement='topLeft'>
                            <template slot='title'>
                              <span v-if='rootItem.wbsName'>{{ rootItem.wbsName }}</span>
                            </template>
                            <a-textarea v-model='rootItem.wbsName' @focus='queryProLinkWbs(rootItem.xm)'
                                        class='hide-input-caret text-ellipsis' readOnly />
                          </a-tooltip>
 
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
 
                  </template>
                  <template v-else-if='rootItem.subType == 2'>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                          <template slot='content'>
                            <div class='list-box'>
                              <a-button v-for='(item, index) in extWorkList' @click='selectExtWork(rootItem,item)'
                                        :key="index+'extWorkList1'"
                                        style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ index + 1 + ' - ' + item.text }}
                              </a-button>
                            </div>
                          </template>
                          <a-input v-model='rootItem.extName' class='hide-input-caret' readOnly />
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.wbsName'
                                    class='text-ellipsis' disabled />
                      </a-form-model-item>
                    </a-col>
 
                  </template>
                  <template v-else>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.xmName' class='hide-input-caret text-ellipsis' readOnly />
                      </a-form-model-item>
                    </a-col>
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.wbsName'
                                    class='hide-input-caret text-ellipsis' readOnly />
                      </a-form-model-item>
                    </a-col>
 
                  </template>
 
 
                  <a-col class='col-text' :span='6'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model.lazy='rootItem.gzms' allow-clear auto-size  @blur='saveData(rootItem,null)'/>
                    </a-form-model-item>
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择工作进度' trigger='focus'>
                        <template slot='content'>
                          <div class='jd-list'>
                            <div class='jd-item' v-for='(item,index) in jdList ' :key="index+'jdList2'">
                              <a-button
                                style='margin: 5px'
                                @click='selectJd(rootItem,index)'
                                type='dashed'>
                                {{ item }}
                              </a-button>
                            </div>
                          </div>
                        </template>
                        <a-input v-model='rootItem.jdName' class='hide-input-caret' readOnly />
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model.lazy='rootItem.xmDeliver'  allow-clear auto-size  @blur='saveData(rootItem,null)'  class='text-ellipsis' />
                    </a-form-model-item>
                  </a-col>
 
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择工时' trigger='focus'>
                        <template slot='content'>
                          <div class='gs-list'>
                            <a-button v-for='(item,index) in gsList ' :key="index+'gsList1'"
                                      @click='selectGs(rootItem,index)' style='width: 30%;margin: 5px 0'
                                      type='dashed'>
                              {{ item }}
                            </a-button>
                          </div>
                        </template>
                        <a-input v-model='rootItem.gsName' class='hide-input-caret' readOnly />
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
 
                  <a-col v-if='showAction' class='col-text' :span='2'>
                    <a-form-model-item>
                      <a-popconfirm v-if='rootItem.id' title='确定删除吗?'
                                    @confirm='() => delRowCustom(weekIndex,1,rootIndex)'>
                        <a-icon type='minus-circle' style='fontSize :20px' />
                      </a-popconfirm>
                      <a-icon v-else @click='delRowCustom(weekIndex,1,rootIndex)' type='minus-circle'
                              style='fontSize :20px' />
                    </a-form-model-item>
                  </a-col>
                </a-row>
 
                <div v-if='showAction' style='display: flex;justify-content: center'>
                  <a-button  type='link' style='width: 98%;margin-top: 10px'
                             @click='copyRowCustom(weekIndex,1)'>
                    <a-icon type='copy' />
                    复制上行
                  </a-button>
                  <a-button  type='link' style='width: 98%;margin-top: 10px'
                             @click='addRowCustom(weekIndex,1)'>
                    <a-icon type='plus' />
                    添加数据
                  </a-button>
 
                </div>
 
                <a-button v-else type='link' style='width: 98%;margin-top: 10px;color:grey'>
                  <a-icon style='color: grey' />
 
                </a-button>
              </div>
              <!--本周计划外end-->
 
 
              <!--下周计划start-->
              <div class='this-week-box borderLeft3 paddingTop10'>
                <span class='this-week-text'>{{ week.typeList[2].name }}</span>
                <span class='this-week-date'>{{ week.startDateStr2 }}- {{ week.endDateStr2 }}</span>
              </div>
              <div class='week-form-box'>
                <!-- 主表单区域 -->
                <a-row class='row-title' type='flex' :gutter='16'>
                  <a-col class='col-title' :span='2'></a-col>
                  <a-col class='col-title' :span='2'>类型</a-col>
                  <a-col class='col-title' :span='3'>项目</a-col>
                  <a-col class='col-title' :span='3'>wbs</a-col>
                  <a-col class='col-title' :span='6'>工作描述</a-col>
                  <a-col class='col-title' :span='2'>进度</a-col>
                  <a-col class='col-title' :span='2'>交付物</a-col>
                  <a-col class='col-title' :span='2'>工时(<span style='color: #1890FF'>{{countGs(week.typeList[2].wekList) }}</span>)</a-col>
                  <a-col v-if='showAction' class='col-title' :span='2'>操作</a-col>
                </a-row>
                <a-row class='row-text' type='flex' :gutter='16'
                       v-for='(rootItem, rootIndex) in week.typeList[2].wekList' :key="rootIndex + 'typeList2' ">
                  <a-col class='col-text' :span='2'>
 
                    <div style='text-align: center'>
                    <span :class="{ 'col-no-red': !rootItem.id , 'col-no-green': rootItem.id }"> {{ rootIndex + 1
                      }}</span>
                    </div>
                    <a-input v-model='rootItem.id' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.week' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.year' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.type' class='hide-input-caret' v-show='false' readOnly />
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择类型' trigger='focus'>
                        <template slot='content'>
                          <div class='list-box'>
                            <a-button v-for='(item, index) in subTypeList' @click='selectHelp(rootItem,item)'
                                      :key="index +'subTypeList3'"
                                      style=' text-align: start;margin: 5px 0'
                                      type='dashed'>
                              {{ item.value }}
                            </a-button>
                          </div>
                        </template>
 
                        <a-input v-model='rootItem.subTypeName' class='hide-input-caret text-ellipsis' readOnly />
 
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
                  <!--有两种类型,一种是选择项目,一种是自己填写-->
                  <template v-if='rootItem.subType == 1'>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                          <template slot='content'>
                            <div class='pro-list'>
                              <a-button v-for='(item, index) in filterProList' @click='selectPro(rootItem,item)'
                                        :key="index +'proList3'"
                                        style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ item.xmbh + ' - ' + item.xmmc }}
                              </a-button>
                            </div>
                          </template>
 
                          <a-tooltip placement='topLeft'>
                            <template slot='title'>
                              <span v-if='rootItem.xmName'>{{ rootItem.xmName }}</span>
                            </template>
                            <a-textarea v-model='rootItem.xmName' @focus='filterProFocus'
                                        @blur='filterProBlur(rootItem)' @change='filterProChange($event,rootItem)'
                                        class='text-ellipsis' />
 
                          </a-tooltip>
 
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目WBS' trigger='focus'>
                          <template slot='content'>
                            <div class='pro-link-list'>
                              <a-button v-for='(item, index) in proLinklist' @click='selectProLinkWbs(rootItem,item)'
                                        :key="index+'proLinklist3'" style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ (item.sxh == null ? '' : item.sxh) + ' - ' + (item.xmhj == null ? '' : item.xmhj)
                                }}
                              </a-button>
                            </div>
                          </template>
 
                          <a-tooltip placement='topLeft'>
                            <template slot='title'>
                              <span v-if='rootItem.wbsName'>{{ rootItem.wbsName }}</span>
                            </template>
                            <a-textarea v-model='rootItem.wbsName' @focus='queryProLinkWbs(rootItem.xm)'
                                        class='hide-input-caret text-ellipsis' readOnly />
                          </a-tooltip>
 
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
 
                  </template>
                  <template v-else-if='rootItem.subType == 2'>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                          <template slot='content'>
                            <div class='list-box'>
                              <a-button v-for='(item, index) in extWorkList' @click='selectExtWork(rootItem,item)'
                                        :key="index+'extWorkList3'"
                                        style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ index + 1 + ' - ' + item.text }}
                              </a-button>
                            </div>
                          </template>
                          <a-input v-model='rootItem.extName' class='hide-input-caret' readOnly />
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.wbsName'
                                    class='text-ellipsis' disabled />
                      </a-form-model-item>
                    </a-col>
 
                  </template>
                  <template v-else>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.xmName' class='hide-input-caret text-ellipsis' readOnly />
                      </a-form-model-item>
                    </a-col>
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.wbsName'
                                    class='hide-input-caret text-ellipsis' readOnly />
                      </a-form-model-item>
                    </a-col>
 
                  </template>
 
 
                  <a-col class='col-text' :span='6'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model.lazy='rootItem.gzms' allow-clear auto-size  @blur='saveData(rootItem,null)'/>
                    </a-form-model-item>
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择工作进度' trigger='focus'>
                        <template slot='content'>
                          <div class='jd-list'>
                            <div class='jd-item' v-for='(item,index) in jdList ' :key="index+'jdList3'">
                              <a-button
                                style='margin: 5px'
                                @click='selectJd(rootItem,index)'
                                type='dashed'>
                                {{ item }}
                              </a-button>
                            </div>
                          </div>
                        </template>
                        <a-input v-model='rootItem.jdName' class='hide-input-caret' readOnly />
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model.lazy='rootItem.xmDeliver'  allow-clear auto-size   @blur='saveData(rootItem,null)'    />
                    </a-form-model-item>
                  </a-col>
 
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择工时' trigger='focus'>
                        <template slot='content'>
                          <div class='gs-list'>
                            <a-button v-for='(item,index) in gsList ' :key="index+'gsList3'"
                                      @click='selectGs(rootItem,index)' style='width: 30%;margin: 5px 0'
                                      type='dashed'>
                              {{ item }}
                            </a-button>
                          </div>
                        </template>
                        <a-input v-model='rootItem.gsName' class='hide-input-caret' readOnly />
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
 
                  <a-col v-if='showAction' class='col-text' :span='2'>
                    <a-form-model-item>
                      <a-popconfirm v-if='rootItem.id' title='确定删除吗?'
                                    @confirm='() => delRowCustom(weekIndex,2,rootIndex)'>
                        <a-icon type='minus-circle' style='fontSize :20px' />
                      </a-popconfirm>
                      <a-icon v-else @click='delRowCustom(weekIndex,2,rootIndex)' type='minus-circle'
                              style='fontSize :20px' />
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <div v-if='showAction' style='display: flex;justify-content: center'>
                  <a-button  type='link' style='width: 98%;margin-top: 10px'
                             @click='copyRowCustom(weekIndex,2)'>
                    <a-icon type='copy' />
                    复制上行
                  </a-button>
                  <a-button  type='link' style='width: 98%;margin-top: 10px'
                             @click='addRowCustom(weekIndex,2)'>
                    <a-icon type='plus' />
                    添加数据
                  </a-button>
 
                </div>
                <a-button v-else type='link' style='width: 98%;margin-top: 10px;color:grey'>
                  <a-icon style='color: grey' />
 
                </a-button>
              </div>
              <!--下周计划end-->
 
 
              <!--下周需协调start-->
              <div class='this-week-box borderLeft3'>
                <span class='this-week-text'>{{ week.typeList[3].name }}</span>
                <span class='this-week-date'> </span>
              </div>
              <div class='week-form-box'>
                <!-- 主表单区域 -->
                <a-row class='row-title' type='flex' :gutter='16'>
                  <a-col class='col-title' :span='2'></a-col>
                  <a-col class='col-title' :span='2'>协调类型</a-col>
                  <a-col class='col-title' :span='3'>项目</a-col>
                  <a-col class='col-title' :span='3'>wbs</a-col>
                  <a-col class='col-title' :span='8'>需要协调问题</a-col>
 
 
                  <a-col v-if='showAction' class='col-title' :span='2'>操作</a-col>
                </a-row>
                <a-row class='row-text' type='flex' :gutter='16'
                       v-for='(rootItem, rootIndex) in week.typeList[3].wekList' :key="rootIndex + 'typeList3' ">
 
                  <a-col class='col-text' :span='2'>
                    <div style='text-align: center'>
                    <span :class="{ 'col-no-red': !rootItem.id , 'col-no-green': rootItem.id  }"> {{ rootIndex + 1
                      }}</span>
                    </div>
                    <a-input v-model='rootItem.id' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.week' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.year' class='hide-input-caret' v-show='false' readOnly />
                    <a-input v-model='rootItem.type' class='hide-input-caret' v-show='false' readOnly />
                  </a-col>
                  <a-col class='col-text' :span='2'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-popover placement='rightTop' title='选择协调类型' trigger='focus'>
                        <template slot='content'>
                          <div class='list-box'>
                            <a-button v-for='(item, index) in subTypeList' @click='selectHelp(rootItem,item)'
                                      :key="index +'subTypeList4'"
                                      style=' text-align: start;margin: 5px 0'
                                      type='dashed'>
                              {{ item.value }}
                            </a-button>
                          </div>
                        </template>
 
                        <a-input v-model='rootItem.subTypeName' class='hide-input-caret text-ellipsis' readOnly />
 
                      </a-popover>
                    </a-form-model-item>
                  </a-col>
 
                  <!--下周需协调有两种类型,一种是选择项目,一种是自己填写-->
                  <template v-if='rootItem.subType == 1'>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                          <template slot='content'>
                            <div class='pro-list'>
                              <a-button v-for='(item, index) in filterProList' @click='selectPro(rootItem,item)'
                                        :key="index +'proList4'"
                                        style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ item.xmbh + ' - ' + item.xmmc }}
                              </a-button>
                            </div>
                          </template>
 
                          <a-tooltip placement='topLeft'>
                            <template slot='title'>
                              <span v-if='rootItem.xmName'>{{ rootItem.xmName }}</span>
                            </template>
                            <a-textarea v-model='rootItem.xmName' @focus='filterProFocus'
                                        @blur='filterProBlur(rootItem)' @change='filterProChange($event,rootItem)'
                                        class='text-ellipsis' />
 
                          </a-tooltip>
 
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目WBS' trigger='focus'>
                          <template slot='content'>
                            <div class='pro-link-list'>
                              <a-button v-for='(item, index) in proLinklist' @click='selectProLinkWbs(rootItem,item)'
                                        :key="index+'proLinklist4'" style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ (item.sxh == null ? '' : item.sxh) + ' - ' + (item.xmhj == null ? '' : item.xmhj)
                                }}
                              </a-button>
                            </div>
                          </template>
 
                          <a-tooltip placement='topLeft'>
                            <template slot='title'>
                              <span v-if='rootItem.wbsName'>{{ rootItem.wbsName }}</span>
                            </template>
                            <a-textarea v-model='rootItem.wbsName' @focus='queryProLinkWbs(rootItem.xm)'
                                        class='hide-input-caret text-ellipsis' readOnly />
                          </a-tooltip>
 
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
 
                  </template>
                  <template v-else-if='rootItem.subType == 2'>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-popover placement='rightTop' title='选择项目' trigger='focus'>
                          <template slot='content'>
                            <div class='list-box'>
                              <a-button v-for='(item, index) in extWorkList' @click='selectExtWork(rootItem,item)'
                                        :key="index+'extWorkList4'"
                                        style=' text-align: start;margin: 5px 0'
                                        type='dashed'>
                                {{ index + 1 + ' - ' + item.text }}
                              </a-button>
                            </div>
                          </template>
                          <a-input v-model='rootItem.extName' class='hide-input-caret' readOnly />
                        </a-popover>
                      </a-form-model-item>
                    </a-col>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.wbsName'
                                    class='text-ellipsis' disabled />
                      </a-form-model-item>
                    </a-col>
 
                  </template>
                  <template v-else>
 
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.xmName' class='hide-input-caret text-ellipsis' readOnly />
                      </a-form-model-item>
                    </a-col>
                    <a-col class='col-text' :span='3'>
                      <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                        <a-textarea v-model='rootItem.wbsName'
                                    class='hide-input-caret text-ellipsis' readOnly />
                      </a-form-model-item>
                    </a-col>
 
                  </template>
 
                  <a-col class='col-text' :span='8'>
                    <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol'>
                      <a-textarea v-model.lazy='rootItem.gzms' allow-clear auto-size @blur='saveData(rootItem,null)'/>
                    </a-form-model-item>
                  </a-col>
                  <a-col v-if='showAction' class='col-text' :span='2'>
                    <a-form-model-item>
                      <a-popconfirm v-if='rootItem.id' title='确定删除吗?'
                                    @confirm='() => delRowCustom(weekIndex,3,rootIndex)'>
                        <a-icon type='minus-circle' style='fontSize :20px' />
                      </a-popconfirm>
                      <a-icon v-else @click='delRowCustom(weekIndex,3,rootIndex)' type='minus-circle'
                              style='fontSize :20px' />
                    </a-form-model-item>
                  </a-col>
 
 
                </a-row>
                <div v-if='showAction' style='display: flex;justify-content: center'>
                  <a-button  type='link' style='width: 98%;margin-top: 10px'
                             @click='copyRowCustom(weekIndex,3)'>
                    <a-icon type='copy' />
                    复制上行
                  </a-button>
                  <a-button  type='link' style='width: 98%;margin-top: 10px'
                             @click='addRowCustom(weekIndex,3)'>
                    <a-icon type='plus' />
                    添加数据
                  </a-button>
 
                </div>
                <a-button v-else type='link' style='width: 98%;margin-top: 10px;color:grey'>
                  <a-icon style='color: grey' />
 
                </a-button>
              </div>
              <!--下周需协调end-->
 
              <template v-if='week.wekEvaluate.showEvaluate'>
              <!--周绩效评价start-->
              <div class='this-week-box borderLeft3'>
                <span class='this-week-text'>周绩效评价</span>
                <span class='this-week-date'></span>
              </div>
              <div class='week-form-box'>
                <!-- 主表单区域 -->
                <a-row class='row-title' type='flex' :gutter='16'>
                  <a-col class='col-title bold' :span='3'>考核项目</a-col>
                  <a-col class='col-title bold' :span='15'>评价标准</a-col>
                  <a-col class='col-title bold' :span='3'>自评等级</a-col>
                  <a-col class='col-title bold' :span='3'>考评等级</a-col>
                </a-row>
 
                <a-row class='row-text' style='background-color: white' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class='bold'>
                      计划与汇报(20分)
                    </div>
                  </a-col>
                  <a-col class='col-text' :span='15'>
                    <div class='preline border-r-t bold'>
                      A:制定下周计划并主动沟通后,目标明确计划合理;及时向直接主管汇报工作进展,能够清晰体现工作进展;
                      B:下周工作计划目标明确,安排合理;能主动向直接主管汇报工作,周报记录清晰明确;
                      C: 下周工作计划目标基本明确,能把握到重点业务, 安排基本合理;工作结果间断汇报,周报记录基本明确;
                      D:下周工作计划目标不明确,不能把握到重点业务;主管问起才进行工作结果汇报,周报记录模糊;
                      E:下周工作计划目标不明确,重点业务未做安排;对于工作结果汇报沟通情况基本无,周报记录较差。
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.zpPlan'  placeholder="请选择自评等级" :disabled='zpDisabled'  @change='selectEvaluate(1, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.kpPlan'  placeholder="请选择考评等级" :disabled='kpDisabled' @change='selectEvaluate(2, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                </a-row>
 
                <a-row class='row-text' style='background-color: white' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t'  :span='3'>
                    <div class='bold'>
                      工作完成量(20分)
                    </div>
                  </a-col>
                  <a-col class='col-text' :span='15'>
                    <div class='preline border-r-t bold'>
                      A:工作难度较大,一周工作时间达到125%,处于超负荷工作状态;
                      B:工作难度一般,一周工作时间达到110%,在职责内工作完成的前提下,能主动承担部分职责外工作;
                      C:工作难度一般,工作量集中为职责内工作,工作完成符合要求;
                      D:工作难度不大,工作涉及点单一,工作量较小,职责内工作(无特殊情况)完成不好;
                      E:工作涉及面单一,工作量小,工作中空暇时间较多。
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.zpAmount' placeholder="请选择自评等级" :disabled='zpDisabled' @change='selectEvaluate(1, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.kpAmount'  placeholder="请选择考评等级" :disabled='kpDisabled' @change='selectEvaluate(2, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                </a-row>
                <a-row class='row-text' style='background-color: white' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class='bold'>
                      工作完成效率(20分)
                    </div>
                  </a-col>
                  <a-col class='col-text' :span='15'>
                    <div class='preline border-r-t bold'>
                      A:工作效率远超预期,优先级清晰合理,能够快速完成工作;
                      B:工作效率较高,重要紧急工作能够主动推动,并按时完成工作;
                      C:工作效率正常,重要紧急工作能够正常推动,基本能够按时完成工作;
                      D:工作效率较低,重要紧急工作需要多次督促才能够完成;
                      E:工作不分主次,  效率低,经常完不成任务。
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.zpEffe'  placeholder="请选择自评等级" :disabled='zpDisabled' @change='selectEvaluate(1, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.kpEffe'  placeholder="请选择考评等级" :disabled='kpDisabled' @change='selectEvaluate(2, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                </a-row>
                <a-row class='row-text' style='background-color: white' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class='bold'>
                      工作完成质量(40分)
                    </div>
                  </a-col>
                  <a-col class='col-text' :span='15'>
                    <div class='preline border-r-t bold'>
                      A:有突出的价值贡献,交付物完成质量超出要求,有明显的创新和优化;工作积极主动,有很好的团队配合与高效沟通;
                      B:有较高的价值贡献,交付物完成质量达到或部分超出预期,有创新性;工作积极主动,关注团队配合与沟通;
                      C:价值贡献与岗位等级匹配,交付物完成质量一般,工作主动性一般,有团队配合与沟通意识 ;
                      D:交付物完成质量差,格式不符合要求;工作主动性差,缺乏团队配合与沟通;
                      E:价值贡献严重低于岗位等级,交付物无,工作状态差。
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.zpQuality'  placeholder="请选择自评等级" :disabled='zpDisabled' @change='selectEvaluate(1, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <a-select v-model='week.wekEvaluate.kpQuality'  placeholder="请选择考评等级" :disabled='kpDisabled' @change='selectEvaluate(2, week,week.wekEvaluate)'>
                      <a-select-option value="A">A</a-select-option>
                      <a-select-option value="B">B</a-select-option>
                      <a-select-option value="C">C</a-select-option>
                      <a-select-option value="D">D</a-select-option>
                      <a-select-option value="E">E</a-select-option>
                    </a-select>
                  </a-col>
                </a-row>
 
                <a-row class='row-text' style='background-color: white' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class=''>
                      主管评价
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='21'>
                    <div style='width: 100%'>
                      <a-textarea  @blur='selectEvaluate(2,week,week.wekEvaluate)' v-model='week.wekEvaluate.kpEvaluate' :disabled='kpDisabled' style='width: 100%;font-weight: bold;color: #7e7e7e'  placeholder="请输入评价"
                                  class='text-ellipsis' />
                    </div>
                  </a-col>
                </a-row>
 
                <a-row class='row-text' style='background-color: white' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class=''>
                      领导附加分
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='5'>
                    <div style='width: 100%'>
                      <a-input  @blur='selectEvaluate(2,week,week.wekEvaluate)' v-model='week.wekEvaluate.kpExtScore' :disabled='kpDisabled' style='width: 100%;font-weight: bold;color: #7e7e7e'  placeholder="请输入附加分"
                                   class='text-ellipsis' />
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class=''>
                      附加分说明
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='13'>
                    <div style='width: 100%'>
                      <a-textarea  @blur='selectEvaluate(2,week,week.wekEvaluate)' v-model='week.wekEvaluate.kpExtDesc' :disabled='kpDisabled' style='width: 100%;font-weight: bold;color: #7e7e7e'  placeholder="请输入附加分说明"
                                   class='text-ellipsis' />
                    </div>
                  </a-col>
                </a-row>
 
 
                <a-row class='row-text' style='background-color: white;height: 45px' type='flex' :gutter='16'>
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div class=''>
                      自评时间
                    </div>
                  </a-col>
                  <a-col class='col-text tcenter border-r-t' :span='5'>
                    <div style='width: 100%'>
                      {{ week.wekEvaluate.zpDate}}
                    </div>
                  </a-col>
 
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div style='width: 100%'>
                      考评人:
                    </div>
                  </a-col>
 
                  <a-col class='col-text tcenter border-r-t' :span='5'>
                    <div style='width: 100%'>
                      {{ week.wekEvaluate.kpName }}
                    </div>
                  </a-col>
 
                  <a-col class='col-text tcenter border-r-t' :span='3'>
                    <div style='width: 100%'>
                      考评时间:
                    </div>
                  </a-col>
 
                  <a-col class='col-text tcenter border-r-t' :span='5'>
                    <div style='width: 100%'>
                      {{ week.wekEvaluate.kpDate}}
                    </div>
                  </a-col>
 
                </a-row>
 
 
              </div>
              <!--周绩效评价end-->
              </template>
 
 
            </template>
            <a-button type='link' @click='showDetail(week)' :key="week.id+'showDetail'">
              {{ week.showDetail ? '收起' : '展开' }}
            </a-button>
 
            <a-button type='link' @click='showEvaluate(week)' :key="week.id+'showEvaluate'">
              {{ week.wekEvaluate.showEvaluate ? '收起周绩效' : '展开周绩效' }}
            </a-button>
          </div>
          <!--一周周报内容end-->
        </div>
      </a-list-item>
    </a-list>
  </a-form-model>
</template>
 
<script>
import { filterMultiDictText, initDictOptions } from '@comp/dict/JDictSelectUtil'
import { queryLinkListWbs, queryProList } from '@api/pro'
import { deleteAction, getAction, getFileAccessHttpUrl } from '@api/manage'
import { getWeek, triggerWindowResizeEvent } from '@/utils/util'
import get from 'lodash.get'
import { ulid } from 'ulid'
import { mapGetters } from 'vuex'
import moment from 'moment'
 
 
export default {
  name: 'WeeklyListCompent',
  props: {
    //数据
    model: {
      type: Object,
      default: {},
      required: true
    },
    //是否显示加载下周按钮
    showLoadModel: {
      type: Boolean,
      default: false,
      required: true
    },
    //数据加载状态
    loadingMore: {
      type: Boolean,
      default: false,
      required: true
    },
    //是否显示操作区域
    showAction: {
      type: Boolean,
      default: false
    },
    //自评是否可以点击
    zpDisabled: {
      type: Boolean,
      default: true,
      required: false
    },
    kpDisabled: {
      type: Boolean,
      default: true,
      required: false
    },
  },
  mounted() {
 
  },
  data() {
    return {
      moment,
      //是否显示加载更多模块
      showLoadingMore: true,
 
      labelCol: {
        xs: { span: 0 },
        sm: { span: 0 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 24 }
      },
      validatorRules: {},
      //项目列表
      proList: [],
      filterProList: [],
      //
      subTypeList: [
        {
          id: 1,
          value: '项目相关'
        },
        {
          id: 2,
          value: '其他事项'
        }
      ],
      //本周其他工作
      extWorkList: [],
      //项目缓存所有的wbs (缓存为map形式,键为项目id,值为项目的子任务列表)
      proLinkWbs: {},
      //当前项目的子任务列表wbs
      proLinklist: [],
      //用户字典信息
      userDictOptions: [],
      url: {
        delete: '/wek/record/delete',
        exportUrl: '/wek/record/exportAweekly'
      },
      weekDays: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
      jdList: ['10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%','完成'],
      gsList: ['1小时', '2小时', '3小时', '4小时', '5小时', '6小时', '7小时', '8小时', '9小时', '10小时', '11小时', '12小时', '13小时', '14小时', '15小时', '16小时', '24小时', '32小时', '40小时'],
      jdValues: [10, 20, 30, 40, 50, 60, 70, 80, 90,100,1000],
      gsValues: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16, 24, 32, 40]
    }
  },
  created() {
    this.queryProjectList()
    this.queryWeekExtWork()
    this.initDictConfig()
  },
  methods: {
    ...mapGetters(["username","nickname", "avatar"]),
    countGs(data){
      const sum = data.filter(item=>item.gs).reduce((accumulator, currentValue) => {
        return accumulator + Number(currentValue.gs);
      }, 0);
      return sum
    },
    saveData(item,evaluate){
      console.info(item)
      console.info(evaluate)
      if(this.zpDisabled){
        this.$emit("submit",null,evaluate)
      }else {
        this.$emit("submit",item,evaluate)
      }
 
      this.$forceUpdate()
    },
 
 
    filterProChange(e, rootItem) {
 
      rootItem.ext = null
      rootItem.extName = null
      rootItem.wbs = null
      rootItem.wbsName = null
 
      const word = e.target.value
      this.filterProList = this.proList.filter(item => item.xmbh.indexOf(word) != -1 || item.xmmc.indexOf(word) != -1)
 
    },
    filterProFocus() {
      this.filterProList = this.proList
    },
    filterProBlur(rootItem) {
      //假如不是选择的项目,项目名清空
      if (!rootItem.xm) {
        rootItem.xmName = null
      }
    },
 
    uploadAttach(rootIndex) {
 
      // console.info(this.$refs.upload[rootIndex].$el.children[1].children[0].children[0].children[0]  )
      // this.$refs.upload[rootIndex].$el.children[1].children[0].children[0].children[0].click()
    },
    onLoadMore() {
      this.$emit('onLoadMore')
    },
    reload() {
      this.$emit('reload')
    },
    /**
     * id 数据id
     * weekIndex 周索引
     * type 周内数据类型
     * recordIndex 周内数据类型索引
     * */
    deleteItem(id, weekIndex, type, recordIndex) {
      deleteAction(this.url.delete, {
        id: id
      }).then((res) => {
        if (res.success) {
          this.$message.success(res.message)
          // this.reload();
          //删除成功后更新视图数据
          this.delRowItemView(weekIndex, type, recordIndex)
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
      })
    },
    copyRowCustom(weekIndex, type) {
      let week = this.model.weekList[weekIndex].week
      let year = this.model.weekList[weekIndex].year
      if (!week || !year) {
        this.$message.error('数据异常,请重试或联系管理员!')
        return false
      }
      const length = this.model.weekList[weekIndex].typeList[type].wekList.length
      if(length>0){
        const last =  this.model.weekList[weekIndex].typeList[type].wekList[length-1]
        // console.info( this.model.weekList[weekIndex].typeList[type].wekList)
        // console.info(last)
        const copy = Object.assign({}, last, { id: ulid() });
        this.model.weekList[weekIndex].typeList[type].wekList.push(copy)
        this.$forceUpdate()
      }else {
        this.$message.info("请至少添加一条数据~")
      }
    },
    addRowCustom(weekIndex, type) {
      let week = this.model.weekList[weekIndex].week
      let year = this.model.weekList[weekIndex].year
      if (!week || !year) {
        this.$message.error('数据异常,请重试或联系管理员!')
        return false
      }
      const id = ulid();
      this.model.weekList[weekIndex].typeList[type].wekList.push({ id:id,type: type, week: week, year: year })
 
      this.$forceUpdate()
    },
    delRowCustom(weekIndex, type, recordIndex) {
      let id = this.model.weekList[weekIndex].typeList[type].wekList[recordIndex].id
      if (id) {
        this.deleteItem(id, weekIndex, type, recordIndex)
      } else {
        this.model.weekList[weekIndex].typeList[type].wekList.splice(recordIndex, 1)
      }
      this.$forceUpdate()
    },
    delRowItemView(weekIndex, type, recordIndex) {
      this.model.weekList[weekIndex].typeList[type].wekList.splice(recordIndex, 1)
      this.$forceUpdate()
    },
    getThisWeek(week) {
      const thisweek = getWeek().weekNo
      if (week.week == thisweek) {
        return '(本周)'
      }
      return   week.weekInMonth ?  '('+ week.weekInMonth +')' : ''
 
    },
 
    //查询其他事项列表
    queryWeekExtWork() {
      initDictOptions('week_ext_work').then((res) => {
        if (res.success) {
          this.extWorkList = res.result
        }
      })
    },
    //查询项目列表
    queryProjectList() {
      if (this.proList.length > 0) {
        return false
      }
      //根据项目id查询项目信息
      queryProList({ pageNo: 1, pageSize: 1000 }).then((res) => {
        if (res.success) {
          this.proList = res.result.records || []
          this.proList.sort((a, b) => b.sortNo - a.sortNo)
        }
      })
    },
    //查询项目子任务(wbs)
    queryProLinkWbs(pro) {
      //清空项目子任务列表
      this.proLinklist = []
      if (!pro) {
        //this.$message.error('请先选择项目')
        return false
      }
 
      if (this.proLinkWbs[pro]) {
        this.proLinklist = this.proLinkWbs[pro]
        return false
      }
 
      queryLinkListWbs({ pro: pro }).then((res) => {
        if (res.success) {
          this.proLinkWbs[pro] = res.result
          this.proLinklist = res.result
        }
      })
    },
    /**
     *选择星期几
     * @param rootItem   当前编辑数据
     * @param xqIndex     选择星期几索引
     */
    selectWeekDay(rootItem, xqIndex) {
      rootItem.xq = xqIndex
      rootItem.xqName = this.weekDays[xqIndex]
      this.$forceUpdate()
    },
    /**
     * 选择协调类型
     * @param rootItem  当前编辑数据
     * @param item    项目
     */
    selectHelp(rootItem, item) {
      rootItem.subType = item.id
      if (rootItem.subType == 2) {
        rootItem.wbs = null
        rootItem.wbsName = ''
      }
      rootItem.subTypeName = item.value
      this.saveData(rootItem,null)
 
    },
    /**
     * 选择项目
     * @param rootItem  当前编辑数据
     * @param item    项目
     */
    selectPro(rootItem, item) {
      rootItem.xm = item.id
      rootItem.xmName = item.xmmc
      rootItem.ext = null
      rootItem.extName = null
      rootItem.wbs = null
      rootItem.wbsName = null
      //选择项目后预加载项目子任务数据
      this.queryProLinkWbs(item.id)
      this.saveData(rootItem,null)
 
    },
    /**
     * 选择本周其他工作
     * @param rootItem  当前编辑数据
     * @param item    项目
     */
    selectExtWork(rootItem, item) {
      rootItem.ext = item.value
      rootItem.extName = item.text
      rootItem.xm = null
      rootItem.xmName = null
 
      this.saveData(rootItem,null)
 
    },
    /**
     * 选择项目wbs
     * @param rootItem
     * @param item
     */
    selectProLinkWbs(rootItem, item) {
      rootItem.wbs = item.id
      rootItem.wbsName = item.sxh + item.xmhj
      this.saveData(rootItem,null)
    },
    /**
     * 选择项目进度
     * @param rootItem
     * @param jdIndex
     */
    selectJd(rootItem, jdIndex) {
      rootItem.jd = this.jdValues[jdIndex]
      rootItem.jdName = this.jdList[jdIndex]
      this.saveData(rootItem,null)
    },
 
    /**
     * 选择项目工时
     * @param rootItem
     * @param gsIndex
     */
    selectGs(rootItem, gsIndex) {
      rootItem.gs = this.gsValues[gsIndex]
      rootItem.gsName = this.gsList[gsIndex]
      this.saveData(rootItem,null)
    },
    /**
     * 是否展开详情
     **/
    showDetail(week) {
      week.showDetail = !week.showDetail
    },
    showEvaluate(week){
      if(!week.showDetail){
        this.$message.warning('请先点击左侧展开!')
        return false
      }
      week.wekEvaluate.showEvaluate = !week.wekEvaluate.showEvaluate
 
    },
    selectEvaluate(type,week,evaluate){
      if(!week.username){
        this.$message.error('请先填写周报后刷新重试!')
        return false;
      }
      if(!evaluate.id){
        evaluate.id = week.username + (week.year * 100 + week.week)
      }
      evaluate.year = week.year
      evaluate.week = week.week
      evaluate.yearWeek = (week.year * 100 + week.week)
      if(type == 1){
        evaluate.zpDate =  moment().format('YYYY-MM-DD HH:mm:ss');
        evaluate.zp = this.username()
        evaluate.zpName =this.nickname()
        if(!evaluate.zp){
          this.$message.error('登录状态异常,请刷新界面或重新登录!')
          return false;
        }
      }else if(type == 2){
        evaluate.kpDate = moment().format('YYYY-MM-DD HH:mm:ss');
        evaluate.kp = this.username()
        evaluate.kpName =this.nickname()
        if(!evaluate.kp){
          this.$message.error('登录状态异常,请刷新界面或重新登录!')
          return false;
        }
 
      }
      this.saveData(null,evaluate)
 
    },
    /**
     * 本周视图是否展开
     * @param weekItem
     */
    showWeekItem(weekItem) {
      weekItem.show = !weekItem.show
    },
    initDictConfig() {
      //初始化字典 - 性别
      initDictOptions('sys_user,realname,username').then((res) => {
        if (res.success) {
          this.$set(this.userDictOptions, 'username', res.result)
        }
      })
 
    },
    getDictText(text) {
      return filterMultiDictText(this.userDictOptions['username'], text)
    },
    //导出
    exportXls(week) {
      let params = {}
      params.week = week.week
      params.year = week.year
      params.user = week.username
      getAction(this.url.exportUrl, params).then((res) => {
        if (res.success) {
          const size = get(res, 'result.size') || 0
          this.openNotification('success', '查询到' + size + '条数据,正在导出文件!')
          this.downloadFile(res.result.filePath)
        } else {
          this.openNotification('error', res.message)
        }
      }).finally(() => {
 
 
      })
 
    },
    //提示
    openNotification(type, message) {
      this.$notification[type]({
        message: '提示',
        description:
        message,
        duration: 5
      })
    },
 
    /**
     * 获取文件服务访问路径
     * @param avatar
     * @param subStr
     * @returns {*}
     */
    getFileAccessHttpUrl(avatar, subStr) {
      if (!subStr) subStr = 'http'
      try {
        if (avatar && avatar.startsWith(subStr)) {
          return avatar
        } else {
          if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) {
            return window._CONFIG['staticDomainURL'] + '/' + avatar
          }
        }
      } catch (err) {
        return
      }
    },
    downloadFile(text) {
      if (!text) {
        this.$message.warning('未知的文件')
        return
      }
      if (text.indexOf(',') > 0) {
        text = text.substring(0, text.indexOf(','))
      }
      let url = getFileAccessHttpUrl(text)
      window.open(url, '_self')
    }
 
 
  },
  computed: {
    getDate() {
      return 'weekly/' + new Date().Format('yyyyMMdd')
    }
  }
}
</script>
 
<style lang='less' scoped>
.head-week {
  padding-left: 10px;
  position: relative;
  overflow: hidden;
 
  .head-week-title {
    display: inline-block;
    color: #fe7300;
    font-size: 26px;
    font-weight: bold;
    padding-top: 30px;
  }
 
  .head-week-icon-up {
    height: 15px;
    line-height: 15px;
    background: url(~@assets/weekly/icon_top.png) no-repeat;
    cursor: pointer;
    width: 15px;
    margin-left: 10px;
    display: inline;
    padding: 0px 10px;
  }
 
  .head-week-icon-down {
    height: 15px;
    line-height: 15px;
    background: url(~@assets/weekly/icon_down.png) no-repeat;
    cursor: pointer;
    width: 15px;
    margin-left: 10px;
    display: inline;
    padding: 0px 10px;
  }
}
 
.this-week-box {
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 10px;
 
  .this-week-text {
    color: #fe7300;
    font-weight: bold;
  }
 
  .this-week-date {
    margin-left: 10px;
  }
}
 
.week-form-box {
  border: 2px solid #cdcdcd;
  border-left: 3px solid #cdcdcd;
  box-shadow: 4px 4px 4px #dad8d8;
  overflow: hidden;
 
  .row-title {
    margin: 0;
    padding: 0;
    background: #F5F5F5;
    height: 40px;
 
    .col-title {
      padding: 0 !important;
      text-align: center;
      line-height: 40px;
      color: #7e7e7e;
      border-right: 1px solid #e9e9e9;
    }
 
  }
 
 
 
  .row-text {
    margin: 0;
    padding: 0;
 
    .col-text {
      padding: 0 !important;
      text-align: center;
      color: #7e7e7e;
      border-right: 1px solid #e9e9e9;
 
      .col-no-red {
        cursor: pointer;
        display: block;
        margin: 5px 5px 5px 10px;
        height: 30px;
        line-height: 30px;
        border-left: 3px solid red;
      }
 
      .col-no-green {
        display: block;
        margin: 5px 5px 5px 10px;
        height: 30px;
        line-height: 30px;
        border-left: 3px solid green;
      }
    }
 
  }
 
  .row-text:nth-child(odd) {
    background: #FFFFFF;
  }
 
  .row-text:nth-child(odd) {
    background: #F5F5F5;
  }
 
  .row-text:hover {
    background: #FCEEE5;
  }
}
 
//custom
 
 
.list-box {
  max-height: 400px;
  overflow: auto;
  display: flex;
  width: 280px;
  height: 100%;
  flex-direction: column;
}
 
.pro-list {
  max-height: 400px;
  overflow: auto;
  display: flex;
  width: 320px;
  height: 100%;
  flex-direction: column;
}
 
.pro-link-list {
  max-height: 400px;
  overflow: auto;
  display: flex;
  width: 340px;
  height: 100%;
  flex-direction: column;
}
 
.jd-list {
  display: flex;
  width: 240px;
  height: 100%;
  flex-direction: row;
  flex-wrap: wrap;
  .jd-item {
    width: 33.3%;
    text-align: center;
 
  }
}
 
.gs-list {
  display: flex;
  width: 240px;
  height: 100%;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap
}
 
.borderLeft3 {
  border-left: 3px solid #cdcdcd;
}
 
.marginTop5 {
  margin-top: 5px;
}
 
.paddingTop10 {
  padding: 10px 10px !important;
}
 
.fontsize12 {
  font-size: 12px;
}
 
.hide-input-caret {
  caret-color: transparent;
 
}
 
.text-ellipsis {
  //display: inline-block; //这个看情况加
  //overflow: hidden; //必须
  //white-space: nowrap; //必须
  //text-overflow: ellipsis; //必须
}
.tcenter{
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.bold{
  font-weight: bold;
}
 
 
.preline{
  text-align: left;
  white-space: pre-line;
  padding:0 10px 10px 10px;
 
}
 
.border-r-t{
  border-right: 1px solid #e9e9e9;
  border-bottom: 1px solid #e9e9e9;
}
 
.upload-attach:hover {
  cursor: pointer;
  color: #1A90FF;
}
 
 
/**input start**/
/deep/ .ant-input {
  width: 100%;
  padding: 0px 5px;
  border: 1px solid transparent;
  background: transparent;
  outline: none;
  margin: 0;
  border-radius: 0;
 
 
}
 
/deep/ .ant-form-item {
  margin-bottom: 0;
}
 
/deep/ .ant-form-item-children {
  display: inline-block;
  width: 100%;
  height: 40px;
 
}
 
/deep/ .ant-input-affix-wrapper {
  top: 4px;
}
 
/deep/ .ant-form-item-children input {
  border: none;
  background: transparent;
  outline: none;
  -webkit-box-shadow: none;
}
 
/deep/ textarea.ant-input {
  min-height: 32px;
  padding: 0 5px;
}
 
/deep/ textarea.ant-input:focus {
  border: 1px solid #7eadd9;
  background: transparent;
  outline: none;
  -webkit-box-shadow: none;
}
 
/deep/ .ant-form-item-children input:focus {
  border: 1px solid #7eadd9;
  background: transparent;
  outline: none;
  -webkit-box-shadow: none;
 
}
 
/**input end**/
 
/**select start**/
/deep/ .ant-select-selection {
  border: none;
  background-color: transparent;
 
}
 
/deep/ .ant-select-arrow .ant-select-arrow-icon {
  display: none;
}
 
/**select end**/
 
/*清除list分割线  start*/
/deep/ .ant-list-split .ant-list-item {
  border: none;
}
 
/deep/ .ant-list-something-after-last-item .ant-spin-container > .ant-list-items > .ant-list-item:last-child {
  border: none;
}
 
/*清除list分割线  end*/
 
/*调整empty view 位置  start*/
/deep/ .ant-empty-normal .ant-empty-image {
  margin-top: 150px;
}
 
/****上传按钮**/
/deep/ .ant-upload.ant-upload-select {
 
}
</style>