Переглянути джерело

农业执法接口对接

wulanhaote
庞东旭 2 роки тому
джерело
коміт
f9abacb38c
7 змінених файлів з 220 додано та 77 видалено
  1. +24
    -0
      src/api/lawEnforcement/index.js
  2. +1
    -0
      src/router/index.js
  3. +64
    -35
      src/views/lawEnforcement/caseAllocation/caseAdd.vue
  4. +6
    -6
      src/views/lawEnforcement/caseAllocation/caseAllocation.vue
  5. +63
    -18
      src/views/lawEnforcement/caseAllocation/caseDistribution.vue
  6. +0
    -2
      src/views/lawEnforcement/caseAllocation/caseLawEnforcer.vue
  7. +62
    -16
      src/views/lawEnforcement/caseAllocation/caseReturn.vue

+ 24
- 0
src/api/lawEnforcement/index.js Переглянути файл

@@ -507,3 +507,27 @@ export function listEnforcer(query) {
params: query params: query
}) })
} }
// 修改案件勘察
export function updateSurvey(data) {
return request({
url: '/enforce/survey/edit',
method: 'post',
data: data
})
}
// 新增案件勘察
export function addSurvey(data) {
return request({
url: '/enforce/survey/add',
method: 'post',
data: data
})
}
// 案件退回,从勘察退回至登记
export function returnCase(data) {
return request({
url: '/enforce/case/returnCase',
method: 'post',
data: data
})
}

+ 1
- 0
src/router/index.js Переглянути файл

@@ -3825,6 +3825,7 @@ export const constantRoutes = [
meta: { meta: {
title: '巡查登记', title: '巡查登记',
hidden: true, hidden: true,
keepAlive: true
}, },
component: (resolve) => require(['@/views/lawEnforcement/caseAllocation/caseAdd'], resolve) component: (resolve) => require(['@/views/lawEnforcement/caseAllocation/caseAdd'], resolve)
} }


+ 64
- 35
src/views/lawEnforcement/caseAllocation/caseAdd.vue Переглянути файл

@@ -12,14 +12,14 @@
<span class="custom-title">登记<i class="bgBlue"></i></span> <span class="custom-title">登记<i class="bgBlue"></i></span>
</template> </template>
</van-cell> </van-cell>
<van-field v-model="form.value" label="案件来源" placeholder="请输入案件来源" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.value" label="关联方案" placeholder="请输入关联方案" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="案件属地" placeholder="请输入案件属地" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.value" label="执行主体" placeholder="请输入执行主体" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.value" label="案件名称" placeholder="请输入案件名称" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="登记日期" placeholder="请输入登记日期" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="执法类别" placeholder="请输入执法类别" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.value" label="案件简述" placeholder="请输入案件简述" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.caseSource" label="案件来源" placeholder="请输入案件来源" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.schemeId" label="关联方案" placeholder="请输入关联方案" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.deptId" label="案件属地" placeholder="请输入案件属地" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.belongTeam" label="执行主体" placeholder="请输入执行主体" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.caseName" label="案件名称" placeholder="请输入案件名称" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.registerDate" label="登记日期" placeholder="请输入登记日期" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.enforceCategory" label="执法类别" placeholder="请输入执法类别" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.caseDescribe" label="案件简述" placeholder="请输入案件简述" :border="false" label-width="auto" input-align="right" />
</div> </div>


<div class="main_box" style="margin-top: 10px;"> <div class="main_box" style="margin-top: 10px;">
@@ -30,30 +30,30 @@
<span class="custom-title">当事人<i class="bgBlue"></i></span> <span class="custom-title">当事人<i class="bgBlue"></i></span>
</template> </template>


