Browse Source

列表状态 改色

feature
tianq 3 years ago
parent
commit
a1e1613baa
  1. 3
      src/assets/scss/dataBoard/listBox.scss
  2. 18
      src/views/dataBoard/cpts/tb.vue
  3. 37
      src/views/dataBoard/sida/xq/list.vue

3
src/assets/scss/dataBoard/listBox.scss

@ -24,7 +24,7 @@
.title_line {
margin-left: 8px;
width: 60%;
width: 244px;
height: 1px;
background: linear-gradient(270deg, rgba(55, 198, 255, 0.1) 0%, #1995ff 100%);
@ -54,3 +54,4 @@
}
}
}

18
src/views/dataBoard/cpts/tb.vue

@ -43,7 +43,16 @@
>
{{ item }}
</div>
<div
v-if="
typeof item === 'object' ||
typeof item.type === 'object'
"
:title="item.name"
:class="item.class"
>
{{ item.name }}
</div>
<div
v-if="
typeof item === 'object' &&
@ -334,7 +343,12 @@ export default {
.g-scrollar {
width: 100%;
}
.orange{
color:#FFAA00
}
.green{
color:#04C790
}
.table-status {
position: relative;
height: 300px;

37
src/views/dataBoard/sida/xq/list.vue

@ -7,8 +7,14 @@
<div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div>
<div class="second-select" style="position:absolute;margin-left:300px;">
<el-select v-model="type1"><el-option value="个性需求">个性需求</el-option></el-select>&nbsp;
<el-select v-model="type2"><el-option value="政府支持">政府支持</el-option></el-select>
<el-select v-model="type1" @change="getList" :clearable="true"><el-option value="个性需求">个性需求</el-option></el-select>
&nbsp;
<el-select v-model="type2" @change="getList" :clearable="true">
<el-option value="政府支撑">政府支撑</el-option>
<el-option value="社会保障">社会保障</el-option>
<el-option value="社区环境">社区环境</el-option>
<el-option value="商家支撑">商家支撑</el-option>
</el-select>
</div>
</div>
<cpt-tb
@ -57,8 +63,8 @@ export default {
}
}
],
type1:"",
type2:"",
type1: '',
type2: '',
tableTitle: '需求列表',
searchName: '',
@ -154,7 +160,7 @@ type2:"",
{
queryParam: {
org_id,
type: listType,
type: this.type2,
pageNo,
pageSize
}
@ -168,20 +174,35 @@ type2:"",
if (code === 0) {
this.srcTableData = data;
console.log('this.srcTableData', this.srcTableData);
// this.total = data.total;
this.list = data.map((item, index) => {
let a = '';
if (item.status == '已接单') {
a = 'green';
} else if (item.status == '已完成') {
a = 'green';
} else if (item.status == '待处理') {
a = 'orange';
}
let obj = {
name: item.status,
class: a
};
return [
index + 1,
item.need_type ? item.need_type : '--',
item.content ? item.content : '--',
item.status ? item.status : '--',
item.status ? obj : '--',
// item.status==""?"&lt;span&gt;2&lt;/span&gt;":"&lt;span&gt;2&lt;/span&gt;",
item.date ? item.date : '--',
{ type: 'operate', list: ['查看'] }
];
});
console.log('this.list', this.list);
this.total = this.list.length;
} else {
this.$message.error(msg);

Loading…
Cancel
Save