|
|
@ -40,155 +40,174 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-if="visible" class="popup" v-show="isCheck"> |
|
|
<van-popup v-model:show="showPicker" round position="bottom" :close-on-click-overlay="false"> |
|
|
<!-- 弹窗的内容 --> |
|
|
<van-picker v-model="selectedValues" |
|
|
<div class="popup-content"> |
|
|
cancel-button-text="" |
|
|
<div class="subtitle">请选择不扫码的原因:</div> |
|
|
title="请选择不扫码的原因" :columns="columns" |
|
|
<!-- 关闭按钮 --> |
|
|
@confirm="onConfirm" /> |
|
|
<label class="close-button" @click="closeReason"></label> |
|
|
</van-popup> |
|
|
<div class="item-box"> |
|
|
|
|
|
<!-- <span :class="checkCss==1?'item-btn active':'item-btn'"--> |
|
|
|
|
|
<!-- @click="checkReason('企业拒绝出示二维码', 1)">企业拒绝出示二维码</span>--> |
|
|
|
|
|
<!-- <span :class="checkCss==2?'item-btn active':'item-btn'"--> |
|
|
|
|
|
<!-- @click="checkReason('网络/设备故障', 2)">网络/设备故障</span>--> |
|
|
|
|
|
<!-- <span :class="checkCss==3?'item-btn active':'item-btn'" --> |
|
|
|
|
|
<!-- @click="checkReason('其它', 3)">其它</span>--> |
|
|
|
|
|
|
|
|
|
|
|
<span v-for="(item, index) in dicts" :key="index" :class="checkCss==item.dictValue?'item-btn active':'item-btn'" @click="checkReason(item.dictLabel, item.dictValue)">{{item.dictLabel}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="btnbox"> |
|
|
|
|
|
<!-- <button class='btn-reset' @click="">重置</button>--> |
|
|
|
|
|
<button class='btn-search' @click="closeReason">确定</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script setup > |
|
|
import {queryEnterpriseInfoList} from '../../api/enterprise' |
|
|
import {queryEnterpriseInfoList} from '../../api/enterprise' |
|
|
import {queryRegistrationList} from "../../api/enforce"; |
|
|
import {queryRegistrationList} from "../../api/enforce"; |
|
|
import {getDict} from "../../api/Home"; |
|
|
import {getDict} from "../../api/Home"; |
|
|
|
|
|
|
|
|
export default { |
|
|
//路由参数 |
|
|
data() { |
|
|
const router = useRouter(); |
|
|
return { |
|
|
const isCheck = true; |
|
|
isCheck: true, |
|
|
const checkCss = ref(1); |
|
|
checkCss: 1, |
|
|
const reason = ref("企业拒绝出示二维码"); |
|
|
reason: "企业拒绝出示二维码", |
|
|
const enterpriseList = ref([]); |
|
|
enterpriseList: [], |
|
|
const searchParam =reactive( { |
|
|
searchParam: { |
|
|
// 企业名称 |
|
|
// 企业名称 |
|
|
enterpriseName: "", |
|
|
enterpriseName: "", |
|
|
params: {}, |
|
|
params: {}, |
|
|
// 分页 |
|
|
// 分页 |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
pageSize: 6, |
|
|
pageSize: 6, |
|
|
}) |
|
|
}, |
|
|
const dicts = ref([]); |
|
|
dicts: [], |
|
|
const loading = ref(false); |
|
|
loading: false, |
|
|
const finished = ref(false); |
|
|
finished: false, |
|
|
const refreshing = ref(false); |
|
|
refreshing: false, |
|
|
const curPage= ref(1); |
|
|
curPage: 1, |
|
|
const columns= []; |
|
|
} |
|
|
const showPicker = ref(true) |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
|
|
visible: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
enterpriseNumber: { |
|
|
visible: { |
|
|
type: String, |
|
|
type: Boolean, |
|
|
default: false |
|
|
default: true |
|
|
}, |
|
|
}, |
|
|
content: { |
|
|
content: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: '' |
|
|
default: '' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
lawEnforcementId: { |
|
|
// this.queryList(); |
|
|
type: String, |
|
|
this.queryDict(); |
|
|
default: '' |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
}) |
|
|
closePopup() { |
|
|
// props: { |
|
|
this.$emit('close'); |
|
|
// visible: { |
|
|
}, |
|
|
// type: Boolean, |
|
|
queryList() { |
|
|
// default: true |
|
|
this.searchParam.reason = this.checkCss; |
|
|
// }, |
|
|
this.searchParam.pageNum = (this.curPage-1)*this.searchParam.pageSize; |
|
|
// content: { |
|
|
queryEnterpriseInfoList(this.searchParam, success => { |
|
|
// type: String, |
|
|
this.curPage++; |
|
|
// default: '' |
|
|
this.loading = false; // 查出结果停止加载 |
|
|
// } |
|
|
if (success.total <= this.enterpriseList.length) { |
|
|
// } |
|
|
// 查到最后没数据 |
|
|
// created() { |
|
|
this.finished = true; |
|
|
// // this.queryList(); |
|
|
return; |
|
|
// this.queryDict(); |
|
|
} |
|
|
// }, |
|
|
// this.enterpriseList.push(...success.data); |
|
|
onMounted(() =>{ |
|
|
this.enterpriseList.push(...success.rows); |
|
|
queryDict(); |
|
|
}); |
|
|
}) |
|
|
}, |
|
|
const closePopup = () =>{ |
|
|
search() { |
|
|
this.$emit('close'); |
|
|
this.curPage = 1; |
|
|
} |
|
|
this.enterpriseList = []; |
|
|
const queryList =() =>{ |
|
|
this.onRefresh(); |
|
|
searchParam.reason = checkCss; |
|
|
}, |
|
|
searchParam.pageNum = (curPage.value-1)*searchParam.pageSize; |
|
|
queryDict() { |
|
|
queryEnterpriseInfoList(searchParam, success => { |
|
|
this.dicts = []; |
|
|
curPage.value++; |
|
|
getDict({"dictType":"no-scan-reason"}, success => { |
|
|
loading.value = false; // 查出结果停止加载 |
|
|
if (success.success) { |
|
|
if (success.total <= enterpriseList.value.length) { |
|
|
this.dicts.push(...success.data); |
|
|
// 查到最后没数据 |
|
|
} |
|
|
finished.value = true; |
|
|
}); |
|
|
return; |
|
|
}, |
|
|
} |
|
|
toDetail(item) { |
|
|
// this.enterpriseList.push(...success.data); |
|
|
this.$router.push({ |
|
|
enterpriseList.value.push(...success.rows); |
|
|
// path: "/sign", |
|
|
}); |
|
|
path: "/enterpriseScanPreview", |
|
|
} |
|
|
query: { |
|
|
const search = () =>{ |
|
|
reason: this.reason, |
|
|
curPage.value = 1; |
|
|
checkCss: this.checkCss, |
|
|
enterpriseList.value = []; |
|
|
enterpriseNumber: item.salt, |
|
|
onRefresh(); |
|
|
isNoScan: true, |
|
|
} |
|
|
} |
|
|
const queryDict = () => { |
|
|
}); |
|
|
dicts.value = []; |
|
|
}, |
|
|
getDict({"dictType":"no-scan-reason"}, success => { |
|
|
checkReason(val, key) { |
|
|
if (success.success) { |
|
|
this.reason = val; |
|
|
dicts.value.push(...success.data); |
|
|
this.checkCss = key; |
|
|
} |
|
|
}, |
|
|
for (let index = 0; index < success.data.length; index++) { |
|
|
closeReason() { |
|
|
const element = success.data[index]; |
|
|
this.isCheck = false; |
|
|
console.log(element); |
|
|
}, |
|
|
var obj = { |
|
|
cancel() { |
|
|
"text": element.dictLabel, |
|
|
this.searchParam.enterpriseName = ''; |
|
|
"value":element.dictValue |
|
|
this.search() |
|
|
} |
|
|
}, |
|
|
columns.push(obj); |
|
|
// 返回 |
|
|
} |
|
|
goBack() { |
|
|
}); |
|
|
this.$router.go(-1); |
|
|
} |
|
|
}, |
|
|
const toDetail = (item) =>{ |
|
|
|
|
|
router.push({ |
|
|
//下拉刷新 |
|
|
// path: "/sign", |
|
|
onRefresh() { |
|
|
path: "/enterpriseScanPreview", |
|
|
// 清空列表数据 |
|
|
query: { |
|
|
this.enterpriseList = []; |
|
|
reason: reason.value, |
|
|
this.finished = false; |
|
|
checkCss: checkCss.value, |
|
|
|
|
|
enterpriseNumber: item.salt, |
|
|
// 重新加载数据 |
|
|
isNoScan: true, |
|
|
// 将 loading 设置为 true,表示处于加载状态 |
|
|
} |
|
|
this.loading = true; |
|
|
}); |
|
|
this.onLoad(); |
|
|
} |
|
|
}, |
|
|
const checkReason = (val, key)=> { |
|
|
// 触底加载 |
|
|
reason = val; |
|
|
onLoad() { |
|
|
checkCss = key; |
|
|
let that = this; |
|
|
} |
|
|
setTimeout(() => { |
|
|
const closeReason =() =>{ |
|
|
if (that.refreshing) { |
|
|
isCheck = false; |
|
|
that.refreshing = false; |
|
|
} |
|
|
} |
|
|
const cancel = () =>{ |
|
|
that.queryList(); |
|
|
searchParam.enterpriseName = ''; |
|
|
}, 1000); |
|
|
search() |
|
|
}, |
|
|
} |
|
|
} |
|
|
// 返回 |
|
|
|
|
|
const goBack = () =>{ |
|
|
|
|
|
router.go(-1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//下拉刷新 |
|
|
|
|
|
const onRefresh =() => { |
|
|
|
|
|
// 清空列表数据 |
|
|
|
|
|
enterpriseList.value = []; |
|
|
|
|
|
finished.value = false; |
|
|
|
|
|
|
|
|
|
|
|
// 重新加载数据 |
|
|
|
|
|
// 将 loading 设置为 true,表示处于加载状态 |
|
|
|
|
|
loading.value = true; |
|
|
|
|
|
onLoad(); |
|
|
|
|
|
} |
|
|
|
|
|
// 触底加载 |
|
|
|
|
|
const onLoad = () => { |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
if (refreshing.value) { |
|
|
|
|
|
refreshing.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
queryList(); |
|
|
|
|
|
}, 1000); |
|
|
|
|
|
} |
|
|
|
|
|
const onConfirm = (item) =>{ |
|
|
|
|
|
showPicker.value = false; |
|
|
|
|
|
var obj = item.selectedOptions[0]; |
|
|
|
|
|
reason.value = obj.text; |
|
|
|
|
|
checkCss.value = obj.value; |
|
|
|
|
|
console.log(item); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
|