|
@@ -94,7 +94,7 @@
|
|
|
<el-dialog :title="$t('timeReportExport')" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
<el-form ref="form3" :model="exportParam" >
|
|
|
<el-form-item prop="projectCategoryId" :label="$t('projectclassification')" v-if="radio == $t('projectclassification')||radio==$t('other.project')">
|
|
|
- <el-select v-model="exportParam.projectCategoryId" :placeholder="$t('classificationitems')" clearable style="width:350px;" filterable="true">
|
|
|
+ <el-select v-model="exportParam.projectCategoryId" :placeholder="$t('classificationitems')" clearable style="width:350px;" filterable="true" @change="filterCategory">
|
|
|
<el-option v-for="item in categoryList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -254,7 +254,8 @@
|
|
|
proJuctId:'',
|
|
|
possWidth: 300,
|
|
|
possradio: '1',
|
|
|
- departmentadio: '1'
|
|
|
+ departmentadio: '1',
|
|
|
+ newProjectList: []
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -347,13 +348,21 @@
|
|
|
this.$set(this.exportParam, 'exportContent', 'hoursAndCost')
|
|
|
}
|
|
|
},
|
|
|
+ filterCategory() {
|
|
|
+ this.exportParam.projectId = ''
|
|
|
+ const id = this.exportParam.projectCategoryId
|
|
|
+ const list = JSON.parse(JSON.stringify(this.newProjectList))
|
|
|
+ this.projectList = list.filter(item => item.category == id)
|
|
|
+ },
|
|
|
//获取我的项目列表
|
|
|
getMyProjectList() {
|
|
|
this.http.post('/project/getProjectList', {
|
|
|
+ category: this.exportParam.projectCategoryId || ''
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.projectList = res.data;
|
|
|
+ this.newProjectList = res.data
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|