Explorar el Código

农业执法问题修改

wulanhaote
庞东旭 hace 3 años
padre
commit
5dbf0e629c
Se han modificado 3 ficheros con 86 adiciones y 46 borrados
  1. +16
    -0
      src/api/lawEnforcement/index.js
  2. +51
    -24
      src/views/lawEnforcement/case/caseList.vue
  3. +19
    -22
      src/views/lawEnforcement/workDynamics/workList.vue

+ 16
- 0
src/api/lawEnforcement/index.js Ver fichero

@@ -312,3 +312,19 @@ export function communicateAdd(data) {
data: data
})
}

// 查询农业执法-案件-备案信息详细
export function getPersonalByUserId(userId) {
return request({
url: '/enforce/personal/getPersonalByUserId/' + userId,
method: 'get'
})
}

// 查询农业执法-案件-备案信息详细
export function getCompanyByUserId(userId) {
return request({
url: '/enforce/company/getCompanyByUserId/' + userId,
method: 'get'
})
}

+ 51
- 24
src/views/lawEnforcement/case/caseList.vue Ver fichero

@@ -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;


+ 19
- 22
src/views/lawEnforcement/workDynamics/workList.vue Ver fichero

@@ -11,7 +11,7 @@
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="getList"
@load="getDeptId"
>
<van-cell-group class="listBox">
<van-cell
@@ -55,27 +55,7 @@ export default {
};
},
created() {
var type = this.$route.query.type ;
this.pageType = this.$route.query.type;
if (type == 'work'){
this.queryParams.number = '003'
this.title = '工作动态'
this.getDeptId();
}
if (type == 'notice'){
this.queryParams.number = '001'
this.title = '通知公告'
this.getDeptId();
}
if (type == 'enforcement'){
this.queryParams.number = '002'
this.title = '执法依据'
this.getDeptId();
}
if (type == 'scheme'){
this.title = '执法方案'
this.getDeptId();
}
this.getDeptId();
},
methods: {
getDeptId(){
@@ -85,6 +65,23 @@ export default {
})
},
getList(){
var type = this.$route.query.type ;
this.pageType = this.$route.query.type;
if (type == 'work'){
this.queryParams.number = '003'
this.title = '工作动态'
}
if (type == 'notice'){
this.queryParams.number = '001'
this.title = '通知公告'
}
if (type == 'enforcement'){
this.queryParams.number = '002'
this.title = '执法依据'
}
if (type == 'scheme'){
this.title = '执法方案'
}
this.loading = true;
if(this.$route.query.type == 'scheme'){
schemeList(this.queryParams).then(response => {


Cargando…
Cancelar
Guardar