Browse Source

优化表单字段,调整日期选择器和企业查询逻辑,修复样式问题

master
parent
commit
b8f442c0b0
  1. 2
      .env
  2. 5
      .env.local
  3. 18
      src/views/Login/Login.vue
  4. 1
      src/views/Login/components/QrCodeForm.vue
  5. 7
      src/views/enterpriseinspections/index.vue
  6. 1
      src/views/enterprises/update.vue
  7. 57
      src/views/task/createEnterprise.vue
  8. 2
      src/views/task/index.vue

2
.env

@ -2,7 +2,7 @@
VITE_APP_TITLE=智慧生态系统 VITE_APP_TITLE=智慧生态系统
# 项目本地运行端口号 # 项目本地运行端口号
VITE_PORT=9980 VITE_PORT=9527
# open 运行 npm run dev 时自动打开浏览器 # open 运行 npm run dev 时自动打开浏览器
VITE_OPEN=true VITE_OPEN=true

5
.env.local

@ -5,9 +5,10 @@ VITE_DEV=true
# 请求路径 # 请求路径
#VITE_BASE_URL='http://localhost:48080' #VITE_BASE_URL='http://localhost:48080'
VITE_BASE_URL='http://188.188.3.232:48080' #VITE_BASE_URL='http://188.188.3.232:48080'
# VITE_BASE_URL='http://188.188.5.188:48080' # VITE_BASE_URL='http://188.188.5.188:48080'
#VITE_BASE_URL='https://hb.jzce.com' VITE_BASE_URL='http://192.168.3.120:48088'
#VITE_BASE_URL='https://yxsthj.cn'
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server VITE_UPLOAD_TYPE=server

18
src/views/Login/Login.vue

@ -47,23 +47,19 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { import { LoginForm, QrCodeForm } from './components'
LoginForm,
QrCodeForm,
} from './components'
defineOptions({ name: 'Login' }) defineOptions({ name: 'Login' })
const isIpAccess = ref(false) const isIpAccess = ref(false)
onMounted(() => { onMounted(() => {
// const hostname = window.location.hostname const hostname = window.location.hostname
// if (hostname == 'localhost') { if (hostname == 'localhost') {
// isIpAccess.value = true isIpAccess.value = true
// } else { } else {
// isIpAccess.value = /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname) isIpAccess.value = /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname)
// } }
// IP访 // IP访
}) })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

1
src/views/Login/components/QrCodeForm.vue

@ -71,7 +71,6 @@ const getimg = async () => {
const blob = new Blob([bytes], { type: 'image/png' }) const blob = new Blob([bytes], { type: 'image/png' })
// URL // URL
imageUrl.value = URL.createObjectURL(blob) imageUrl.value = URL.createObjectURL(blob)
// //
refaulst() refaulst()
} }

7
src/views/enterpriseinspections/index.vue

@ -45,9 +45,9 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="enterpriseId"> <el-form-item label="" prop="createtime">
<el-date-picker <el-date-picker
v-model="queryParams.establishmentDate" v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
type="daterange" type="daterange"
format="YYYY年M月D日" format="YYYY年M月D日"
@ -145,7 +145,8 @@ const queryParams = reactive({
enterpriseName: undefined, enterpriseName: undefined,
inspectionsStatus: undefined, inspectionsStatus: undefined,
departmentId: undefined, departmentId: undefined,
userId: undefined userId: undefined,
createTime:undefined
}) })
const userList = ref() const userList = ref()
const deptList = ref() const deptList = ref()

1
src/views/enterprises/update.vue

@ -464,7 +464,6 @@ const getDetail = () => {
formData.value.region = getDictLabel(DICT_TYPE.ENTERPRISES_AREA, formData.value.region) formData.value.region = getDictLabel(DICT_TYPE.ENTERPRISES_AREA, formData.value.region)
formData.value.tagIds = res.tagObjList.map((i) => i.tagName).join(',') formData.value.tagIds = res.tagObjList.map((i) => i.tagName).join(',')
} }
console.log(formData.value.tagIds)
}) })
} }

57
src/views/task/createEnterprise.vue

