|
|
@@ -112,7 +112,7 @@ |
|
|
|
v-model="loading" |
|
|
|
:finished="finished" |
|
|
|
finished-text="没有更多了" |
|
|
|
@load="getList" |
|
|
|
@load="getUser" |
|
|
|
> |
|
|
|
<van-swipe-cell v-for="(item,index) in caseList" :key="index"> |
|
|
|
<van-cell :title="item.caseName" :value="22222" center :to="{name:'caseDetail',query:{id:item.id,caseProgress:item.caseProgress}}"> |
|
|
@@ -139,7 +139,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { getTopDeptId , listCase } from "@/api/lawEnforcement/index"; |
|
|
|
import { getUserProfile , listCase , getPersonalByUserId , getCompanyByUserId } from "@/api/lawEnforcement/index"; |
|
|
|
import law from "@/components/common/law_footer"; |
|
|
|
import Cookies from "js-cookie"; |
|
|
|
export default { |
|
|
@@ -160,7 +160,7 @@ export default { |
|
|
|
showAjzt: false, |
|
|
|
showAjzfjd: false, |
|
|
|
showSxtj: false, |
|
|
|
loginType:false, |
|
|
|
loginType:true, |
|
|
|
// 查询参数 |
|
|
|
queryParams: { |
|
|
|
// 分页 |
|
|
@@ -209,14 +209,56 @@ export default { |
|
|
|
this.caseProgressColumns.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}) |
|
|
|
} |
|
|
|
}); |
|
|
|
if(!Cookies.get("User-Token")){ |
|
|
|
this.loginType = false ; |
|
|
|
return |
|
|
|
}else{ |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getUser() { |
|
|
|
if(!Cookies.get("User-Token")){ |
|
|
|
this.loginType = false ; |
|
|
|
this.loading = false; |
|
|
|
this.finished = true; |
|
|
|
return |
|
|
|
} |
|
|
|
getUserProfile().then(response => { |
|
|
|
this.loginType = true; |
|
|
|
if (response.data.roles.length < 1){ |
|
|
|
this.tabShow = false; |
|
|
|
}else{ |
|
|
|
response.data.roles.forEach(res=>{ |
|
|
|
if (res.roleKey == 'personal_user'){//个体用户 |
|
|
|
getPersonalByUserId(response.data.userId).then( item => { |
|
|
|
console.log(item.id) |
|
|
|
if (item.data.id != undefined && item.data.id != null && item.data.id != ``){ |
|
|
|
console.log('aaa') |
|
|
|
this.queryParams.type = "1"; |
|
|
|
this.queryParams.bodyId = item.data.id; |
|
|
|
this.getList(); |
|
|
|
}else{ |
|
|
|
this.loading = false; |
|
|
|
this.finished = true; |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
} else if (res.roleKey == 'company_user'){//企业用户 |
|
|
|
getCompanyByUserId(response.data.userId).then( item => { |
|
|
|
console.log(item.id) |
|
|
|
if (item.data.id != undefined && item.data.id != null && item.data.id != ``){ |
|
|
|
console.log('bbb') |
|
|
|
this.queryParams.type = "2"; |
|
|
|
this.queryParams.bodyId = item.data.id; |
|
|
|
this.getList(); |
|
|
|
}else{ |
|
|
|
this.loading = false; |
|
|
|
this.finished = true; |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log("ccc") |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
getList(){ |
|
|
|
this.loginType = true ; |
|
|
|
this.loading = true; |
|
|
@@ -233,21 +275,6 @@ export default { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
getBanner(){ |
|
|
|
this.loading = true; |
|
|
|
this.queryParams.number = 1 ; |
|
|
|
this.queryParams.pageSize = 5 ; |
|
|
|
newList(this.queryParams).then(response => { |
|
|
|
this.bannerList = response.rows; |
|
|
|
for (var i = 0; i < response.rows.length; i++) { |
|
|
|
var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi) |
|
|
|
if (imgStrs != null && imgStrs != '') { |
|
|
|
this.bannerList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12)); |
|
|
|
} |
|
|
|
} |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
goDetail(id){ |
|
|
|
console.log(id) |
|
|
|
window.location = 'news/newDetail?id='+id; |
|
|
|