|
|
@@ -3,67 +3,72 @@
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
<el-tab-pane label="我负责的" name="我负责的">
|
|
|
<div style="margin-bottom: 15px">
|
|
|
- <add class="inline-16" ></add>
|
|
|
+ <add class="inline-16" @addSuccess="leaderData"></add>
|
|
|
+<!-- <el-input style="width:200px;" placeholder="搜索" :suffix-icon="leader.params.content.where.condition?leader.params.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="leader.params.content.where.condition"
|
|
|
+ @keyup.native.enter="leaderData(leader.params.content.pageNumber = 1)" @clear="leaderData(leader.params.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
+ </el-input>-->
|
|
|
</div>
|
|
|
<div style="margin-top: 15px">
|
|
|
- <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" fixedName="operation">
|
|
|
+ <tableLayout :layout="tablecols" :data="leader.list" :opwidth="200" :custom="true" fixedName="operation">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'operation'">
|
|
|
<span>{{scope.column.data[scope.column.columnname]}}</span>
|
|
|
</div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'editable'">
|
|
|
+ <span>{{scope.column.data[scope.column.columnname] === 1 ? '是' : '否'}}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'userrole'">
|
|
|
+ <span style="margin-left: 10px" v-for="(item,index) in scope.column.data.userrole">
|
|
|
+ <span v-if="scope.column.data.userrole.length -1 === index">{{item.rolename}}</span>
|
|
|
+ <span v-else>{{item.rolename + ','}}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
<p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <!-- <edit :data="scope.data" class="inline-16" @editSuccess="onSuccess" :disabled="data.disabled"></edit>
|
|
|
- <delContact :data="scope.data" @delSuccess="onSuccess" class="inline-16" :disabled="data.disabled"></delContact>-->
|
|
|
+ <el-button slot="reference" type="text" size="mini" class="inline-16" @click="onEdit(scope.data)">设置</el-button>
|
|
|
+ <el-popconfirm
|
|
|
+ title="确定删除该团队人员吗?"
|
|
|
+ @confirm="onDel(scope.data)"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" class="inline-16" type="text" size="mini">删除</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
</template>
|
|
|
</tableLayout>
|
|
|
</div>
|
|
|
- <div style="margin-top:16px;text-align:right">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- small
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="params.content.pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="我参与的" name="我参与的">
|
|
|
- <div style="margin-bottom: 15px">
|
|
|
-
|
|
|
- </div>
|
|
|
<div style="margin-top: 15px">
|
|
|
- <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" fixedName="operation">
|
|
|
+ <tableLayout :layout="tablecolsPartake" :data="partake.list" :opwidth="200" :custom="true" fixedName="operation">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'operation'">
|
|
|
<span>{{scope.column.data[scope.column.columnname]}}</span>
|
|
|
</div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'editable'">
|
|
|
+ <span>{{scope.column.data[scope.column.columnname] === 1 ? '是' : '否'}}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'userrole'">
|
|
|
+ <span style="margin-left: 10px" v-for="(item,index) in scope.column.data.userrole">
|
|
|
+ <span v-if="scope.column.data.userrole.length -1 === index">{{item.rolename}}</span>
|
|
|
+ <span v-else>{{item.rolename + ','}}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
<p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <!-- <edit :data="scope.data" class="inline-16" @editSuccess="onSuccess" :disabled="data.disabled"></edit>
|
|
|
- <delContact :data="scope.data" @delSuccess="onSuccess" class="inline-16" :disabled="data.disabled"></delContact>-->
|
|
|
</template>
|
|
|
</tableLayout>
|
|
|
</div>
|
|
|
- <div style="margin-top:16px;text-align:right">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- small
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="params.content.pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+ <el-dialog title="设置" :visible.sync="dialogTableVisible" append-to-body width="400px">
|
|
|
+ <el-radio v-model="isEdit" label="1" >允许编辑</el-radio>
|
|
|
+ <el-radio v-model="isEdit" label="0" >不允许编辑</el-radio>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogTableVisible = false" size="small">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit" size="small">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -75,37 +80,115 @@ export default {
|
|
|
data(){
|
|
|
return {
|
|
|
tablecols:[],
|
|
|
- list:[],
|
|
|
- total:0,
|
|
|
- currentPage:0,
|
|
|
+ tablecolsPartake:[],
|
|
|
+ dialogTableVisible:false,
|
|
|
activeName: '我负责的',
|
|
|
- params:{
|
|
|
- "id": 20230302174201,
|
|
|
- "content": {
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 20,
|
|
|
- "where":{
|
|
|
- "conditino":""
|
|
|
+ radio:'1',
|
|
|
+ leader:{
|
|
|
+ params:{
|
|
|
+ "id": 20230302174201,
|
|
|
+ "content": {
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ list:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0,
|
|
|
+ },
|
|
|
+ partake:{
|
|
|
+ params:{
|
|
|
+ "id": 20230302174501,
|
|
|
+ "content": {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ list:[],
|
|
|
+ total:0,
|
|
|
+ currentPage:0,
|
|
|
+ },
|
|
|
+ row:'',
|
|
|
+ isEdit:''
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- handleClick(){},
|
|
|
+ /*我负责的*/
|
|
|
+ async leaderData(){
|
|
|
+ const res = await this.$api.requested(this.leader.params)
|
|
|
+ this.leader.list = res.data
|
|
|
+ },
|
|
|
+ /*我参与的*/
|
|
|
+ async partakeData(){
|
|
|
+ const res = await this.$api.requested(this.partake.params)
|
|
|
+ this.partake.list = res.data
|
|
|
+ },
|
|
|
+ handleClick(){
|
|
|
+ if (this.activeName === '我负责的'){
|
|
|
+ this.leaderData()
|
|
|
+ }else {
|
|
|
+ this.partakeData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onEdit(row){
|
|
|
+ this.row = row
|
|
|
+ this.isEdit = row.editable
|
|
|
+ if (this.isEdit === 1){
|
|
|
+ this.isEdit = '1'
|
|
|
+ }else {
|
|
|
+ this.isEdit = '0'
|
|
|
+ }
|
|
|
+ console.log(this.row)
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ },
|
|
|
handleSizeChange(val) {
|
|
|
// console.log(`每页 ${val} 条`);
|
|
|
- this.params.content.pageSize = val
|
|
|
- this.listData()
|
|
|
+ this.leader.params.content.pageSize = val
|
|
|
+ this.leaderData()
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
// console.log(`当前页: ${val}`);
|
|
|
- this.params.content.pageNumber = val
|
|
|
- this.listData()
|
|
|
+ this.leader.params.content.pageNumber = val
|
|
|
+ this.leaderData()
|
|
|
+ },
|
|
|
+ editClick(){
|
|
|
+ this.editShow = true
|
|
|
},
|
|
|
+ async onSubmit(){
|
|
|
+ if (this.isEdit === '1'){
|
|
|
+ this.isEdit = 1
|
|
|
+ }else {
|
|
|
+ this.isEdit = 0
|
|
|
+ }
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id":"20230302174301",
|
|
|
+ "content":{
|
|
|
+ "editable":this.isEdit,
|
|
|
+ "userid":this.row.userid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.dialogTableVisible = false
|
|
|
+ this.leaderData()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async onDel(row){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id":"20230302174401",
|
|
|
+ "content":{
|
|
|
+ "userid":row.userid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.dialogTableVisible = false
|
|
|
+ this.leaderData()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.leaderData()
|
|
|
+ this.partakeData()
|
|
|
},
|
|
|
created() {
|
|
|
this.tablecols = this.tool.tabelCol(this.$route.name).teamTable.tablecols
|
|
|
+ /*partakeTeamTable*/
|
|
|
+ this.tablecolsPartake = this.tool.tabelCol(this.$route.name).partakeTeamTable.tablecols
|
|
|
}
|
|
|
}
|
|
|
</script>
|