|
@@ -49,7 +49,7 @@ const current = ref(0);
|
|
|
const classifyUrl = ref("");
|
|
|
const classifyCode = ref("");
|
|
|
const placeholderText = ref("");
|
|
|
-const dataRes = ref(0);
|
|
|
+const dataRes = ref(1);
|
|
|
|
|
|
const list = ref([
|
|
|
{
|
|
@@ -208,6 +208,7 @@ function tabsClick(e) {
|
|
|
current.value = e.index;
|
|
|
console.log(current.value);
|
|
|
dataInput.value = "";
|
|
|
+ dataRes.value = 1;
|
|
|
}
|
|
|
|
|
|
function goSearch() {
|
|
@@ -286,40 +287,35 @@ async function classifySearch(URL, params) {
|
|
|
if (res.status == "SUCCESS") {
|
|
|
|
|
|
if (current.value == 2) {
|
|
|
- if(res.data.length){
|
|
|
- dataRes.value = 1;
|
|
|
- }else{
|
|
|
- dataRes.value = 0;
|
|
|
- }
|
|
|
- var records = res.data[0][0];
|
|
|
-
|
|
|
+ if(res.data.length){
|
|
|
+ dataRes.value = 1;
|
|
|
+ }else{
|
|
|
+ dataRes.value = 0;
|
|
|
+ }
|
|
|
+ var records = res.data[0][0];
|
|
|
+
|
|
|
} else if (current.value == 3) {
|
|
|
- if(res.data.length){
|
|
|
- dataRes.value = 1;
|
|
|
- }else{
|
|
|
- dataRes.value = 0;
|
|
|
- }
|
|
|
+ if(res.data.length){
|
|
|
+ dataRes.value = 1;
|
|
|
+ }else{
|
|
|
+ dataRes.value = 0;
|
|
|
+ }
|
|
|
|
|
|
var records = res.data[0];
|
|
|
} else {
|
|
|
// console.log('111111111')
|
|
|
// console.log(res.data.records.length)
|
|
|
// console.log('111222')
|
|
|
- if(res.data.records.length){
|
|
|
- dataRes.value = 1;
|
|
|
- }else{
|
|
|
- dataRes.value = 0;
|
|
|
- }
|
|
|
- var records = res.data.records[0];
|
|
|
+ if(res.data.total){
|
|
|
+ dataRes.value = 1;
|
|
|
+ }else{
|
|
|
+ dataRes.value = 0;
|
|
|
+ }
|
|
|
+ var records = res.data.records[0];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- // if (!records) {
|
|
|
- // dataRes.value = 0;
|
|
|
- // } else {
|
|
|
- // dataRes.value = 1;
|
|
|
- // }
|
|
|
+ console.log(dataRes.value+'------1')
|
|
|
+
|
|
|
|
|
|
switch (current.value) {
|
|
|
case 0: //警情查询
|