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
2519 lines
108 KiB
<template>
|
|
<div>
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
|
|
<el-form-item :label="'BU'">
|
|
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in userBuList"
|
|
:key = "i.buNo"
|
|
:label = "i.buDesc"
|
|
:value = "i.buDesc">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'项目编码'">
|
|
<el-input v-model="searchData.projectNo" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'项目名称'">
|
|
<el-input v-model="searchData.projectDesc" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'项目料号'">
|
|
<el-input v-model="searchData.testPartNo" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'料号描述'">
|
|
<el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户编码'">
|
|
<el-input v-model="searchData.customerNo" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户名称'">
|
|
<el-input v-model="searchData.customerDesc" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'项目分类'">
|
|
<el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in projectCategoryList"
|
|
:key = "i.projectCategory"
|
|
:label = "i.projectCategory"
|
|
:value = "i.projectCategory">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'项目状态'">
|
|
<el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in statusList"
|
|
:key = "i.status"
|
|
:label = "i.status"
|
|
:value = "i.status">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'PM/Sales'">
|
|
<el-select v-model="searchData.projectManager" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in projectManagersList"
|
|
:key = "i.projectManagerId"
|
|
:label = "i.projectManagerName"
|
|
:value = "i.projectManager">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'PjM'">
|
|
<el-select v-model="searchData.projectOwner" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in projectOwnersList"
|
|
:key = "i.projectOwnerId"
|
|
:label = "i.projectOwnerName"
|
|
:value = "i.projectOwner">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'Engineer'">
|
|
<el-select v-model="searchData.engineer" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in engineersList"
|
|
:key = "i.engineerId"
|
|
:label = "i.engineerName"
|
|
:value = "i.engineer">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'文档负责人'">
|
|
<el-select v-model="searchData.projectLeader" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in projectProjectLeadersList"
|
|
:key = "i.projectLeaderId"
|
|
:label = "i.projectLeader"
|
|
:value = "i.projectLeader">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'是否上传'">
|
|
<el-select filterable v-model="searchData.uploadedFlag" style="width: 130px">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="否" value="N"></el-option>
|
|
<el-option label="是" value="Y"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'ERP正式料号'">
|
|
<el-select v-model="searchData.finalPartNo" placeholder="请选择" clearable style="width: 130px">
|
|
<el-option
|
|
v-for = "i in finalPartNosList"
|
|
:key = "i.finalPartNoId"
|
|
:label = "i.finalPartNo"
|
|
:value = "i.finalPartNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'转量产日期:'">
|
|
<el-date-picker
|
|
style="width: 120px"
|
|
v-model="searchData.massProductionStartDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
-
|
|
<el-date-picker
|
|
style="width: 120px"
|
|
v-model="searchData.massProductionEndDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item :label="'立项日期:'">
|
|
<el-date-picker
|
|
style="width: 120px"
|
|
v-model="searchData.startDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
-
|
|
<el-date-picker
|
|
style="width: 120px"
|
|
v-model="searchData.endDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<!-- <el-form-item :label="'在用'">-->
|
|
<!-- <el-select filterable v-model="searchData.active" style="width: 130px">-->
|
|
<!-- <el-option label="全部" value=""></el-option>-->
|
|
<!-- <el-option label="是" value="Y"></el-option>-->
|
|
<!-- <el-option label="否" value="N"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item :label="' '">
|
|
<el-button @click="getDataList()">查询</el-button>
|
|
<download-excel
|
|
v-if="this.$route.query.flag !== '2' && this.$route.query.flag !== '1'"
|
|
:fields="fields()"
|
|
:data="exportData"
|
|
type="xlsx"
|
|
:name="exportName"
|
|
:header="exportHeader"
|
|
:footer="exportFooter"
|
|
:fetch="createExportData"
|
|
:before-generate="startDownload"
|
|
:before-finish="finishDownload"
|
|
worksheet="导出信息"
|
|
class="el-button el-button--primary el-button--medium">
|
|
{{ "导出" }}
|
|
</download-excel>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-table
|
|
:data="dataList"
|
|
border
|
|
:height="height"
|
|
style="width: 100%;margin-top: 0px;"
|
|
ref="projectAllDocumentDocumentTable"
|
|
@row-click="projectAllDocumentClickRow"
|
|
:row-style="rowStyle"
|
|
v-loading="dataListLoading">
|
|
<el-table-column
|
|
v-for="(item,index) in columnProjectAllDocumentList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.proofingPhase === 'Alpha' || scope.row.proofingPhase === 'Beta'">
|
|
<span v-if="!item.columnHidden" style="color: #0033ff;">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px"/></span>
|
|
</div>
|
|
<div v-else-if="scope.row.uploadedFlag === 'Y'">
|
|
<span v-if="!item.columnHidden" style="color: #029315;">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px"/></span>
|
|
</div>
|
|
<div v-else>
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px"/></span>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
label="操作"
|
|
align="center"
|
|
fixed="left"
|
|
width="150">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="toMes(scope.row)">项目信息</a>
|
|
<a v-if="scope.row.uploadedFlag !== 'Y'" type="text" size="small" @click="uploadFile(scope.row)">上传文件</a>
|
|
<a type="text" size="small" v-if="warnFlag || scope.row.uploadedFlag !== 'Y'" @click="warnSendMail(scope.row)">提醒</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<el-pagination
|
|
@size-change="sizeChangeHandle"
|
|
@current-change="currentChangeHandle"
|
|
:current-page="pageIndex"
|
|
:page-sizes="[20, 50, 100, 200, 500]"
|
|
:page-size="pageSize"
|
|
:total="totalPage"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
|
|
<upload-file-list-1 :folder="this.folder" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="projectAllDocumentCurrentRow.documentTypeId" :no-type="projectAllDocumentCurrentRow.documentType"
|
|
: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"
|
|
:project-id="projectAllDocumentCurrentRow.projectId" :project-no="projectAllDocumentCurrentRow.projectNo" :project-desc="projectAllDocumentCurrentRow.projectDesc" :document-type="projectAllDocumentCurrentRow.documentType" :conclusion="'N/A'"
|
|
:customer-no="projectAllDocumentCurrentRow.customerNo" :customer-desc="projectAllDocumentCurrentRow.customerDesc" :test-part-no="projectAllDocumentCurrentRow.testPartNo" :project-part-id="projectAllDocumentCurrentRow.projectPartId"
|
|
:part-desc="projectAllDocumentCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectPartDocumentList"
|
|
path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-1>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import {
|
|
searchProjectUploadsDocumentList,
|
|
searchProjectOverUploadsDocumentList,
|
|
searchConfirmProgressList,
|
|
searchOverConfirmProgressList,
|
|
getProofDocument,
|
|
searchAllProjectUploadsDocumentList,
|
|
searchAllConfirmProgressList,
|
|
queryProjectOverUploadsDocumentList,
|
|
queryProjectUploadsDocumentList,
|
|
queryAllProjectUploadsDocumentList
|
|
} from "../../../api/eam/eamProofing";
|
|
import {searchConfirmProgressPusherList, warnSendMailHandle} from "../../../api/eam/eamProject";
|
|
import {getSiteAndBuByUserName} from "../../../api/qc/qc";
|
|
import {removeUserFavorite, saveUserFavorite, userFavoriteList} from "../../../api/userFavorite";
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "../../../api/table";
|
|
import {EventBus} from "../../../main";
|
|
import UploadFileList1 from "../common/uploadFileList1.vue";
|
|
|
|
export default {
|
|
components: {UploadFileList1},
|
|
|
|
computed: {
|
|
projectOwnersList() {
|
|
return this.allPersonnelInfoList.filter(item => item.projectOwnerId !== undefined);
|
|
},
|
|
projectManagersList() {
|
|
return this.allPersonnelInfoList.filter(item => item.projectManagerId !== undefined);
|
|
},
|
|
engineersList() {
|
|
return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined);
|
|
},
|
|
finalPartNosList() {
|
|
return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined);
|
|
},
|
|
projectProjectLeadersList() {
|
|
return this.allPersonnelInfoList.filter(item => item.projectLeaderId !== undefined);
|
|
},
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
// 导出
|
|
exportData: [],
|
|
exportName: '待上传文件' + this.dayjs().format('YYYYMMDDHHmmss') + '.xlsx',
|
|
exportHeader: ['待上传文件'],
|
|
exportFooter: [],
|
|
exportList:[],
|
|
folder: '',
|
|
dataList: [],
|
|
allDataList: [],
|
|
fileList: [],
|
|
confirmProgressList: [],
|
|
projectPartDocumentList: [],
|
|
allPersonnelInfoList: [],
|
|
height: 200,
|
|
pageIndex: 1,
|
|
pageSize: 20,
|
|
totalPage: 0,
|
|
selectTypeFlag: [],
|
|
dataListLoading: false,
|
|
uploadDialog:false,
|
|
isEditable: true,
|
|
isMassProductionStage: true,
|
|
warnFlag: false,
|
|
projectAllDocumentCurrentRow: {},
|
|
searchData: {
|
|
site: this.$store.state.user.site,
|
|
userId: this.$store.state.user.id,
|
|
projectId: '',
|
|
projectNo: '',
|
|
uploadedFlag: 'N',
|
|
projectDesc: '',
|
|
projectPartId: '',
|
|
testPartNo: '',
|
|
partDesc: '',
|
|
customerNo: '',
|
|
customerDesc: '',
|
|
buDesc: '',
|
|
projectCategory: '',
|
|
status: '',
|
|
startDate:'',
|
|
endDate:'',
|
|
projectCreationDate: new Date(),
|
|
projectCloseDate:'',
|
|
needDate:'',
|
|
projectManager: '',
|
|
projectOwner: '',
|
|
engineer: '',
|
|
finalPartNo: '',
|
|
closeStartDate: '',
|
|
closeEndDate: '',
|
|
projectLeader: '',
|
|
documentDefinitionListId: '',
|
|
page: 1,
|
|
limit: 10,
|
|
},
|
|
columnProjectAllDocumentList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1BuDesc',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'buDesc',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: 'BU',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectId',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'projectNo',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '项目编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectDesc',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'projectDesc',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '项目名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1TestPartNo',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'testPartNo',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '项目料号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1PartDesc',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'partDesc',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '料号描述',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1customerNo',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: "customerNo",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "客户编码",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1customerDesc',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: "customerDesc",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "客户名称",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectCreationDate',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: "buildDate",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "立项日期",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1Priority',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'priority',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '优先级',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CProjectRegion',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cProjectRegion',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '区域',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectManager',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'projectManagerName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'PM/Sales',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectOwner',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'projectOwnerName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'PjM',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1Engineer',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'engineerName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'Engineer',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CQualityEngineer1',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cQualityEngineer1Name',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CQualityEngineer2',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cQualityEngineer2Name',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'IPQC-Converting',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CQualityEngineer3',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cQualityEngineer3Name',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'FQC1',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CQualityEngineer5',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cQualityEngineer5Name',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'FQC2',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CQualityEngineer6',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cQualityEngineer6Name',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'IQC',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CManufactureEngineer',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cManufactureEngineerName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'MFG',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CQualityEngineer4',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cQualityEngineer4Name',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'SQE',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1DocEngineer',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'docEngineerName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '文档工程师',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1Status',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'status',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '项目状态' ,
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1NeedDate',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'needDate',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '项目物料预计完成日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 130,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CloseDate',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'closeDate',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '转量产日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1FinalPartNo',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'finalPartNo',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'ERP正式料号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1RequiredDeliveryDate',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'planStartDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '打样开始日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 90
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProofingNo',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'proofingNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '打样单号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProofingNumber',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'proofingNumber',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CProjectTypeDb',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'cProjectTypeDb',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '项目分类',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1RequiredDeliveryDate',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'requiredDeliveryDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '打样预计完成日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ActualityDeliveryDate',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'actualityDeliveryDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '实际完成日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1DocumentType',
|
|
tableId: "401006Table1",
|
|
tableName: "BU文档清单表",
|
|
columnProp: 'documentType',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '文档类型',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1FileName',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'fileName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '文件名',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectLeader',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'projectLeader',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '文档负责人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProjectPhase',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'projectPhase',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '项目阶段',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1ProofingPhase',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'proofingPhase',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '打样阶段',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CreateDate',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'createDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '文档创建时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 130
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CreateBy',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'createdBy',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '文档创建人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
}
|
|
],
|
|
columnFileContentArray: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1FileName',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'fileName',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '文件名',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1UploadedFlag',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'uploadedFlag',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '是否上传',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1Conclusion',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'conclusion',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '结论',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1DocumentGroupDesc',
|
|
tableId: "401006Table1",
|
|
tableName: "项目信息待上传文件表",
|
|
columnProp: 'documentGroupDesc',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '文档种类',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CreateDate',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'createDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '创建时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 401006,
|
|
serialNumber: '401006Table1CreateBy',
|
|
tableId: '401006Table1',
|
|
tableName: '项目信息待上传文件表',
|
|
columnProp: 'createdBy',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '创建人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
}
|
|
],
|
|
userBuList: [],
|
|
projectCategoryList: [
|
|
{
|
|
projectCategory: 'Low Risk',
|
|
},
|
|
{
|
|
projectCategory: 'High Risk',
|
|
},
|
|
{
|
|
projectCategory: 'Sustaining',
|
|
}
|
|
],
|
|
statusList: [
|
|
{
|
|
status: '草稿',
|
|
},
|
|
{
|
|
status: '进行中',
|
|
},
|
|
{
|
|
status: '已量产',
|
|
},
|
|
{
|
|
status: '正式量产',
|
|
}
|
|
],
|
|
};
|
|
},
|
|
created() {
|
|
// 获取用户的 site 和 bu
|
|
this.getSiteAndBuByUserName()
|
|
// 校验用户是否收藏
|
|
this.favoriteIsOk()
|
|
// 动态列
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
|
|
// 获取 URL 查询参数
|
|
const { documentDefinitionListId, flag } = this.$route.query;
|
|
// 将查询参数赋值给 searchData
|
|
if (flag === '4'){
|
|
this.$route.query.flag = '1'
|
|
this.searchData.documentDefinitionListId = documentDefinitionListId
|
|
}
|
|
this.getDataList()
|
|
},
|
|
activated() {
|
|
if (this.$route.query.flag) {
|
|
this.getDataList()
|
|
}
|
|
this.$store.commit("sift/commitSearchFunction",this.queryProjectUploadsDocumentList)
|
|
},
|
|
mounted () {
|
|
this.$nextTick(() => {
|
|
this.height = window.innerHeight - 200
|
|
})
|
|
EventBus.$on('updateAgencyMatterForUploads', () => {
|
|
this.getDataList();
|
|
});
|
|
},
|
|
methods: {
|
|
// 获取用户的bu
|
|
getSiteAndBuByUserName () {
|
|
let tempData = {
|
|
username: this.$store.state.user.name,
|
|
}
|
|
getSiteAndBuByUserName(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.userBuList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
//导出excel
|
|
async createExportData() {
|
|
this.searchData.limit = -1
|
|
this.searchData.page = 1
|
|
await searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
|
|
this.exportList = data.page.list
|
|
this.exportList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1];
|
|
item.projectOwnerName = item.projectOwner.split('-')[1];
|
|
item.engineerName = item.engineer.split('-')[1];
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
|
|
if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
|
|
}
|
|
if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
|
|
}
|
|
if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
|
|
}
|
|
if (item.docEngineer !== null && item.docEngineer !== '') {
|
|
item.docEngineerName = item.docEngineer.split('-')[1];
|
|
}
|
|
});
|
|
|
|
for (let i = 0; i < this.exportList.length; i++) {
|
|
if (this.exportList[i].responsibleDepartment === 'R001') {
|
|
this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R002') {
|
|
this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R004') {
|
|
this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R005') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R007') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R008') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R009') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
|
|
} else if (this.exportList[i].responsibleDepartment === 'R011') {
|
|
if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
|
|
}
|
|
} else if (this.exportList[i].responsibleDepartment === 'R012') {
|
|
if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
|
|
this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
|
|
}
|
|
} else if (this.exportList[i].responsibleDepartment === 'R013') {
|
|
if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
|
|
}
|
|
} else if (this.exportList[i].responsibleDepartment === 'R014') {
|
|
if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
|
|
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
|
|
}
|
|
}
|
|
}
|
|
})
|
|
return this.exportList
|
|
},
|
|
|
|
startDownload() {
|
|
},
|
|
|
|
finishDownload() {
|
|
},
|
|
|
|
fields () {
|
|
let json = "{"
|
|
this.columnProjectAllDocumentList.forEach((item, index) => {
|
|
if (index == this.columnProjectAllDocumentList.length - 1) {
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
|
|
} else {
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
|
|
}
|
|
})
|
|
json += "}"
|
|
let s = eval("(" + json + ")")
|
|
return s
|
|
},
|
|
|
|
// 获取数据列表
|
|
getDataList (params) {
|
|
this.selectTypeFlag = params
|
|
// 如果this.pageSize/10为整数
|
|
|
|
this.searchData.limit = this.pageSize % 10 === 0 ? this.pageSize : 20
|
|
this.searchData.page = this.pageIndex
|
|
if (this.$route.query.flag === '2') {
|
|
searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.allPersonnelInfoList = data.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.dataList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1]
|
|
item.projectOwnerName = item.projectOwner.split('-')[1]
|
|
item.engineerName = item.engineer.split('-')[1]
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
|
|
if (item.docEngineer === null || item.docEngineer === ''){
|
|
item.docEngineerName = ''
|
|
} else {
|
|
item.docEngineerName = item.docEngineer.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
|
|
item.cQualityEngineer4Name = ''
|
|
} else {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
|
|
item.cQualityEngineer5Name = ''
|
|
} else {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
|
|
item.cQualityEngineer6Name = ''
|
|
} else {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
|
|
}
|
|
})
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
|
|
this.dataList = data.list
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
|
|
this.pageIndex = 1
|
|
this.pageSize = this.dataList.length + 1
|
|
this.totalPage = this.dataList.length + 1
|
|
}
|
|
}
|
|
// 获取全部人员信息用于下拉框
|
|
this.getAllPersonnelList()
|
|
})
|
|
}else if(this.$route.query.flag === '1') {
|
|
searchProjectUploadsDocumentList(this.searchData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.allPersonnelInfoList = data.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.dataList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1]
|
|
item.projectOwnerName = item.projectOwner.split('-')[1]
|
|
item.engineerName = item.engineer.split('-')[1]
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
|
|
if (item.docEngineer === null || item.docEngineer === ''){
|
|
item.docEngineerName = ''
|
|
} else {
|
|
item.docEngineerName = item.docEngineer.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
|
|
item.cQualityEngineer4Name = ''
|
|
} else {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
|
|
item.cQualityEngineer5Name = ''
|
|
} else {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
|
|
item.cQualityEngineer6Name = ''
|
|
} else {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
|
|
}
|
|
})
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013') {
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014') {
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
|
|
this.dataList = data.list
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
|
|
this.pageIndex = 1
|
|
this.pageSize = this.dataList.length + 1
|
|
this.totalPage = this.dataList.length + 1
|
|
}
|
|
}
|
|
// 获取全部人员信息用于下拉框
|
|
this.getAllPersonnelList()
|
|
})
|
|
}else {
|
|
searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.allDataList = data.list
|
|
let pjmList = []
|
|
// 遍历data.page.list
|
|
data.list.forEach((item) => {
|
|
if (!pjmList.includes(item.projectOwner.split('-')[0])) {
|
|
pjmList.push(item.projectOwner.split('-')[0])
|
|
}
|
|
})
|
|
if (pjmList.includes(this.$store.state.user.name) || this.$store.state.user.name === 'admin') {
|
|
this.warnFlag = true
|
|
this.dataList = data.page.list
|
|
this.allPersonnelInfoList = data.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.dataList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1]
|
|
item.projectOwnerName = item.projectOwner.split('-')[1]
|
|
item.engineerName = item.engineer.split('-')[1]
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
|
|
if (item.docEngineer === null || item.docEngineer === ''){
|
|
item.docEngineerName = ''
|
|
} else {
|
|
item.docEngineerName = item.docEngineer.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
|
|
item.cQualityEngineer4Name = ''
|
|
} else {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
|
|
item.cQualityEngineer5Name = ''
|
|
} else {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
|
|
item.cQualityEngineer6Name = ''
|
|
} else {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
|
|
}
|
|
})
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001') {
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R002') {
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R004') {
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R005') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R007') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R008') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R009') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null) {
|
|
console.log('3',this.searchData.projectLeader)
|
|
this.dataList = data.list
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001') {
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R002') {
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R004') {
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R005') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R007') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R008') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R009') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R012') {
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if (this.dataList[i].responsibleDepartment === 'R011') {
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if (this.dataList[i].responsibleDepartment === 'R013') {
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if (this.dataList[i].responsibleDepartment === 'R014') {
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
|
|
this.pageIndex = 1
|
|
this.pageSize = this.dataList.length + 1
|
|
this.totalPage = this.dataList.length + 1
|
|
}
|
|
} else {
|
|
this.$route.query.flag = '1'
|
|
}
|
|
// 获取全部人员信息用于下拉框
|
|
this.getAllPersonnelList()
|
|
}
|
|
})
|
|
}
|
|
},
|
|
|
|
queryProjectUploadsDocumentList (params) {
|
|
this.selectTypeFlag = params
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
if (params !== null && params !== undefined) {
|
|
params.limit = this.pageSize
|
|
params.page = this.pageIndex
|
|
params.site = this.$store.state.user.site
|
|
params.userName = this.$store.state.user.name
|
|
} else {
|
|
params = this.searchData
|
|
}
|
|
if (this.$route.query.flag === '2') {
|
|
queryProjectOverUploadsDocumentList(params).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.allPersonnelInfoList = data.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.dataList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1]
|
|
item.projectOwnerName = item.projectOwner.split('-')[1]
|
|
item.engineerName = item.engineer.split('-')[1]
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
|
|
if (item.docEngineer === null || item.docEngineer === ''){
|
|
item.docEngineerName = ''
|
|
} else {
|
|
item.docEngineerName = item.docEngineer.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
|
|
item.cQualityEngineer4Name = ''
|
|
} else {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
|
|
item.cQualityEngineer5Name = ''
|
|
} else {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
|
|
item.cQualityEngineer6Name = ''
|
|
} else {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
|
|
}
|
|
})
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
}else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
|
|
this.dataList = data.list
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
|
|
this.pageIndex = 1
|
|
this.pageSize = -1
|
|
this.totalPage = this.dataList.length + 1
|
|
}
|
|
}
|
|
// 获取全部人员信息用于下拉框
|
|
this.getAllPersonnelList()
|
|
})
|
|
}else if(this.$route.query.flag === '1') {
|
|
queryProjectUploadsDocumentList(params).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.allPersonnelInfoList = data.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.dataList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1]
|
|
item.projectOwnerName = item.projectOwner.split('-')[1]
|
|
item.engineerName = item.engineer.split('-')[1]
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
|
|
if (item.docEngineer === null || item.docEngineer === ''){
|
|
item.docEngineerName = ''
|
|
} else {
|
|
item.docEngineerName = item.docEngineer.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
|
|
item.cQualityEngineer4Name = ''
|
|
} else {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
|
|
item.cQualityEngineer5Name = ''
|
|
} else {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
|
|
item.cQualityEngineer6Name = ''
|
|
} else {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
|
|
}
|
|
})
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013') {
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014') {
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
|
|
this.dataList = data.list
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
|
|
this.pageIndex = 1
|
|
this.pageSize = -1
|
|
this.totalPage = this.dataList.length + 1
|
|
}
|
|
}
|
|
// 获取全部人员信息用于下拉框
|
|
this.getAllPersonnelList()
|
|
})
|
|
}else {
|
|
queryAllProjectUploadsDocumentList(params).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.allDataList = data.list
|
|
let pjmList = []
|
|
// 遍历data.page.list
|
|
data.list.forEach((item) => {
|
|
if (!pjmList.includes(item.projectOwner.split('-')[0])) {
|
|
pjmList.push(item.projectOwner.split('-')[0])
|
|
}
|
|
})
|
|
if (pjmList.includes(this.$store.state.user.name)){
|
|
this.warnFlag = true
|
|
this.dataList = data.page.list
|
|
this.allPersonnelInfoList = data.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.dataList.forEach((item) => {
|
|
item.projectManagerName = item.projectManager.split('-')[1]
|
|
item.projectOwnerName = item.projectOwner.split('-')[1]
|
|
item.engineerName = item.engineer.split('-')[1]
|
|
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
|
|
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
|
|
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
|
|
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
|
|
if (item.docEngineer === null || item.docEngineer === ''){
|
|
item.docEngineerName = ''
|
|
} else {
|
|
item.docEngineerName = item.docEngineer.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer4 === null || item.cQualityEngineer4 === ''){
|
|
item.cQualityEngineer4Name = ''
|
|
} else {
|
|
item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer5 === null || item.cQualityEngineer5 === ''){
|
|
item.cQualityEngineer5Name = ''
|
|
} else {
|
|
item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
|
|
}
|
|
if (item.cQualityEngineer6 === null || item.cQualityEngineer6 === ''){
|
|
item.cQualityEngineer6Name = ''
|
|
} else {
|
|
item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
|
|
}
|
|
})
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001') {
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R002') {
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R004') {
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R005') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R007') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R008') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if (this.dataList[i].responsibleDepartment === 'R009') {
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
|
|
this.dataList = data.list
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].responsibleDepartment === 'R001'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R002'){
|
|
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R004'){
|
|
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R005'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R007'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R008'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R009'){
|
|
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(this.dataList[i].responsibleDepartment === 'R012'){
|
|
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R011'){
|
|
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R013'){
|
|
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(this.dataList[i].responsibleDepartment === 'R014'){
|
|
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
|
|
this.dataList[i].projectLeader = ''
|
|
} else {
|
|
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
|
|
this.pageIndex = 1
|
|
this.pageSize = -1
|
|
this.totalPage = this.dataList.length + 1
|
|
}
|
|
} else {
|
|
this.$route.query.flag = '1'
|
|
}
|
|
|
|
// 获取全部人员信息用于下拉框
|
|
this.getAllPersonnelList()
|
|
}
|
|
})
|
|
}
|
|
},
|
|
|
|
// 获取全部人员信息用于下拉框
|
|
getAllPersonnelList() {
|
|
|
|
let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
|
|
|
|
// 找出所有的同时过滤出唯一的 project owners, managers, and engineers
|
|
const allPersonnelList = [];
|
|
const projectOwnersMap = new Map();
|
|
const projectManagersMap = new Map();
|
|
const engineersMap = new Map();
|
|
const finalPartNosMap = new Map();
|
|
const projectProjectLeadersMap = new Map();
|
|
|
|
for (let i = 0; i < allPersonnelInfoDataList.length; i++) {
|
|
if (allPersonnelInfoDataList[i].responsibleDepartment === 'R001'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectManager.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R002'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectOwner.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R004'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].engineer.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R005'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer1.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R007'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer2.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R008'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer3.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R009'){
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cManufactureEngineer.split("-")[1]
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R012'){
|
|
if (allPersonnelInfoDataList[i].docEngineer === null || allPersonnelInfoDataList[i].docEngineer === ''){
|
|
allPersonnelInfoDataList[i].projectLeader = ''
|
|
} else {
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].docEngineer.split("-")[1]
|
|
}
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R011'){
|
|
if (allPersonnelInfoDataList[i].cQualityEngineer4 === null || allPersonnelInfoDataList[i].cQualityEngineer4 === ''){
|
|
allPersonnelInfoDataList[i].projectLeader = ''
|
|
} else {
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer4.split("-")[1]
|
|
}
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R013'){
|
|
if (allPersonnelInfoDataList[i].cQualityEngineer5 === null || allPersonnelInfoDataList[i].cQualityEngineer5 === ''){
|
|
allPersonnelInfoDataList[i].projectLeader = ''
|
|
} else {
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer5.split("-")[1]
|
|
}
|
|
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R014'){
|
|
if (allPersonnelInfoDataList[i].cQualityEngineer6 === null || allPersonnelInfoDataList[i].cQualityEngineer6 === ''){
|
|
allPersonnelInfoDataList[i].projectLeader = ''
|
|
} else {
|
|
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer6.split("-")[1]
|
|
}
|
|
}
|
|
}
|
|
|
|
allPersonnelInfoDataList.forEach((item) => {
|
|
// Handle project owners
|
|
if (!projectOwnersMap.has(item.projectOwner)) {
|
|
const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
|
|
projectOwnersMap.set(item.projectOwner, {
|
|
projectOwnerId,
|
|
projectOwner: item.projectOwner,
|
|
projectOwnerName: item.projectOwner.split('-')[1]
|
|
});
|
|
allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
|
|
}
|
|
|
|
// Handle project managers
|
|
if (!projectManagersMap.has(item.projectManager)) {
|
|
const projectManagerId = projectManagersMap.size + 1;
|
|
projectManagersMap.set(item.projectManager, {
|
|
projectManagerId,
|
|
projectManager: item.projectManager,
|
|
projectManagerName: item.projectManager.split('-')[1]
|
|
});
|
|
allPersonnelList.push(projectManagersMap.get(item.projectManager));
|
|
}
|
|
|
|
// Handle engineers
|
|
if (!engineersMap.has(item.engineer)) {
|
|
const engineerId = engineersMap.size + 1;
|
|
engineersMap.set(item.engineer, {
|
|
engineerId,
|
|
engineer: item.engineer,
|
|
engineerName: item.engineer.split('-')[1]
|
|
});
|
|
allPersonnelList.push(engineersMap.get(item.engineer));
|
|
}
|
|
|
|
// Handle finalPartNos
|
|
if (!finalPartNosMap.has(item.finalPartNo) && item.finalPartNo !== null) {
|
|
const finalPartNoId = finalPartNosMap.size + 1;
|
|
finalPartNosMap.set(item.finalPartNo, {
|
|
finalPartNoId,
|
|
finalPartNo: item.finalPartNo,
|
|
});
|
|
allPersonnelList.push(finalPartNosMap.get(item.finalPartNo));
|
|
}
|
|
|
|
// Handle projectProjectLeaders
|
|
if (!projectProjectLeadersMap.has(item.projectLeader) && item.projectLeader !== null && item.projectLeader !== '') {
|
|
const projectLeaderId = projectProjectLeadersMap.size + 1;
|
|
projectProjectLeadersMap.set(item.projectLeader, {
|
|
projectLeaderId,
|
|
projectLeader: item.projectLeader,
|
|
});
|
|
allPersonnelList.push(projectProjectLeadersMap.get(item.projectLeader));
|
|
}
|
|
});
|
|
|
|
this.allPersonnelInfoList = allPersonnelList;
|
|
},
|
|
|
|
warnSendMail(row) {
|
|
this.$confirm('确认发送提醒?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
warnSendMailHandle(row).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.$message({
|
|
message: '发送成功',
|
|
type: 'success'
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
this.$message({
|
|
type: 'info',
|
|
message: '已取消发送'
|
|
});
|
|
});
|
|
},
|
|
|
|
// 每页数
|
|
sizeChangeHandle (val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
|
|
this.queryProjectUploadsDocumentList(this.selectTypeFlag)
|
|
} else {
|
|
this.getDataList()
|
|
}
|
|
},
|
|
// 当前页
|
|
currentChangeHandle (val) {
|
|
this.pageIndex = val
|
|
if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
|
|
this.queryProjectUploadsDocumentList(this.selectTypeFlag)
|
|
} else {
|
|
this.getDataList()
|
|
}
|
|
},
|
|
|
|
filteredProjectAllDocumentList() {
|
|
this.dataList.map(item => {
|
|
item.id = item.documentDefinitionListId
|
|
})
|
|
return this.dataList.filter(item => item.uploadedFlag !== 'Y')
|
|
},
|
|
projectAllDocumentClickRow (row) {
|
|
this.projectAllDocumentCurrentRow = JSON.parse(JSON.stringify(row))
|
|
},
|
|
|
|
toMes (row) {
|
|
this.$router.push({ path: 'eam-eamProjectPartInfo', query: { projectNo: row.projectNo , testPartNo:row.testPartNo}})
|
|
},
|
|
|
|
/**
|
|
* 上传文件
|
|
*/
|
|
uploadFile (row) {
|
|
this.isEditable = false;
|
|
this.fileList = []
|
|
if (row.documentId === null || row.documentId === undefined || row.documentId === '') {
|
|
this.projectAllDocumentCurrentRow.proofingId= -1
|
|
this.projectAllDocumentCurrentRow.proofingNo = '*'
|
|
this.isMassProductionStage = true
|
|
this.folder = 'projectPMPDocumentFiles'
|
|
} else {
|
|
this.isMassProductionStage = false
|
|
this.folder = 'projectPPDocumentFiles'
|
|
}
|
|
this.getProofDocument(row)
|
|
this.uploadDialog = true
|
|
//打开组件 去做新增业务
|
|
// this.$nextTick(() => {
|
|
// this.$refs.partUploadFile.init(currentData);
|
|
// })
|
|
},
|
|
|
|
getProofDocument (row) {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
buNo: row.buNo,
|
|
projectId: row.projectId,
|
|
projectPartId: row.projectPartId,
|
|
proofingId: row.proofingId,
|
|
userId: this.$store.state.user.id,
|
|
languageCode: this.$i18n.locale
|
|
}
|
|
getProofDocument(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.projectPartDocumentList = data.page.list
|
|
for (let i = 0; i < this.projectPartDocumentList.length; i++) {
|
|
this.projectPartDocumentList[i].buNo = this.tempData.buNo
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
formatDate(row, column) {
|
|
// row 是当前行的数据对象
|
|
// column 是当前列的属性信息对象
|
|
const date = row[column.property];
|
|
if (date) {
|
|
const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
|
|
return s.replace(/\//g, '-')
|
|
} else {
|
|
return '';
|
|
}
|
|
},
|
|
rowStyle ({row}) {
|
|
},
|
|
getCombinedDocumentType(row) {
|
|
// 根据您的需求,组合或拼接需要显示的字段
|
|
if (row.documentType === null || row.documentType === undefined) {
|
|
return row.documentDesc
|
|
}else {
|
|
return row.documentType
|
|
}
|
|
},
|
|
// 校验用户是否收藏
|
|
favoriteIsOk () {
|
|
let userFavorite = {
|
|
userId: this.$store.state.user.id,
|
|
languageCode: this.$i18n.locale
|
|
}
|
|
userFavoriteList(userFavorite).then(({data}) => {
|
|
for (let i = 0; i < data.list.length; i++) {
|
|
if (this.$route.meta.menuId === data.list[i].menuId) {
|
|
this.favorite = true
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
// 收藏 OR 取消收藏
|
|
favoriteFunction () {
|
|
let userFavorite = {
|
|
userId: this.$store.state.user.id,
|
|
functionId: this.$route.meta.menuId,
|
|
}
|
|
if (this.favorite) {
|
|
removeUserFavorite(userFavorite).then(({data}) => {
|
|
this.$message.success(data.msg)
|
|
this.favorite = false
|
|
})
|
|
} else {
|
|
// 收藏
|
|
saveUserFavorite(userFavorite).then(({data}) => {
|
|
this.$message.success(data.msg)
|
|
this.favorite = true
|
|
})
|
|
}
|
|
},
|
|
|
|
// 动态列开始 获取 用户保存的 格式列
|
|
async getTableUserColumn(tableId, columnId) {
|
|
let queryTableUser = {
|
|
userId: this.$store.state.user.name,
|
|
functionId: this.$route.meta.menuId,
|
|
tableId: tableId,
|
|
status: true,
|
|
languageCode: this.$i18n.locale
|
|
}
|
|
await getTableUserListLanguage(queryTableUser).then(({data}) => {
|
|
if (data.rows.length > 0) {
|
|
//this.columnList1 = []
|
|
switch (columnId) {
|
|
case 1:
|
|
this.columnProjectAllDocumentList = data.rows
|
|
break;
|
|
// case 2:
|
|
// this.detailColumnList = data.rows
|
|
// break;
|
|
// case 3:
|
|
// this.columnList2 = data.rows
|
|
// break;
|
|
// case 4:
|
|
// this.columnList3 = data.rows
|
|
// break;
|
|
}
|
|
} else {
|
|
this.getColumnList(tableId, columnId)
|
|
}
|
|
})
|
|
},
|
|
|
|
// 获取 tableDefault 列
|
|
async getColumnList (tableId, columnId) {
|
|
let queryTable= {
|
|
functionId: this.$route.meta.menuId,
|
|
tableId: tableId,
|
|
languageCode: this.$i18n.locale
|
|
}
|
|
await getTableDefaultListLanguage(queryTable).then(({data}) => {
|
|
if (!data.rows.length == 0) {
|
|
switch (columnId) {
|
|
case 1:
|
|
this.columnProjectAllDocumentList = data.rows
|
|
break;
|
|
// case 2:
|
|
// this.detailColumnList = data.rows
|
|
// break;
|
|
// case 3:
|
|
// this.columnList2 = data.rows
|
|
// break;
|
|
// case 4:
|
|
// this.columnList3 = data.rows
|
|
// break;
|
|
}
|
|
} else {
|
|
// this.showDefault = true.
|
|
}
|
|
})
|
|
},
|
|
//获取按钮的权限数据
|
|
getButtonAuthData () {
|
|
let searchFlag = this.isAuth(this.menuId+":search")
|
|
let saveFlag = this.isAuth(this.menuId+":save")
|
|
let updateFlag = this.isAuth(this.menuId+":update")
|
|
let deleteFlag = this.isAuth(this.menuId+":delete")
|
|
//处理页面的权限数据
|
|
this.authSearch = !searchFlag
|
|
this.authSave = !saveFlag
|
|
this.authUpdate = !updateFlag
|
|
this.authDelete = !deleteFlag
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.card-item {
|
|
cursor: pointer;
|
|
margin-bottom: 20px;
|
|
transition: transform 0.3s, box-shadow 0.3s;
|
|
overflow: hidden;
|
|
//padding: 10px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
height: 208px;
|
|
width: 230px;
|
|
margin-left: 40px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.card-item:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.card-title {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
margin-bottom: 10px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.card-count {
|
|
font-size: 55px;
|
|
color: #17B3A3;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
margin-top: 50px;
|
|
}
|
|
|
|
.project-list {
|
|
font-size: 12px;
|
|
color: #333;
|
|
line-height: 1.5;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.el-divider {
|
|
margin: 10px 0;
|
|
}
|
|
</style>
|