<van-field v-model="form.value" label="当事人类型" :border="false" label-width="auto" input-align="right" >
<van-field v-model="form.type" label="当事人类型" :border="false" label-width="auto" input-align="right" >
<template #input> <template #input>
<van-radio-group v-model="form.radio" direction="horizontal">
<van-radio-group v-model="form.type" direction="horizontal">
<van-radio name="1">个人/个体工商户</van-radio> <van-radio name="1">个人/个体工商户</van-radio>
<van-radio name="2">企业</van-radio> <van-radio name="2">企业</van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<van-field v-model="form.value" label="当事人姓名" placeholder="请输入当事人姓名" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="性别" placeholder="请输入性别" :border="false" label-width="auto" input-align="right" >
<van-field v-model="form.name" label="当事人姓名" placeholder="请输入当事人姓名" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.sex" label="性别" placeholder="请输入性别" :border="false" label-width="auto" input-align="right" >
<template #input> <template #input>
<van-radio-group v-model="form.radio" direction="horizontal">
<van-radio-group v-model="form.sex" direction="horizontal">
<van-radio name="1">男</van-radio> <van-radio name="1">男</van-radio>
<van-radio name="2">女</van-radio> <van-radio name="2">女</van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<van-field v-model="form.value" label="身份证号" placeholder="请输入身份证号" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="出生日期" placeholder="请输入出生日期" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="民族" placeholder="请输入民族" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.value" label="工作单位及职务" placeholder="请输入工作单位及职务" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="联系电话" placeholder="请输入联系电话" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="统一社会信用代码" placeholder="请输入统一社会信用代码" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.value" label="字号名称" placeholder="请输入字号名称" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.cardNum" label="身份证号" placeholder="请输入身份证号" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.birthday" label="出生日期" placeholder="请输入出生日期" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.nation" label="民族" placeholder="请输入民族" :border="false" label-width="auto" input-align="right" is-link arrow-direction="down" />
<van-field v-model="form.companyPosition" label="工作单位及职务" placeholder="请输入工作单位及职务" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.phone" label="联系电话" placeholder="请输入联系电话" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.uniformCode" label="统一社会信用代码" placeholder="请输入统一社会信用代码" :border="false" label-width="auto" input-align="right" />
<van-field v-model="form.zihao" label="字号名称" placeholder="请输入字号名称" :border="false" label-width="auto" input-align="right" />


</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
@@ -82,21 +82,20 @@
<span class="custom-title">执法人员<i class="bgBlue"></i></span> <span class="custom-title">执法人员<i class="bgBlue"></i></span>
</template> </template>
<div class="peopleList"> <div class="peopleList">
<van-row>
<van-row class="peoplett">
<van-col :span="4">序号</van-col> <van-col :span="4">序号</van-col>
<van-col :span="6">执行人员</van-col> <van-col :span="6">执行人员</van-col>
<van-col :span="10">执法证号</van-col> <van-col :span="10">执法证号</van-col>
<van-col :span="4">带队人</van-col> <van-col :span="4">带队人</van-col>
</van-row> </van-row>

<van-row v-for="(item,index) in 10" :key="index" >
<van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" >
<van-col :span="4">{{index+1}}</van-col> <van-col :span="4">{{index+1}}</van-col>
<van-col :span="6">庞东旭{{index}}</van-col>
<van-col :span="10">2303888{{index}}</van-col>
<van-col :span="6">{{item.enforcerName}}</van-col>
<van-col :span="10">{{item.enforcerNum}}</van-col>
<van-col :span="4"> <van-col :span="4">
<div class="icon_box"> <div class="icon_box">
<van-checkbox v-model="checked" shape="square"></van-checkbox>
<van-icon name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20"></van-icon>
<van-checkbox v-model="item.enforcerLeader" shape="square" @change="checkBoxChange(item.enforcerLeader,index)"></van-checkbox>
<van-icon name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index)"></van-icon>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
@@ -106,7 +105,7 @@
</van-collapse> </van-collapse>
</div> </div>
<div class="submit_box"> <div class="submit_box">
<p class="submitButton">保存</p>
<p class="submitButton" @click="goSubmit">保存</p>
<p class="submitButton">保存并打卡</p> <p class="submitButton">保存并打卡</p>
</div> </div>
</div> </div>
@@ -114,6 +113,7 @@


<script> <script>
import { getScheme } from "@/api/lawEnforcement/index"; import { getScheme } from "@/api/lawEnforcement/index";
import Cookies from "js-cookie";
export default { export default {
name: "programmeDetail", name: "programmeDetail",
data() { data() {
@@ -137,20 +137,49 @@
activeNames: ['1'], activeNames: ['1'],
activeNames1: ['1'], activeNames1: ['1'],
activeNames2: ['1'], activeNames2: ['1'],

caseSourceOptions:[],
belongTeamOptions:[],

// 查询参数
queryParams: {
// 分页
pageNum: 1,
pageSize: 10,
// 查询排序
orderByColumn: "id",
isAsc: "desc",
name: null, // 搜索参数-执行人姓名或证件号
belongTeam: null, // 搜索参数-所在中队
},
tEnforceCaseHandlerList:[],
radio:'',
submitType:'',
surveyId:'',
fileList: [], fileList: [],
}; };
}, },
created() { created() {
// this.getDictionaries() // this.getDictionaries()

}, },
methods: { methods: {
getDictionaries(){
getScheme(this.$route.query.id).then((response) => {
this.form = response.data;
});
},
goBack(){
window.history.go(-1)
goSubmit(){

}
},
watch: {
$route (to, from ) {
// 监听路由变化, 实现类似 小程序的 onShow 事件
if (to.path === '/lawEnforcement/caseAdd') {
console.log('abc')
// do anything you want
if (Cookies.get('enforcer')){
JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
this.tEnforceCaseHandlerList.push(res)
})
}
}
} }
}, },
} }