@ -1,16 +1,15 @@
<template> <template>
<el-dialog <el-dialog
v-model="visible" v-model="visible"
title="筛选企业" title="筛选企业"
width="1200px" width="1200px"
style="padding: 40px; " style="padding: 40px"
top="5vh" top="5vh"
:close-on-click-modal="false" :close-on-click-modal="false"
append-to-body append-to-body
> >
<template #header > <template #header>
<span style="font-size: 20px; font-weight: bold;">筛选企业</span> <span style="font-size: 20px; font-weight: bold">筛选企业</span>
</template> </template>
<div class="enterprise-container"> <div class="enterprise-container">
<!-- 搜索区域 --> <!-- 搜索区域 -->
@ -24,19 +23,28 @@
> >
<div class="form-container"> <div class="form-container">
<el-form-item label="" prop="region" class="form-item"> <el-form-item label="" prop="region" class="form-item">
<el-select v-model="enterprise.queryParams.region" placeholder="请选择所属区域" clearable> <el-select
v-model="enterprise.queryParams.region"
placeholder="请选择所属区域"
clearable
>
<el-option <el-option
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_AREA)" v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_AREA)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="hy" class="form-item"> <el-form-item label="" prop="hy" class="form-item">
<el-select v-model="enterprise.queryParams.hy" placeholder="请选择行业" clearable filterable multiple> <el-select
v-model="enterprise.queryParams.hy"
placeholder="请选择行业"
clearable
filterable
multiple
>
<el-option <el-option
v-for="dict in hyList" v-for="dict in hyList"
:key="dict.id" :key="dict.id"
@ -47,18 +55,26 @@
</el-form-item> </el-form-item>
<el-form-item label="" prop="userId" class="form-item"> <el-form-item label="" prop="userId" class="form-item">
<el-select v-model="enterprise.queryParams.userId" placeholder="请选择执法人员" filterable clearable> <el-select
v-model="enterprise.queryParams.userId"
placeholder="请选择执法人员"
filterable
clearable
>
<el-option <el-option
v-for="dict in userList" v-for="dict in userList"
:key="dict.id" :key="dict.id"
:label="dict.deptName +'_'+ dict.realName" :label="dict.deptName + '_' + dict.realName"
:value="dict.id" :value="dict.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="enterprisesName" class="form-item"> <el-form-item label="" prop="enterprisesName" class="form-item">
<el-input v-model="enterprise.queryParams.enterprisesName" placeholder="请输入企业名称" /> <el-input
v-model="enterprise.queryParams.enterprisesName"
placeholder="请输入企业名称"
/>
</el-form-item> </el-form-item>
<el-form-item class="form-item"> <el-form-item class="form-item">
@ -80,7 +96,7 @@
@select="handleSelectionChange" @select="handleSelectionChange"
@select-all="selectAll" @select-all="selectAll"
style="width: 100%; border: 1px solid #ebeef5" style="width: 100%; border: 1px solid #ebeef5"
:cell-style="{ borderBottom: '1px solid #EBEEF5', textAlign: 'left'}" :cell-style="{ borderBottom: '1px solid #EBEEF5', textAlign: 'left' }"
height="400px" height="400px"
size="large" size="large"
row-key="id" row-key="id"
@ -113,10 +129,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="inviterName" label="执法人员" > <el-table-column property="inviterName" label="执法人员">
<template #default="scope"> <template #default="scope">
{{scope.row.inviterName}} | {{scope.row.inviterNameDept}} {{ scope.row.inviterName }} | {{ scope.row.inviterNameDept }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -199,12 +215,10 @@ const confirmSelect = () => {
async function getEnterPriseList() { async function getEnterPriseList() {
loading.value = true loading.value = true
if (enterprise.value.queryParams.hy) {
if (enterprise.value.queryParams.hy ) {
enterprise.value.queryParams.tagList = enterprise.value.queryParams.hy enterprise.value.queryParams.tagList = enterprise.value.queryParams.hy
} }
try { try {
const data = await EnterprisesApi.getEnterpriseByUserId(enterprise.value.queryParams) const data = await EnterprisesApi.getEnterpriseByUserId(enterprise.value.queryParams)
enterprise.value.list = data.list enterprise.value.list = data.list
@ -213,7 +227,6 @@ async function getEnterPriseList() {
} finally { } finally {
loading.value = false loading.value = false
enterprise.value.queryParams.tagList = [] enterprise.value.queryParams.tagList = []
} }
} }
// //
@ -221,7 +234,6 @@ const open = async () => {
// TODO: // TODO:
visible.value = true visible.value = true
getEnterPriseList() getEnterPriseList()
} }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -241,32 +253,27 @@ const resetQuery = () => {
const hyList: any = ref([]) const hyList: any = ref([])
// //
const userList:any = ref() const userList: any = ref()
async function init() { async function init() {
try { try {
const codeList = 'hy' const codeList = 'hy'
const data = await TagLibraryApi.tagLibraryList(codeList) const data = await TagLibraryApi.tagLibraryList(codeList)
hyList.value = data[0].children hyList.value = data[0].children
} finally { } finally {
} }
const userData = await getSimpleUserZGList() const userData = await getSimpleUserZGList()
userList.value = userData userList.value = userData
} }
onMounted(() => { onMounted(() => {
init() init()
}) })
defineExpose({ open }) defineExpose({ open })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep(.el-dialog) { ::v-deep(.el-dialog) {
padding: 40px; padding: 40px;
} }

2
src/views/task/index.vue

@ -95,7 +95,7 @@
</el-table-column> </el-table-column>
<el-table-column label="执法对象" align="left" min-width="180"> <el-table-column label="执法对象" align="left" min-width="180">
<template #default="scope"> <template #default="scope">
{{ new Set(scope.row.enterpriseIdes?.map((e) => e.type)).size }}个区域 , {{ new Set(scope.row.enterpriseIdes?.map((e) => e.region)).size }}个区域 ,
{{ scope.row.enterpriseIdes.length }}家企业 {{ scope.row.enterpriseIdes.length }}家企业
</template> </template>
</el-table-column> </el-table-column>

Loading…
Cancel
Save