Browse Source

用户审核

master
DX 1 month ago
parent
commit
87ac06d7e5
  1. 6
      src/api/enterprises/index.ts
  2. 5
      src/api/system/user/index.ts
  3. 2
      src/views/enterpriseinspections/index.vue
  4. 33
      src/views/enterprises/update.vue
  5. 40
      src/views/task/create.vue

6
src/api/enterprises/index.ts

@ -55,4 +55,10 @@ export const EnterprisesApi = {
exportEnterprises: async (params) => {
return await request.download({ url: `/system/enterprise/export-excel`, params })
},
// 标签查询
tagList: async (params) => {
return await request.get({ url: `"/system/system/tag-library/list`, params })
},
}

5
src/api/system/user/index.ts

@ -94,6 +94,11 @@ export const getSimpleUserZGList = (): Promise<UserVO[]> => {
return request.get({ url: '/system/user/simple-zg-list' })
}
// 通过用户类型获取用户列表
export const getSimpleUserListByUserType = (params:number) => {
return request.get({ url: '/system/user/simple-user-by-userType?type='+ params })
}
/**
*
*/

2
src/views/enterpriseinspections/index.vue

@ -69,9 +69,7 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<!-- <el-table-column label="检查记录ID,主键" align="center" prop="id" /> -->
<el-table-column label="企业名称" align="center" prop="enterpriseName" />

33
src/views/enterprises/update.vue

