kun 19/10/9/21:58
This commit is contained in:
@@ -76,11 +76,8 @@
|
||||
<td>{{info.society_type}}</td>
|
||||
<td>{{info.legal_person}}</td>
|
||||
<td>{{info.reg_time}}</td>
|
||||
<!-- <td v-if="info.status == 1" style="color:#2fd63f">正常</td>
|
||||
<td v-if="info.status == 0" style="color:#e13232">异常</td>-->
|
||||
<td v-if="info.status == '正常'" style="color:#2fd63f">{{info.status}}</td>
|
||||
<td v-if="info.status == '活动异常'" style="color:#e57e1a">{{info.status}}</td>
|
||||
<td v-if="info.status == '违法失信'" style="color:#e13232">{{info.status}}</td>
|
||||
<td v-if="info.status == '正常'" style="color:#2fd63f">正常</td>
|
||||
<td v-if="info.status == '异常'" style="color:#e13232">异常</td>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-if="searchValue.length > 0">
|
||||
@@ -95,11 +92,8 @@
|
||||
<td>{{info.society_type}}</td>
|
||||
<td>{{info.legal_person}}</td>
|
||||
<td>{{info.reg_time}}</td>
|
||||
<!-- <td v-if="info.status == 1" style="color:#2fd63f">正常</td>
|
||||
<td v-if="info.status == 0" style="color:#e13232">异常</td>-->
|
||||
<td v-if="info.status == '正常'" style="color:#2fd63f">{{info.status}}</td>
|
||||
<td v-if="info.status == '活动异常'" style="color:#e57e1a">{{info.status}}</td>
|
||||
<td v-if="info.status == '违法失信'" style="color:#e13232">{{info.status}}</td>
|
||||
<td v-if="info.status == '正常'" style="color:#2fd63f">正常</td>
|
||||
<td v-if="info.status == '异常'" style="color:#e13232">异常</td>
|
||||
</tr>
|
||||
</template>
|
||||
</table>
|
||||
@@ -123,7 +117,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
index_num: 1,
|
||||
text: ["全部", "异常名单", "信用良好名录"],
|
||||
text: ["全部", "黑名单", "信用良好名录"],
|
||||
sub: 0,
|
||||
imgUrl: {
|
||||
xa: require("../../static/img/xa.png")
|
||||
@@ -156,64 +150,7 @@ export default {
|
||||
searchRecord(str) {
|
||||
this.getSearch(str)
|
||||
},
|
||||
/** 筛选函数 */
|
||||
// scree() {
|
||||
// if (this.screeOut.society_type == "类型") {
|
||||
// this.screeOut.society_type = ''
|
||||
// } else {
|
||||
// this.record.push({ category: '类型', nameOf: this.screeOut.society_type })
|
||||
// }
|
||||
|
||||
// if (this.screeOut.reg_time == "登记时间") {
|
||||
// this.screeOut.reg_time = ''
|
||||
// } else {
|
||||
// this.record.push({ category: '登记时间', nameOf: this.screeOut.reg_time })
|
||||
// }
|
||||
|
||||
// if (this.screeOut.reg_time == "年检年份") {
|
||||
// this.screeOut.reg_time = ''
|
||||
// } else {
|
||||
// this.record.push({ category: '年检年份', nameOf: this.screeOut.reg_time })
|
||||
// }
|
||||
|
||||
// if (this.screeOut.status == "年检情况") {
|
||||
// this.screeOut.status = ''
|
||||
// } else {
|
||||
// this.record.push({ category: '年检情况', nameOf: this.screeOut.status })
|
||||
// }
|
||||
|
||||
// /**
|
||||
// let hash = {};
|
||||
// this.record = this.record.reduce((preVal, curVal) => {
|
||||
// hash[curVal.nameOf] ? '' : hash[curVal.nameOf] = true && preVal.push(curVal);
|
||||
// return preVal
|
||||
// }, [])
|
||||
// */
|
||||
|
||||
// console.log(this.record)
|
||||
|
||||
// this.record = this.$tool.arrayHeavy(this.record, 'nameOf')
|
||||
|
||||
// let gData = this.$tool.multiFilter(this.bgData, this.screeOut)
|
||||
// if (gData != undefined && gData != '') {
|
||||
// this.searchValue = gData
|
||||
// } else {
|
||||
// this.$message('您搜索的内容暂无~')
|
||||
// }
|
||||
|
||||
// if (this.screeOut.society_type == "") {
|
||||
// this.screeOut.society_type = '类型'
|
||||
// }
|
||||
// if (this.screeOut.reg_time == "") {
|
||||
// this.screeOut.reg_time = '登记时间'
|
||||
// }
|
||||
// if (this.screeOut.reg_time == "") {
|
||||
// this.screeOut.reg_time = '年检年份'
|
||||
// }
|
||||
// if (this.screeOut.status == "") {
|
||||
// this.screeOut.status = '年检情况'
|
||||
// }
|
||||
// },
|
||||
/** 搜索函数 */
|
||||
getSearch(str) {
|
||||
this.searchValue = [];
|
||||
@@ -233,40 +170,21 @@ export default {
|
||||
} else {
|
||||
this.$message('您搜索的内容暂无~')
|
||||
}
|
||||
/*
|
||||
this.sData.forEach((item, index) => {
|
||||
if (
|
||||
item.organization.indexOf(this.searchVal) > -1 ||
|
||||
item.credit.indexOf(this.searchVal) > -1 ||
|
||||
item.type.indexOf(this.searchVal) > -1 ||
|
||||
item.representative.indexOf(this.searchVal) > -1 ||
|
||||
item.date.indexOf(this.searchVal) > -1
|
||||
) {
|
||||
this.searchValue.push(item);
|
||||
}
|
||||
});
|
||||
*/
|
||||
},
|
||||
/** 名单切换 */
|
||||
btn(index) {
|
||||
let s = this.sub;
|
||||
s = index;
|
||||
this.sub = s;
|
||||
let t0 = this.arr0
|
||||
let t1 = this.arr1
|
||||
let t2 = this.bgData
|
||||
|
||||
switch (this.sub) {
|
||||
case 0:
|
||||
this.conversion = t2;
|
||||
this.getData;
|
||||
break;
|
||||
case 1:
|
||||
this.conversion = t0;
|
||||
case 1: this.getDataZ;
|
||||
break;
|
||||
case 2:
|
||||
this.conversion = t1;
|
||||
break;
|
||||
default:
|
||||
this.getDataO;
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -283,20 +201,46 @@ export default {
|
||||
}
|
||||
_this.bgData = res.data.data.data.info
|
||||
_this.conversion = _this.bgData
|
||||
_this.bgData.forEach((item, index) => {
|
||||
|
||||
switch (item.status) {
|
||||
case '异常':
|
||||
_this.arr0.push(item);
|
||||
break;
|
||||
case '正常':
|
||||
_this.arr1.push(item);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
})
|
||||
// eslint-disable-next-line handle-callback-err
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
getDataZ() {
|
||||
let _this = this
|
||||
this.$http({
|
||||
method: 'post',
|
||||
url: 'v1/society/society',
|
||||
data: {
|
||||
status: 0
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.data.data.code !== 200) {
|
||||
alert('数据请求失败!')
|
||||
}
|
||||
_this.bgData = res.data.data.data.info
|
||||
_this.conversion = _this.bgData
|
||||
})
|
||||
// eslint-disable-next-line handle-callback-err
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
getDataO() {
|
||||
let _this = this
|
||||
this.$http({
|
||||
method: 'post',
|
||||
url: 'v1/society/society',
|
||||
data: {
|
||||
status: 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.data.data.code !== 200) {
|
||||
return;
|
||||
}
|
||||
_this.bgData = res.data.data.data.info
|
||||
_this.conversion = _this.bgData
|
||||
})
|
||||
// eslint-disable-next-line handle-callback-err
|
||||
.catch(err => {
|
||||
@@ -308,7 +252,6 @@ export default {
|
||||
this.getData()
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user