Browse Source

新增委托执法

v4
Chendy 1 year ago
parent
commit
f217ff085d
  1. 3
      src/api/enterprise.js
  2. 366
      src/views/enforce/selectEntrustFilter.vue
  3. 43
      src/views/enforce/sign.vue
  4. 14
      src/views/enterprise/registrationDetail.vue
  5. 33
      src/views/enterprise/registrationEdit.vue

3
src/api/enterprise.js

@ -174,3 +174,6 @@ export const queryStatisticsIndicatorPart2 = (params, success, error) =>_get("/a
* @returns * @returns
*/ */
export const queryStatisticsIndicatorPart3 = (params, success, error) =>_get("/app/enforcementCheckStatistics/statisticsIndicatorPart3",params,success,error) export const queryStatisticsIndicatorPart3 = (params, success, error) =>_get("/app/enforcementCheckStatistics/statisticsIndicatorPart3",params,success,error)
//获取全部执法单位
export const getAllEnforceDept = (params, success, error) => _post("/app/code/registration/getAllEnforceDept",params,success,error)

366
src/views/enforce/selectEntrustFilter.vue

@ -0,0 +1,366 @@
<template>
<div v-if="visible" class="van-overlay"></div>
<div v-if="visible" class="popup">
<div class="popup-title">单位查询</div>
<!-- 关闭按钮 -->
<label class="close-button" @click="closePopup"></label>
<!-- 弹窗的内容 -->
<div class="popup-content">
<div class="subsearch">
<input class="searchbox" v-model="searchParam.deptName" placeholder="请输入单位名称"/>
<van-icon class="ibtn-reset" name="clear" @click="cancel()" title="重置"/>
<button class='btn-search' @click="onSearch()">搜索</button>
<button class='btn-search' @click="selectData()">确定</button>
</div>
<div class="search-result">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<van-radio-group v-model="checked">
<van-cell-group inset>
<van-cell v-for="(item) in dataList" :key="item">
<div style="display: flex; justify-content: space-between;">
<div @click="toggle(item.deptId)">
<van-radio :name="item.deptId+','+item.deptName" :ref="el => checkboxRefs[item.deptId] = el" @click.stop>
{{item.deptName}}
</van-radio>
</div>
</div>
</van-cell>
</van-cell-group>
</van-radio-group>
</van-list>
</van-pull-refresh>
</div>
</div>
</div>
</template>
<script>
import {ref} from 'vue'
import { getAllEnforceDept } from '@/api/enterprise'
import {queryUserInfo} from '@/api/enforce'
const {useCommon} = $globalStore
export default {
props: {
visible: {
type: Boolean,
default: false
},
content: {
type: String,
default: ''
},
checkItem:{
type:String
}
},
data() {
return {
searchParam: {
deptName: '',
pageNum: 1,
pageSize: 20,
},
curPage: 1,
dataList: [],
checkboxRefs: ref([]),
checked:{},
loading:false,
deptId:""
}
},
created() {
this.getDept()
},
methods: {
onSearch(){
this.curPage = 1;
this.onRefresh();
},
toggle(index) {
this.checkboxRefs[index].toggle();
},
closePopup() {
this.$emit('close');
},
getDept() {
queryUserInfo(useCommon.userId, success => {
if (null != success.data) {
this.searchParam.deptId = success.data.bureauDept.deptId;
}
}, error => {
})
},
getDataList(){
if(this.searchParam.deptId!=null && this.searchParam.deptId!==""){
let params = {
pageNum: (this.curPage-1)*this.searchParam.pageSize,
pageSize: this.searchParam.pageSize
}
this.searchParam.params = params;
getAllEnforceDept(this.searchParam, success => {
this.curPage++;
this.loading = false;
if (success.total <= this.dataList.length) {
this.finished = true;
return;
}
for(let i=0;i<success.rows.length;i++){
if(success.rows[i].deptId===this.checkItem){
this.checked=success.rows[i].deptId+","+success.rows[i].deptName;
break;
}
}
this.dataList.push(...success.rows);
}, error => {
})
}
},
cancel() {
this.searchParam.deptName = '';
this.getDataList()
},
selectData() {
let item = this.checked.split(",");
let res={"deptId":item[0], "deptName":item[1]}
this.$emit("reciveData", res);
this.$emit('close');
},
onRefresh() {
this.dataList = [];
this.finished = false;
this.loading = true;
this.onLoad();
},
onLoad() {
let that = this;
setTimeout(() => {
if (that.refreshing) {
that.refreshing = false;
}
that.getDataList();
}, 1000);
},
},
}
</script>
<style scoped>
.popup {
position: fixed;
z-index: 999;
top: 3rem;
left: 0;
width: 100%;
height: calc(100% - 3rem);
background: #fff;
overflow: hidden;
}
.popup-title {
margin: 0.3rem 0 0;
width: 100%;
height: 1rem;
border-bottom: 1px solid #f3f4f5;
text-align: center;
font-size: 0.42rem;
font-weight: 600;
}
.btn-goback {
position: absolute;
top: 0.267rem;
left: 0.3rem;
width: 0.8rem;
height: 0.8rem;
font-size: 0.5rem;
font-weight: bold;
color: #333;
line-height: 1.5;
}
.close-button {
position: absolute;
top: 0.15rem;
right: 0.1rem;
width: 0.8rem;
height: 0.8rem;
background-color: rgba(255, 255, 255, .5);
border: 0.05rem solid rgba(255, 255, 255, .7);
border-radius: 50%;
transform: rotate(45deg);
}
.close-button:before,
.close-button:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
background: #333;
border-radius: 50%;
transform: translate(-50%, -50%);
height: 0.4rem;
width: 0.02rem;
}
.close-button:after {
height: 0.02rem;
width: 0.4rem;
}
.popup-content {
margin: 0.25rem 0 0;
padding-bottom: 3rem;
width: 100%;
height: calc(100% - 1.6rem);
overflow-y: auto;
font-size: 0.37rem;
}
.subsearch {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1% 0.43rem 3%;
width: calc(100% - 0.86rem);
height: 1.25rem;
font-size: 0.37rem;
}
.subsearch .ibtn-reset {
margin: 0 0.5rem 0 -1rem;
width: 1rem;
color: #cfcbcb;
font-size: 0.5rem;
}
.subsearch .btn-search {
margin: 0 0.8rem 0 -0.2rem;
width: 20%;
height: 1rem;
background: #eeeff1 url(/src/assets/images/icon_sou.png) no-repeat;
background-position: left 0.3rem center;
background-size: auto 50%;
border-radius: 0 0.15rem 0.15rem 0;
border: 1px solid rgba(0, 0, 0, .1);
border-left: 1px solid #eee;
line-height: 10rem;
overflow: hidden;
}
.subsearch .btn-search:last-child {
margin-right: 0;
border-radius: 0.15rem;
background: #1367fe;
border-color: #1367fe;
color: #fff;
line-height: 1;
}
.searchbox {
margin: 2% 0;
padding: 0.1rem 1.2rem 0.1rem 0.3rem;
width: 100%;
height: 1rem;
/*background: #f6f7fe url(../../assets/images/icon_sou.png) no-repeat;
background-position: left 0.25rem center;
background-size: auto 50%;*/
box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, .1);
border-radius: 0.15rem 0 0 0.15rem;
color: #999999;
outline: none;
}
.subtitle {
margin: 0.5rem 0 0.25rem;
font-size: 0.38rem;
font-weight: 600;
}
.quick-item {
display: flex;
}
.quick-item span {
display: inline-block;
margin: 1% 0 2% 3.5%;
padding: 2% 3.75%;
background: #f2f3f4;
border: 0;
border-radius: 8px;
color: #4c4c4c;
}
.quick-item span.seled {
background: #e9f2fb;
color: #1367fe;
}
.btnbox {
display: flex;
justify-content: center;
margin: 5% 2%;
width: 96%;
height: 1.0rem;
}
.btn-reset,
.btn-search {
display: inline-block;
margin: 0 2%;
padding: 0;
width: 60%;
color: #fff;
font-size: 0.37rem;
border-radius: 1rem;
background: #1367fe;
border: 1px solid #1367fe;
text-align: center;
}
.btn-reset {
width: 35%;
background-color: #fff;
border-color: rgba(19, 103, 254, .7);
color: #1367fe;
}
.search-result {
width: 100%;
height: calc(100% - 3rem);
padding-bottom: 1rem;
overflow-y: auto;
}
.search-result .van-cell-group {
margin: 0;
}
.case-item {
margin: 3% 2%;
padding: 2% 0;
width: 96%;
font-size: 0.35rem;
border-bottom: 1px solid #f4f4f4;
color: #999;
line-height: 2;
}
.case-title {
margin: 2% 0;
font-size: 0.42rem;
color: #333;
line-height: 1.25;
}
</style>