+ 6
- 6
src/views/lawEnforcement/caseAllocation/caseAllocation.vue Переглянути файл

@@ -34,7 +34,7 @@
<template #right> <template #right>
<van-row> <van-row>
<van-col> <van-col>
<van-button square text="退回" type="danger" :to="{name:'lawEnforcementCaseReturn', query: {id:item.id}}" class="delete-button" />
<van-button square text="退回" type="danger" :to="{name:'lawEnforcementCaseReturn', query: {id:item.caseId}}" class="delete-button" />
</van-col> </van-col>
<van-col> <van-col>
<van-button square text="分配" type="info" :to="{name:'lawEnforcementCaseDistribution', query: {id:item.caseId}}" class="delete-button" /> <van-button square text="分配" type="info" :to="{name:'lawEnforcementCaseDistribution', query: {id:item.caseId}}" class="delete-button" />
@@ -99,15 +99,15 @@
}); });
}, },
goSearch(){ goSearch(){
if (this.searchInput == ''){
location.reload()
}
// if (this.searchInput == ''){
// location.reload()
// }
this.list = []; this.list = [];
this.loading = false; this.loading = false;
this.finished = false; this.finished = false;
this.queryParams.title = this.searchInput;
this.queryParams.caseName = this.searchInput;
this.queryParams.pageNum = 1 ; this.queryParams.pageNum = 1 ;
this.getList();
// this.getList();
}, },
}, },
} }


+ 63
- 18
src/views/lawEnforcement/caseAllocation/caseDistribution.vue Переглянути файл

@@ -78,21 +78,20 @@
<span class="custom-title">执法人员<i class="bgBlue"></i></span> <span class="custom-title">执法人员<i class="bgBlue"></i></span>
</template> </template>
<div class="peopleList"> <div class="peopleList">
<van-row>
<van-row class="peoplett">
<van-col :span="4">序号</van-col> <van-col :span="4">序号</van-col>
<van-col :span="6">执行人员</van-col> <van-col :span="6">执行人员</van-col>
<van-col :span="10">执法证号</van-col> <van-col :span="10">执法证号</van-col>
<van-col :span="4">带队人</van-col> <van-col :span="4">带队人</van-col>
</van-row> </van-row>

<van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" > <van-row v-for="(item,index) in tEnforceCaseHandlerList" :key="index" >
<van-col :span="4">{{index+1}}</van-col> <van-col :span="4">{{index+1}}</van-col>
<van-col :span="6">{{item.enforcerName}}</van-col> <van-col :span="6">{{item.enforcerName}}</van-col>
<van-col :span="10">{{item.enforcerNum}}</van-col> <van-col :span="10">{{item.enforcerNum}}</van-col>
<van-col :span="4"> <van-col :span="4">
<div class="icon_box"> <div class="icon_box">
<van-checkbox v-model="item.enforcerLeader" shape="square"></van-checkbox>
<van-icon name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20"></van-icon>
<van-checkbox v-model="item.enforcerLeader" shape="square" @change="checkBoxChange(item.enforcerLeader,index)"></van-checkbox>
<van-icon name="../../../static/images/lawEnforcement/icon/icon_delete.png" size="20" @click="removePeople(index)"></van-icon>
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
@@ -102,13 +101,13 @@
</van-collapse> </van-collapse>
</div> </div>


<p class="submitButton">保存</p>
<p class="submitButton" @click="submitForm()">保存</p>


</div> </div>
</template> </template>


