|
@@ -108,7 +108,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<!--列表-->
|
|
<!--列表-->
|
|
- <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist">
|
|
|
|
|
|
+ <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist" @sort-change="tableSort">
|
|
<el-table-column type="selection" width="60" :selectable="isSelectable">
|
|
<el-table-column type="selection" width="60" :selectable="isSelectable">
|
|
<!-- creator 项目创建人 incharger 项目负责人 -->
|
|
<!-- creator 项目创建人 incharger 项目负责人 -->
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -117,9 +117,9 @@
|
|
{{scope.$index+1+(page-1)*size}}
|
|
{{scope.$index+1+(page-1)*size}}
|
|
</template>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
- <el-table-column prop="projectCode" label="项目编号" sortable width="120"></el-table-column>
|
|
|
|
- <el-table-column prop="categoryName" label="项目分类" sortable width="120"></el-table-column>
|
|
|
|
- <el-table-column prop="projectName" label="项目名称" width="250" sortable>
|
|
|
|
|
|
+ <el-table-column prop="projectCode" label="项目编号" sortable="custom" width="120"></el-table-column>
|
|
|
|
+ <el-table-column prop="categoryName" label="项目分类" sortable="custom" width="120"></el-table-column>
|
|
|
|
+ <el-table-column prop="projectName" label="项目名称" width="250" sortable="custom">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<!-- <div class="kans">
|
|
<!-- <div class="kans">
|
|
<el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
|
|
<el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
|
|
@@ -141,7 +141,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="inchargerName" label="负责人" sortable min-width="150">
|
|
|
|
|
|
+ <el-table-column prop="inchargerName" label="负责人" sortable="custom" min-width="150">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-link type="primary" :underline="false" @click="showUser(scope.row.inchargerId)">{{scope.row.inchargerName}}</el-link>
|
|
<el-link type="primary" :underline="false" @click="showUser(scope.row.inchargerId)">{{scope.row.inchargerName}}</el-link>
|
|
</template>
|
|
</template>
|
|
@@ -172,7 +172,7 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- 客户管理 -->
|
|
<!-- 客户管理 -->
|
|
- <el-table-column prop="customerName" label="客户" min-width="190" v-if="user.company.packageCustomer == 1">
|
|
|
|
|
|
+ <el-table-column prop="customerName" label="客户" min-width="190" v-if="user.company.packageCustomer == 1" sortable="custom">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-popover placement="top" width="250" trigger="hover" v-if="scope.row.customerName&&scope.row.customerName.length > 12">
|
|
<el-popover placement="top" width="250" trigger="hover" v-if="scope.row.customerName&&scope.row.customerName.length > 12">
|
|
<div slot="reference" class="kans">
|
|
<div slot="reference" class="kans">
|
|
@@ -189,7 +189,7 @@
|
|
<el-table-column prop="providerNames" label="供应商" min-width="190" v-if="user.company.packageProvider">
|
|
<el-table-column prop="providerNames" label="供应商" min-width="190" v-if="user.company.packageProvider">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="status" label="状态" min-width="100" >
|
|
|
|
|
|
+ <el-table-column prop="status" label="状态" min-width="100" sortable="custom">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{scope.row.status == null?"-":statusTxt[scope.row.status]}}
|
|
{{scope.row.status == null?"-":statusTxt[scope.row.status]}}
|
|
</template>
|
|
</template>
|
|
@@ -907,6 +907,8 @@ a {
|
|
isAddGroupPerson: true,
|
|
isAddGroupPerson: true,
|
|
projectMainId: '',
|
|
projectMainId: '',
|
|
supplierList: '',
|
|
supplierList: '',
|
|
|
|
+ sortProp: '',
|
|
|
|
+ sortOrder: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 过滤器
|
|
// 过滤器
|
|
@@ -950,6 +952,13 @@ a {
|
|
categoryId == '' ? '' : this.addForm.category = categoryId
|
|
categoryId == '' ? '' : this.addForm.category = categoryId
|
|
console.log(this.addForm)
|
|
console.log(this.addForm)
|
|
},
|
|
},
|
|
|
|
+ tableSort({column, prop, order}){
|
|
|
|
+ if(prop == 'inchargerName' || prop == 'customerName' || prop == 'projectCode' || prop == 'categoryName' || prop == 'projectName' || prop == 'status'){
|
|
|
|
+ this.sortOrder = order
|
|
|
|
+ this.sortProp = prop
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//获取项目列表
|
|
//获取项目列表
|
|
getSupplierList() {
|
|
getSupplierList() {
|
|
this.http.post('/provider-info/list', {
|
|
this.http.post('/provider-info/list', {
|
|
@@ -2294,7 +2303,7 @@ a {
|
|
//获取项目列表
|
|
//获取项目列表
|
|
getList() {
|
|
getList() {
|
|
this.listLoading = true;
|
|
this.listLoading = true;
|
|
- this.http.post(this.port.project.listPage, {
|
|
|
|
|
|
+ let parameter = {
|
|
pageIndex: this.page,
|
|
pageIndex: this.page,
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
keyword:this.keyword,
|
|
keyword:this.keyword,
|
|
@@ -2302,8 +2311,29 @@ a {
|
|
status: this.status,
|
|
status: this.status,
|
|
category: this.statusClf,
|
|
category: this.statusClf,
|
|
projectMainId: this.projectMainId
|
|
projectMainId: this.projectMainId
|
|
- //
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ if(this.sortOrder){
|
|
|
|
+ if(this.sortProp == 'inchargerName'){
|
|
|
|
+ parameter.sortProp = "incharger_id"
|
|
|
|
+ }else if(this.sortProp == 'customerName'){
|
|
|
|
+ parameter.sortProp = "customer_id"
|
|
|
|
+ }else if(this.sortProp == 'projectCode'){
|
|
|
|
+ parameter.sortProp = 'project_code'
|
|
|
|
+ }else if(this.sortProp == 'categoryName'){
|
|
|
|
+ parameter.sortProp = 'category'
|
|
|
|
+ }else if(this.sortProp == 'projectName'){
|
|
|
|
+ parameter.sortProp = 'project_name'
|
|
|
|
+ }else if(this.sortProp == 'status'){
|
|
|
|
+ parameter.sortProp = 'status'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(this.sortOrder == 'descending'){
|
|
|
|
+ parameter.sortOrder = 0
|
|
|
|
+ }else if(this.sortOrder == 'ascending'){
|
|
|
|
+ parameter.sortOrder = 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.http.post(this.port.project.listPage, parameter,
|
|
res => {
|
|
res => {
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|