Browse Source

增加Alpha、天线;项目分类从数据库取

master
han\hanst 3 weeks ago
parent
commit
b3fdb539a4
  1. 1
      src/api/eam/eam.js
  2. 103
      src/views/modules/eam/eamBuDocumentListDefinition.vue
  3. 104
      src/views/modules/eam/eamProjectInfo.vue
  4. 64
      src/views/modules/eam/eamProjectPartInfo.vue

1
src/api/eam/eam.js

@ -208,6 +208,7 @@ export const getDetail= data => createAPI(`/pms/eam/getDetail`,'post',data)
export const AddTreeselect= data => createAPI(`/pms/eam/AddTreeselect`,'post',data) export const AddTreeselect= data => createAPI(`/pms/eam/AddTreeselect`,'post',data)
export const EditTreeselect= data => createAPI(`/pms/eam/EditTreeselect`,'post',data) export const EditTreeselect= data => createAPI(`/pms/eam/EditTreeselect`,'post',data)
export const getSiteAndBuByUserName= data => createAPI(`/pms/eam/getSiteAndBuByUserName`,'post',data) export const getSiteAndBuByUserName= data => createAPI(`/pms/eam/getSiteAndBuByUserName`,'post',data)
export const getProjectCategoryByBu= data => createAPI(`/pms/eam/getProjectCategoryByBu`,'post',data)
export const eamCheckRecordSearch= data => createAPI(`/pms/eam/eamCheckRecordSearch`,'post',data) export const eamCheckRecordSearch= data => createAPI(`/pms/eam/eamCheckRecordSearch`,'post',data)
export const eamCheckRecordSearch2= data => createAPI(`/pms/eam/eamCheckRecordSearch2`,'post',data) export const eamCheckRecordSearch2= data => createAPI(`/pms/eam/eamCheckRecordSearch2`,'post',data)

103
src/views/modules/eam/eamBuDocumentListDefinition.vue

@ -8,7 +8,7 @@
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px" @change="searchBuChangeHandle">
<el-option <el-option
v-for = "i in userBuList" v-for = "i in userBuList"
:key = "i.buNo" :key = "i.buNo"
@ -30,7 +30,7 @@
<el-form-item :label="'项目分类'"> <el-form-item :label="'项目分类'">
<el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px"> <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
<el-option <el-option
v-for = "i in projectCategoryList"
v-for = "i in searchProjectCategoryList"
:key = "i.projectCategory" :key = "i.projectCategory"
:label = "i.projectCategory" :label = "i.projectCategory"
:value = "i.projectCategory"> :value = "i.projectCategory">
@ -111,7 +111,7 @@
<el-dialog title="BU文档清单" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="455px"> <el-dialog title="BU文档清单" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="455px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="BU" prop="bu" :rules="rules.bu"> <el-form-item label="BU" prop="bu" :rules="rules.bu">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 110px">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 110px" @change="modalBuChangeHandle">
<el-option <el-option
v-for = "i in userBuList" v-for = "i in userBuList"
:key = "i.buNo" :key = "i.buNo"
@ -190,6 +190,7 @@
eamBuDocumentSave, eamBuDocumentSave,
eamBuDocumentEdit, eamBuDocumentEdit,
eamBuDocumentDelete, eamBuDocumentDelete,
getProjectCategoryByBu,
getSiteAndBuByUserName getSiteAndBuByUserName
} from "@/api/eam/eam.js" } from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -535,17 +536,8 @@
} }
] ]
}, },
projectCategoryList: [
{
projectCategory: 'Low Risk',
},
{
projectCategory: 'High Risk',
},
{
projectCategory: 'Sustaining',
}
],
searchProjectCategoryList: [],
projectCategoryList: [],
projectPhaseList: [ projectPhaseList: [
{ {
projectPhase: 'Sample', projectPhase: 'Sample',
@ -610,9 +602,88 @@
getSiteAndBuByUserName(tempData).then(({data}) => { getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.userBuList = data.rows this.userBuList = data.rows
const defaultBuNo = this.userBuList.length > 0 ? this.getBuNoByJoinedValue(this.userBuList[0].buNo) : ''
this.loadSearchProjectCategory('')
this.loadModalProjectCategory(defaultBuNo)
} else {
this.userBuList = []
this.searchProjectCategoryList = []
this.projectCategoryList = []
}
})
},
// site_bu bu_no
getBuNoByJoinedValue (buValue) {
if (!buValue) {
return ''
}
let buParts = buValue.split('_')
if (buParts.length >= 2) {
return buParts[1]
}
return buValue
},
// BU bu_no
getBuNoByBuDesc (buDesc) {
if (!buDesc) {
return ''
}
let matchBu = this.userBuList.find(item => item.buDesc === buDesc)
if (!matchBu) {
return ''
}
return this.getBuNoByJoinedValue(matchBu.buNo)
},
//
loadSearchProjectCategory (buNo) {
let inData = {
site: this.$store.state.user.site,
buNo: buNo || ''
}
getProjectCategoryByBu(inData).then(({data}) => {
if (data && data.code === 0) {
this.searchProjectCategoryList = data.rows || []
} else {
this.searchProjectCategoryList = []
}
}).catch(() => {
this.searchProjectCategoryList = []
})
},
//
loadModalProjectCategory (buNo, currentProjectCategory) {
let inData = {
site: this.$store.state.user.site,
buNo: buNo || ''
}
getProjectCategoryByBu(inData).then(({data}) => {
if (data && data.code === 0) {
let categoryList = (data.rows || []).slice()
if (currentProjectCategory && !categoryList.some(item => item.projectCategory === currentProjectCategory)) {
categoryList.push({
projectCategory: currentProjectCategory
})
}
this.projectCategoryList = categoryList
} else {
this.projectCategoryList = []
} }
}).catch(() => {
this.projectCategoryList = []
}) })
}, },
// BU
searchBuChangeHandle (buDesc) {
this.searchData.projectCategory = ''
let buNo = this.getBuNoByBuDesc(buDesc)
this.loadSearchProjectCategory(buNo)
},
// BU
modalBuChangeHandle (buValue) {
this.modalData.projectCategory = ''
let buNo = this.getBuNoByJoinedValue(buValue)
this.loadModalProjectCategory(buNo)
},
// S // S
getBaseList (val,type) { getBaseList (val,type) {
@ -795,6 +866,8 @@
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
} }
let defaultBuNo = this.getBuNoByJoinedValue(this.modalData.bu)
this.loadModalProjectCategory(defaultBuNo)
this.modalDisableFlag = false this.modalDisableFlag = false
this.modalFlag = true this.modalFlag = true
}, },
@ -830,6 +903,8 @@
createBy: this.modalData.createBy, createBy: this.modalData.createBy,
updateBy: this.modalData.updateBy, updateBy: this.modalData.updateBy,
} }
let editBuNo = this.getBuNoByJoinedValue(this.modalData.bu)
this.loadModalProjectCategory(editBuNo, this.modalData.projectCategory)
this.disableButton = true this.disableButton = true
this.modalDisableFlag = true this.modalDisableFlag = true
this.modalFlag = true this.modalFlag = true

