You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2519 lines
108 KiB

  1. <template>
  2. <div>
  3. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  4. <el-form-item :label="'BU'">
  5. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
  6. <el-option
  7. v-for = "i in userBuList"
  8. :key = "i.buNo"
  9. :label = "i.buDesc"
  10. :value = "i.buDesc">
  11. </el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item :label="'项目编码'">
  15. <el-input v-model="searchData.projectNo" style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'项目名称'">
  18. <el-input v-model="searchData.projectDesc" style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'项目料号'">
  21. <el-input v-model="searchData.testPartNo" style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'料号描述'">
  24. <el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
  25. </el-form-item>
  26. <el-form-item :label="'客户编码'">
  27. <el-input v-model="searchData.customerNo" style="width: 120px"></el-input>
  28. </el-form-item>
  29. <el-form-item :label="'客户名称'">
  30. <el-input v-model="searchData.customerDesc" style="width: 120px"></el-input>
  31. </el-form-item>
  32. <el-form-item :label="'项目分类'">
  33. <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
  34. <el-option
  35. v-for = "i in projectCategoryList"
  36. :key = "i.projectCategory"
  37. :label = "i.projectCategory"
  38. :value = "i.projectCategory">
  39. </el-option>
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item :label="'项目状态'">
  43. <el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">
  44. <el-option
  45. v-for = "i in statusList"
  46. :key = "i.status"
  47. :label = "i.status"
  48. :value = "i.status">
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item :label="'PM/Sales'">
  53. <el-select v-model="searchData.projectManager" placeholder="请选择" clearable style="width: 130px">
  54. <el-option
  55. v-for = "i in projectManagersList"
  56. :key = "i.projectManagerId"
  57. :label = "i.projectManagerName"
  58. :value = "i.projectManager">
  59. </el-option>
  60. </el-select>
  61. </el-form-item>
  62. <el-form-item :label="'PjM'">
  63. <el-select v-model="searchData.projectOwner" placeholder="请选择" clearable style="width: 130px">
  64. <el-option
  65. v-for = "i in projectOwnersList"
  66. :key = "i.projectOwnerId"
  67. :label = "i.projectOwnerName"
  68. :value = "i.projectOwner">
  69. </el-option>
  70. </el-select>
  71. </el-form-item>
  72. <el-form-item :label="'Engineer'">
  73. <el-select v-model="searchData.engineer" placeholder="请选择" clearable style="width: 130px">
  74. <el-option
  75. v-for = "i in engineersList"
  76. :key = "i.engineerId"
  77. :label = "i.engineerName"
  78. :value = "i.engineer">
  79. </el-option>
  80. </el-select>
  81. </el-form-item>
  82. <el-form-item :label="'文档负责人'">
  83. <el-select v-model="searchData.projectLeader" placeholder="请选择" clearable style="width: 130px">
  84. <el-option
  85. v-for = "i in projectProjectLeadersList"
  86. :key = "i.projectLeaderId"
  87. :label = "i.projectLeader"
  88. :value = "i.projectLeader">
  89. </el-option>
  90. </el-select>
  91. </el-form-item>
  92. <el-form-item :label="'是否上传'">
  93. <el-select filterable v-model="searchData.uploadedFlag" style="width: 130px">
  94. <el-option label="全部" value=""></el-option>
  95. <el-option label="否" value="N"></el-option>
  96. <el-option label="是" value="Y"></el-option>
  97. </el-select>
  98. </el-form-item>
  99. <el-form-item :label="'ERP正式料号'">
  100. <el-select v-model="searchData.finalPartNo" placeholder="请选择" clearable style="width: 130px">
  101. <el-option
  102. v-for = "i in finalPartNosList"
  103. :key = "i.finalPartNoId"
  104. :label = "i.finalPartNo"
  105. :value = "i.finalPartNo">
  106. </el-option>
  107. </el-select>
  108. </el-form-item>
  109. <el-form-item :label="'转量产日期:'">
  110. <el-date-picker
  111. style="width: 120px"
  112. v-model="searchData.massProductionStartDate"
  113. type="date"
  114. value-format="yyyy-MM-dd"
  115. placeholder="选择日期">
  116. </el-date-picker>
  117. -
  118. <el-date-picker
  119. style="width: 120px"
  120. v-model="searchData.massProductionEndDate"
  121. type="date"
  122. value-format="yyyy-MM-dd"
  123. placeholder="选择日期">
  124. </el-date-picker>
  125. </el-form-item>
  126. <el-form-item :label="'立项日期:'">
  127. <el-date-picker
  128. style="width: 120px"
  129. v-model="searchData.startDate"
  130. type="date"
  131. value-format="yyyy-MM-dd"
  132. placeholder="选择日期">
  133. </el-date-picker>
  134. -
  135. <el-date-picker
  136. style="width: 120px"
  137. v-model="searchData.endDate"
  138. type="date"
  139. value-format="yyyy-MM-dd"
  140. placeholder="选择日期">
  141. </el-date-picker>
  142. </el-form-item>
  143. <!-- <el-form-item :label="'在用'">-->
  144. <!-- <el-select filterable v-model="searchData.active" style="width: 130px">-->
  145. <!-- <el-option label="全部" value=""></el-option>-->
  146. <!-- <el-option label="是" value="Y"></el-option>-->
  147. <!-- <el-option label="否" value="N"></el-option>-->
  148. <!-- </el-select>-->
  149. <!-- </el-form-item>-->
  150. <el-form-item :label="' '">
  151. <el-button @click="getDataList()">查询</el-button>
  152. <download-excel
  153. v-if="this.$route.query.flag !== '2' && this.$route.query.flag !== '1'"
  154. :fields="fields()"
  155. :data="exportData"
  156. type="xlsx"
  157. :name="exportName"
  158. :header="exportHeader"
  159. :footer="exportFooter"
  160. :fetch="createExportData"
  161. :before-generate="startDownload"
  162. :before-finish="finishDownload"
  163. worksheet="导出信息"
  164. class="el-button el-button--primary el-button--medium">
  165. {{ "导出" }}
  166. </download-excel>
  167. </el-form-item>
  168. </el-form>
  169. <el-table
  170. :data="dataList"
  171. border
  172. :height="height"
  173. style="width: 100%;margin-top: 0px;"
  174. ref="projectAllDocumentDocumentTable"
  175. @row-click="projectAllDocumentClickRow"
  176. :row-style="rowStyle"
  177. v-loading="dataListLoading">
  178. <el-table-column
  179. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  180. :sortable="item.columnSortable"
  181. :prop="item.columnProp"
  182. :header-align="item.headerAlign"
  183. :show-overflow-tooltip="item.showOverflowTooltip"
  184. :align="item.align"
  185. :fixed="item.fixed==''?false:item.fixed"
  186. :min-width="item.columnWidth"
  187. :label="item.columnLabel">
  188. <template slot-scope="scope">
  189. <div v-if="scope.row.proofingPhase === 'Alpha' || scope.row.proofingPhase === 'Beta'">
  190. <span v-if="!item.columnHidden" style="color: #0033ff;">{{scope.row[item.columnProp]}}</span>
  191. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  192. style="width: 100px; height: 80px"/></span>
  193. </div>
  194. <div v-else-if="scope.row.uploadedFlag === 'Y'">
  195. <span v-if="!item.columnHidden" style="color: #029315;">{{scope.row[item.columnProp]}}</span>
  196. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  197. style="width: 100px; height: 80px"/></span>
  198. </div>
  199. <div v-else>
  200. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  201. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  202. style="width: 100px; height: 80px"/></span>
  203. </div>
  204. </template>
  205. </el-table-column>
  206. <el-table-column
  207. label="操作"
  208. align="center"
  209. fixed="left"
  210. width="150">
  211. <template slot-scope="scope">
  212. <a type="text" size="small" @click="toMes(scope.row)">项目信息</a>
  213. <a v-if="scope.row.uploadedFlag !== 'Y'" type="text" size="small" @click="uploadFile(scope.row)">上传文件</a>
  214. <a type="text" size="small" v-if="warnFlag || scope.row.uploadedFlag !== 'Y'" @click="warnSendMail(scope.row)">提醒</a>
  215. </template>
  216. </el-table-column>
  217. </el-table>
  218. <el-pagination
  219. @size-change="sizeChangeHandle"
  220. @current-change="currentChangeHandle"
  221. :current-page="pageIndex"
  222. :page-sizes="[20, 50, 100, 200, 500]"
  223. :page-size="pageSize"
  224. :total="totalPage"
  225. layout="total, sizes, prev, pager, next, jumper">
  226. </el-pagination>
  227. <upload-file-list-1 :folder="this.folder" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="projectAllDocumentCurrentRow.documentTypeId" :no-type="projectAllDocumentCurrentRow.documentType"
  228. :proofing-id='projectAllDocumentCurrentRow.proofingId' :proofing-no="projectAllDocumentCurrentRow.proofingNo" :bu="projectAllDocumentCurrentRow.buNo" :site="projectAllDocumentCurrentRow.site" :upload-dialog.sync="uploadDialog" :no-desc="projectAllDocumentCurrentRow.documentDesc" :id="projectAllDocumentCurrentRow.documentDefinitionListId"
  229. :project-id="projectAllDocumentCurrentRow.projectId" :project-no="projectAllDocumentCurrentRow.projectNo" :project-desc="projectAllDocumentCurrentRow.projectDesc" :document-type="projectAllDocumentCurrentRow.documentType" :conclusion="'N/A'"
  230. :customer-no="projectAllDocumentCurrentRow.customerNo" :customer-desc="projectAllDocumentCurrentRow.customerDesc" :test-part-no="projectAllDocumentCurrentRow.testPartNo" :project-part-id="projectAllDocumentCurrentRow.projectPartId"
  231. :part-desc="projectAllDocumentCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectPartDocumentList"
  232. path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-1>
  233. </div>
  234. </template>
  235. <script>
  236. import {
  237. searchProjectUploadsDocumentList,
  238. searchProjectOverUploadsDocumentList,
  239. searchConfirmProgressList,
  240. searchOverConfirmProgressList,
  241. getProofDocument,
  242. searchAllProjectUploadsDocumentList,
  243. searchAllConfirmProgressList,
  244. queryProjectOverUploadsDocumentList,
  245. queryProjectUploadsDocumentList,
  246. queryAllProjectUploadsDocumentList
  247. } from "../../../api/eam/eamProofing";
  248. import {searchConfirmProgressPusherList, warnSendMailHandle} from "../../../api/eam/eamProject";
  249. import {getSiteAndBuByUserName} from "../../../api/qc/qc";
  250. import {removeUserFavorite, saveUserFavorite, userFavoriteList} from "../../../api/userFavorite";
  251. import {getTableDefaultListLanguage, getTableUserListLanguage} from "../../../api/table";
  252. import {EventBus} from "../../../main";
  253. import UploadFileList1 from "../common/uploadFileList1.vue";
  254. export default {
  255. components: {UploadFileList1},
  256. computed: {
  257. projectOwnersList() {
  258. return this.allPersonnelInfoList.filter(item => item.projectOwnerId !== undefined);
  259. },
  260. projectManagersList() {
  261. return this.allPersonnelInfoList.filter(item => item.projectManagerId !== undefined);
  262. },
  263. engineersList() {
  264. return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined);
  265. },
  266. finalPartNosList() {
  267. return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined);
  268. },
  269. projectProjectLeadersList() {
  270. return this.allPersonnelInfoList.filter(item => item.projectLeaderId !== undefined);
  271. },
  272. },
  273. data() {
  274. return {
  275. // 导出
  276. exportData: [],
  277. exportName: '待上传文件' + this.dayjs().format('YYYYMMDDHHmmss') + '.xlsx',
  278. exportHeader: ['待上传文件'],
  279. exportFooter: [],
  280. exportList:[],
  281. folder: '',
  282. dataList: [],
  283. allDataList: [],
  284. fileList: [],
  285. confirmProgressList: [],
  286. projectPartDocumentList: [],
  287. allPersonnelInfoList: [],
  288. height: 200,
  289. pageIndex: 1,
  290. pageSize: 20,
  291. totalPage: 0,
  292. selectTypeFlag: [],
  293. dataListLoading: false,
  294. uploadDialog:false,
  295. isEditable: true,
  296. isMassProductionStage: true,
  297. warnFlag: false,
  298. projectAllDocumentCurrentRow: {},
  299. searchData: {
  300. site: this.$store.state.user.site,
  301. userId: this.$store.state.user.id,
  302. projectId: '',
  303. projectNo: '',
  304. uploadedFlag: 'N',
  305. projectDesc: '',
  306. projectPartId: '',
  307. testPartNo: '',
  308. partDesc: '',
  309. customerNo: '',
  310. customerDesc: '',
  311. buDesc: '',
  312. projectCategory: '',
  313. status: '',
  314. startDate:'',
  315. endDate:'',
  316. projectCreationDate: new Date(),
  317. projectCloseDate:'',
  318. needDate:'',
  319. projectManager: '',
  320. projectOwner: '',
  321. engineer: '',
  322. finalPartNo: '',
  323. closeStartDate: '',
  324. closeEndDate: '',
  325. projectLeader: '',
  326. documentDefinitionListId: '',
  327. page: 1,
  328. limit: 10,
  329. },
  330. columnProjectAllDocumentList: [
  331. {
  332. userId: this.$store.state.user.name,
  333. functionId: 401006,
  334. serialNumber: '401006Table1BuDesc',
  335. tableId: "401006Table1",
  336. tableName: "项目信息待上传文件表",
  337. columnProp: 'buDesc',
  338. headerAlign: "center",
  339. align: "center",
  340. columnLabel: 'BU',
  341. columnHidden: false,
  342. columnImage: false,
  343. columnSortable: false,
  344. sortLv: 0,
  345. status: true,
  346. fixed: '',
  347. columnWidth: 100,
  348. },
  349. {
  350. userId: this.$store.state.user.name,
  351. functionId: 401006,
  352. serialNumber: '401006Table1ProjectId',
  353. tableId: "401006Table1",
  354. tableName: "项目信息待上传文件表",
  355. columnProp: 'projectNo',
  356. headerAlign: "center",
  357. align: "center",
  358. columnLabel: '项目编码',
  359. columnHidden: false,
  360. columnImage: false,
  361. columnSortable: false,
  362. sortLv: 0,
  363. status: true,
  364. fixed: '',
  365. columnWidth: 100,
  366. },
  367. {
  368. userId: this.$store.state.user.name,
  369. functionId: 401006,
  370. serialNumber: '401006Table1ProjectDesc',
  371. tableId: "401006Table1",
  372. tableName: "项目信息待上传文件表",
  373. columnProp: 'projectDesc',
  374. headerAlign: "center",
  375. align: "center",
  376. columnLabel: '项目名称',
  377. columnHidden: false,
  378. columnImage: false,
  379. columnSortable: false,
  380. sortLv: 0,
  381. status: true,
  382. fixed: '',
  383. columnWidth: 100,
  384. },
  385. {
  386. userId: this.$store.state.user.name,
  387. functionId: 401006,
  388. serialNumber: '401006Table1TestPartNo',
  389. tableId: "401006Table1",
  390. tableName: "项目信息待上传文件表",
  391. columnProp: 'testPartNo',
  392. headerAlign: "center",
  393. align: "center",
  394. columnLabel: '项目料号',
  395. columnHidden: false,
  396. columnImage: false,
  397. columnSortable: false,
  398. sortLv: 0,
  399. status: true,
  400. fixed: '',
  401. columnWidth: 100,
  402. },
  403. {
  404. userId: this.$store.state.user.name,
  405. functionId: 401006,
  406. serialNumber: '401006Table1PartDesc',
  407. tableId: "401006Table1",
  408. tableName: "项目信息待上传文件表",
  409. columnProp: 'partDesc',
  410. headerAlign: "center",
  411. align: "center",
  412. columnLabel: '料号描述',
  413. columnHidden: false,
  414. columnImage: false,
  415. columnSortable: false,
  416. sortLv: 0,
  417. status: true,
  418. fixed: '',
  419. columnWidth: 100,
  420. },
  421. {
  422. userId: this.$store.state.user.name,
  423. functionId: 401006,
  424. serialNumber: '401006Table1customerNo',
  425. tableId: "401006Table1",
  426. tableName: "项目信息待上传文件表",
  427. columnProp: "customerNo",
  428. headerAlign: "center",
  429. align: "left",
  430. columnLabel: "客户编码",
  431. columnHidden: false,
  432. columnImage: false,
  433. columnSortable: false,
  434. sortLv: 0,
  435. status: true,
  436. fixed: '',
  437. columnWidth: 100
  438. },
  439. {
  440. userId: this.$store.state.user.name,
  441. functionId: 401006,
  442. serialNumber: '401006Table1customerDesc',
  443. tableId: "401006Table1",
  444. tableName: "项目信息待上传文件表",
  445. columnProp: "customerDesc",
  446. headerAlign: "center",
  447. align: "left",
  448. columnLabel: "客户名称",
  449. columnHidden: false,
  450. columnImage: false,
  451. columnSortable: false,
  452. sortLv: 0,
  453. status: true,
  454. fixed: '',
  455. columnWidth: 150
  456. },
  457. {
  458. userId: this.$store.state.user.name,
  459. functionId: 401006,
  460. serialNumber: '401006Table1ProjectCreationDate',
  461. tableId: "401006Table1",
  462. tableName: "项目信息待上传文件表",
  463. columnProp: "buildDate",
  464. headerAlign: "center",
  465. align: "center",
  466. columnLabel: "立项日期",
  467. columnHidden: false,
  468. columnImage: false,
  469. columnSortable: false,
  470. sortLv: 0,
  471. status: true,
  472. fixed: '',
  473. columnWidth: 120
  474. },
  475. {
  476. userId: this.$store.state.user.name,
  477. functionId: 401006,
  478. serialNumber: '401006Table1Priority',
  479. tableId: "401006Table1",
  480. tableName: "项目信息待上传文件表",
  481. columnProp: 'priority',
  482. headerAlign: "center",
  483. align: "left",
  484. columnLabel: '优先级',
  485. columnHidden: false,
  486. columnImage: false,
  487. columnSortable: false,
  488. sortLv: 0,
  489. status: true,
  490. fixed: '',
  491. columnWidth: 80,
  492. },
  493. {
  494. userId: this.$store.state.user.name,
  495. functionId: 401006,
  496. serialNumber: '401006Table1CProjectRegion',
  497. tableId: "401006Table1",
  498. tableName: "项目信息待上传文件表",
  499. columnProp: 'cProjectRegion',
  500. headerAlign: "center",
  501. align: "left",
  502. columnLabel: '区域',
  503. columnHidden: false,
  504. columnImage: false,
  505. columnSortable: false,
  506. sortLv: 0,
  507. status: true,
  508. fixed: '',
  509. columnWidth: 120,
  510. },
  511. {
  512. userId: this.$store.state.user.name,
  513. functionId: 401006,
  514. serialNumber: '401006Table1ProjectManager',
  515. tableId: "401006Table1",
  516. tableName: "项目信息待上传文件表",
  517. columnProp: 'projectManagerName',
  518. headerAlign: "center",
  519. align: "left",
  520. columnLabel: 'PM/Sales',
  521. columnHidden: false,
  522. columnImage: false,
  523. columnSortable: false,
  524. sortLv: 0,
  525. status: true,
  526. fixed: '',
  527. columnWidth: 120,
  528. },
  529. {
  530. userId: this.$store.state.user.name,
  531. functionId: 401006,
  532. serialNumber: '401006Table1ProjectOwner',
  533. tableId: "401006Table1",
  534. tableName: "项目信息待上传文件表",
  535. columnProp: 'projectOwnerName',
  536. headerAlign: "center",
  537. align: "left",
  538. columnLabel: 'PjM',
  539. columnHidden: false,
  540. columnImage: false,
  541. columnSortable: false,
  542. sortLv: 0,
  543. status: true,
  544. fixed: '',
  545. columnWidth: 120,
  546. },
  547. {
  548. userId: this.$store.state.user.name,
  549. functionId: 401006,
  550. serialNumber: '401006Table1Engineer',
  551. tableId: "401006Table1",
  552. tableName: "项目信息待上传文件表",
  553. columnProp: 'engineerName',
  554. headerAlign: "center",
  555. align: "left",
  556. columnLabel: 'Engineer',
  557. columnHidden: false,
  558. columnImage: false,
  559. columnSortable: false,
  560. sortLv: 0,
  561. status: true,
  562. fixed: '',
  563. columnWidth: 120,
  564. },
  565. {
  566. userId: this.$store.state.user.name,
  567. functionId: 401006,
  568. serialNumber: '401006Table1CQualityEngineer1',
  569. tableId: "401006Table1",
  570. tableName: "项目信息待上传文件表",
  571. columnProp: 'cQualityEngineer1Name',
  572. headerAlign: "center",
  573. align: "left",
  574. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  575. columnHidden: false,
  576. columnImage: false,
  577. columnSortable: false,
  578. sortLv: 0,
  579. status: true,
  580. fixed: '',
  581. columnWidth: 120,
  582. },
  583. {
  584. userId: this.$store.state.user.name,
  585. functionId: 401006,
  586. serialNumber: '401006Table1CQualityEngineer2',
  587. tableId: "401006Table1",
  588. tableName: "项目信息待上传文件表",
  589. columnProp: 'cQualityEngineer2Name',
  590. headerAlign: "center",
  591. align: "left",
  592. columnLabel: 'IPQC-Converting',
  593. columnHidden: false,
  594. columnImage: false,
  595. columnSortable: false,
  596. sortLv: 0,
  597. status: true,
  598. fixed: '',
  599. columnWidth: 120,
  600. },
  601. {
  602. userId: this.$store.state.user.name,
  603. functionId: 401006,
  604. serialNumber: '401006Table1CQualityEngineer3',
  605. tableId: "401006Table1",
  606. tableName: "项目信息待上传文件表",
  607. columnProp: 'cQualityEngineer3Name',
  608. headerAlign: "center",
  609. align: "left",
  610. columnLabel: 'FQC1',
  611. columnHidden: false,
  612. columnImage: false,
  613. columnSortable: false,
  614. sortLv: 0,
  615. status: true,
  616. fixed: '',
  617. columnWidth: 120,
  618. },
  619. {
  620. userId: this.$store.state.user.name,
  621. functionId: 401006,
  622. serialNumber: '401006Table1CQualityEngineer5',
  623. tableId: "401006Table1",
  624. tableName: "项目信息待上传文件表",
  625. columnProp: 'cQualityEngineer5Name',
  626. headerAlign: "center",
  627. align: "left",
  628. columnLabel: 'FQC2',
  629. columnHidden: false,
  630. columnImage: false,
  631. columnSortable: false,
  632. sortLv: 0,
  633. status: true,
  634. fixed: '',
  635. columnWidth: 120,
  636. },
  637. {
  638. userId: this.$store.state.user.name,
  639. functionId: 401006,
  640. serialNumber: '401006Table1CQualityEngineer6',
  641. tableId: "401006Table1",
  642. tableName: "项目信息待上传文件表",
  643. columnProp: 'cQualityEngineer6Name',
  644. headerAlign: "center",
  645. align: "left",
  646. columnLabel: 'IQC',
  647. columnHidden: false,
  648. columnImage: false,
  649. columnSortable: false,
  650. sortLv: 0,
  651. status: true,
  652. fixed: '',
  653. columnWidth: 120,
  654. },
  655. {
  656. userId: this.$store.state.user.name,
  657. functionId: 401006,
  658. serialNumber: '401006Table1CManufactureEngineer',
  659. tableId: "401006Table1",
  660. tableName: "项目信息待上传文件表",
  661. columnProp: 'cManufactureEngineerName',
  662. headerAlign: "center",
  663. align: "left",
  664. columnLabel: 'MFG',
  665. columnHidden: false,
  666. columnImage: false,
  667. columnSortable: false,
  668. sortLv: 0,
  669. status: true,
  670. fixed: '',
  671. columnWidth: 120,
  672. },
  673. {
  674. userId: this.$store.state.user.name,
  675. functionId: 401006,
  676. serialNumber: '401006Table1CQualityEngineer4',
  677. tableId: "401006Table1",
  678. tableName: "项目信息待上传文件表",
  679. columnProp: 'cQualityEngineer4Name',
  680. headerAlign: "center",
  681. align: "left",
  682. columnLabel: 'SQE',
  683. columnHidden: false,
  684. columnImage: false,
  685. columnSortable: false,
  686. sortLv: 0,
  687. status: true,
  688. fixed: '',
  689. columnWidth: 120,
  690. },
  691. {
  692. userId: this.$store.state.user.name,
  693. functionId: 401006,
  694. serialNumber: '401006Table1DocEngineer',
  695. tableId: "401006Table1",
  696. tableName: "项目信息待上传文件表",
  697. columnProp: 'docEngineerName',
  698. headerAlign: "center",
  699. align: "left",
  700. columnLabel: '文档工程师',
  701. columnHidden: false,
  702. columnImage: false,
  703. columnSortable: false,
  704. sortLv: 0,
  705. status: true,
  706. fixed: '',
  707. columnWidth: 120,
  708. },
  709. {
  710. userId: this.$store.state.user.name,
  711. functionId: 401006,
  712. serialNumber: '401006Table1Status',
  713. tableId: "401006Table1",
  714. tableName: "项目信息待上传文件表",
  715. columnProp: 'status',
  716. headerAlign: "center",
  717. align: "left",
  718. columnLabel: '项目状态' ,
  719. columnHidden: false,
  720. columnImage: false,
  721. columnSortable: false,
  722. sortLv: 0,
  723. status: true,
  724. fixed: '',
  725. columnWidth: 100,
  726. },
  727. {
  728. userId: this.$store.state.user.name,
  729. functionId: 401006,
  730. serialNumber: '401006Table1NeedDate',
  731. tableId: "401006Table1",
  732. tableName: "项目信息待上传文件表",
  733. columnProp: 'needDate',
  734. headerAlign: "center",
  735. align: "center",
  736. columnLabel: '项目物料预计完成日期',
  737. columnHidden: false,
  738. columnImage: false,
  739. columnSortable: false,
  740. sortLv: 0,
  741. status: true,
  742. fixed: '',
  743. columnWidth: 130,
  744. },
  745. {
  746. userId: this.$store.state.user.name,
  747. functionId: 401006,
  748. serialNumber: '401006Table1CloseDate',
  749. tableId: "401006Table1",
  750. tableName: "项目信息待上传文件表",
  751. columnProp: 'closeDate',
  752. headerAlign: "center",
  753. align: "center",
  754. columnLabel: '转量产日期',
  755. columnHidden: false,
  756. columnImage: false,
  757. columnSortable: false,
  758. sortLv: 0,
  759. status: true,
  760. fixed: '',
  761. columnWidth: 120,
  762. },
  763. {
  764. userId: this.$store.state.user.name,
  765. functionId: 401006,
  766. serialNumber: '401006Table1FinalPartNo',
  767. tableId: "401006Table1",
  768. tableName: "项目信息待上传文件表",
  769. columnProp: 'finalPartNo',
  770. headerAlign: "center",
  771. align: "left",
  772. columnLabel: 'ERP正式料号',
  773. columnHidden: false,
  774. columnImage: false,
  775. columnSortable: false,
  776. sortLv: 0,
  777. status: true,
  778. fixed: '',
  779. columnWidth: 120,
  780. },
  781. {
  782. userId: this.$store.state.user.name,
  783. functionId: 401006,
  784. serialNumber: '401006Table1RequiredDeliveryDate',
  785. tableId: '401006Table1',
  786. tableName: '项目信息待上传文件表',
  787. columnProp: 'planStartDate',
  788. headerAlign: 'center',
  789. align: 'center',
  790. columnLabel: '打样开始日期',
  791. columnHidden: false,
  792. columnImage: false,
  793. columnSortable: false,
  794. sortLv: 0,
  795. status: true,
  796. fixed: '',
  797. columnWidth: 90
  798. },
  799. {
  800. userId: this.$store.state.user.name,
  801. functionId: 401006,
  802. serialNumber: '401006Table1ProofingNo',
  803. tableId: '401006Table1',
  804. tableName: '项目信息待上传文件表',
  805. columnProp: 'proofingNo',
  806. headerAlign: 'center',
  807. align: 'center',
  808. columnLabel: '打样单号',
  809. columnHidden: false,
  810. columnImage: false,
  811. columnSortable: false,
  812. sortLv: 0,
  813. status: true,
  814. fixed: '',
  815. columnWidth: 80
  816. },
  817. {
  818. userId: this.$store.state.user.name,
  819. functionId: 401006,
  820. serialNumber: '401006Table1ProofingNumber',
  821. tableId: '401006Table1',
  822. tableName: '项目信息待上传文件表',
  823. columnProp: 'proofingNumber',
  824. headerAlign: 'center',
  825. align: 'center',
  826. columnLabel: '数量',
  827. columnHidden: false,
  828. columnImage: false,
  829. columnSortable: false,
  830. sortLv: 0,
  831. status: true,
  832. fixed: '',
  833. columnWidth: 80
  834. },
  835. {
  836. userId: this.$store.state.user.name,
  837. functionId: 401006,
  838. serialNumber: '401006Table1CProjectTypeDb',
  839. tableId: "401006Table1",
  840. tableName: "项目信息待上传文件表",
  841. columnProp: 'cProjectTypeDb',
  842. headerAlign: "center",
  843. align: "left",
  844. columnLabel: '项目分类',
  845. columnHidden: false,
  846. columnImage: false,
  847. columnSortable: false,
  848. sortLv: 0,
  849. status: true,
  850. fixed: '',
  851. columnWidth: 80,
  852. },
  853. {
  854. userId: this.$store.state.user.name,
  855. functionId: 401006,
  856. serialNumber: '401006Table1RequiredDeliveryDate',
  857. tableId: '401006Table1',
  858. tableName: '项目信息待上传文件表',
  859. columnProp: 'requiredDeliveryDate',
  860. headerAlign: 'center',
  861. align: 'center',
  862. columnLabel: '打样预计完成日期',
  863. columnHidden: false,
  864. columnImage: false,
  865. columnSortable: false,
  866. sortLv: 0,
  867. status: true,
  868. fixed: '',
  869. columnWidth: 120
  870. },
  871. {
  872. userId: this.$store.state.user.name,
  873. functionId: 401006,
  874. serialNumber: '401006Table1ActualityDeliveryDate',
  875. tableId: '401006Table1',
  876. tableName: '项目信息待上传文件表',
  877. columnProp: 'actualityDeliveryDate',
  878. headerAlign: 'center',
  879. align: 'center',
  880. columnLabel: '实际完成日期',
  881. columnHidden: false,
  882. columnImage: false,
  883. columnSortable: false,
  884. sortLv: 0,
  885. status: true,
  886. fixed: '',
  887. columnWidth: 80
  888. },
  889. {
  890. userId: this.$store.state.user.name,
  891. functionId: 401006,
  892. serialNumber: '401006Table1DocumentType',
  893. tableId: "401006Table1",
  894. tableName: "BU文档清单表",
  895. columnProp: 'documentType',
  896. headerAlign: "center",
  897. align: "center",
  898. columnLabel: '文档类型',
  899. columnHidden: false,
  900. columnImage: false,
  901. columnSortable: false,
  902. sortLv: 0,
  903. status: true,
  904. fixed: '',
  905. columnWidth: 120,
  906. },
  907. {
  908. userId: this.$store.state.user.name,
  909. functionId: 401006,
  910. serialNumber: '401006Table1FileName',
  911. tableId: "401006Table1",
  912. tableName: "项目信息待上传文件表",
  913. columnProp: 'fileName',
  914. headerAlign: "center",
  915. align: "left",
  916. columnLabel: '文件名',
  917. columnHidden: false,
  918. columnImage: false,
  919. columnSortable: false,
  920. sortLv: 0,
  921. status: true,
  922. fixed: '',
  923. columnWidth: 180,
  924. },
  925. {
  926. userId: this.$store.state.user.name,
  927. functionId: 401006,
  928. serialNumber: '401006Table1ProjectLeader',
  929. tableId: "401006Table1",
  930. tableName: "项目信息待上传文件表",
  931. columnProp: 'projectLeader',
  932. headerAlign: "center",
  933. align: "center",
  934. columnLabel: '文档负责人',
  935. columnHidden: false,
  936. columnImage: false,
  937. columnSortable: false,
  938. sortLv: 0,
  939. status: true,
  940. fixed: '',
  941. columnWidth: 70,
  942. },
  943. {
  944. userId: this.$store.state.user.name,
  945. functionId: 401006,
  946. serialNumber: '401006Table1ProjectPhase',
  947. tableId: "401006Table1",
  948. tableName: "项目信息待上传文件表",
  949. columnProp: 'projectPhase',
  950. headerAlign: "center",
  951. align: "center",
  952. columnLabel: '项目阶段',
  953. columnHidden: false,
  954. columnImage: false,
  955. columnSortable: false,
  956. sortLv: 0,
  957. status: true,
  958. fixed: '',
  959. columnWidth: 70,
  960. },
  961. {
  962. userId: this.$store.state.user.name,
  963. functionId: 401006,
  964. serialNumber: '401006Table1ProofingPhase',
  965. tableId: "401006Table1",
  966. tableName: "项目信息待上传文件表",
  967. columnProp: 'proofingPhase',
  968. headerAlign: "center",
  969. align: "center",
  970. columnLabel: '打样阶段',
  971. columnHidden: false,
  972. columnImage: false,
  973. columnSortable: false,
  974. sortLv: 0,
  975. status: true,
  976. fixed: '',
  977. columnWidth: 70,
  978. },
  979. {
  980. userId: this.$store.state.user.name,
  981. functionId: 401006,
  982. serialNumber: '401006Table1CreateDate',
  983. tableId: '401006Table1',
  984. tableName: '项目信息待上传文件表',
  985. columnProp: 'createDate',
  986. headerAlign: 'center',
  987. align: 'center',
  988. columnLabel: '文档创建时间',
  989. columnHidden: false,
  990. columnImage: false,
  991. columnSortable: false,
  992. sortLv: 0,
  993. status: true,
  994. fixed: '',
  995. columnWidth: 130
  996. },
  997. {
  998. userId: this.$store.state.user.name,
  999. functionId: 401006,
  1000. serialNumber: '401006Table1CreateBy',
  1001. tableId: '401006Table1',
  1002. tableName: '项目信息待上传文件表',
  1003. columnProp: 'createdBy',
  1004. headerAlign: 'center',
  1005. align: 'center',
  1006. columnLabel: '文档创建人',
  1007. columnHidden: false,
  1008. columnImage: false,
  1009. columnSortable: false,
  1010. sortLv: 0,
  1011. status: true,
  1012. fixed: '',
  1013. columnWidth: 80
  1014. }
  1015. ],
  1016. columnFileContentArray: [
  1017. {
  1018. userId: this.$store.state.user.name,
  1019. functionId: 401006,
  1020. serialNumber: '401006Table1FileName',
  1021. tableId: "401006Table1",
  1022. tableName: "项目信息待上传文件表",
  1023. columnProp: 'fileName',
  1024. headerAlign: "center",
  1025. align: "left",
  1026. columnLabel: '文件名',
  1027. columnHidden: false,
  1028. columnImage: false,
  1029. columnSortable: false,
  1030. sortLv: 0,
  1031. status: true,
  1032. fixed: '',
  1033. columnWidth: 180,
  1034. },
  1035. {
  1036. userId: this.$store.state.user.name,
  1037. functionId: 401006,
  1038. serialNumber: '401006Table1UploadedFlag',
  1039. tableId: "401006Table1",
  1040. tableName: "项目信息待上传文件表",
  1041. columnProp: 'uploadedFlag',
  1042. headerAlign: "center",
  1043. align: "center",
  1044. columnLabel: '是否上传',
  1045. columnHidden: false,
  1046. columnImage: false,
  1047. columnSortable: false,
  1048. sortLv: 0,
  1049. status: true,
  1050. fixed: '',
  1051. columnWidth: 70,
  1052. },
  1053. {
  1054. userId: this.$store.state.user.name,
  1055. functionId: 401006,
  1056. serialNumber: '401006Table1Conclusion',
  1057. tableId: "401006Table1",
  1058. tableName: "项目信息待上传文件表",
  1059. columnProp: 'conclusion',
  1060. headerAlign: "center",
  1061. align: "center",
  1062. columnLabel: '结论',
  1063. columnHidden: false,
  1064. columnImage: false,
  1065. columnSortable: false,
  1066. sortLv: 0,
  1067. status: true,
  1068. fixed: '',
  1069. columnWidth: 70,
  1070. },
  1071. {
  1072. userId: this.$store.state.user.name,
  1073. functionId: 401006,
  1074. serialNumber: '401006Table1DocumentGroupDesc',
  1075. tableId: "401006Table1",
  1076. tableName: "项目信息待上传文件表",
  1077. columnProp: 'documentGroupDesc',
  1078. headerAlign: "center",
  1079. align: "center",
  1080. columnLabel: '文档种类',
  1081. columnHidden: false,
  1082. columnImage: false,
  1083. columnSortable: false,
  1084. sortLv: 0,
  1085. status: true,
  1086. fixed: '',
  1087. columnWidth: 70,
  1088. },
  1089. {
  1090. userId: this.$store.state.user.name,
  1091. functionId: 401006,
  1092. serialNumber: '401006Table1CreateDate',
  1093. tableId: '401006Table1',
  1094. tableName: '项目信息待上传文件表',
  1095. columnProp: 'createDate',
  1096. headerAlign: 'center',
  1097. align: 'center',
  1098. columnLabel: '创建时间',
  1099. columnHidden: false,
  1100. columnImage: false,
  1101. columnSortable: false,
  1102. sortLv: 0,
  1103. status: true,
  1104. fixed: '',
  1105. columnWidth: 120
  1106. },
  1107. {
  1108. userId: this.$store.state.user.name,
  1109. functionId: 401006,
  1110. serialNumber: '401006Table1CreateBy',
  1111. tableId: '401006Table1',
  1112. tableName: '项目信息待上传文件表',
  1113. columnProp: 'createdBy',
  1114. headerAlign: 'center',
  1115. align: 'center',
  1116. columnLabel: '创建人',
  1117. columnHidden: false,
  1118. columnImage: false,
  1119. columnSortable: false,
  1120. sortLv: 0,
  1121. status: true,
  1122. fixed: '',
  1123. columnWidth: 80
  1124. }
  1125. ],
  1126. userBuList: [],
  1127. projectCategoryList: [
  1128. {
  1129. projectCategory: 'Low Risk',
  1130. },
  1131. {
  1132. projectCategory: 'High Risk',
  1133. },
  1134. {
  1135. projectCategory: 'Sustaining',
  1136. }
  1137. ],
  1138. statusList: [
  1139. {
  1140. status: '草稿',
  1141. },
  1142. {
  1143. status: '进行中',
  1144. },
  1145. {
  1146. status: '已量产',
  1147. },
  1148. {
  1149. status: '正式量产',
  1150. }
  1151. ],
  1152. };
  1153. },
  1154. created() {
  1155. // 获取用户的 site 和 bu
  1156. this.getSiteAndBuByUserName()
  1157. // 校验用户是否收藏
  1158. this.favoriteIsOk()
  1159. // 动态列
  1160. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  1161. // 获取 URL 查询参数
  1162. const { documentDefinitionListId, flag } = this.$route.query;
  1163. // 将查询参数赋值给 searchData
  1164. if (flag === '4'){
  1165. this.$route.query.flag = '1'
  1166. this.searchData.documentDefinitionListId = documentDefinitionListId
  1167. }
  1168. this.getDataList()
  1169. },
  1170. activated() {
  1171. if (this.$route.query.flag) {
  1172. this.getDataList()
  1173. }
  1174. this.$store.commit("sift/commitSearchFunction",this.queryProjectUploadsDocumentList)
  1175. },
  1176. mounted () {
  1177. this.$nextTick(() => {
  1178. this.height = window.innerHeight - 200
  1179. })
  1180. EventBus.$on('updateAgencyMatterForUploads', () => {
  1181. this.getDataList();
  1182. });
  1183. },
  1184. methods: {
  1185. // 获取用户的bu
  1186. getSiteAndBuByUserName () {
  1187. let tempData = {
  1188. username: this.$store.state.user.name,
  1189. }
  1190. getSiteAndBuByUserName(tempData).then(({data}) => {
  1191. if (data.code === 0) {
  1192. this.userBuList = data.rows
  1193. }
  1194. })
  1195. },
  1196. //导出excel
  1197. async createExportData() {
  1198. this.searchData.limit = -1
  1199. this.searchData.page = 1
  1200. await searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1201. this.exportList = data.page.list
  1202. this.exportList.forEach((item) => {
  1203. item.projectManagerName = item.projectManager.split('-')[1];
  1204. item.projectOwnerName = item.projectOwner.split('-')[1];
  1205. item.engineerName = item.engineer.split('-')[1];
  1206. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  1207. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  1208. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  1209. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  1210. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
  1211. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  1212. }
  1213. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
  1214. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  1215. }
  1216. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
  1217. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  1218. }
  1219. if (item.docEngineer !== null && item.docEngineer !== '') {
  1220. item.docEngineerName = item.docEngineer.split('-')[1];
  1221. }
  1222. });
  1223. for (let i = 0; i < this.exportList.length; i++) {
  1224. if (this.exportList[i].responsibleDepartment === 'R001') {
  1225. this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
  1226. } else if (this.exportList[i].responsibleDepartment === 'R002') {
  1227. this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
  1228. } else if (this.exportList[i].responsibleDepartment === 'R004') {
  1229. this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
  1230. } else if (this.exportList[i].responsibleDepartment === 'R005') {
  1231. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
  1232. } else if (this.exportList[i].responsibleDepartment === 'R007') {
  1233. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
  1234. } else if (this.exportList[i].responsibleDepartment === 'R008') {
  1235. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
  1236. } else if (this.exportList[i].responsibleDepartment === 'R009') {
  1237. this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
  1238. } else if (this.exportList[i].responsibleDepartment === 'R011') {
  1239. if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
  1240. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
  1241. }
  1242. } else if (this.exportList[i].responsibleDepartment === 'R012') {
  1243. if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
  1244. this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
  1245. }
  1246. } else if (this.exportList[i].responsibleDepartment === 'R013') {
  1247. if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
  1248. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
  1249. }
  1250. } else if (this.exportList[i].responsibleDepartment === 'R014') {
  1251. if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
  1252. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
  1253. }
  1254. }
  1255. }
  1256. })
  1257. return this.exportList
  1258. },
  1259. startDownload() {
  1260. },
  1261. finishDownload() {
  1262. },
  1263. fields () {
  1264. let json = "{"
  1265. this.columnProjectAllDocumentList.forEach((item, index) => {
  1266. if (index == this.columnProjectAllDocumentList.length - 1) {
  1267. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1268. } else {
  1269. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1270. }
  1271. })
  1272. json += "}"
  1273. let s = eval("(" + json + ")")
  1274. return s
  1275. },
  1276. // 获取数据列表
  1277. getDataList (params) {
  1278. this.selectTypeFlag = params
  1279. // 如果this.pageSize/10为整数
  1280. this.searchData.limit = this.pageSize % 10 === 0 ? this.pageSize : 20
  1281. this.searchData.page = this.pageIndex
  1282. if (this.$route.query.flag === '2') {
  1283. searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => {
  1284. if (data.code === 0) {
  1285. this.dataList = data.page.list
  1286. this.allPersonnelInfoList = data.list
  1287. this.pageIndex = data.page.currPage
  1288. this.pageSize = data.page.pageSize
  1289. this.totalPage = data.page.totalCount
  1290. this.dataList.forEach((item) => {
  1291. item.projectManagerName = item.projectManager.split('-')[1]
  1292. item.projectOwnerName = item.projectOwner.split('-')[1]
  1293. item.engineerName = item.engineer.split('-')[1]
  1294. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1295. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1296. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1297. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1298. if (item.docEngineer === null || item.docEngineer === ''){
  1299. item.docEngineerName = ''
  1300. } else {
  1301. item.docEngineerName = item.docEngineer.split('-')[1]
  1302. }
  1303. if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
  1304. item.cQualityEngineer4Name = ''
  1305. } else {
  1306. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  1307. }
  1308. if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
  1309. item.cQualityEngineer5Name = ''
  1310. } else {
  1311. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  1312. }
  1313. if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
  1314. item.cQualityEngineer6Name = ''
  1315. } else {
  1316. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  1317. }
  1318. })
  1319. for (let i = 0; i < this.dataList.length; i++) {
  1320. if (this.dataList[i].responsibleDepartment === 'R001'){
  1321. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1322. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1323. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1324. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1325. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1326. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1327. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1328. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1329. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1330. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1331. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1332. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1333. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1334. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1335. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1336. this.dataList[i].projectLeader = ''
  1337. } else {
  1338. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1339. }
  1340. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1341. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1342. this.dataList[i].projectLeader = ''
  1343. } else {
  1344. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1345. }
  1346. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1347. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1348. this.dataList[i].projectLeader = ''
  1349. } else {
  1350. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1351. }
  1352. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  1353. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1354. this.dataList[i].projectLeader = ''
  1355. } else {
  1356. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1357. }
  1358. }
  1359. }
  1360. if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
  1361. this.dataList = data.list
  1362. for (let i = 0; i < this.dataList.length; i++) {
  1363. if (this.dataList[i].responsibleDepartment === 'R001'){
  1364. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1365. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1366. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1367. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1368. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1369. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1370. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1371. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1372. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1373. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1374. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1375. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1376. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1377. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1378. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1379. this.dataList[i].projectLeader = ''
  1380. } else {
  1381. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1382. }
  1383. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1384. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1385. this.dataList[i].projectLeader = ''
  1386. } else {
  1387. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1388. }
  1389. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1390. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1391. this.dataList[i].projectLeader = ''
  1392. } else {
  1393. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1394. }
  1395. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  1396. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1397. this.dataList[i].projectLeader = ''
  1398. } else {
  1399. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1400. }
  1401. }
  1402. }
  1403. this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
  1404. this.pageIndex = 1
  1405. this.pageSize = this.dataList.length + 1
  1406. this.totalPage = this.dataList.length + 1
  1407. }
  1408. }
  1409. // 获取全部人员信息用于下拉框
  1410. this.getAllPersonnelList()
  1411. })
  1412. }else if(this.$route.query.flag === '1') {
  1413. searchProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1414. if (data.code === 0) {
  1415. this.dataList = data.page.list
  1416. this.allPersonnelInfoList = data.list
  1417. this.pageIndex = data.page.currPage
  1418. this.pageSize = data.page.pageSize
  1419. this.totalPage = data.page.totalCount
  1420. this.dataList.forEach((item) => {
  1421. item.projectManagerName = item.projectManager.split('-')[1]
  1422. item.projectOwnerName = item.projectOwner.split('-')[1]
  1423. item.engineerName = item.engineer.split('-')[1]
  1424. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1425. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1426. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1427. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1428. if (item.docEngineer === null || item.docEngineer === ''){
  1429. item.docEngineerName = ''
  1430. } else {
  1431. item.docEngineerName = item.docEngineer.split('-')[1]
  1432. }
  1433. if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
  1434. item.cQualityEngineer4Name = ''
  1435. } else {
  1436. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  1437. }
  1438. if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
  1439. item.cQualityEngineer5Name = ''
  1440. } else {
  1441. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  1442. }
  1443. if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
  1444. item.cQualityEngineer6Name = ''
  1445. } else {
  1446. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  1447. }
  1448. })
  1449. for (let i = 0; i < this.dataList.length; i++) {
  1450. if (this.dataList[i].responsibleDepartment === 'R001'){
  1451. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1452. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1453. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1454. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1455. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1456. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1457. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1458. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1459. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1460. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1461. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1462. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1463. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1464. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1465. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1466. this.dataList[i].projectLeader = ''
  1467. } else {
  1468. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1469. }
  1470. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1471. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1472. this.dataList[i].projectLeader = ''
  1473. } else {
  1474. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1475. }
  1476. } else if(this.dataList[i].responsibleDepartment === 'R013') {
  1477. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
  1478. this.dataList[i].projectLeader = ''
  1479. } else {
  1480. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1481. }
  1482. } else if(this.dataList[i].responsibleDepartment === 'R014') {
  1483. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
  1484. this.dataList[i].projectLeader = ''
  1485. } else {
  1486. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1487. }
  1488. }
  1489. }
  1490. if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
  1491. this.dataList = data.list
  1492. for (let i = 0; i < this.dataList.length; i++) {
  1493. if (this.dataList[i].responsibleDepartment === 'R001'){
  1494. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1495. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1496. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1497. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1498. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1499. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1500. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1501. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1502. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1503. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1504. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1505. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1506. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1507. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1508. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1509. this.dataList[i].projectLeader = ''
  1510. } else {
  1511. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1512. }
  1513. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1514. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1515. this.dataList[i].projectLeader = ''
  1516. } else {
  1517. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1518. }
  1519. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1520. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1521. this.dataList[i].projectLeader = ''
  1522. } else {
  1523. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1524. }
  1525. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  1526. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1527. this.dataList[i].projectLeader = ''
  1528. } else {
  1529. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1530. }
  1531. }
  1532. }
  1533. this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
  1534. this.pageIndex = 1
  1535. this.pageSize = this.dataList.length + 1
  1536. this.totalPage = this.dataList.length + 1
  1537. }
  1538. }
  1539. // 获取全部人员信息用于下拉框
  1540. this.getAllPersonnelList()
  1541. })
  1542. }else {
  1543. searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1544. if (data.code === 0) {
  1545. this.allDataList = data.list
  1546. let pjmList = []
  1547. // 遍历data.page.list
  1548. data.list.forEach((item) => {
  1549. if (!pjmList.includes(item.projectOwner.split('-')[0])) {
  1550. pjmList.push(item.projectOwner.split('-')[0])
  1551. }
  1552. })
  1553. if (pjmList.includes(this.$store.state.user.name) || this.$store.state.user.name === 'admin') {
  1554. this.warnFlag = true
  1555. this.dataList = data.page.list
  1556. this.allPersonnelInfoList = data.list
  1557. this.pageIndex = data.page.currPage
  1558. this.pageSize = data.page.pageSize
  1559. this.totalPage = data.page.totalCount
  1560. this.dataList.forEach((item) => {
  1561. item.projectManagerName = item.projectManager.split('-')[1]
  1562. item.projectOwnerName = item.projectOwner.split('-')[1]
  1563. item.engineerName = item.engineer.split('-')[1]
  1564. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1565. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1566. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1567. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1568. if (item.docEngineer === null || item.docEngineer === ''){
  1569. item.docEngineerName = ''
  1570. } else {
  1571. item.docEngineerName = item.docEngineer.split('-')[1]
  1572. }
  1573. if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
  1574. item.cQualityEngineer4Name = ''
  1575. } else {
  1576. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  1577. }
  1578. if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
  1579. item.cQualityEngineer5Name = ''
  1580. } else {
  1581. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  1582. }
  1583. if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
  1584. item.cQualityEngineer6Name = ''
  1585. } else {
  1586. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  1587. }
  1588. })
  1589. for (let i = 0; i < this.dataList.length; i++) {
  1590. if (this.dataList[i].responsibleDepartment === 'R001') {
  1591. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1592. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1593. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1594. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1595. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1596. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1597. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1598. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1599. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1600. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1601. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1602. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1603. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1604. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1605. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1606. this.dataList[i].projectLeader = ''
  1607. } else {
  1608. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1609. }
  1610. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1611. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1612. this.dataList[i].projectLeader = ''
  1613. } else {
  1614. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1615. }
  1616. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1617. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1618. this.dataList[i].projectLeader = ''
  1619. } else {
  1620. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1621. }
  1622. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  1623. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1624. this.dataList[i].projectLeader = ''
  1625. } else {
  1626. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1627. }
  1628. }
  1629. }
  1630. if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null) {
  1631. console.log('3',this.searchData.projectLeader)
  1632. this.dataList = data.list
  1633. for (let i = 0; i < this.dataList.length; i++) {
  1634. if (this.dataList[i].responsibleDepartment === 'R001') {
  1635. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1636. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1637. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1638. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1639. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1640. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1641. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1642. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1643. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1644. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1645. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1646. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1647. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1648. } else if (this.dataList[i].responsibleDepartment === 'R012') {
  1649. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === '') {
  1650. this.dataList[i].projectLeader = ''
  1651. } else {
  1652. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1653. }
  1654. } else if (this.dataList[i].responsibleDepartment === 'R011') {
  1655. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === '') {
  1656. this.dataList[i].projectLeader = ''
  1657. } else {
  1658. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1659. }
  1660. } else if (this.dataList[i].responsibleDepartment === 'R013') {
  1661. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
  1662. this.dataList[i].projectLeader = ''
  1663. } else {
  1664. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1665. }
  1666. } else if (this.dataList[i].responsibleDepartment === 'R014') {
  1667. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
  1668. this.dataList[i].projectLeader = ''
  1669. } else {
  1670. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1671. }
  1672. }
  1673. }
  1674. this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
  1675. this.pageIndex = 1
  1676. this.pageSize = this.dataList.length + 1
  1677. this.totalPage = this.dataList.length + 1
  1678. }
  1679. } else {
  1680. this.$route.query.flag = '1'
  1681. }
  1682. // 获取全部人员信息用于下拉框
  1683. this.getAllPersonnelList()
  1684. }
  1685. })
  1686. }
  1687. },
  1688. queryProjectUploadsDocumentList (params) {
  1689. this.selectTypeFlag = params
  1690. this.searchData.limit = this.pageSize
  1691. this.searchData.page = this.pageIndex
  1692. if (params !== null && params !== undefined) {
  1693. params.limit = this.pageSize
  1694. params.page = this.pageIndex
  1695. params.site = this.$store.state.user.site
  1696. params.userName = this.$store.state.user.name
  1697. } else {
  1698. params = this.searchData
  1699. }
  1700. if (this.$route.query.flag === '2') {
  1701. queryProjectOverUploadsDocumentList(params).then(({data}) => {
  1702. if (data.code === 0) {
  1703. this.dataList = data.page.list
  1704. this.allPersonnelInfoList = data.list
  1705. this.pageIndex = data.page.currPage
  1706. this.pageSize = data.page.pageSize
  1707. this.totalPage = data.page.totalCount
  1708. this.dataList.forEach((item) => {
  1709. item.projectManagerName = item.projectManager.split('-')[1]
  1710. item.projectOwnerName = item.projectOwner.split('-')[1]
  1711. item.engineerName = item.engineer.split('-')[1]
  1712. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1713. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1714. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1715. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1716. if (item.docEngineer === null || item.docEngineer === ''){
  1717. item.docEngineerName = ''
  1718. } else {
  1719. item.docEngineerName = item.docEngineer.split('-')[1]
  1720. }
  1721. if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
  1722. item.cQualityEngineer4Name = ''
  1723. } else {
  1724. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  1725. }
  1726. if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
  1727. item.cQualityEngineer5Name = ''
  1728. } else {
  1729. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  1730. }
  1731. if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
  1732. item.cQualityEngineer6Name = ''
  1733. } else {
  1734. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  1735. }
  1736. })
  1737. for (let i = 0; i < this.dataList.length; i++) {
  1738. if (this.dataList[i].responsibleDepartment === 'R001'){
  1739. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1740. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1741. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1742. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1743. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1744. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1745. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1746. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1747. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1748. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1749. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1750. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1751. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1752. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1753. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1754. this.dataList[i].projectLeader = ''
  1755. } else {
  1756. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1757. }
  1758. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1759. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1760. this.dataList[i].projectLeader = ''
  1761. } else {
  1762. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1763. }
  1764. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1765. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1766. this.dataList[i].projectLeader = ''
  1767. } else {
  1768. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1769. }
  1770. }else if(this.dataList[i].responsibleDepartment === 'R014'){
  1771. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1772. this.dataList[i].projectLeader = ''
  1773. } else {
  1774. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1775. }
  1776. }
  1777. }
  1778. if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
  1779. this.dataList = data.list
  1780. for (let i = 0; i < this.dataList.length; i++) {
  1781. if (this.dataList[i].responsibleDepartment === 'R001'){
  1782. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1783. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1784. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1785. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1786. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1787. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1788. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1789. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1790. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1791. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1792. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1793. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1794. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1795. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1796. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1797. this.dataList[i].projectLeader = ''
  1798. } else {
  1799. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1800. }
  1801. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1802. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1803. this.dataList[i].projectLeader = ''
  1804. } else {
  1805. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1806. }
  1807. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1808. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1809. this.dataList[i].projectLeader = ''
  1810. } else {
  1811. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1812. }
  1813. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  1814. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1815. this.dataList[i].projectLeader = ''
  1816. } else {
  1817. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1818. }
  1819. }
  1820. }
  1821. this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
  1822. this.pageIndex = 1
  1823. this.pageSize = -1
  1824. this.totalPage = this.dataList.length + 1
  1825. }
  1826. }
  1827. // 获取全部人员信息用于下拉框
  1828. this.getAllPersonnelList()
  1829. })
  1830. }else if(this.$route.query.flag === '1') {
  1831. queryProjectUploadsDocumentList(params).then(({data}) => {
  1832. if (data.code === 0) {
  1833. this.dataList = data.page.list
  1834. this.allPersonnelInfoList = data.list
  1835. this.pageIndex = data.page.currPage
  1836. this.pageSize = data.page.pageSize
  1837. this.totalPage = data.page.totalCount
  1838. this.dataList.forEach((item) => {
  1839. item.projectManagerName = item.projectManager.split('-')[1]
  1840. item.projectOwnerName = item.projectOwner.split('-')[1]
  1841. item.engineerName = item.engineer.split('-')[1]
  1842. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1843. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1844. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1845. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1846. if (item.docEngineer === null || item.docEngineer === ''){
  1847. item.docEngineerName = ''
  1848. } else {
  1849. item.docEngineerName = item.docEngineer.split('-')[1]
  1850. }
  1851. if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
  1852. item.cQualityEngineer4Name = ''
  1853. } else {
  1854. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  1855. }
  1856. if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
  1857. item.cQualityEngineer5Name = ''
  1858. } else {
  1859. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  1860. }
  1861. if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
  1862. item.cQualityEngineer6Name = ''
  1863. } else {
  1864. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  1865. }
  1866. })
  1867. for (let i = 0; i < this.dataList.length; i++) {
  1868. if (this.dataList[i].responsibleDepartment === 'R001'){
  1869. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1870. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1871. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1872. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1873. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1874. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1875. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1876. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1877. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1878. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1879. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1880. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1881. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1882. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1883. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1884. this.dataList[i].projectLeader = ''
  1885. } else {
  1886. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1887. }
  1888. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1889. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1890. this.dataList[i].projectLeader = ''
  1891. } else {
  1892. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1893. }
  1894. } else if(this.dataList[i].responsibleDepartment === 'R013') {
  1895. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
  1896. this.dataList[i].projectLeader = ''
  1897. } else {
  1898. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1899. }
  1900. } else if(this.dataList[i].responsibleDepartment === 'R014') {
  1901. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
  1902. this.dataList[i].projectLeader = ''
  1903. } else {
  1904. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1905. }
  1906. }
  1907. }
  1908. if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
  1909. this.dataList = data.list
  1910. for (let i = 0; i < this.dataList.length; i++) {
  1911. if (this.dataList[i].responsibleDepartment === 'R001'){
  1912. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1913. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1914. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1915. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1916. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1917. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1918. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1919. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1920. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1921. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1922. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1923. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1924. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1925. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  1926. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  1927. this.dataList[i].projectLeader = ''
  1928. } else {
  1929. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  1930. }
  1931. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  1932. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  1933. this.dataList[i].projectLeader = ''
  1934. } else {
  1935. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  1936. }
  1937. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  1938. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  1939. this.dataList[i].projectLeader = ''
  1940. } else {
  1941. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  1942. }
  1943. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  1944. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  1945. this.dataList[i].projectLeader = ''
  1946. } else {
  1947. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  1948. }
  1949. }
  1950. }
  1951. this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
  1952. this.pageIndex = 1
  1953. this.pageSize = -1
  1954. this.totalPage = this.dataList.length + 1
  1955. }
  1956. }
  1957. // 获取全部人员信息用于下拉框
  1958. this.getAllPersonnelList()
  1959. })
  1960. }else {
  1961. queryAllProjectUploadsDocumentList(params).then(({data}) => {
  1962. if (data.code === 0) {
  1963. this.allDataList = data.list
  1964. let pjmList = []
  1965. // 遍历data.page.list
  1966. data.list.forEach((item) => {
  1967. if (!pjmList.includes(item.projectOwner.split('-')[0])) {
  1968. pjmList.push(item.projectOwner.split('-')[0])
  1969. }
  1970. })
  1971. if (pjmList.includes(this.$store.state.user.name)){
  1972. this.warnFlag = true
  1973. this.dataList = data.page.list
  1974. this.allPersonnelInfoList = data.list
  1975. this.pageIndex = data.page.currPage
  1976. this.pageSize = data.page.pageSize
  1977. this.totalPage = data.page.totalCount
  1978. this.dataList.forEach((item) => {
  1979. item.projectManagerName = item.projectManager.split('-')[1]
  1980. item.projectOwnerName = item.projectOwner.split('-')[1]
  1981. item.engineerName = item.engineer.split('-')[1]
  1982. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1983. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1984. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1985. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1986. if (item.docEngineer === null || item.docEngineer === ''){
  1987. item.docEngineerName = ''
  1988. } else {
  1989. item.docEngineerName = item.docEngineer.split('-')[1]
  1990. }
  1991. if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
  1992. item.cQualityEngineer4Name = ''
  1993. } else {
  1994. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  1995. }
  1996. if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
  1997. item.cQualityEngineer5Name = ''
  1998. } else {
  1999. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  2000. }
  2001. if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
  2002. item.cQualityEngineer6Name = ''
  2003. } else {
  2004. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  2005. }
  2006. })
  2007. for (let i = 0; i < this.dataList.length; i++) {
  2008. if (this.dataList[i].responsibleDepartment === 'R001') {
  2009. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  2010. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  2011. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  2012. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  2013. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  2014. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  2015. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  2016. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  2017. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  2018. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  2019. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  2020. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  2021. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  2022. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  2023. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  2024. this.dataList[i].projectLeader = ''
  2025. } else {
  2026. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  2027. }
  2028. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  2029. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  2030. this.dataList[i].projectLeader = ''
  2031. } else {
  2032. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  2033. }
  2034. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  2035. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  2036. this.dataList[i].projectLeader = ''
  2037. } else {
  2038. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  2039. }
  2040. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  2041. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  2042. this.dataList[i].projectLeader = ''
  2043. } else {
  2044. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  2045. }
  2046. }
  2047. }
  2048. if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
  2049. this.dataList = data.list
  2050. for (let i = 0; i < this.dataList.length; i++) {
  2051. if (this.dataList[i].responsibleDepartment === 'R001'){
  2052. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  2053. } else if(this.dataList[i].responsibleDepartment === 'R002'){
  2054. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  2055. } else if(this.dataList[i].responsibleDepartment === 'R004'){
  2056. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  2057. } else if(this.dataList[i].responsibleDepartment === 'R005'){
  2058. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  2059. } else if(this.dataList[i].responsibleDepartment === 'R007'){
  2060. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  2061. } else if(this.dataList[i].responsibleDepartment === 'R008'){
  2062. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  2063. } else if(this.dataList[i].responsibleDepartment === 'R009'){
  2064. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  2065. } else if(this.dataList[i].responsibleDepartment === 'R012'){
  2066. if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
  2067. this.dataList[i].projectLeader = ''
  2068. } else {
  2069. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
  2070. }
  2071. } else if(this.dataList[i].responsibleDepartment === 'R011'){
  2072. if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
  2073. this.dataList[i].projectLeader = ''
  2074. } else {
  2075. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
  2076. }
  2077. } else if(this.dataList[i].responsibleDepartment === 'R013'){
  2078. if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
  2079. this.dataList[i].projectLeader = ''
  2080. } else {
  2081. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
  2082. }
  2083. } else if(this.dataList[i].responsibleDepartment === 'R014'){
  2084. if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
  2085. this.dataList[i].projectLeader = ''
  2086. } else {
  2087. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
  2088. }
  2089. }
  2090. }
  2091. this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
  2092. this.pageIndex = 1
  2093. this.pageSize = -1
  2094. this.totalPage = this.dataList.length + 1
  2095. }
  2096. } else {
  2097. this.$route.query.flag = '1'
  2098. }
  2099. // 获取全部人员信息用于下拉框
  2100. this.getAllPersonnelList()
  2101. }
  2102. })
  2103. }
  2104. },
  2105. // 获取全部人员信息用于下拉框
  2106. getAllPersonnelList() {
  2107. let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
  2108. // 找出所有的同时过滤出唯一的 project owners, managers, and engineers
  2109. const allPersonnelList = [];
  2110. const projectOwnersMap = new Map();
  2111. const projectManagersMap = new Map();
  2112. const engineersMap = new Map();
  2113. const finalPartNosMap = new Map();
  2114. const projectProjectLeadersMap = new Map();
  2115. for (let i = 0; i < allPersonnelInfoDataList.length; i++) {
  2116. if (allPersonnelInfoDataList[i].responsibleDepartment === 'R001'){
  2117. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectManager.split("-")[1]
  2118. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R002'){
  2119. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectOwner.split("-")[1]
  2120. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R004'){
  2121. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].engineer.split("-")[1]
  2122. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R005'){
  2123. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer1.split("-")[1]
  2124. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R007'){
  2125. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer2.split("-")[1]
  2126. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R008'){
  2127. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer3.split("-")[1]
  2128. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R009'){
  2129. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cManufactureEngineer.split("-")[1]
  2130. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R012'){
  2131. if (allPersonnelInfoDataList[i].docEngineer === null || allPersonnelInfoDataList[i].docEngineer === ''){
  2132. allPersonnelInfoDataList[i].projectLeader = ''
  2133. } else {
  2134. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].docEngineer.split("-")[1]
  2135. }
  2136. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R011'){
  2137. if (allPersonnelInfoDataList[i].cQualityEngineer4 === null || allPersonnelInfoDataList[i].cQualityEngineer4 === ''){
  2138. allPersonnelInfoDataList[i].projectLeader = ''
  2139. } else {
  2140. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer4.split("-")[1]
  2141. }
  2142. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R013'){
  2143. if (allPersonnelInfoDataList[i].cQualityEngineer5 === null || allPersonnelInfoDataList[i].cQualityEngineer5 === ''){
  2144. allPersonnelInfoDataList[i].projectLeader = ''
  2145. } else {
  2146. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer5.split("-")[1]
  2147. }
  2148. } else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R014'){
  2149. if (allPersonnelInfoDataList[i].cQualityEngineer6 === null || allPersonnelInfoDataList[i].cQualityEngineer6 === ''){
  2150. allPersonnelInfoDataList[i].projectLeader = ''
  2151. } else {
  2152. allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer6.split("-")[1]
  2153. }
  2154. }
  2155. }
  2156. allPersonnelInfoDataList.forEach((item) => {
  2157. // Handle project owners
  2158. if (!projectOwnersMap.has(item.projectOwner)) {
  2159. const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
  2160. projectOwnersMap.set(item.projectOwner, {
  2161. projectOwnerId,
  2162. projectOwner: item.projectOwner,
  2163. projectOwnerName: item.projectOwner.split('-')[1]
  2164. });
  2165. allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
  2166. }
  2167. // Handle project managers
  2168. if (!projectManagersMap.has(item.projectManager)) {
  2169. const projectManagerId = projectManagersMap.size + 1;
  2170. projectManagersMap.set(item.projectManager, {
  2171. projectManagerId,
  2172. projectManager: item.projectManager,
  2173. projectManagerName: item.projectManager.split('-')[1]
  2174. });
  2175. allPersonnelList.push(projectManagersMap.get(item.projectManager));
  2176. }
  2177. // Handle engineers
  2178. if (!engineersMap.has(item.engineer)) {
  2179. const engineerId = engineersMap.size + 1;
  2180. engineersMap.set(item.engineer, {
  2181. engineerId,
  2182. engineer: item.engineer,
  2183. engineerName: item.engineer.split('-')[1]
  2184. });
  2185. allPersonnelList.push(engineersMap.get(item.engineer));
  2186. }
  2187. // Handle finalPartNos
  2188. if (!finalPartNosMap.has(item.finalPartNo) && item.finalPartNo !== null) {
  2189. const finalPartNoId = finalPartNosMap.size + 1;
  2190. finalPartNosMap.set(item.finalPartNo, {
  2191. finalPartNoId,
  2192. finalPartNo: item.finalPartNo,
  2193. });
  2194. allPersonnelList.push(finalPartNosMap.get(item.finalPartNo));
  2195. }
  2196. // Handle projectProjectLeaders
  2197. if (!projectProjectLeadersMap.has(item.projectLeader) && item.projectLeader !== null && item.projectLeader !== '') {
  2198. const projectLeaderId = projectProjectLeadersMap.size + 1;
  2199. projectProjectLeadersMap.set(item.projectLeader, {
  2200. projectLeaderId,
  2201. projectLeader: item.projectLeader,
  2202. });
  2203. allPersonnelList.push(projectProjectLeadersMap.get(item.projectLeader));
  2204. }
  2205. });
  2206. this.allPersonnelInfoList = allPersonnelList;
  2207. },
  2208. warnSendMail(row) {
  2209. this.$confirm('确认发送提醒?', '提示', {
  2210. confirmButtonText: '确定',
  2211. cancelButtonText: '取消',
  2212. type: 'warning'
  2213. }).then(() => {
  2214. warnSendMailHandle(row).then(({data}) => {
  2215. if (data && data.code === 0) {
  2216. this.$message({
  2217. message: '发送成功',
  2218. type: 'success'
  2219. })
  2220. } else {
  2221. this.$alert(data.msg, '错误', {
  2222. confirmButtonText: '确定'
  2223. })
  2224. }
  2225. })
  2226. }).catch(() => {
  2227. this.$message({
  2228. type: 'info',
  2229. message: '已取消发送'
  2230. });
  2231. });
  2232. },
  2233. // 每页数
  2234. sizeChangeHandle (val) {
  2235. this.pageSize = val
  2236. this.pageIndex = 1
  2237. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  2238. this.queryProjectUploadsDocumentList(this.selectTypeFlag)
  2239. } else {
  2240. this.getDataList()
  2241. }
  2242. },
  2243. // 当前页
  2244. currentChangeHandle (val) {
  2245. this.pageIndex = val
  2246. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  2247. this.queryProjectUploadsDocumentList(this.selectTypeFlag)
  2248. } else {
  2249. this.getDataList()
  2250. }
  2251. },
  2252. filteredProjectAllDocumentList() {
  2253. this.dataList.map(item => {
  2254. item.id = item.documentDefinitionListId
  2255. })
  2256. return this.dataList.filter(item => item.uploadedFlag !== 'Y')
  2257. },
  2258. projectAllDocumentClickRow (row) {
  2259. this.projectAllDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  2260. },
  2261. toMes (row) {
  2262. this.$router.push({ path: 'eam-eamProjectPartInfo', query: { projectNo: row.projectNo , testPartNo:row.testPartNo}})
  2263. },
  2264. /**
  2265. * 上传文件
  2266. */
  2267. uploadFile (row) {
  2268. this.isEditable = false;
  2269. this.fileList = []
  2270. if (row.documentId === null || row.documentId === undefined || row.documentId === '') {
  2271. this.projectAllDocumentCurrentRow.proofingId= -1
  2272. this.projectAllDocumentCurrentRow.proofingNo = '*'
  2273. this.isMassProductionStage = true
  2274. this.folder = 'projectPMPDocumentFiles'
  2275. } else {
  2276. this.isMassProductionStage = false
  2277. this.folder = 'projectPPDocumentFiles'
  2278. }
  2279. this.getProofDocument(row)
  2280. this.uploadDialog = true
  2281. //打开组件 去做新增业务
  2282. // this.$nextTick(() => {
  2283. // this.$refs.partUploadFile.init(currentData);
  2284. // })
  2285. },
  2286. getProofDocument (row) {
  2287. let tempData = {
  2288. site: this.$store.state.user.site,
  2289. buNo: row.buNo,
  2290. projectId: row.projectId,
  2291. projectPartId: row.projectPartId,
  2292. proofingId: row.proofingId,
  2293. userId: this.$store.state.user.id,
  2294. languageCode: this.$i18n.locale
  2295. }
  2296. getProofDocument(tempData).then(({data}) => {
  2297. if (data && data.code === 0) {
  2298. this.projectPartDocumentList = data.page.list
  2299. for (let i = 0; i < this.projectPartDocumentList.length; i++) {
  2300. this.projectPartDocumentList[i].buNo = this.tempData.buNo
  2301. }
  2302. }
  2303. })
  2304. },
  2305. formatDate(row, column) {
  2306. // row 是当前行的数据对象
  2307. // column 是当前列的属性信息对象
  2308. const date = row[column.property];
  2309. if (date) {
  2310. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  2311. return s.replace(/\//g, '-')
  2312. } else {
  2313. return '';
  2314. }
  2315. },
  2316. rowStyle ({row}) {
  2317. },
  2318. getCombinedDocumentType(row) {
  2319. // 根据您的需求,组合或拼接需要显示的字段
  2320. if (row.documentType === null || row.documentType === undefined) {
  2321. return row.documentDesc
  2322. }else {
  2323. return row.documentType
  2324. }
  2325. },
  2326. // 校验用户是否收藏
  2327. favoriteIsOk () {
  2328. let userFavorite = {
  2329. userId: this.$store.state.user.id,
  2330. languageCode: this.$i18n.locale
  2331. }
  2332. userFavoriteList(userFavorite).then(({data}) => {
  2333. for (let i = 0; i < data.list.length; i++) {
  2334. if (this.$route.meta.menuId === data.list[i].menuId) {
  2335. this.favorite = true
  2336. }
  2337. }
  2338. })
  2339. },
  2340. // 收藏 OR 取消收藏
  2341. favoriteFunction () {
  2342. let userFavorite = {
  2343. userId: this.$store.state.user.id,
  2344. functionId: this.$route.meta.menuId,
  2345. }
  2346. if (this.favorite) {
  2347. removeUserFavorite(userFavorite).then(({data}) => {
  2348. this.$message.success(data.msg)
  2349. this.favorite = false
  2350. })
  2351. } else {
  2352. // 收藏
  2353. saveUserFavorite(userFavorite).then(({data}) => {
  2354. this.$message.success(data.msg)
  2355. this.favorite = true
  2356. })
  2357. }
  2358. },
  2359. // 动态列开始 获取 用户保存的 格式列
  2360. async getTableUserColumn(tableId, columnId) {
  2361. let queryTableUser = {
  2362. userId: this.$store.state.user.name,
  2363. functionId: this.$route.meta.menuId,
  2364. tableId: tableId,
  2365. status: true,
  2366. languageCode: this.$i18n.locale
  2367. }
  2368. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  2369. if (data.rows.length > 0) {
  2370. //this.columnList1 = []
  2371. switch (columnId) {
  2372. case 1:
  2373. this.columnProjectAllDocumentList = data.rows
  2374. break;
  2375. // case 2:
  2376. // this.detailColumnList = data.rows
  2377. // break;
  2378. // case 3:
  2379. // this.columnList2 = data.rows
  2380. // break;
  2381. // case 4:
  2382. // this.columnList3 = data.rows
  2383. // break;
  2384. }
  2385. } else {
  2386. this.getColumnList(tableId, columnId)
  2387. }
  2388. })
  2389. },
  2390. // 获取 tableDefault 列
  2391. async getColumnList (tableId, columnId) {
  2392. let queryTable= {
  2393. functionId: this.$route.meta.menuId,
  2394. tableId: tableId,
  2395. languageCode: this.$i18n.locale
  2396. }
  2397. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  2398. if (!data.rows.length == 0) {
  2399. switch (columnId) {
  2400. case 1:
  2401. this.columnProjectAllDocumentList = data.rows
  2402. break;
  2403. // case 2:
  2404. // this.detailColumnList = data.rows
  2405. // break;
  2406. // case 3:
  2407. // this.columnList2 = data.rows
  2408. // break;
  2409. // case 4:
  2410. // this.columnList3 = data.rows
  2411. // break;
  2412. }
  2413. } else {
  2414. // this.showDefault = true.
  2415. }
  2416. })
  2417. },
  2418. //获取按钮的权限数据
  2419. getButtonAuthData () {
  2420. let searchFlag = this.isAuth(this.menuId+":search")
  2421. let saveFlag = this.isAuth(this.menuId+":save")
  2422. let updateFlag = this.isAuth(this.menuId+":update")
  2423. let deleteFlag = this.isAuth(this.menuId+":delete")
  2424. //处理页面的权限数据
  2425. this.authSearch = !searchFlag
  2426. this.authSave = !saveFlag
  2427. this.authUpdate = !updateFlag
  2428. this.authDelete = !deleteFlag
  2429. },
  2430. },
  2431. };
  2432. </script>
  2433. <style scoped>
  2434. .card-item {
  2435. cursor: pointer;
  2436. margin-bottom: 20px;
  2437. transition: transform 0.3s, box-shadow 0.3s;
  2438. overflow: hidden;
  2439. //padding: 10px;
  2440. display: flex;
  2441. flex-direction: column;
  2442. justify-content: space-between;
  2443. align-items: center;
  2444. height: 208px;
  2445. width: 230px;
  2446. margin-left: 40px;
  2447. margin-top: 10px;
  2448. }
  2449. .card-item:hover {
  2450. transform: translateY(-5px);
  2451. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  2452. }
  2453. .card-title {
  2454. font-size: 18px;
  2455. font-weight: bold;
  2456. margin-bottom: 10px;
  2457. margin-top: 20px;
  2458. }
  2459. .card-count {
  2460. font-size: 55px;
  2461. color: #17B3A3;
  2462. text-align: center;
  2463. font-weight: bold;
  2464. margin-top: 50px;
  2465. }
  2466. .project-list {
  2467. font-size: 12px;
  2468. color: #333;
  2469. line-height: 1.5;
  2470. margin-bottom: 5px;
  2471. }
  2472. .el-divider {
  2473. margin: 10px 0;
  2474. }
  2475. </style>