|
|
|
|
@ -15,7 +15,7 @@
|
|
|
|
|
</LxHeader>
|
|
|
|
|
</div>
|
|
|
|
|
<div ref="lxTable">
|
|
|
|
|
<el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
|
|
|
|
|
<el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
|
|
|
|
|
<el-table-column type="index" width="50" align="center" fixed="left"> </el-table-column>
|
|
|
|
|
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
|
|
|
|
|
:label="column.title" :width="column.width" :fixed="column.fixed">
|
|
|
|
|
@ -31,10 +31,11 @@
|
|
|
|
|
</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="column.field=='task_departments'">
|
|
|
|
|
<el-tag v-for="(tag, tIndex) in scope.row['task_name']"
|
|
|
|
|
style="margin-right: 5px;margin-bottom: 5px;">
|
|
|
|
|
{{tag.name}}
|
|
|
|
|
</el-tag>
|
|
|
|
|
<block v-for="(tag, tIndex) in scope.row['task_name']">
|
|
|
|
|
<el-tag style="margin-right: 5px;margin-bottom: 5px;" v-if="tag.id">
|
|
|
|
|
{{tag.name}}
|
|
|
|
|
</el-tag>
|
|
|
|
|
</block>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="column.field=='admin'">
|
|
|
|
|
{{scope.row[column.field]?scope.row[column.field].name:""}}
|
|
|
|
|
@ -298,18 +299,18 @@
|
|
|
|
|
listtask({
|
|
|
|
|
page: this.paginations.page,
|
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
|
keyword:this.searchFields.KeyWord
|
|
|
|
|
}).then(response => {
|
|
|
|
|
var that = this
|
|
|
|
|
for(var m of response.data){
|
|
|
|
|
if(m.safety_task_departments){
|
|
|
|
|
let task_list = []
|
|
|
|
|
for(var k of m.safety_task_departments){
|
|
|
|
|
let dep = Object.assign({}, k.departments)
|
|
|
|
|
task_list.push(dep)
|
|
|
|
|
}
|
|
|
|
|
m.task_name = task_list
|
|
|
|
|
}
|
|
|
|
|
keyword: this.searchFields.KeyWord
|
|
|
|
|
}).then(response => {
|
|
|
|
|
var that = this
|
|
|
|
|
for (var m of response.data) {
|
|
|
|
|
if (m.safety_task_departments) {
|
|
|
|
|
let task_list = []
|
|
|
|
|
for (var k of m.safety_task_departments) {
|
|
|
|
|
let dep = Object.assign({}, k.departments)
|
|
|
|
|
task_list.push(dep)
|
|
|
|
|
}
|
|
|
|
|
m.task_name = task_list
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.tableData = response.data;
|
|
|
|
|
this.paginations.page_size = response.total;
|
|
|
|
|
|