7 changed files with 650 additions and 10 deletions
@ -0,0 +1,256 @@ |
|||||
|
<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="请输入部门名称"/> |
||||
|
</div> |
||||
|
<div class="btnbox"> |
||||
|
<button class='btn-reset' @click="cancel()">重置</button> |
||||
|
<button class='btn-search' @click="queryList()">搜索</button> |
||||
|
<button class='btn-search' @click="selectData()">确定</button> |
||||
|
</div> |
||||
|
|
||||
|
<div class="search-result"> |
||||
|
<van-checkbox-group v-model="checked"> |
||||
|
<van-cell-group inset> |
||||
|
<van-cell v-for="(item, index) in dataList" :key="item" @click="toggle(index)" :title="item.deptName" clickable> |
||||
|
<template #right-icon> |
||||
|
<van-checkbox :name="item" :ref="el => checkboxRefs[index] = el" @click.stop/> |
||||
|
</template> |
||||
|
</van-cell> |
||||
|
</van-cell-group> |
||||
|
<!-- <div class="case-item" v-for="(item, index) in dataList" :key="index" @click="selectData(item)">--> |
||||
|
<!-- <div class="case-title">部门:{{ item.deptName }}</div>--> |
||||
|
<!-- <div class="case-depart">电话:{{ item.phonenumber }}</div>--> |
||||
|
<!-- <div class="case-time">执法证件号:{{ item.lawCertificateNum }}</div>--> |
||||
|
<!-- </div>--> |
||||
|
</van-checkbox-group> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {ref} from 'vue' |
||||
|
import {queryDepts} from '../../api/user' |
||||
|
|
||||
|
const {useCommon} = $globalStore |
||||
|
export default { |
||||
|
props: { |
||||
|
visible: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
content: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
searchParam: { |
||||
|
//搜索框 |
||||
|
dataScopeId: useCommon.userId, |
||||
|
deptName: '', |
||||
|
}, |
||||
|
dataList: [], |
||||
|
checked: ref([]), |
||||
|
checkboxRefs: ref([]), |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// this.queryList() |
||||
|
}, |
||||
|
methods: { |
||||
|
toggle(index) { |
||||
|
this.checkboxRefs[index].toggle(); |
||||
|
}, |
||||
|
closePopup() { |
||||
|
this.$emit('close'); |
||||
|
}, |
||||
|
queryList() { |
||||
|
queryDepts(this.searchParam, success => { |
||||
|
console.log(success); |
||||
|
this.dataList = success.data |
||||
|
}, error => { |
||||
|
}) |
||||
|
}, |
||||
|
cancel() { |
||||
|
this.searchParam.userName = ''; |
||||
|
this.queryList() |
||||
|
}, |
||||
|
selectData() { |
||||
|
this.$emit("reciveData", JSON.parse(JSON.stringify(this.checked))); |
||||
|
this.$emit('close'); |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</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; |
||||
|
} |
||||
|
|
||||
|
.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 3% 0; |
||||
|
padding-bottom: 3rem; |
||||
|
width: 94%; |
||||
|
height: calc(100% - 1.6rem); |
||||
|
overflow-y: auto; |
||||
|
font-size: 0.38rem; |
||||
|
} |
||||
|
|
||||
|
.subsearch { |
||||
|
width: 100%; |
||||
|
height: 1.25rem; |
||||
|
} |
||||
|
|
||||
|
.searchbox { |
||||
|
margin: 2% 3%; |
||||
|
padding: 0.15rem 0.3rem 0.1rem 1.15rem; |
||||
|
width: 94%; |
||||
|
height: 1.0rem; |
||||
|
background: #f6f7fe url(../../assets/images/icon_sou.png) no-repeat; |
||||
|
background-position: left 0.5rem center; |
||||
|
background-size: auto 50%; |
||||
|
box-sizing: border-box; |
||||
|
border: 1px solid rgba(0, 0, 0, .05); |
||||
|
border-radius: 0.5rem; |
||||
|
color: #999999; |
||||
|
outline: none; |
||||
|
} |
||||
|
|
||||
|
.subtitle { |
||||
|
margin: 0.5rem 0 0.25rem; |
||||
|
font-size: 0.4rem; |
||||
|
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.38rem; |
||||
|
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%; |
||||
|
padding-bottom: 2rem; |
||||
|
} |
||||
|
|
||||
|
.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> |
||||
@ -0,0 +1,248 @@ |
|||||
|
<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.enterpriseName" placeholder="请输入企业名称"/> |
||||
|
</div> |
||||
|
<div class="btnbox"> |
||||
|
<button class='btn-reset' @click="cancel()">重置</button> |
||||
|
<button class='btn-search' @click="queryList()">搜索</button> |
||||
|
</div> |
||||
|
|
||||
|
<div class="search-result"> |
||||
|
<div class="case-item" v-for="(item, index) in dataList" :key="index" @click="selectData(item)"> |
||||
|
<div class="case-title">企业名:{{ item.enterpriseName }}</div> |
||||
|
<div class="case-depart">执法项:{{ item.checkItem }}</div> |
||||
|
<!-- <div class="case-time">执法证件号:{{ item.lawCertificateNum }}</div>--> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {ref} from 'vue' |
||||
|
import {queryEnforcementList} from '../../api/enterprise' |
||||
|
|
||||
|
const {useCommon} = $globalStore |
||||
|
export default { |
||||
|
props: { |
||||
|
visible: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
content: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
lawEnforcementId: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
enterpriseNumber: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
searchParam: { |
||||
|
//搜索框 |
||||
|
dataScopeId: useCommon.userId, |
||||
|
enterpriseName: '', |
||||
|
}, |
||||
|
dataList: [], |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// this.queryList() |
||||
|
}, |
||||
|
methods: { |
||||
|
closePopup() { |
||||
|
this.$emit('close'); |
||||
|
}, |
||||
|
queryList() { |
||||
|
queryEnforcementList({"lawEnforcementId": this.lawEnforcementId, "enterpriseNumber": this.enterpriseNumber, "isReg": 0, "isSubmit": 1}, success => { |
||||
|
this.dataList = success.data |
||||
|
}, error => { |
||||
|
}) |
||||
|
}, |
||||
|
cancel() { |
||||
|
this.searchParam.userName = ''; |
||||
|
this.queryList() |
||||
|
}, |
||||
|
selectData(item) { |
||||
|
this.$emit("reciveData", JSON.parse(JSON.stringify(item))); |
||||
|
this.$emit('close'); |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</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; |
||||
|
} |
||||
|
|
||||
|
.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 3% 0; |
||||
|
padding-bottom: 3rem; |
||||
|
width: 94%; |
||||
|
height: calc(100% - 1.6rem); |
||||
|
overflow-y: auto; |
||||
|
font-size: 0.38rem; |
||||
|
} |
||||
|
|
||||
|
.subsearch { |
||||
|
width: 100%; |
||||
|
height: 1.25rem; |
||||
|
} |
||||
|
|
||||
|
.searchbox { |
||||
|
margin: 2% 3%; |
||||
|
padding: 0.15rem 0.3rem 0.1rem 1.15rem; |
||||
|
width: 94%; |
||||
|
height: 1.0rem; |
||||
|
background: #f6f7fe url(../../assets/images/icon_sou.png) no-repeat; |
||||
|
background-position: left 0.5rem center; |
||||
|
background-size: auto 50%; |
||||
|
box-sizing: border-box; |
||||
|
border: 1px solid rgba(0, 0, 0, .05); |
||||
|
border-radius: 0.5rem; |
||||
|
color: #999999; |
||||
|
outline: none; |
||||
|
} |
||||
|
|
||||
|
.subtitle { |
||||
|
margin: 0.5rem 0 0.25rem; |
||||
|
font-size: 0.4rem; |
||||
|
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.38rem; |
||||
|
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%; |
||||
|
padding-bottom: 2rem; |
||||
|
} |
||||
|
|
||||
|
.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> |
||||
Loading…
Reference in new issue