@ -12,7 +12,7 @@
<el-form-item label="企业名称" prop="enterprisesName">
<el-input v-model="formData.enterprisesName" placeholder="请输入企业名称" />
</el-form-item>
<el-form-item label="企业类型" prop="type">
<el-form-item label="企业类型标签" prop="type">
<el-select v-model="formData.type" placeholder="请选择企业类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_TYPE)"
@ -41,7 +41,21 @@
</section>
</section>
</el-form-item>
<el-form-item label="企业关联微信用户" prop="address">
<el-select
v-model="formData.enterpriseUserId"
filterable
placeholder="Select"
style="width: 240px"
>
<el-option
v-for="item in enterpriseUserList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="企业地址" prop="address">
<el-input v-model="formData.address" type="textarea" placeholder="请输入企业地址" />
</el-form-item>
@ -188,7 +202,10 @@
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
import { EnterprisesApi, EnterprisesVO } from '@/api/enterprises'
import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qualification'
import { UserVO, getSimpleUserListByUserType } from '@/api/system/user'
import { EnterpriseInspectionsApi, EnterpriseInspectionsVO } from '@/api/enterpriseinspections'
import { UploadImgs } from '@/components/UploadFile'
import * as FileApi from '@/api/infra/file'
import { ElMessage } from 'element-plus'
@ -213,6 +230,7 @@ const fileIds = ref([]);
const qualificationlist = ref([]);
const inspectionslist = ref([]);
const inspectionsLogList = ref([]);
const enterpriseUserList = ref([])
const formData = ref({
id: undefined,
@ -233,8 +251,18 @@ const formData = ref({
managerDeptId: undefined,
ides: undefined,
startUserSelectAssignees:undefined,
enterpriseUserId: undefined,
fileIds:[]
})
const getEnterpriseUserList = async () => {
const type:number = 2
const data = await getSimpleUserListByUserType(type)
console.log("datadata===>", data)
}
const formRules = reactive({
type: [{ required: true, message: '企业类型不能为空', trigger: 'change' }],
enterprisesName: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
@ -341,6 +369,7 @@ onMounted(() => {
init()
getQualificationList()
getInspectionslList()
getEnterpriseUserList()
//getInspectionsLogList()
const openMapAndInit = async () => {
if (showMap.value) {

40
src/views/task/create.vue

@ -16,7 +16,6 @@
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="类型" prop="taskType">
<el-tree-select
v-model="formData.taskType"
@ -27,7 +26,6 @@
placeholder="请选择任务类型"
/>
</el-form-item>
<el-form-item label="执行周期" prop="execCycle" v-if="formData.taskType == 2">
<el-select v-model="formData.execCycle" placeholder="请选择执行周期">
<el-option
@ -76,7 +74,6 @@
</el-form>
</section>
</ContentWrap>
<ContentWrap title="执行范围">
<template #header> </template>
<section class="select-area" v-loading="loading">
@ -125,8 +122,6 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="" prop="id">-->
<!-- <el-select-->
<!-- v-model="enterprise.queryParams.id"-->
@ -144,8 +139,6 @@
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> 搜索
@ -158,7 +151,6 @@
</el-button-group>
</el-form-item>
</el-form>
<section class="enterprise-area">
<section
v-for="enterprise in enterprise.list"
@ -194,7 +186,6 @@
</section>
</section>
</section>
<pagination
v-show="enterprise.total > 0"
:total="enterprise.total"
@ -235,12 +226,17 @@
</section>
</section>
</ContentWrap>
<ContentWrap>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button
type="primary" @click="submitForm" v-hasPermi="['system:enterprise-inspections:audit']">审核通过</el-button>
<el-button
type="danger"
@click="submitForm"
v-hasPermi="['system:enterprise-inspections:audit']"
>删除</el-button>
</ContentWrap>
</template>
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
import { TagLibraryApi } from '@/api/system/taglibrary'
@ -248,9 +244,7 @@ import { EnterprisesApi, EnterprisesVO } from '@/api/enterprises'
import { TaskInfoApi } from '@/api/system/taskinfo'
import { useTagsViewStore} from '@/store/modules/tagsView'
import {defaultProps} from "@/utils/tree";
defineOptions({ name: 'CreateTask' })
const loading = ref(false)
const formData = ref({
id: undefined,
@ -309,14 +303,11 @@ const handleQuery = () => {
enterprise.value.queryParams.pageNo = 1
getEnterPriseList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/**
* 获取标签列表
*/
@ -325,14 +316,10 @@ function getTagList() {
tagList.value = res
})
}
const defaultProps = {
label: 'tagName', // 使 'name'
children: 'children', // 使 'children'
};
/**
* 获取企业列表
*/
@ -346,7 +333,6 @@ async function getEnterPriseList() {
loading.value = false
}
}
/**
* 全选
*/
@ -360,7 +346,6 @@ async function selectAll() {
formData.value.enterprises = uniqueFunc(arr, 'id')
loading.value = false
}
/**
* 取消全选
*/
@ -377,7 +362,6 @@ async function cancelAll() {
}
loading.value = false
}
/**
* 单选企业
* @param enterprise
@ -385,7 +369,6 @@ async function cancelAll() {
function selectEnterprise(enterprise) {
formData.value.enterprises.push(enterprise)
}
/**
* 单选取消
* @param enterprise
@ -393,7 +376,6 @@ function selectEnterprise(enterprise) {
function checkEnterprise(enterprise) {
formData.value.enterprises = formData.value.enterprises.filter((e) => e.id != enterprise.id)
}
/**
* 数组去重
* @param arr
@ -404,12 +386,10 @@ function uniqueFunc(arr, uniId) {
const res = new Map()
return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1))
}
/**
* 提交表单
*/
async function submitForm() {
const validate = await unref(formRef).validate()
if (validate) {
const data = JSON.parse(JSON.stringify(formData.value))
@ -440,10 +420,8 @@ async function submitForm() {
message.success('温馨提示:该任务已经执行,无法再进行修改')
}
}
}
}
function init(){
if(query.id){
TaskInfoApi.getTaskInfo(query.id).then(res=>{
@ -454,14 +432,12 @@ function init(){
})
}
}
getEnterPriseList()
getTagList()
onMounted(()=>{
init()
})
</script>
<style scoped lang="scss">
::v-deep(.taskForm .el-form) {
display: flex;
@ -545,4 +521,4 @@ onMounted(()=>{
}
}
}
</style>
</style>
Loading…
Cancel
Save