10 changed files with 1602 additions and 8 deletions
@ -0,0 +1,10 @@ |
|||||
|
import { _get, _post,_form,_delete } from "../http/index"; |
||||
|
|
||||
|
//行政检查预约登记
|
||||
|
export const addEnterpriseLawEnforcement = (params, success, error) => _post("/code/enforcement/add",params,success,error) |
||||
|
|
||||
|
//查询历史检查信息
|
||||
|
export const queryEnterpriseLawEnforcementList = (params, success, error) => _get("/code/enforcement/queryList",params,success,error) |
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,11 @@ |
|||||
|
import { _get, _post,_form,_delete } from "../http/index"; |
||||
|
|
||||
|
//保存执法信息登记
|
||||
|
export const addEnforcementRegistration = (params, success, error) => _post("/code/registration/add",params,success,error) |
||||
|
|
||||
|
//查询历史检查信息
|
||||
|
export const queryRegistrationList = (params, success, error) => _get("/code/registration/queryList",params,success,error) |
||||
|
|
||||
|
//查询预警列表
|
||||
|
export const queryEarlyWarning = (params, success, error) => _get("/code/registration/queryEarlyWarning",params,success,error) |
||||
|
|
||||
@ -0,0 +1,16 @@ |
|||||
|
const routes = [ |
||||
|
// 执法信息登记
|
||||
|
{ |
||||
|
path: "/appointment", |
||||
|
name: "appointment", |
||||
|
component: () => import("@/views/administrative/appointment.vue"), |
||||
|
}, |
||||
|
// 执法信息登记列表
|
||||
|
{ |
||||
|
path: "/appointmentList", |
||||
|
name: "appointmentList", |
||||
|
component: () => import("@/views/administrative/appointmentList.vue"), |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export { routes }; |
||||
@ -0,0 +1,22 @@ |
|||||
|
const routes = [ |
||||
|
// 执法信息登记
|
||||
|
{ |
||||
|
path: "/sign", |
||||
|
name: "sign", |
||||
|
component: () => import("@/views/enforce/sign.vue"), |
||||
|
}, |
||||
|
// 历史检查信息
|
||||
|
{ |
||||
|
path: "/historyCheck", |
||||
|
name: "historyCheck", |
||||
|
component: () => import("@/views/enforce/historyCheck.vue"), |
||||
|
}, |
||||
|
// 预警列表
|
||||
|
{ |
||||
|
path: "/earlyWarning", |
||||
|
name: "earlyWarning", |
||||
|
component: () => import("@/views/enforce/earlyWarning.vue"), |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export { routes }; |
||||
@ -0,0 +1,201 @@ |
|||||
|
<template> |
||||
|
<div class="address_edit"> |
||||
|
<!-- 导航栏 --> |
||||
|
<div class="header_body"> |
||||
|
<header-nav :slefBack="true" @goBack="goBack" :titelText="`行政检查预约`"></header-nav> |
||||
|
</div> |
||||
|
<!-- 中间 --> |
||||
|
<div> |
||||
|
<!-- <van-cell-group>--> |
||||
|
<van-form @failed="onFailed" @submit="submit"> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcementCode" |
||||
|
label="登记编号" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.enterpriseName" |
||||
|
label="企业名称" |
||||
|
required |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.linkMan" |
||||
|
label="企业联系人" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.linkTel" |
||||
|
label="联系人电话" |
||||
|
:rules="[{ validator, message: '请输入正确内容' }]" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.checkTime" |
||||
|
required |
||||
|
readonly |
||||
|
label="检查时间" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
@click="data.showTimePicker = true" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.checkItem" |
||||
|
required |
||||
|
label="检查事项" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.checkRequire" |
||||
|
required |
||||
|
label="检查要求" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcement" |
||||
|
required |
||||
|
label="执法部门" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcer" |
||||
|
readonly |
||||
|
label="执法人员" |
||||
|
@click="data.showLawEnforcerFlag = true" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.remark" |
||||
|
label="备注" |
||||
|
rows="2" |
||||
|
autosize |
||||
|
type="textarea" |
||||
|
maxlength="50" |
||||
|
placeholder="请输入备注" |
||||
|
show-word-limit |
||||
|
/> |
||||
|
|
||||
|
<div class="warp_body"> |
||||
|
<van-action-bar> |
||||
|
<van-button round block color="#be99ff" type="info" native-type="submit">提交</van-button> |
||||
|
</van-action-bar> |
||||
|
</div> |
||||
|
</van-form> |
||||
|
<!-- </van-cell-group>--> |
||||
|
</div> |
||||
|
|
||||
|
<!-- <div class="warp_body">--> |
||||
|
<!-- <van-action-bar>--> |
||||
|
<!-- <van-action-bar-button color="#be99ff" text="保存" @click="submit" />--> |
||||
|
<!-- </van-action-bar>--> |
||||
|
<!-- </div>--> |
||||
|
|
||||
|
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }" /> |
||||
|
|
||||
|
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }" > |
||||
|
<van-date-picker |
||||
|
type="time" |
||||
|
@confirm="onConfirm" |
||||
|
@cancel="data.showTimePicker = false" |
||||
|
/> |
||||
|
</van-popup> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup name="register"> |
||||
|
|
||||
|
import { showSuccessToast } from 'vant'; |
||||
|
import {addEnterpriseLawEnforcement} from '../../api/administrative' |
||||
|
import { reactive, ref } from "vue"; |
||||
|
import {uploadFile} from "../../util/fileUpload"; |
||||
|
const { useMy } = $globalStore |
||||
|
|
||||
|
const router = useRouter(); |
||||
|
let queryaddressId = ref(""); |
||||
|
const data = reactive({ |
||||
|
showLawEnforcerFlag:false, |
||||
|
showTimePicker:false, |
||||
|
}); |
||||
|
//保存参数 |
||||
|
const submitData = reactive({ |
||||
|
/** 登记编号 */ |
||||
|
lawEnforcementCode:"", |
||||
|
/** 企业名称 */ |
||||
|
enterpriseName:"", |
||||
|
/** 企业ID */ |
||||
|
enterpriseId:"", |
||||
|
/** 企业联系人 */ |
||||
|
linkMan:"", |
||||
|
/** 联系人电话 */ |
||||
|
linkTel:"", |
||||
|
/** 检查时间 */ |
||||
|
checkTime:"", |
||||
|
/** 检查事项 */ |
||||
|
checkItem:"", |
||||
|
/** 检查要求 */ |
||||
|
checkRequire:"", |
||||
|
/** 执法部门 */ |
||||
|
lawEnforcement:"", |
||||
|
/** 执法部门ID */ |
||||
|
lawEnforcementId:"", |
||||
|
/** 执法人员 */ |
||||
|
lawEnforcer:"", |
||||
|
/** 执法人员ID */ |
||||
|
lawEnforcerId:"", |
||||
|
/** 备注 */ |
||||
|
remark:"", |
||||
|
}) |
||||
|
|
||||
|
const onConfirm = (time) => { |
||||
|
if(time != null) { |
||||
|
var times = time.selectedValues; |
||||
|
submitData.checkTime = times[0] +"-"+ times[1] +"-"+ times[2]; |
||||
|
} |
||||
|
data.showTimePicker = false; |
||||
|
}; |
||||
|
|
||||
|
const validator = (val) => /^1[34578]\d{9}$/.test(val); |
||||
|
|
||||
|
const onFailed = (errorInfo) => { |
||||
|
console.log('failed', errorInfo); |
||||
|
}; |
||||
|
|
||||
|
// 返回 |
||||
|
const goBack = () => { |
||||
|
router.go(-1); |
||||
|
}; |
||||
|
|
||||
|
const submit = () =>{ |
||||
|
showSuccessToast('登记成功'); |
||||
|
addEnterpriseLawEnforcement(submitData,success =>{ |
||||
|
//跳转企业二维码地址 |
||||
|
if(success.success){ |
||||
|
console.log("登记成功"); |
||||
|
router.push( |
||||
|
{ |
||||
|
path: "/appointmentList" |
||||
|
}); |
||||
|
} |
||||
|
},error=>{ |
||||
|
console.log("登记失败") |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="less" scoped> |
||||
|
.address_edit { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
height: 100%; |
||||
|
overflow: hidden; |
||||
|
background-color: #f4f4f4; |
||||
|
} |
||||
|
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */ |
||||
|
.van-popup.van-toast{ |
||||
|
background: var(--van-toast-background) !important; |
||||
|
box-sizing: content-box !important; |
||||
|
/* 下面3条css,影响不大 */ |
||||
|
transition: all var(--van-duration-fast) !important; |
||||
|
width: var(--van-toast-default-width) !important; |
||||
|
max-width: var(--van-toast-max-width) !important; |
||||
|
} |
||||
|
.van-popup.van-toast .van-toast__icon{ |
||||
|
font-size: var(--van-toast-icon-size) !important; |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,372 @@ |
|||||
|
|
||||
|
<template> |
||||
|
<div class="shop app_content"> |
||||
|
<!-- 导航栏 --> |
||||
|
<div class="header_body"> |
||||
|
<header-nav :slefBack="true" @goBack="goBack" :titelText="`行政检查预约`"/> |
||||
|
</div> |
||||
|
<van-search v-model="searchParam.searchValue" show-action placeholder="手机号/登记号/企业名称" @search="onSearch"> |
||||
|
<template #action> |
||||
|
<div @click="onClickButton">搜索</div> |
||||
|
</template> |
||||
|
</van-search> |
||||
|
<div class="search-button-list"> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType()" round type="primary" size="mini">全部</van-button> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType(1)" round type="primary" size="mini">本月</van-button> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType(2)" round type="primary" size="mini">本季</van-button> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType(3)" round type="primary" size="mini">本年</van-button> |
||||
|
</div> |
||||
|
<div class="search-button-date"> |
||||
|
<span class="date-select" @click="selectDate">{{ data.dateSearch }}</span> |
||||
|
<div style="border-color: black;" class="van-hairline--bottom"></div> |
||||
|
<van-button class="search-button" @click="goAdd" type="primary" size="mini">创建</van-button> |
||||
|
<van-popup v-model:show="data.showDatePicker" position="bottom"> |
||||
|
<van-date-picker |
||||
|
title="选择日期" |
||||
|
v-model="data.currentDate" |
||||
|
:min-date="data.minDate" |
||||
|
:max-date="data.maxDate" |
||||
|
:columns-type="data.columnsType" |
||||
|
@confirm="onDateConfirm" |
||||
|
@cancel="cancelSelectDate" |
||||
|
/> |
||||
|
</van-popup> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 中间 --> |
||||
|
<div class="shop-center"> |
||||
|
<lodding-card :isLodding="isLodding"> |
||||
|
<refresh-list v-model:freshMap="freshMap" :classMap="classMap" @refresh="onRefresh" @onLoad="onLoad" |
||||
|
:resetScroll="resetScroll" class="refresh_box"> |
||||
|
<div class="refresh_content" v-if="data?.dataList.length"> |
||||
|
<div class="goods_box" v-for="(item, index) in data?.dataList" :key="index"> |
||||
|
<van-swipe-cell class="swipe_cell"> |
||||
|
<div class="card_box"> |
||||
|
<div class="card_box_span"> |
||||
|
<p>执法时间:{{ item.createTime }} |
||||
|
<!-- <span class="card_box_action">--> |
||||
|
<!-- <van-button @click="toComplaintView(item.id,item.lawEnforcementIncident)" type="primary" size="mini">投诉</van-button>--> |
||||
|
<!-- </span>--> |
||||
|
</p> |
||||
|
</div> |
||||
|
<!-- <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa',padding: '0 5px' }" />--> |
||||
|
<div style="background-color: aqua; border: 2px; height: .1px;" class="van-hairline--bottom"></div> |
||||
|
<div class="card_box_span"> |
||||
|
<p style="font-size: 16px;font-weight: bold;">{{ item.checkItem }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p><span class="card_box_label">登记编号:</span> {{ item.lawEnforcement }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p><span class="card_box_label">执法部门:</span> {{ item.lawEnforcer }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p><span class="card_box_label">企业名称:</span> {{ item.remark }}</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</van-swipe-cell> |
||||
|
</div> |
||||
|
</div> |
||||
|
<van-empty v-else class="no_data" description="暂无数据" /> |
||||
|
</refresh-list> |
||||
|
</lodding-card> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 底部 --> |
||||
|
<!-- <div class="shop_footer_body">--> |
||||
|
<!-- <footer-nav></footer-nav>--> |
||||
|
<!-- </div>--> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup name="registrationList"> |
||||
|
import { showToast } from "vant"; |
||||
|
import {queryEnterpriseLawEnforcementList} from '../../api/administrative'; |
||||
|
import { setGoodsNum } from "@/util/util"; |
||||
|
const { useCommon, useShopCard } = $globalStore; |
||||
|
|
||||
|
const router = useRouter(); |
||||
|
let allchecked = ref(false); // 是否全选 |
||||
|
let refreshLoad = ref(false); // 是否加载中 |
||||
|
let value = ref('') |
||||
|
let totalPrice = ref(0); // 总钱数 |
||||
|
|
||||
|
let searchParam = reactive({ |
||||
|
//执法事件 |
||||
|
// lawEnforcementIncident:"", |
||||
|
//执法部门 |
||||
|
lawEnforcement:"", |
||||
|
//搜索框 |
||||
|
searchValue: ref(''), |
||||
|
//时间类型 |
||||
|
dateType: null, |
||||
|
//是否投诉 |
||||
|
isComplaint: null, |
||||
|
//企业统一信用码 |
||||
|
enterpriseNumber: ref(useCommon.enterpriseNumber), |
||||
|
}); |
||||
|
|
||||
|
const data = reactive({ |
||||
|
cartList: [], |
||||
|
dataList: [], |
||||
|
dateSearch: ref(), |
||||
|
showDatePicker:false, |
||||
|
currentDate:ref(['2024', '01']), |
||||
|
minDate: new Date(2020, 0, 1), |
||||
|
maxDate: new Date(2125, 5, 1), |
||||
|
columnsType :['year', 'month'], |
||||
|
}); |
||||
|
|
||||
|
// 设置初始值为当前时间 |
||||
|
onMounted(() => { |
||||
|
// getCard(); |
||||
|
searchParam.enterpriseNumber = useCommon.enterpriseNumber; |
||||
|
queryList(); |
||||
|
data.dateSearch = nowDate(new Date()); |
||||
|
}); |
||||
|
const queryList = () =>{ |
||||
|
queryEnterpriseLawEnforcementList(searchParam,success =>{ |
||||
|
data.dataList = success.data; |
||||
|
},error =>{ |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const onSearch = (val) => { |
||||
|
queryEnterpriseLawEnforcementList( |
||||
|
{ |
||||
|
"searchValue": searchParam.searchValue |
||||
|
} |
||||
|
,success =>{ |
||||
|
data.dataList = success.data; |
||||
|
},error =>{ |
||||
|
|
||||
|
}) |
||||
|
}; |
||||
|
const onClickButton = () =>{ |
||||
|
queryList(); |
||||
|
} |
||||
|
|
||||
|
const toComplaintView = (id,name) =>{ |
||||
|
router.push( |
||||
|
{ |
||||
|
path: "/enterprise/complaint", |
||||
|
query: { |
||||
|
id: id, |
||||
|
lawEnforcementIncident: name |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
onActivated(() => { |
||||
|
}); |
||||
|
|
||||
|
onDeactivated(() => { |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
const goAdd = () => { |
||||
|
router.push({ |
||||
|
path: "/appointment", |
||||
|
query: { |
||||
|
enterpriseNumber: "123", |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 返回 |
||||
|
const goBack = () => { |
||||
|
router.go(-1); |
||||
|
}; |
||||
|
|
||||
|
let resetScroll = ref(0); // 滚动记录 |
||||
|
let isLodding = ref(true); // 是否加载中 |
||||
|
let freshMap = reactive({ |
||||
|
refreshLoad: false, // 是否刷新 |
||||
|
listLoading: false, // 是否加载中 |
||||
|
listFinished: false, // 是否加载完成标识 |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//下拉刷新 |
||||
|
const onRefresh = () => { |
||||
|
freshMap.listFinished = false; |
||||
|
freshMap.listLoading = true; |
||||
|
getGoodslist(); |
||||
|
}; |
||||
|
|
||||
|
// 触底加载 |
||||
|
const onLoad = () => { |
||||
|
freshMap.listFinished = true; |
||||
|
getGoodslist(true); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
|
||||
|
//获取分类下的商品列表 |
||||
|
const getGoodslist = async (onLoad) => { |
||||
|
// const res = await useClassify.classifyGoods(); |
||||
|
// if (res?.code === 20000) { |
||||
|
// goodsList = onLoad ? goodsList.concat(res?.data) : res?.data; |
||||
|
// freshMap.refreshLoad = false; |
||||
|
// freshMap.listLoading = false; |
||||
|
// freshMap.listFinished = res?.listFinished; |
||||
|
// if (goodsList.length > 50) { |
||||
|
// freshMap.listFinished = true; |
||||
|
// } |
||||
|
// } |
||||
|
freshMap.refreshLoad = false; |
||||
|
freshMap.listLoading = false; |
||||
|
freshMap.listFinished = true; |
||||
|
isLodding.value = false; |
||||
|
}; |
||||
|
|
||||
|
onMounted(async () => { |
||||
|
// let res = await getClassify(); |
||||
|
// if (res && res?.length) { |
||||
|
// classifyId = res?.[0]?.id; |
||||
|
// classifyId && getGoodslist(); |
||||
|
// } else { |
||||
|
// isLodding.value = false; |
||||
|
// } |
||||
|
queryList(); |
||||
|
isLodding.value = false; |
||||
|
}); |
||||
|
|
||||
|
const selectDate = () =>{ |
||||
|
data.showDatePicker = true; |
||||
|
console.log(data.showDatePicker) |
||||
|
} |
||||
|
|
||||
|
const onDateConfirm = (value)=> { |
||||
|
console.log(value); |
||||
|
value.selectedValues.forEach((item,index) => { |
||||
|
console.log(item); |
||||
|
}); |
||||
|
data.dateSearch = value.selectedValues[0] + "/" + value.selectedValues[1] |
||||
|
data.showDatePicker = false; |
||||
|
} |
||||
|
const nowDate = (time) => { |
||||
|
var year = time.getFullYear(); // 年 |
||||
|
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // 月 |
||||
|
var date = time.getDate().toString().padStart(2, '0'); // 日 |
||||
|
var hour = time.getHours().toString().padStart(2, '0'); // 时 |
||||
|
var minute = time.getMinutes().toString().padStart(2, '0'); // 分 |
||||
|
var second = time.getSeconds().toString().padStart(2, '0'); // 秒 |
||||
|
return ( |
||||
|
year + "/" + month |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const searchDateType = (val) =>{ |
||||
|
searchParam.dateType = val; |
||||
|
searchParam.isComplaint = null; |
||||
|
queryList(); |
||||
|
} |
||||
|
const searchComplaint = (val) =>{ |
||||
|
searchParam.isComplaint = val; |
||||
|
searchParam.dateType = null; |
||||
|
queryList(); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less" scoped> |
||||
|
.card_box_label { |
||||
|
color: rgba(128, 128, 128, 0.5); |
||||
|
} |
||||
|
.shop { |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
overflow: hidden; |
||||
|
background-color: #f4f4f4; |
||||
|
|
||||
|
.header_body { |
||||
|
height: 50px; |
||||
|
} |
||||
|
|
||||
|
.shop-center { |
||||
|
flex: 1; |
||||
|
overflow-y: scroll; |
||||
|
position: relative; |
||||
|
|
||||
|
.goods_box { |
||||
|
display: flex; |
||||
|
background-color: #fff; |
||||
|
margin: 6px; |
||||
|
border-radius: 10px; |
||||
|
|
||||
|
.swipe_cell { |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.card_box { |
||||
|
display: flex; |
||||
|
width: 100%; |
||||
|
padding: 10px,0px; |
||||
|
flex-direction: column; |
||||
|
.card_body { |
||||
|
background-color: #fff; |
||||
|
border-radius: 10px; |
||||
|
flex: 1; |
||||
|
} |
||||
|
.card_box_span{ |
||||
|
font-size: 13px; |
||||
|
padding-left: 5%; |
||||
|
height: 35px; |
||||
|
align-items: center; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.card_box_action{ |
||||
|
position: absolute; |
||||
|
right: 4%; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.shop_footer_body { |
||||
|
height: 101px; |
||||
|
position: relative; |
||||
|
.footer-one-btn { |
||||
|
height: 50px; |
||||
|
bottom: 51px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.search-button-list{ |
||||
|
height: 3%; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding-left: 10px; |
||||
|
margin-top: 6px; |
||||
|
align-items: end; |
||||
|
.search-button{ |
||||
|
width: 15%; |
||||
|
height: 80%; |
||||
|
} |
||||
|
} |
||||
|
.search-button-date{ |
||||
|
height: 3%; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding-left: 10px; |
||||
|
margin-top: 6px; |
||||
|
align-items: end; |
||||
|
position: relative; |
||||
|
.date-select{ |
||||
|
font-size: 20px; |
||||
|
margin-left: 2%; |
||||
|
} |
||||
|
.search-button{ |
||||
|
width: 15%; |
||||
|
height: 80%; |
||||
|
position: absolute; |
||||
|
top: 1%; |
||||
|
right: 1%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,344 @@ |
|||||
|
|
||||
|
<template> |
||||
|
<div class="shop app_content"> |
||||
|
<!-- 导航栏 --> |
||||
|
<div class="header_body"> |
||||
|
<header-nav :slefBack="true" @goBack="goBack" :titelText="`预警信息`"/> |
||||
|
</div> |
||||
|
<van-search v-model="searchParam.searchValue" show-action placeholder="企业名称" @search="onSearch"> |
||||
|
<template #action> |
||||
|
<div @click="onClickButton">搜索</div> |
||||
|
</template> |
||||
|
</van-search> |
||||
|
|
||||
|
<!-- 中间 --> |
||||
|
<div class="shop-center"> |
||||
|
<lodding-card :isLodding="isLodding"> |
||||
|
<refresh-list v-model:freshMap="freshMap" :classMap="classMap" @refresh="onRefresh" @onLoad="onLoad" |
||||
|
:resetScroll="resetScroll" class="refresh_box"> |
||||
|
<div class="refresh_content" v-if="data?.dataList.length"> |
||||
|
<div class="goods_box" v-for="(item, index) in data?.dataList" :key="index"> |
||||
|
<van-swipe-cell class="swipe_cell"> |
||||
|
<div class="card_box"> |
||||
|
<div class="card_box_span"> |
||||
|
<p>{{ item.createTime }} |
||||
|
<!-- <span class="card_box_action">--> |
||||
|
<!-- <van-button @click="toComplaintView(item.id,item.lawEnforcementIncident)" type="primary" size="mini">投诉</van-button>--> |
||||
|
<!-- </span>--> |
||||
|
</p> |
||||
|
</div> |
||||
|
<!-- <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa',padding: '0 5px' }" />--> |
||||
|
<div style="background-color: aqua; border: 2px; height: .1px;" class="van-hairline--bottom"></div> |
||||
|
<div class="card_box_span"> |
||||
|
<van-icon v-if="item.level==1" name="info" color="red" size="30" /> |
||||
|
<van-icon v-else-if="item.level==2" name="info" color="orange" size="30" /> |
||||
|
<van-icon v-else-if="item.level==3" name="info" color="yellow" size="30" /> |
||||
|
<van-icon v-else name="info" size="30" /> |
||||
|
<p style="padding-left: 15px; font-size: 16px;font-weight: bold;">{{ item.lawEnforcement }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p style="padding-left: 30px;"><span class="card_box_label">预警原因:</span> 本月对其行政检查{{ item.num }}次</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p style="padding-left: 30px;"><span class="card_box_label">预警级别:</span> |
||||
|
{{ item.level==1?"Ⅰ级 (特别严重)":item.level==2?"Ⅱ级 (严重)": item.level==3?"Ⅲ级 (较重)": "Ⅳ (一般)"}} |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</van-swipe-cell> |
||||
|
</div> |
||||
|
</div> |
||||
|
<van-empty v-else class="no_data" description="暂无数据" /> |
||||
|
</refresh-list> |
||||
|
</lodding-card> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 底部 --> |
||||
|
<!-- <div class="shop_footer_body">--> |
||||
|
<!-- <footer-nav></footer-nav>--> |
||||
|
<!-- </div>--> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup name="registrationList"> |
||||
|
import { showToast } from "vant"; |
||||
|
import {queryEarlyWarning} from '../../api/enforce'; |
||||
|
import { setGoodsNum } from "@/util/util"; |
||||
|
const { useCommon, useShopCard } = $globalStore; |
||||
|
|
||||
|
const router = useRouter(); |
||||
|
let allchecked = ref(false); // 是否全选 |
||||
|
let refreshLoad = ref(false); // 是否加载中 |
||||
|
let value = ref('') |
||||
|
let totalPrice = ref(0); // 总钱数 |
||||
|
|
||||
|
let searchParam = reactive({ |
||||
|
//执法事件 |
||||
|
// lawEnforcementIncident:"", |
||||
|
//执法部门 |
||||
|
lawEnforcement:"", |
||||
|
//搜索框 |
||||
|
searchValue: ref(''), |
||||
|
//时间类型 |
||||
|
dateType: null, |
||||
|
//是否投诉 |
||||
|
isComplaint: null, |
||||
|
//企业统一信用码 |
||||
|
enterpriseNumber: ref(useCommon.enterpriseNumber), |
||||
|
}); |
||||
|
|
||||
|
const data = reactive({ |
||||
|
cartList: [], |
||||
|
dataList: [], |
||||
|
dateSearch: ref(), |
||||
|
showDatePicker:false, |
||||
|
currentDate:ref(['2024', '01']), |
||||
|
minDate: new Date(2020, 0, 1), |
||||
|
maxDate: new Date(2125, 5, 1), |
||||
|
columnsType :['year', 'month'], |
||||
|
}); |
||||
|
|
||||
|
// 设置初始值为当前时间 |
||||
|
onMounted(() => { |
||||
|
// getCard(); |
||||
|
searchParam.enterpriseNumber = useCommon.enterpriseNumber; |
||||
|
queryList(); |
||||
|
data.dateSearch = nowDate(new Date()); |
||||
|
}); |
||||
|
const queryList = () =>{ |
||||
|
queryEarlyWarning(searchParam,success =>{ |
||||
|
data.dataList = success.data; |
||||
|
},error =>{ |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const onSearch = (val) => { |
||||
|
queryEarlyWarning( |
||||
|
{ |
||||
|
"searchValue": searchParam.searchValue |
||||
|
} |
||||
|
,success =>{ |
||||
|
data.dataList = success.data; |
||||
|
},error =>{ |
||||
|
|
||||
|
}) |
||||
|
}; |
||||
|
const onClickButton = () =>{ |
||||
|
queryList(); |
||||
|
} |
||||
|
|
||||
|
const toComplaintView = (id,name) =>{ |
||||
|
router.push( |
||||
|
{ |
||||
|
path: "/enterprise/complaint", |
||||
|
query: { |
||||
|
id: id, |
||||
|
lawEnforcementIncident: name |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
onActivated(() => { |
||||
|
}); |
||||
|
|
||||
|
onDeactivated(() => { |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
// 返回 |
||||
|
const goBack = () => { |
||||
|
router.go(-1); |
||||
|
}; |
||||
|
|
||||
|
let resetScroll = ref(0); // 滚动记录 |
||||
|
let isLodding = ref(true); // 是否加载中 |
||||
|
let freshMap = reactive({ |
||||
|
refreshLoad: false, // 是否刷新 |
||||
|
listLoading: false, // 是否加载中 |
||||
|
listFinished: false, // 是否加载完成标识 |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//下拉刷新 |
||||
|
const onRefresh = () => { |
||||
|
freshMap.listFinished = false; |
||||
|
freshMap.listLoading = true; |
||||
|
getGoodslist(); |
||||
|
}; |
||||
|
|
||||
|
// 触底加载 |
||||
|
const onLoad = () => { |
||||
|
freshMap.listFinished = true; |
||||
|
getGoodslist(true); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
|
||||
|
//获取分类下的商品列表 |
||||
|
const getGoodslist = async (onLoad) => { |
||||
|
// const res = await useClassify.classifyGoods(); |
||||
|
// if (res?.code === 20000) { |
||||
|
// goodsList = onLoad ? goodsList.concat(res?.data) : res?.data; |
||||
|
// freshMap.refreshLoad = false; |
||||
|
// freshMap.listLoading = false; |
||||
|
// freshMap.listFinished = res?.listFinished; |
||||
|
// if (goodsList.length > 50) { |
||||
|
// freshMap.listFinished = true; |
||||
|
// } |
||||
|
// } |
||||
|
freshMap.refreshLoad = false; |
||||
|
freshMap.listLoading = false; |
||||
|
freshMap.listFinished = true; |
||||
|
isLodding.value = false; |
||||
|
}; |
||||
|
|
||||
|
onMounted(async () => { |
||||
|
// let res = await getClassify(); |
||||
|
// if (res && res?.length) { |
||||
|
// classifyId = res?.[0]?.id; |
||||
|
// classifyId && getGoodslist(); |
||||
|
// } else { |
||||
|
// isLodding.value = false; |
||||
|
// } |
||||
|
queryList(); |
||||
|
isLodding.value = false; |
||||
|
}); |
||||
|
|
||||
|
const selectDate = () =>{ |
||||
|
data.showDatePicker = true; |
||||
|
console.log(data.showDatePicker) |
||||
|
} |
||||
|
|
||||
|
const onDateConfirm = (value)=> { |
||||
|
console.log(value); |
||||
|
value.selectedValues.forEach((item,index) => { |
||||
|
console.log(item); |
||||
|
}); |
||||
|
data.dateSearch = value.selectedValues[0] + "/" + value.selectedValues[1] |
||||
|
data.showDatePicker = false; |
||||
|
} |
||||
|
const nowDate = (time) => { |
||||
|
var year = time.getFullYear(); // 年 |
||||
|
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // 月 |
||||
|
var date = time.getDate().toString().padStart(2, '0'); // 日 |
||||
|
var hour = time.getHours().toString().padStart(2, '0'); // 时 |
||||
|
var minute = time.getMinutes().toString().padStart(2, '0'); // 分 |
||||
|
var second = time.getSeconds().toString().padStart(2, '0'); // 秒 |
||||
|
return ( |
||||
|
year + "/" + month |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const searchDateType = (val) =>{ |
||||
|
searchParam.dateType = val; |
||||
|
searchParam.isComplaint = null; |
||||
|
queryList(); |
||||
|
} |
||||
|
const searchComplaint = (val) =>{ |
||||
|
searchParam.isComplaint = val; |
||||
|
searchParam.dateType = null; |
||||
|
queryList(); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less" scoped> |
||||
|
.card_box_label { |
||||
|
color: rgba(128, 128, 128, 0.5); |
||||
|
} |
||||
|
.shop { |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
overflow: hidden; |
||||
|
background-color: #f4f4f4; |
||||
|
|
||||
|
.header_body { |
||||
|
height: 50px; |
||||
|
} |
||||
|
|
||||
|
.shop-center { |
||||
|
flex: 1; |
||||
|
overflow-y: scroll; |
||||
|
position: relative; |
||||
|
|
||||
|
.goods_box { |
||||
|
display: flex; |
||||
|
background-color: #fff; |
||||
|
margin: 6px; |
||||
|
border-radius: 10px; |
||||
|
|
||||
|
.swipe_cell { |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.card_box { |
||||
|
display: flex; |
||||
|
width: 100%; |
||||
|
padding: 10px,0px; |
||||
|
flex-direction: column; |
||||
|
.card_body { |
||||
|
background-color: #fff; |
||||
|
border-radius: 10px; |
||||
|
flex: 1; |
||||
|
} |
||||
|
.card_box_span{ |
||||
|
font-size: 13px; |
||||
|
padding-left: 5%; |
||||
|
height: 35px; |
||||
|
align-items: center; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.card_box_action{ |
||||
|
position: absolute; |
||||
|
right: 4%; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.shop_footer_body { |
||||
|
height: 101px; |
||||
|
position: relative; |
||||
|
.footer-one-btn { |
||||
|
height: 50px; |
||||
|
bottom: 51px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.search-button-list{ |
||||
|
height: 3%; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding-left: 10px; |
||||
|
margin-top: 6px; |
||||
|
align-items: end; |
||||
|
.search-button{ |
||||
|
width: 15%; |
||||
|
height: 80%; |
||||
|
} |
||||
|
} |
||||
|
.search-button-date{ |
||||
|
height: 3%; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding-left: 10px; |
||||
|
margin-top: 6px; |
||||
|
align-items: end; |
||||
|
position: relative; |
||||
|
.date-select{ |
||||
|
font-size: 20px; |
||||
|
margin-left: 2%; |
||||
|
} |
||||
|
.search-button{ |
||||
|
width: 15%; |
||||
|
height: 80%; |
||||
|
position: absolute; |
||||
|
top: 1%; |
||||
|
right: 1%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,363 @@ |
|||||
|
|
||||
|
<template> |
||||
|
<div class="shop app_content"> |
||||
|
<!-- 导航栏 --> |
||||
|
<div class="header_body"> |
||||
|
<header-nav :slefBack="true" @goBack="goBack" :titelText="`历史检查信息`"/> |
||||
|
</div> |
||||
|
<van-search v-model="searchParam.searchValue" show-action placeholder="手机号/登记号/企业名称" @search="onSearch"> |
||||
|
<template #action> |
||||
|
<div @click="onClickButton">搜索</div> |
||||
|
</template> |
||||
|
</van-search> |
||||
|
<div class="search-button-list"> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType()" round type="primary" size="mini">全部</van-button> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType(1)" round type="primary" size="mini">本月</van-button> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType(2)" round type="primary" size="mini">本季</van-button> |
||||
|
<van-button plain hairline class="search-button" @click="searchDateType(3)" round type="primary" size="mini">本年</van-button> |
||||
|
</div> |
||||
|
<div class="search-button-date"> |
||||
|
<span class="date-select" @click="selectDate">{{ data.dateSearch }}</span> |
||||
|
<div style="border-color: black;" class="van-hairline--bottom"></div> |
||||
|
<van-button class="search-button" type="primary" size="mini">统计分析</van-button> |
||||
|
<van-popup v-model:show="data.showDatePicker" position="bottom"> |
||||
|
<van-date-picker |
||||
|
title="选择日期" |
||||
|
v-model="data.currentDate" |
||||
|
:min-date="data.minDate" |
||||
|
:max-date="data.maxDate" |
||||
|
:columns-type="data.columnsType" |
||||
|
@confirm="onDateConfirm" |
||||
|
@cancel="cancelSelectDate" |
||||
|
/> |
||||
|
</van-popup> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 中间 --> |
||||
|
<div class="shop-center"> |
||||
|
<lodding-card :isLodding="isLodding"> |
||||
|
<refresh-list v-model:freshMap="freshMap" :classMap="classMap" @refresh="onRefresh" @onLoad="onLoad" |
||||
|
:resetScroll="resetScroll" class="refresh_box"> |
||||
|
<div class="refresh_content" v-if="data?.dataList.length"> |
||||
|
<div class="goods_box" v-for="(item, index) in data?.dataList" :key="index"> |
||||
|
<van-swipe-cell class="swipe_cell"> |
||||
|
<div class="card_box"> |
||||
|
<div class="card_box_span"> |
||||
|
<p>执法时间:{{ item.createTime }} |
||||
|
<!-- <span class="card_box_action">--> |
||||
|
<!-- <van-button @click="toComplaintView(item.id,item.lawEnforcementIncident)" type="primary" size="mini">投诉</van-button>--> |
||||
|
<!-- </span>--> |
||||
|
</p> |
||||
|
</div> |
||||
|
<!-- <van-divider :style="{ color: '#1989fa', borderColor: '#1989fa',padding: '0 5px' }" />--> |
||||
|
<div style="background-color: aqua; border: 2px; height: .1px;" class="van-hairline--bottom"></div> |
||||
|
<div class="card_box_span"> |
||||
|
<p style="font-size: 16px;font-weight: bold;">{{ item.lawEnforcementItem }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p><span class="card_box_label">执法部门:</span> {{ item.lawEnforcement }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p><span class="card_box_label">执法人员:</span> {{ item.lawEnforcer }}</p> |
||||
|
</div> |
||||
|
<div class="card_box_span"> |
||||
|
<p><span class="card_box_label">备注:</span> {{ item.remark }}</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</van-swipe-cell> |
||||
|
</div> |
||||
|
</div> |
||||
|
<van-empty v-else class="no_data" description="暂无数据" /> |
||||
|
</refresh-list> |
||||
|
</lodding-card> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 底部 --> |
||||
|
<!-- <div class="shop_footer_body">--> |
||||
|
<!-- <footer-nav></footer-nav>--> |
||||
|
<!-- </div>--> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup name="registrationList"> |
||||
|
import { showToast } from "vant"; |
||||
|
import {queryRegistrationList} from '../../api/enforce'; |
||||
|
import { setGoodsNum } from "@/util/util"; |
||||
|
const { useCommon, useShopCard } = $globalStore; |
||||
|
|
||||
|
const router = useRouter(); |
||||
|
let allchecked = ref(false); // 是否全选 |
||||
|
let refreshLoad = ref(false); // 是否加载中 |
||||
|
let value = ref('') |
||||
|
let totalPrice = ref(0); // 总钱数 |
||||
|
|
||||
|
let searchParam = reactive({ |
||||
|
//执法事件 |
||||
|
// lawEnforcementIncident:"", |
||||
|
//执法部门 |
||||
|
lawEnforcement:"", |
||||
|
//搜索框 |
||||
|
searchValue: ref(''), |
||||
|
//时间类型 |
||||
|
dateType: null, |
||||
|
//是否投诉 |
||||
|
isComplaint: null, |
||||
|
//企业统一信用码 |
||||
|
enterpriseNumber: ref(useCommon.enterpriseNumber), |
||||
|
}); |
||||
|
|
||||
|
const data = reactive({ |
||||
|
cartList: [], |
||||
|
dataList: [], |
||||
|
dateSearch: ref(), |
||||
|
showDatePicker:false, |
||||
|
currentDate:ref(['2024', '01']), |
||||
|
minDate: new Date(2020, 0, 1), |
||||
|
maxDate: new Date(2125, 5, 1), |
||||
|
columnsType :['year', 'month'], |
||||
|
}); |
||||
|
|
||||
|
// 设置初始值为当前时间 |
||||
|
onMounted(() => { |
||||
|
// getCard(); |
||||
|
searchParam.enterpriseNumber = useCommon.enterpriseNumber; |
||||
|
queryList(); |
||||
|
data.dateSearch = nowDate(new Date()); |
||||
|
}); |
||||
|
const queryList = () =>{ |
||||
|
queryRegistrationList(searchParam,success =>{ |
||||
|
data.dataList = success.data; |
||||
|
},error =>{ |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const onSearch = (val) => { |
||||
|
queryRegistrationList( |
||||
|
{ |
||||
|
"searchValue": searchParam.searchValue |
||||
|
} |
||||
|
,success =>{ |
||||
|
data.dataList = success.data; |
||||
|
},error =>{ |
||||
|
|
||||
|
}) |
||||
|
}; |
||||
|
const onClickButton = () =>{ |
||||
|
queryList(); |
||||
|
} |
||||
|
|
||||
|
const toComplaintView = (id,name) =>{ |
||||
|
router.push( |
||||
|
{ |
||||
|
path: "/enterprise/complaint", |
||||
|
query: { |
||||
|
id: id, |
||||
|
lawEnforcementIncident: name |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
onActivated(() => { |
||||
|
}); |
||||
|
|
||||
|
onDeactivated(() => { |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
// 返回 |
||||
|
const goBack = () => { |
||||
|
router.go(-1); |
||||
|
}; |
||||
|
|
||||
|
let resetScroll = ref(0); // 滚动记录 |
||||
|
let isLodding = ref(true); // 是否加载中 |
||||
|
let freshMap = reactive({ |
||||
|
refreshLoad: false, // 是否刷新 |
||||
|
listLoading: false, // 是否加载中 |
||||
|
listFinished: false, // 是否加载完成标识 |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//下拉刷新 |
||||
|
const onRefresh = () => { |
||||
|
freshMap.listFinished = false; |
||||
|
freshMap.listLoading = true; |
||||
|
getGoodslist(); |
||||
|
}; |
||||
|
|
||||
|
// 触底加载 |
||||
|
const onLoad = () => { |
||||
|
freshMap.listFinished = true; |
||||
|
getGoodslist(true); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
|
||||
|
//获取分类下的商品列表 |
||||
|
const getGoodslist = async (onLoad) => { |
||||
|
// const res = await useClassify.classifyGoods(); |
||||
|
// if (res?.code === 20000) { |
||||
|
// goodsList = onLoad ? goodsList.concat(res?.data) : res?.data; |
||||
|
// freshMap.refreshLoad = false; |
||||
|
// freshMap.listLoading = false; |
||||
|
// freshMap.listFinished = res?.listFinished; |
||||
|
// if (goodsList.length > 50) { |
||||
|
// freshMap.listFinished = true; |
||||
|
// } |
||||
|
// } |
||||
|
freshMap.refreshLoad = false; |
||||
|
freshMap.listLoading = false; |
||||
|
freshMap.listFinished = true; |
||||
|
isLodding.value = false; |
||||
|
}; |
||||
|
|
||||
|
onMounted(async () => { |
||||
|
// let res = await getClassify(); |
||||
|
// if (res && res?.length) { |
||||
|
// classifyId = res?.[0]?.id; |
||||
|
// classifyId && getGoodslist(); |
||||
|
// } else { |
||||
|
// isLodding.value = false; |
||||
|
// } |
||||
|
queryList(); |
||||
|
isLodding.value = false; |
||||
|
}); |
||||
|
|
||||
|
const selectDate = () =>{ |
||||
|
data.showDatePicker = true; |
||||
|
console.log(data.showDatePicker) |
||||
|
} |
||||
|
|
||||
|
const onDateConfirm = (value)=> { |
||||
|
console.log(value); |
||||
|
value.selectedValues.forEach((item,index) => { |
||||
|
console.log(item); |
||||
|
}); |
||||
|
data.dateSearch = value.selectedValues[0] + "/" + value.selectedValues[1] |
||||
|
data.showDatePicker = false; |
||||
|
} |
||||
|
const nowDate = (time) => { |
||||
|
var year = time.getFullYear(); // 年 |
||||
|
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // 月 |
||||
|
var date = time.getDate().toString().padStart(2, '0'); // 日 |
||||
|
var hour = time.getHours().toString().padStart(2, '0'); // 时 |
||||
|
var minute = time.getMinutes().toString().padStart(2, '0'); // 分 |
||||
|
var second = time.getSeconds().toString().padStart(2, '0'); // 秒 |
||||
|
return ( |
||||
|
year + "/" + month |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const searchDateType = (val) =>{ |
||||
|
searchParam.dateType = val; |
||||
|
searchParam.isComplaint = null; |
||||
|
queryList(); |
||||
|
} |
||||
|
const searchComplaint = (val) =>{ |
||||
|
searchParam.isComplaint = val; |
||||
|
searchParam.dateType = null; |
||||
|
queryList(); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less" scoped> |
||||
|
.card_box_label { |
||||
|
color: rgba(128, 128, 128, 0.5); |
||||
|
} |
||||
|
.shop { |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
overflow: hidden; |
||||
|
background-color: #f4f4f4; |
||||
|
|
||||
|
.header_body { |
||||
|
height: 50px; |
||||
|
} |
||||
|
|
||||
|
.shop-center { |
||||
|
flex: 1; |
||||
|
overflow-y: scroll; |
||||
|
position: relative; |
||||
|
|
||||
|
.goods_box { |
||||
|
display: flex; |
||||
|
background-color: #fff; |
||||
|
margin: 6px; |
||||
|
border-radius: 10px; |
||||
|
|
||||
|
.swipe_cell { |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.card_box { |
||||
|
display: flex; |
||||
|
width: 100%; |
||||
|
padding: 10px,0px; |
||||
|
flex-direction: column; |
||||
|
.card_body { |
||||
|
background-color: #fff; |
||||
|
border-radius: 10px; |
||||
|
flex: 1; |
||||
|
} |
||||
|
.card_box_span{ |
||||
|
font-size: 13px; |
||||
|
padding-left: 5%; |
||||
|
height: 35px; |
||||
|
align-items: center; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.card_box_action{ |
||||
|
position: absolute; |
||||
|
right: 4%; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.shop_footer_body { |
||||
|
height: 101px; |
||||
|
position: relative; |
||||
|
.footer-one-btn { |
||||
|
height: 50px; |
||||
|
bottom: 51px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.search-button-list{ |
||||
|
height: 3%; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding-left: 10px; |
||||
|
margin-top: 6px; |
||||
|
align-items: end; |
||||
|
.search-button{ |
||||
|
width: 15%; |
||||
|
height: 80%; |
||||
|
} |
||||
|
} |
||||
|
.search-button-date{ |
||||
|
height: 3%; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding-left: 10px; |
||||
|
margin-top: 6px; |
||||
|
align-items: end; |
||||
|
position: relative; |
||||
|
.date-select{ |
||||
|
font-size: 20px; |
||||
|
margin-left: 2%; |
||||
|
} |
||||
|
.search-button{ |
||||
|
width: 15%; |
||||
|
height: 80%; |
||||
|
position: absolute; |
||||
|
top: 1%; |
||||
|
right: 1%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,255 @@ |
|||||
|
<template> |
||||
|
<div class="address_edit"> |
||||
|
<!-- 导航栏 --> |
||||
|
<div class="header_body"> |
||||
|
<header-nav :slefBack="true" @goBack="goBack" :titelText="`执法信息登记`"></header-nav> |
||||
|
</div> |
||||
|
<!-- 中间 --> |
||||
|
<div> |
||||
|
<van-form @failed="onFailed" @submit="submit"> |
||||
|
<div style="font-size:large">执法信息</div> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcement" |
||||
|
label="执法部门" |
||||
|
readonly |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcer" |
||||
|
label="执法人员1" |
||||
|
readonly |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcerTwo" |
||||
|
label="执法人员2" |
||||
|
readonly |
||||
|
placeholder="请选择" |
||||
|
right-icon="add-o" |
||||
|
@click="data.showLawEnforcerFlag = true" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.subsidiaryer" |
||||
|
label="辅助人员" |
||||
|
readonly |
||||
|
placeholder="请选择" |
||||
|
right-icon="add-o" |
||||
|
@click="data.showLawEnforcerFlag = true" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcementItem" |
||||
|
required |
||||
|
label="执法事项" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
placeholder="必填 执法事项" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.lawEnforcementBasis" |
||||
|
required |
||||
|
label="执法依据" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
placeholder="必填 执法依据" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.reslut" |
||||
|
required |
||||
|
label="执法结果" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
> |
||||
|
<template #input> |
||||
|
<div> |
||||
|
<van-tag :color="data.good" @click="tapGood">合格</van-tag> |
||||
|
<van-tag :color="data.bad" @click="tapBad" style="margin-left: 15px;">不合格</van-tag> |
||||
|
</div> |
||||
|
</template> |
||||
|
</van-field> |
||||
|
<van-field |
||||
|
v-model="submitData.remark" |
||||
|
label="备注" |
||||
|
rows="2" |
||||
|
autosize |
||||
|
type="textarea" |
||||
|
maxlength="50" |
||||
|
placeholder="请输入备注" |
||||
|
show-word-limit |
||||
|
/> |
||||
|
|
||||
|
<div style="padding-top: 15px;"> |
||||
|
<div style="font-size:medium; padding-left: 15px; display: flex; justify-content: space-between;"> |
||||
|
<div style="color: rgb(50, 50, 51);">相关附件 <span>(不多于9份)</span></div> |
||||
|
<div style="padding-right: 15px; font-size: 20px; color: rgb(150, 151, 153);"><van-icon name="add-o" /></div> |
||||
|
</div> |
||||
|
<van-uploader v-model="submitData.fileListObj" accept="" class="file" multiple :max-size="500 * 1024" :after-read="uploadFiles" :before-delete="deleteFile"> |
||||
|
<template #preview-cover="{ file }"> |
||||
|
<div class="preview-cover van-ellipsis">{{ file.name }}</div> |
||||
|
</template> |
||||
|
</van-uploader> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="padding-top: 20px;"> |
||||
|
<van-cell-group> |
||||
|
<div style="font-size:large">企业信息</div> |
||||
|
<van-field |
||||
|
v-model="submitData.enterpriseName" |
||||
|
required |
||||
|
readonly |
||||
|
label="企业名称" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
placeholder="必填 企业名称" |
||||
|
/> |
||||
|
<van-field |
||||
|
v-model="submitData.enterpriseNumber" |
||||
|
required |
||||
|
readonly |
||||
|
label="统一信用码" |
||||
|
:rules="[{ required: true, message: '必填项' }]" |
||||
|
placeholder="必填 纳税人识别号" |
||||
|
/> |
||||
|
</van-cell-group> |
||||
|
</div> |
||||
|
|
||||
|
<div class="warp_body"> |
||||
|
<van-action-bar> |
||||
|
<van-button round block color="#be99ff" type="info" native-type="submit">提交</van-button> |
||||
|
</van-action-bar> |
||||
|
</div> |
||||
|
</van-form> |
||||
|
</div> |
||||
|
|
||||
|
<!-- <div class="warp_body">--> |
||||
|
<!-- <van-action-bar>--> |
||||
|
<!-- <van-action-bar-button color="#be99ff" text="保存" @click="submit" />--> |
||||
|
<!-- </van-action-bar>--> |
||||
|
<!-- </div>--> |
||||
|
|
||||
|
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup name="register"> |
||||
|
|
||||
|
import { showSuccessToast } from 'vant'; |
||||
|
import {addEnforcementRegistration} from '../../api/enforce' |
||||
|
import { reactive, ref } from "vue"; |
||||
|
import {uploadFile} from "../../util/fileUpload"; |
||||
|
const { useMy } = $globalStore |
||||
|
|
||||
|
const router = useRouter(); |
||||
|
let queryaddressId = ref(""); |
||||
|
const data = reactive({ |
||||
|
showLawEnforcerFlag:false, |
||||
|
good:"#7FFFD4", |
||||
|
bad:"#D3D3D3", |
||||
|
}); |
||||
|
//保存参数 |
||||
|
const submitData = reactive({ |
||||
|
//执法部门 |
||||
|
lawEnforcement:"", |
||||
|
//执法人员1 |
||||
|
lawEnforcer:"", |
||||
|
//执法人员2 |
||||
|
lawEnforcerTwo: "", |
||||
|
//辅助人员 |
||||
|
subsidiaryer: "", |
||||
|
//执法事项 |
||||
|
lawEnforcementItem:"", |
||||
|
//执法依据 |
||||
|
lawEnforcementBasis:"", |
||||
|
//执法结果 |
||||
|
reslut:0, |
||||
|
//备注 |
||||
|
remark:"", |
||||
|
//企业名称 |
||||
|
enterpriseName:"", |
||||
|
//统一信用码 |
||||
|
enterpriseNumber:"", |
||||
|
//后台保存图片列表 |
||||
|
fileList:[], |
||||
|
//vant组件上传照片列表 |
||||
|
fileListObj:[], |
||||
|
}) |
||||
|
|
||||
|
const tapGood = () => { |
||||
|
data.good = "#7FFFD4"; |
||||
|
data.bad = "#D3D3D3"; |
||||
|
submitData.reslut = 0; |
||||
|
} |
||||
|
const tapBad = () => { |
||||
|
data.good = "#D3D3D3"; |
||||
|
data.bad = "#7FFFD4"; |
||||
|
submitData.reslut = 1; |
||||
|
} |
||||
|
|
||||
|
// 返回 |
||||
|
const goBack = () => { |
||||
|
router.go(-1); |
||||
|
}; |
||||
|
|
||||
|
const uploadFiles = (file) =>{ |
||||
|
uploadFile(file,(res) =>{ |
||||
|
console.log(res); |
||||
|
submitData.fileList.push(res.url) |
||||
|
console.log(submitData.fileList); |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
const deleteFile = (file,index) =>{ |
||||
|
console.log(index); |
||||
|
submitData.fileListObj.filter((item, indexs) => { |
||||
|
if (index.index == indexs) { |
||||
|
submitData.fileListObj.splice(indexs, 1);//splice 删除 |
||||
|
} |
||||
|
}); |
||||
|
submitData.fileList.filter((item, indexs) => { |
||||
|
if (index.index == indexs) { |
||||
|
submitData.fileList.splice(indexs, 1);//splice 删除 |
||||
|
} |
||||
|
}); |
||||
|
console.log(submitData.fileList); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
const submit = () =>{ |
||||
|
addEnforcementRegistration(submitData,success =>{ |
||||
|
//重新设置本地存储 |
||||
|
useCommon.SET_USER_ENTERPRISE_NUMBER(submitData.enterpriseNumber); |
||||
|
console.log(success) |
||||
|
//跳转企业二维码地址 |
||||
|
if(success.success){ |
||||
|
console.log("登记成功"); |
||||
|
// router.push( |
||||
|
// { |
||||
|
// path: "/enterprise/qrCode", |
||||
|
// query: { |
||||
|
// enterpriseNumber: submitData.enterpriseNumber, |
||||
|
// } |
||||
|
// }); |
||||
|
} |
||||
|
},error=>{ |
||||
|
console.log("登记失败") |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="less" scoped> |
||||
|
.address_edit { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
height: 100%; |
||||
|
overflow: hidden; |
||||
|
background-color: #f4f4f4; |
||||
|
} |
||||
|
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */ |
||||
|
.van-popup.van-toast{ |
||||
|
background: var(--van-toast-background) !important; |
||||
|
box-sizing: content-box !important; |
||||
|
/* 下面3条css,影响不大 */ |
||||
|
transition: all var(--van-duration-fast) !important; |
||||
|
width: var(--van-toast-default-width) !important; |
||||
|
max-width: var(--van-toast-max-width) !important; |
||||
|
} |
||||
|
.van-popup.van-toast .van-toast__icon{ |
||||
|
font-size: var(--van-toast-icon-size) !important; |
||||
|
} |
||||
|
|
||||
|
</style> |
||||
Loading…
Reference in new issue