|
@@ -3,6 +3,30 @@
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
|
<el-form :inline="true">
|
|
|
+ <el-form-item label="项目列表">
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item >
|
|
|
+ <div>
|
|
|
+ <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true">
|
|
|
+ <el-select v-model="searchField" style="width:120px;" slot="prepend" placeholder="请选择">
|
|
|
+ <el-option label="项目名称" value=1 ></el-option>
|
|
|
+ <el-option label="项目编码" value=2></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item v-if="user.company.packageProject==1">
|
|
|
+ <span style="margin-left:10px;margin-right:10px;">状态</span>
|
|
|
+ <el-select v-model="status" style="width:120px;" placeholder="请选择" @change="searchList">
|
|
|
+ <el-option label="全部" value=0 ></el-option>
|
|
|
+ <el-option label="进行中" value=1 ></el-option>
|
|
|
+ <el-option label="已完成" value=2 ></el-option>
|
|
|
+ <el-option label="已撤销" value=3 ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item style="float:right;">
|
|
|
<el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增项目</el-link>
|
|
|
</el-form-item>
|
|
@@ -17,20 +41,34 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="projectCode" label="项目编码" sortable width="150"></el-table-column>
|
|
|
- <el-table-column prop="projectName" label="项目名称" sortable></el-table-column>
|
|
|
+ <el-table-column prop="projectName" label="项目名称" sortable>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link type="primary" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="inchargerName" label="负责人" sortable width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-link type="primary" @click="showUser(scope.row.inchargerId)">{{scope.row.inchargerName}}</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="participator" label="参与者" sortable>
|
|
|
-
|
|
|
<template slot-scope="scope">
|
|
|
<v-for v-for="par in scope.row.participator" :key="par.id" >
|
|
|
<el-link style="margin-right:10px;" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
|
|
|
</v-for>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!--专业项目协作-->
|
|
|
+ <el-table-column prop="status" label="状态" width="100" v-if="user.company.packageProject == 1">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="progress" label="完成度" width="100" v-if="user.company.packageProject == 1">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.progress==null?"-":scope.row.progress}}%
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" width="290">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-if="user.role>0" size="small" type="primary" @click="subProject(scope.row)">子项目</el-button>
|
|
@@ -55,7 +93,7 @@
|
|
|
|
|
|
<!--新增界面-->
|
|
|
<el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="600px">
|
|
|
- <el-form ref="form1" :model="addForm" :rules="rules" label-width="100px">
|
|
|
+ <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
|
|
|
<el-form-item label="项目编号" >
|
|
|
<el-input v-model="addForm.code" :disabled="user.role==0" placeholder="请输入项目编号" clearable></el-input>
|
|
|
</el-form-item>
|
|
@@ -72,7 +110,32 @@
|
|
|
<el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+ <!--专业项目协作版本功能 -->
|
|
|
+ <el-form-item label="级别" >
|
|
|
+ <el-select v-model="addForm.level" v-if="user.company.packageProject==1" placeholder="请选择负责人" style="width:32%;" >
|
|
|
+ <el-option v-for="item in importanceList" :key="item.id" :label="item.label" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span style="margin-left:50px;margin-right:10px;">项目预算</span>
|
|
|
+ <el-input v-model="addForm.budget" v-if="user.company.packageProject==1" style="width:32%;"
|
|
|
+ placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开始日期" prop="planStartDate">
|
|
|
+ <el-date-picker v-model="addForm.planStartDate" v-if="user.company.packageProject==1"
|
|
|
+ :editable="false"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ :clearable="false" type="date"
|
|
|
+ placeholder="选择日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="截止日期" prop="planEndDate">
|
|
|
+ <el-date-picker v-model="addForm.planEndDate" v-if="user.company.packageProject==1"
|
|
|
+ :editable="false"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ :clearable="false" type="date"
|
|
|
+ placeholder="选择日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click.native="addFormVisible = false">取消</el-button>
|
|
@@ -129,6 +192,9 @@
|
|
|
</section>
|
|
|
</template>
|
|
|
<style scoped>
|
|
|
+.input-with-select .el-input-group__prepend {
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
.line {
|
|
|
padding:10px;
|
|
|
}
|
|
@@ -145,6 +211,11 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ status:null,
|
|
|
+ statusTxt:["-","进行中","已完成","已撤销"],
|
|
|
+ importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
|
|
|
+ searchField:null,
|
|
|
+ keyword:null,
|
|
|
user: JSON.parse(sessionStorage.getItem("user")),
|
|
|
userDetailVisible: false,
|
|
|
userDetail:{},
|
|
@@ -167,6 +238,7 @@
|
|
|
addForm: {
|
|
|
name: '',
|
|
|
userId: [],
|
|
|
+ level:1,
|
|
|
},
|
|
|
rules: {
|
|
|
name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
|
|
@@ -174,6 +246,10 @@
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ number(){
|
|
|
+ this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
|
|
|
+ this.addForm.budget = this.addForm.budget.replace('.','');
|
|
|
+ },
|
|
|
deleteSubPro(subProject) {
|
|
|
this.$confirm("确定要删除子项目" + subProject.name + "吗?","删除子项目", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -211,10 +287,13 @@
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
-
|
|
|
+ searchList() {
|
|
|
+ this.page = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
addNewSubProject(subProject) {
|
|
|
if (subProject == null) {
|
|
|
- this.addForm = {projectId: this.currentProject.id}
|
|
|
+ this.addForm = {projectId: this.currentProject.id, level:1}
|
|
|
} else {
|
|
|
this.addForm = subProject;
|
|
|
}
|
|
@@ -319,7 +398,10 @@
|
|
|
this.listLoading = true;
|
|
|
this.http.post(this.port.project.listPage, {
|
|
|
pageIndex: this.page,
|
|
|
- pageSize: this.size
|
|
|
+ pageSize: this.size,
|
|
|
+ keyword:this.keyword,
|
|
|
+ searchField: this.searchField,
|
|
|
+ status: this.status
|
|
|
},
|
|
|
res => {
|
|
|
this.listLoading = false;
|
|
@@ -363,6 +445,7 @@
|
|
|
userId: [],
|
|
|
code:'',
|
|
|
inchargerId:null,
|
|
|
+ level:1,
|
|
|
}
|
|
|
} else {
|
|
|
this.title = "修改项目";
|
|
@@ -376,7 +459,11 @@
|
|
|
name: item.projectName,
|
|
|
userId: arr,
|
|
|
code:item.projectCode,
|
|
|
- inchargerId: item.inchargerId
|
|
|
+ inchargerId: item.inchargerId,
|
|
|
+ level: item.level,
|
|
|
+ planStartDate: item.planStartDate,
|
|
|
+ planEndDate: item.planEndDate,
|
|
|
+ budget: item.budget,
|
|
|
}
|
|
|
this.changeParticipator();
|
|
|
}
|
|
@@ -434,6 +521,18 @@
|
|
|
if(this.addForm.code != null) {
|
|
|
formData.append("code", this.addForm.code);
|
|
|
}
|
|
|
+ if(this.addForm.planStartDate != null) {
|
|
|
+ formData.append("planStartDate", this.addForm.planStartDate);
|
|
|
+ }
|
|
|
+ if(this.addForm.planEndDate != null) {
|
|
|
+ formData.append("planEndDate", this.addForm.planEndDate);
|
|
|
+ }
|
|
|
+ if(this.addForm.level != null) {
|
|
|
+ formData.append("level", this.addForm.level);
|
|
|
+ }
|
|
|
+ if(this.addForm.budget != null) {
|
|
|
+ formData.append("budget", this.addForm.budget);
|
|
|
+ }
|
|
|
|
|
|
this.http.uploadFile(this.port.project.add,formData,
|
|
|
res => {
|