104
src/views/modules/eam/eamProjectInfo.vue

@ -8,7 +8,7 @@
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px" @change="searchBuChangeHandle">
<el-option <el-option
v-for = "i in userBuList" v-for = "i in userBuList"
:key = "i.buNo" :key = "i.buNo"
@ -32,7 +32,7 @@
<el-form-item :label="'项目分类'"> <el-form-item :label="'项目分类'">
<el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px"> <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
<el-option <el-option
v-for = "i in projectCategoryList"
v-for = "i in searchProjectCategoryList"
:key = "i.projectCategory" :key = "i.projectCategory"
:label = "i.projectCategory" :label = "i.projectCategory"
:value = "i.projectCategory"> :value = "i.projectCategory">
@ -182,7 +182,7 @@
<template #label> <template #label>
<span class="big-label">BU</span> <span class="big-label">BU</span>
</template> </template>
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 151px">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 151px" @change="modalBuChangeHandle">
<el-option <el-option
v-for = "i in userBuList" v-for = "i in userBuList"
:key = "i.buNo" :key = "i.buNo"
@ -1005,7 +1005,7 @@
</template> </template>
<script> <script>
import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
import {getProjectCategoryByBu, getSiteAndBuByUserName} from "@/api/eam/eam.js"
import { import {
searchBusinessInfo, searchBusinessInfo,
searchBusinessInfo1, searchBusinessInfo1,
@ -2683,17 +2683,8 @@ import {updateColumnSize} from "../../../api/table";
} }
], ],
}, },
projectCategoryList: [
{
projectCategory: 'Low Risk',
},
{
projectCategory: 'High Risk',
},
{
projectCategory: 'Sustaining',
}
],
searchProjectCategoryList: [],
projectCategoryList: [],
cProjectRegionList: [ cProjectRegionList: [
{ {
cProjectRegion: 'Global', cProjectRegion: 'Global',
@ -2799,9 +2790,88 @@ import {updateColumnSize} from "../../../api/table";
getSiteAndBuByUserName(tempData).then(({data}) => { getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.userBuList = data.rows this.userBuList = data.rows
const defaultBuNo = this.userBuList.length > 0 ? this.getBuNoByJoinedValue(this.userBuList[0].buNo) : ''
this.loadSearchProjectCategory('')
this.loadModalProjectCategory(defaultBuNo)
} else {
this.userBuList = []
this.searchProjectCategoryList = []
this.projectCategoryList = []
} }
}) })
}, },
// site_bu bu_no
getBuNoByJoinedValue (buValue) {
if (!buValue) {
return ''
}
let buParts = buValue.split('_')
if (buParts.length >= 2) {
return buParts[1]
}
return buValue
},
// BU bu_no
getBuNoByBuDesc (buDesc) {
if (!buDesc) {
return ''
}
let matchBu = this.userBuList.find(item => item.buDesc === buDesc)
if (!matchBu) {
return ''
}
return this.getBuNoByJoinedValue(matchBu.buNo)
},
//
loadSearchProjectCategory (buNo) {
let inData = {
site: this.$store.state.user.site,
buNo: buNo || ''
}
getProjectCategoryByBu(inData).then(({data}) => {
if (data && data.code === 0) {
this.searchProjectCategoryList = data.rows || []
} else {
this.searchProjectCategoryList = []
}
}).catch(() => {
this.searchProjectCategoryList = []
})
},
//
loadModalProjectCategory (buNo, currentProjectCategory) {
let inData = {
site: this.$store.state.user.site,
buNo: buNo || ''
}
getProjectCategoryByBu(inData).then(({data}) => {
if (data && data.code === 0) {
let categoryList = (data.rows || []).slice()
if (currentProjectCategory && !categoryList.some(item => item.projectCategory === currentProjectCategory)) {
categoryList.push({
projectCategory: currentProjectCategory
})
}
this.projectCategoryList = categoryList
} else {
this.projectCategoryList = []
}
}).catch(() => {
this.projectCategoryList = []
})
},
// BU
searchBuChangeHandle (buDesc) {
this.searchData.projectCategory = ''
let buNo = this.getBuNoByBuDesc(buDesc)
this.loadSearchProjectCategory(buNo)
},
// BU
modalBuChangeHandle (buValue) {
this.modalData.projectCategory = ''
let buNo = this.getBuNoByJoinedValue(buValue)
this.loadModalProjectCategory(buNo)
},
// S // S
getBaseList (val,type) { getBaseList (val,type) {
@ -3398,6 +3468,8 @@ import {updateColumnSize} from "../../../api/table";
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
} }
let defaultBuNo = this.getBuNoByJoinedValue(this.modalData.bu)
this.loadModalProjectCategory(defaultBuNo)
this.modalDisableFlag = false this.modalDisableFlag = false
this.modalPartDisableFlag = false this.modalPartDisableFlag = false
this.clearButtonFlag = false this.clearButtonFlag = false
@ -3469,6 +3541,8 @@ import {updateColumnSize} from "../../../api/table";
if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== ''){ if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== ''){
this.modalData.cQualityEngineer7Name= row.cQualityEngineer7.split('-')[1] // this.modalData.cQualityEngineer7Name= row.cQualityEngineer7.split('-')[1] //
} }
let editBuNo = this.getBuNoByJoinedValue(this.modalData.bu)
this.loadModalProjectCategory(editBuNo, this.modalData.projectCategory)
this.modalDisableFlag = true this.modalDisableFlag = true
this.modalPartDisableFlag = false this.modalPartDisableFlag = false
this.clearButtonFlag = true this.clearButtonFlag = true