43
src/views/enforce/sign.vue

@ -185,9 +185,21 @@
<van-divider class="divdsty" /> <van-divider class="divdsty" />
<van-cell center title="委托执法"> <van-cell center title="委托执法">
<template #right-icon> <template #right-icon>
<van-switch v-model="data.auth_checked" @click="!data.auth_checked"/> <van-switch v-model="data.auth_checked" @click="authCheck"/>
</template> </template>
</van-cell> </van-cell>
<view v-if="data.auth_checked===true">
<van-field
v-model="submitData.entrustDeptName"
label="委托单位"
placeholder="请选择"
is-link
readonly
required
:rules="[{ required: true, message: '请选择委托单位' }]"
@click="showEntrust"
/>
</view>
<div class="add-inspect" v-if="data.checked"> <div class="add-inspect" v-if="data.checked">
<!-- <p v-if="submitData.userObjs.length > 0"><label>联合执法部门+人员</label></p>--> <!-- <p v-if="submitData.userObjs.length > 0"><label>联合执法部门+人员</label></p>-->
@ -291,6 +303,8 @@
<DeptPopup :visible="data.deptChecked" :content="data.deptContent" @close="closePopup" <DeptPopup :visible="data.deptChecked" :content="data.deptContent" @close="closePopup"
@reciveData="reciveDept"/> @reciveData="reciveDept"/>
<entrustFilter :visible="data.entrustPopup" :deptList="data.dataList" @close="closePopup" @reciveData="entrustPopupData"/>
</div> </div>
</template> </template>
@ -326,6 +340,7 @@
getByUserIdAndZero, getByUserIdAndZero,
queryEnterpriseLawEnforcementList queryEnterpriseLawEnforcementList
} from "../../api/administrative"; } from "../../api/administrative";
import entrustFilter from '@/views/enforce/selectEntrustFilter';
const {useCommon, useMy} = $globalStore const {useCommon, useMy} = $globalStore
@ -393,6 +408,7 @@
union_datas: [], // list union_datas: [], // list
check_union_no: '', // check_union_no: '', //
radio_flag: 'circle', // radio_flag: 'circle', //
entrustPopup:false
}); });
var fileSize = 0; var fileSize = 0;
// //
@ -462,9 +478,33 @@
deptObjs: [], deptObjs: [],
userObjs: [], userObjs: [],
isUnite: 0, isUnite: 0,
// id name
entrustDeptName:"",
entrustDeptId:""
}) })
//
const authCheck=() =>{
if(data.auth_checked===false){
data.auth_checked===true
//
}else{
data.auth_checked===false;
}
}
const showEntrust = () => {
data.entrustPopup = true;
}
//
const entrustPopupData=(item)=>{
submitData.entrustDeptId=item.deptId;
submitData.entrustDeptName=item.deptName;
}
const tapGood = () => { const tapGood = () => {
data.good = "#13c11a"; data.good = "#13c11a";
data.bad = "#D3D3D3"; data.bad = "#D3D3D3";
@ -1055,6 +1095,7 @@
data.popupCp = false; data.popupCp = false;
data.lawChecked = false; data.lawChecked = false;
data.deptChecked = false; data.deptChecked = false;
data.entrustPopup=false;
} }
const reciveData = (item) => { const reciveData = (item) => {

14
src/views/enterprise/registrationDetail.vue

@ -108,6 +108,14 @@
<van-switch v-model="data.auth_checked" disabled/> <van-switch v-model="data.auth_checked" disabled/>
</template> </template>
</van-cell> </van-cell>
<view v-if="data.auth_checked===true">
<van-field
v-model="data.entrustDeptName"
label="委托单位"
readonly
/>
</view>
<div class="file-upload"> <div class="file-upload">
<div class="file-upload-center"> <div class="file-upload-center">
@ -554,7 +562,8 @@ const data = reactive({
auth_checked: false, // auth_checked: false, //
union_datas: [], // list union_datas: [], // list
check_union_no: '', // check_union_no: '', //
radio_flag: 'circle', // radio_flag: 'circle', // ,
entrustDeptName:""
}); });
// //
const submitData = reactive({ const submitData = reactive({
@ -615,7 +624,7 @@ const submitData = reactive({
problem2: 0, problem2: 0,
problem3: 0, problem3: 0,
problem4: 0, problem4: 0,
problem5: 0, problem5: 0
}); });
const tapGood = () => { const tapGood = () => {
@ -983,6 +992,7 @@ const convertReg = (regs) => {
obj.lawEnforcementItem = dt.lawEnforcementItem; obj.lawEnforcementItem = dt.lawEnforcementItem;
obj.lawEnforcementItemText = dt.lawEnforcementItemText; obj.lawEnforcementItemText = dt.lawEnforcementItemText;
data.auth_checked = dt.hasAuto==0?false:true; data.auth_checked = dt.hasAuto==0?false:true;
data.entrustDeptName=dt.entrustDeptName;
data.hasUnion = dt.hasUnion==0?false:true; data.hasUnion = dt.hasUnion==0?false:true;
obj.lawEnforcer = nameCorrect(dt.lawEnforcer); obj.lawEnforcer = nameCorrect(dt.lawEnforcer);
obj.remark = dt.remark; obj.remark = dt.remark;

33
src/views/enterprise/registrationEdit.vue

@ -275,6 +275,20 @@
<van-switch v-model="data.auth_checked" @click="!data.auth_checked"/> <van-switch v-model="data.auth_checked" @click="!data.auth_checked"/>
</template> </template>
</van-cell> </van-cell>
<view v-if="data.auth_checked===true">
<van-field
v-model="submitData.entrustDeptName"
label="委托单位"
placeholder="请选择"
is-link
readonly
required
:rules="[{ required: true, message: '请选择委托单位' }]"
@click="showEntrust"
/>
</view>
<entrustFilter :visible="data.entrustPopup" :deptList="data.deptList"
:checkItem="submitData.entrustDeptId" @close="closePopup" @reciveData="entrustPopupData"/>
<!-- <div class="add-inspect" v-if="data.checked"> --> <!-- <div class="add-inspect" v-if="data.checked"> -->
<div class="add-inspect" v-if="false"> <div class="add-inspect" v-if="false">
@ -355,6 +369,7 @@
<van-date-picker v-if="data.showNom" type="time" v-model="data.currentDate" @confirm="onConfirm" /> <van-date-picker v-if="data.showNom" type="time" v-model="data.currentDate" @confirm="onConfirm" />
<van-date-picker v-if="data.showBl" type="time" v-model="data.currentDate" :max-date="data.maxDate" :min-date="data.minDate" @confirm="onConfirm" @cancel="data.showTimePicker = false" /> <van-date-picker v-if="data.showBl" type="time" v-model="data.currentDate" :max-date="data.maxDate" :min-date="data.minDate" @confirm="onConfirm" @cancel="data.showTimePicker = false" />
</van-popup> </van-popup>
</div> </div>
</template> </template>
@ -384,6 +399,7 @@ import {showFailToast, showSuccessToast} from 'vant';
queryEnterpriseLawEnforcementList queryEnterpriseLawEnforcementList
} from "../../api/administrative"; } from "../../api/administrative";
import { baseUrl } from "@/config/env"; import { baseUrl } from "@/config/env";
import entrustFilter from '@/views/enforce/selectEntrustFilter';
const { useCommon,useMy } = $globalStore const { useCommon,useMy } = $globalStore
@ -444,6 +460,8 @@ import {showFailToast, showSuccessToast} from 'vant';
showNom: false, showNom: false,
minDate: null, minDate: null,
maxDate: null, maxDate: null,
entrustPopup:false,
deptList:[]
}); });
var fileSize = 0; var fileSize = 0;
// //
@ -517,8 +535,20 @@ import {showFailToast, showSuccessToast} from 'vant';
userObjs: [], userObjs: [],
isUnite: 0, isUnite: 0,
updateTimeFlag: 0, updateTimeFlag: 0,
entrustDeptId:"",
entrustDeptName:""
}) })
//
const entrustPopupData=(item)=>{
submitData.entrustDeptId=item.deptId;
submitData.entrustDeptName=item.deptName;
}
const showEntrust = () => {
data.entrustPopup = true;
}
const tapGood = () => { const tapGood = () => {
data.good = "#13c11a"; data.good = "#13c11a";
data.bad = "#D3D3D3"; data.bad = "#D3D3D3";
@ -760,6 +790,8 @@ import {showFailToast, showSuccessToast} from 'vant';
submitData.hasAuto = success.data.hasAuto; submitData.hasAuto = success.data.hasAuto;
data.auth_checked = success.data.hasAuto==0?false:true; data.auth_checked = success.data.hasAuto==0?false:true;
submitData.unionNo = success.data.unionNo; submitData.unionNo = success.data.unionNo;
submitData.entrustDeptId=success.data.entrustDeptId;
submitData.entrustDeptName=success.data.entrustDeptName;
// //
submitData.isEvaluate = success.data.isEvaluate; submitData.isEvaluate = success.data.isEvaluate;
if (null != success.data.enterpriseEvaluate && "" != success.data.enterpriseEvaluate) { if (null != success.data.enterpriseEvaluate && "" != success.data.enterpriseEvaluate) {
@ -1190,6 +1222,7 @@ import {showFailToast, showSuccessToast} from 'vant';
data.popupVisibleqz = false; data.popupVisibleqz = false;
data.lawChecked = false; data.lawChecked = false;
data.deptChecked = false; data.deptChecked = false;
data.entrustPopup=false;
} }
const reciveData = (item) =>{ const reciveData = (item) =>{

Loading…
Cancel
Save