<script> <script>
import { getCase , getDeptName , getSurveyByCaseId } from "@/api/lawEnforcement/index";
import { getCase , getDeptName , getSurveyByCaseId , updateSurvey , addSurvey } from "@/api/lawEnforcement/index";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
export default { export default {
name: "programmeDetail", name: "programmeDetail",
@@ -148,7 +147,10 @@
name: null, // 搜索参数-执行人姓名或证件号 name: null, // 搜索参数-执行人姓名或证件号
belongTeam: null, // 搜索参数-所在中队 belongTeam: null, // 搜索参数-所在中队
}, },
tEnforceCaseHandlerList:[]
tEnforceCaseHandlerList:[],
radio:'',
submitType:'',
surveyId:''
}; };
}, },
created() { created() {
@@ -177,21 +179,64 @@
getSurveyByCaseId(this.$route.query.id).then((response) => { getSurveyByCaseId(this.$route.query.id).then((response) => {
if(response.data != undefined){ if(response.data != undefined){
this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList; this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList;
this.surveyId = response.data.id;
this.submitType = 'update';
}else{
this.submitType = 'add';
} }
}); });
}, },
removePeople(index){
this.tEnforceCaseHandlerList.splice(index,1)
},
submitForm(){
let surveyForm = {};
surveyForm.tEnforceCaseHandlerList = this.tEnforceCaseHandlerList;
surveyForm.caseId = this.$route.query.id;
surveyForm.id = this.surveyId;
if(this.submitType == 'update'){
updateSurvey(surveyForm).then(response => {
this.$notify({ type: 'success', message: '保存成功' });
setTimeout(function(){
history.back(-1);
},2000)
});
}else if (this.submitType == 'add'){
addSurvey(surveyForm).then(response => {
this.$notify({ type: 'success', message: '保存成功' });
setTimeout(function(){
history.back(-1);
},2000)
});
}
},
checkBoxChange(val,index){
console.log(val)
console.log(index)
this.tEnforceCaseHandlerList[index].enforcerLeader = val ? 'Y' : ''
}
}, },
watch: { watch: {
$route (to, from ) { $route (to, from ) {
// 监听路由变化, 实现类似 小程序的 onShow 事件 // 监听路由变化, 实现类似 小程序的 onShow 事件
if (to.path === '/lawEnforcement/caseDistribution') { if (to.path === '/lawEnforcement/caseDistribution') {
// do anything you want // do anything you want
console.log(JSON.parse(Cookies.get('enforcer')))
if (Cookies.get('enforcer')){ if (Cookies.get('enforcer')){
JSON.parse(Cookies.get('enforcer')).map(res=>{
this.tEnforceCaseHandlerList.push(res)
})
console.log(this.tEnforceCaseHandlerList)
getSurveyByCaseId(this.$route.query.id).then((response) => {
if(response.data != undefined){
this.tEnforceCaseHandlerList = response.data.tEnforceCaseHandlerList;
JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
let array1 = response.data.tEnforceCaseHandlerList.filter(function (e) { return e.enforcerName == res.enforcerName; });
if ( array1.length < 1 ){
this.tEnforceCaseHandlerList.push(res)
}
})
}else {
JSON.parse(Cookies.get('enforcer')).map((res,index)=>{
this.tEnforceCaseHandlerList.push(res)
})
}
});
} }
} }
} }
@@ -281,12 +326,12 @@
color: #333333; color: #333333;
padding: 5PX 0; padding: 5PX 0;
} }
&:first-child{
background: none;
.van-col{
padding: 0;
color: #1D6FE9;
}
}
.peoplett{
background: none;
.van-col{
padding: 0;
color: #1D6FE9;
} }
} }
} }


+ 0
- 2
src/views/lawEnforcement/caseAllocation/caseLawEnforcer.vue Переглянути файл