64
src/views/modules/eam/eamProjectPartInfo.vue

@ -8,7 +8,7 @@
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'BU'"> <el-form-item :label="'BU'">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px" @change="searchBuChangeHandle">
<el-option <el-option
v-for = "i in userBuList" v-for = "i in userBuList"
:key = "i.buNo" :key = "i.buNo"
@ -1694,7 +1694,7 @@
</template> </template>
<script> <script>
import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
import {getProjectCategoryByBu, getSiteAndBuByUserName} from "@/api/eam/eam.js"
import { import {
searchBusinessInfo, searchBusinessInfo,
searchBusinessInfo1, searchBusinessInfo1,
@ -3780,17 +3780,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
} }
], ],
}, },
projectCategoryList: [
{
projectCategory: 'Low Risk',
},
{
projectCategory: 'High Risk',
},
{
projectCategory: 'Sustaining',
}
],
projectCategoryList: [],
cProjectRegionList: [ cProjectRegionList: [
{ {
cProjectRegion: 'Global', cProjectRegion: 'Global',
@ -3915,9 +3905,57 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
getSiteAndBuByUserName(tempData).then(({data}) => { getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.userBuList = data.rows this.userBuList = data.rows
this.loadSearchProjectCategory('')
} else {
this.userBuList = []
this.projectCategoryList = []
} }
}) })
}, },
// site_bu bu_no
getBuNoByJoinedValue (buValue) {
if (!buValue) {
return ''
}
let buParts = buValue.split('_')
if (buParts.length >= 2) {
return buParts[1]
}
return buValue
},
// BU bu_no
getBuNoByBuDesc (buDesc) {
if (!buDesc) {
return ''
}
let matchBu = this.userBuList.find(item => item.buDesc === buDesc)
if (!matchBu) {
return ''
}
return this.getBuNoByJoinedValue(matchBu.buNo)
},
//
loadSearchProjectCategory (buNo) {
let inData = {
site: this.$store.state.user.site,
buNo: buNo || ''
}
getProjectCategoryByBu(inData).then(({data}) => {
if (data && data.code === 0) {
this.projectCategoryList = data.rows || []
} else {
this.projectCategoryList = []
}
}).catch(() => {
this.projectCategoryList = []
})
},
// BU
searchBuChangeHandle (buDesc) {
this.searchData.projectCategory = ''
let buNo = this.getBuNoByBuDesc(buDesc)
this.loadSearchProjectCategory(buNo)
},
// S // S
getBaseList (val,type) { getBaseList (val,type) {

Loading…
Cancel
Save