@@ -108,14 +108,12 @@
this.getDictionaries() this.getDictionaries()
}, },
popChange(action,index){ popChange(action,index){
console.log(action,index)
this.popValue = action.text; this.popValue = action.text;
this.queryParams.belongTeam = action.value; this.queryParams.belongTeam = action.value;
this.enforcerList = []; this.enforcerList = [];
this.getDictionaries(); this.getDictionaries();
}, },
choiceEnforcer(){ choiceEnforcer(){
console.log(this.result)
const list = []; const list = [];
this.result.map(res=>{ this.result.map(res=>{
let obj = {}; let obj = {};


+ 62
- 16
src/views/lawEnforcement/caseAllocation/caseReturn.vue Переглянути файл

@@ -12,15 +12,14 @@
<span class="custom-title">登记<i class="bgBlue"></i></span> <span class="custom-title">登记<i class="bgBlue"></i></span>
</template> </template>
</van-cell> </van-cell>
<van-cell title="登记号" :border="false" value="登记号" />
<van-cell title="案件来源" :border="false" value="案件来源" />
<van-cell title="关联方案" :border="false" value="关联方案" />
<van-cell title="案件属地" :border="false" value="案件属地" />
<van-cell title="执行主体" :border="false" value="执行主体" />
<van-cell title="案件名称" :border="false" value="案件名称" />
<van-cell title="登记日期" :border="false" value="登记日期" />
<van-cell title="执法类别" :border="false" value="执法类别" />
<van-cell title="案件简述" :border="false" value="案件简述 " />
<van-cell title="案件来源" :border="false" v-model="form.caseSource" />
<van-cell title="关联方案" :border="false" v-model="form.schemeId" />
<van-cell title="案件属地" :border="false" v-model="form.deptId" />
<van-cell title="执行主体" :border="false" v-model="form.belongTeam" />
<van-cell title="案件名称" :border="false" v-model="form.caseName" />
<van-cell title="登记日期" :border="false" v-model="form.registerDate" />
<van-cell title="执法类别" :border="false" v-model="form.enforceCategory" />
<van-cell title="案件简述" :border="false" v-model="form.caseDescribe" />
</div> </div>


<div class="main_box" style="margin-top: 10px;padding-bottom: 15px;"> <div class="main_box" style="margin-top: 10px;padding-bottom: 15px;">
@@ -42,12 +41,12 @@
/> />
</div> </div>
</div> </div>
<p class="submitButton">确定</p>
<p class="submitButton" @click="goSubmit">确定</p>
</div> </div>
</template> </template>


<script> <script>
import { getScheme } from "@/api/lawEnforcement/index";
import { getCase , getDeptName , returnCase } from "@/api/lawEnforcement/index";
export default { export default {
name: "programmeDetail", name: "programmeDetail",
data() { data() {
@@ -56,7 +55,6 @@
showPayeeType:false, showPayeeType:false,
showPicker:false, showPicker:false,
form:{}, form:{},
message:'',


bankType:'', bankType:'',
payeeType:'', payeeType:'',
@@ -72,19 +70,67 @@
activeNames: ['1'], activeNames: ['1'],
activeNames1: ['1'], activeNames1: ['1'],
activeNames2: ['1'], activeNames2: ['1'],

caseSourceOptions:[],
belongTeamOptions:[],

// 查询参数
queryParams: {
// 分页
pageNum: 1,
pageSize: 10,
// 查询排序
orderByColumn: "id",
isAsc: "desc",
name: null, // 搜索参数-执行人姓名或证件号
belongTeam: null, // 搜索参数-所在中队
},
tEnforceCaseHandlerList:[],
radio:'',
submitType:'',
surveyId:'',
message:''
}; };
}, },
created() { created() {
// this.getDictionaries() // this.getDictionaries()
this.getDicts("case_source").then(response => {
this.caseSourceOptions = response.data;
});
this.getDicts("team_category").then(response => {
this.belongTeamOptions = response.data;
});
this.getDicts("enforce_body_type").then(response => {
this.typeOptions = response.data;
});
this.getDetail();
}, },
methods: { methods: {
getDictionaries(){
getScheme(this.$route.query.id).then((response) => {
getDetail(){
getCase(this.$route.query.id).then((response) => {
response.data.caseSource = response.data.caseSource == '' ? '' : this.selectDictLabel(this.caseSourceOptions, response.data.caseSource);
response.data.belongTeam = response.data.belongTeam == '' ? '' : this.selectDictLabel(this.belongTeamOptions, response.data.belongTeam);
response.data.type = response.data.type == '' ? '' : this.selectDictLabel(this.typeOptions, response.data.type);
getDeptName(response.data.deptId).then(res => {
response.data.deptId = res.data.deptName
});
this.form = response.data; this.form = response.data;
}); });
}, },
goBack(){
window.history.go(-1)
goSubmit(){
var caseParam = {
id: this.$route.query.id,
caseProgress:"2", // 默认传参2
returnReson: this.message, // 输入框内容值
};
returnCase(caseParam).then(response => {
if(response.code==200){
this.$notify({ type: 'success', message: '退回成功' });
setTimeout(function(){
history.back(-1);
},2000)
}
});
} }
}, },
} }


Завантаження…
Відмінити
Зберегти