feat: 劳务实名制-人员管理新增
This commit is contained in:
parent
b9539c2003
commit
9ea6c11043
@ -310,3 +310,11 @@ export const getworkTypeList = (params: FormData) => {
|
|||||||
export const addWorkType = (params: FormData) => {
|
export const addWorkType = (params: FormData) => {
|
||||||
return http.post(BASEURL + `/project/workerType/add`, params);
|
return http.post(BASEURL + `/project/workerType/add`, params);
|
||||||
};
|
};
|
||||||
|
// 工种管理编辑
|
||||||
|
export const updateWorkType = (params: FormData) => {
|
||||||
|
return http.post(BASEURL + `/project/workerType/edit`, params);
|
||||||
|
};
|
||||||
|
// 工种管理删除
|
||||||
|
export const deleteWorkType = (params: { id: string }) => {
|
||||||
|
return http.post(BASEURL + `/project/workerType/delete`, params);
|
||||||
|
};
|
||||||
|
|||||||
BIN
src/assets/images/projectLogon/Vector.png
Normal file
BIN
src/assets/images/projectLogon/Vector.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/assets/images/projectLogon/idCard-badge.png
Normal file
BIN
src/assets/images/projectLogon/idCard-badge.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/images/projectLogon/idCard-face.png
Normal file
BIN
src/assets/images/projectLogon/idCard-face.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@ -89,7 +89,7 @@ const columns: ColumnProps[] = [
|
|||||||
prop: "winddirection",
|
prop: "winddirection",
|
||||||
label: "风向",
|
label: "风向",
|
||||||
render: scoped => {
|
render: scoped => {
|
||||||
return scoped.row.pm25 + "风";
|
return scoped.row.winddirection + "风";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ prop: "createTime", label: "上报时间" }
|
{ prop: "createTime", label: "上报时间" }
|
||||||
|
|||||||
@ -41,10 +41,10 @@ let initCount = ref(0);
|
|||||||
let oWebControl = ref(null);
|
let oWebControl = ref(null);
|
||||||
let cameraIndexCode = ref<Array<string>>([]);
|
let cameraIndexCode = ref<Array<string>>([]);
|
||||||
let objData = ref({
|
let objData = ref({
|
||||||
appkey: "24017757", //海康提供的appkey
|
appkey: "21582859", //海康提供的appkey
|
||||||
ip: "182.101.141.23", //海康提供的ip
|
ip: "120.236.122.37", //海康提供的ip
|
||||||
secret: "VJz0FbzmE6drPQ7egsBi", //海康提供的secret
|
secret: "CfxWWzB9MEC5y6R5CmWI", //海康提供的secret
|
||||||
port: 18443,
|
port: 81,
|
||||||
playMode: 0, // 0 预览 1回放
|
playMode: 0, // 0 预览 1回放
|
||||||
layout: "4x6" //页面展示的模块数【16】
|
layout: "4x6" //页面展示的模块数【16】
|
||||||
});
|
});
|
||||||
|
|||||||
@ -219,10 +219,10 @@ let initCount = ref(0);
|
|||||||
let oWebControl = ref(null);
|
let oWebControl = ref(null);
|
||||||
let cameraIndexCode = ref<Array<string>>([]);
|
let cameraIndexCode = ref<Array<string>>([]);
|
||||||
let objData = ref({
|
let objData = ref({
|
||||||
appkey: "24017757", //海康提供的appkey
|
appkey: "21582859", //海康提供的appkey
|
||||||
ip: "182.101.141.23", //海康提供的ip
|
ip: "120.236.122.37", //海康提供的ip
|
||||||
secret: "VJz0FbzmE6drPQ7egsBi", //海康提供的secret
|
secret: "CfxWWzB9MEC5y6R5CmWI", //海康提供的secret
|
||||||
port: 18443,
|
port: 81,
|
||||||
playMode: 0, // 0 预览 1回放
|
playMode: 0, // 0 预览 1回放
|
||||||
layout: "4x6" //页面展示的模块数【16】
|
layout: "4x6" //页面展示的模块数【16】
|
||||||
});
|
});
|
||||||
|
|||||||
@ -87,7 +87,7 @@ const columns: ColumnProps[] = [
|
|||||||
prop: "winddirection",
|
prop: "winddirection",
|
||||||
label: "风向",
|
label: "风向",
|
||||||
render: scoped => {
|
render: scoped => {
|
||||||
return scoped.row.pm25 + "风";
|
return scoped.row.winddirection + "风";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ prop: "createTime", label: "上报时间" }
|
{ prop: "createTime", label: "上报时间" }
|
||||||
|
|||||||
@ -80,6 +80,7 @@ import {
|
|||||||
classGroupInfo
|
classGroupInfo
|
||||||
} from "@/api/modules/project";
|
} from "@/api/modules/project";
|
||||||
import DialogForm from "@/components/DialogForm/index.vue";
|
import DialogForm from "@/components/DialogForm/index.vue";
|
||||||
|
import { Delete } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
|
||||||
@ -240,10 +241,10 @@ const getTableList = (params: any) => {
|
|||||||
|
|
||||||
const handleAddItem = async (index: number, row: any) => {
|
const handleAddItem = async (index: number, row: any) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
title.value = "新增班组管理";
|
title.value = "新增班组";
|
||||||
formData.value = reactive({});
|
formData.value = reactive({});
|
||||||
} else {
|
} else {
|
||||||
title.value = "编辑班组管理";
|
title.value = "编辑班组";
|
||||||
console.log(row);
|
console.log(row);
|
||||||
const res: any = await classGroupInfo({ id: row.id });
|
const res: any = await classGroupInfo({ id: row.id });
|
||||||
formData.value = reactive({ ...res.result });
|
formData.value = reactive({ ...res.result });
|
||||||
|
|||||||
@ -0,0 +1,776 @@
|
|||||||
|
<template>
|
||||||
|
<div class="overview">
|
||||||
|
<el-dialog title="新增工人" show-close v-model="visible1" style="min-width: 1300px">
|
||||||
|
<el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="200px" class="form" size="default">
|
||||||
|
<!-- 基础信息 -->
|
||||||
|
<div>
|
||||||
|
<div class="form-title">
|
||||||
|
<div>基础信息</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="姓名:" prop="personName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.personName" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性别:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">男</el-radio>
|
||||||
|
<el-radio :label="0">女</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="出生日期:" prop="projectName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.projectName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="民族:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.projectName" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<el-form-item label="住址:" prop="registerAddress">
|
||||||
|
<el-input placeholder="请输入" v-model="form.registerAddress" />
|
||||||
|
</el-form-item>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="身份证号:" prop="projectName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.projectName" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="签发机关:" prop="projectName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.projectName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证有效期:" prop="engineeringName">
|
||||||
|
<div class="date-select">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 62%; margin-right: 8px"
|
||||||
|
v-model="form.engineeringName"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择时间"
|
||||||
|
v-if="changeType == 1"
|
||||||
|
/>
|
||||||
|
<div v-else>长期</div>
|
||||||
|
<el-radio-group v-model="changeType">
|
||||||
|
<el-radio-button label="1">日期</el-radio-button>
|
||||||
|
<el-radio-button label="2">长期</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="身份证:" prop="isImportant">
|
||||||
|
<div class="idCard-img">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
accept="image/jpg, image/jpeg, image/png"
|
||||||
|
>
|
||||||
|
<img v-if="form.engineeringArea" :src="form.engineeringArea" class="avatar" />
|
||||||
|
<span v-else class="text-tip">上传身份证人像面</span>
|
||||||
|
</el-upload>
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
accept="image/jpg, image/jpeg, image/png"
|
||||||
|
>
|
||||||
|
<img v-if="form.engineeringArea" :src="form.engineeringArea" class="avatar" />
|
||||||
|
<span v-else class="text-tip">上传身份证国徽面</span>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<div class="idCard-tip">请上传清晰、完善、无遮挡物的身份证照片</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="人像信息:" prop="position">
|
||||||
|
<div class="face-img">
|
||||||
|
<el-upload
|
||||||
|
class="face-uploader"
|
||||||
|
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
accept="image/jpg, image/jpeg, image/png"
|
||||||
|
>
|
||||||
|
<img v-if="form.engineeringArea" :src="form.engineeringArea" class="face-avatar" />
|
||||||
|
<el-icon v-else><plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<div class="face-tip">
|
||||||
|
<span>人员照片示例</span>
|
||||||
|
<el-popover placement="right" :width="371" title="注册照片示例" trigger="hover">
|
||||||
|
<template #reference>
|
||||||
|
<div class="tip-circle">?</div>
|
||||||
|
</template>
|
||||||
|
<div class="face-register">
|
||||||
|
<div class="face-top">
|
||||||
|
<div class="face-top-left">
|
||||||
|
<img src="@/assets/images/projectLogon/vector.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="face-top-right">
|
||||||
|
<span>1.简单背景;</span>
|
||||||
|
<span>2.正脸表情;</span>
|
||||||
|
<span>3.正常镜片无反光;</span>
|
||||||
|
<span>4.面部光照强度适中;</span>
|
||||||
|
<span>5.面部明暗均匀;</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="face-bottom">
|
||||||
|
<div class="face-bottom-title">照片要求</div>
|
||||||
|
<div class="face-bottom-require">
|
||||||
|
<span>1.小于400k;</span>
|
||||||
|
<span>2.面部区域像素不低于128X128,面部大小占整张照片1/3以上;</span>
|
||||||
|
<span>3.确保所有注册照为同一人,否则无法成功注册;</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 进场信息 -->
|
||||||
|
<div class="form-title">
|
||||||
|
<div>进场信息</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="手机号:" prop="projectName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="现居住地 :" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="参建单位:" prop="address">
|
||||||
|
<el-input placeholder="请输入" v-model="form.address" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="班组 :" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="工种 :" prop="engineeringCost">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="人员类别:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">男</el-radio>
|
||||||
|
<el-radio :label="0">女</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="是否参与安全教育:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">合格</el-radio>
|
||||||
|
<el-radio :label="2">不合格</el-radio>
|
||||||
|
<el-radio :label="3">未培训</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否购买工伤和意外保险:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="2">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="有无合同 :" prop="engineeringCost">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">有</el-radio>
|
||||||
|
<el-radio :label="2">无</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="filelist"
|
||||||
|
class="upload-demo"
|
||||||
|
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||||
|
multiple
|
||||||
|
:limit="1"
|
||||||
|
:on-success="uploadSuccess"
|
||||||
|
style="display: flex; align-items: center; justify-content: center; margin-left: 22px"
|
||||||
|
>
|
||||||
|
<el-button plain color="#47A99D" size="small">选择文件</el-button>
|
||||||
|
<template #tip>
|
||||||
|
<div v-show="!form.engineeringCost" style="margin-left: 10px; color: #aeaeae">未选择任何文件</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否体验:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="2">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 银行卡与社保 -->
|
||||||
|
<div>
|
||||||
|
<div class="form-title">
|
||||||
|
<div>银行卡和社保</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="银行类型:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="银行卡号:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="实名制卡号:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开户支行名称:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="开户支行代号:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 其他信息 -->
|
||||||
|
<div>
|
||||||
|
<div class="form-title">
|
||||||
|
<div>其他信息</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="政治面貌:" prop="politicsStatus">
|
||||||
|
<el-select v-model="form.politicsStatus" placeholder="请选择" style="width: 100%">
|
||||||
|
<el-option v-for="item in politicsStatusList" :key="item.value" :label="item.label" :value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="学历:" prop="educationLevel">
|
||||||
|
<el-select v-model="form.educationLevel" placeholder="请选择" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in educationLevelList"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictValue"
|
||||||
|
:value="item.dictLabel"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="学位:" prop="academicDegree">
|
||||||
|
<el-select v-model="form.academicDegree" placeholder="请选择">
|
||||||
|
<el-option v-for="item in academicDegreeList" :key="item.label" :label="item.label" :value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否有重大病史:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="2">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="户口性质:" prop="engineeringName">
|
||||||
|
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="2">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="婚姻状况:" prop="maritalStatus">
|
||||||
|
<el-select v-model="form.maritalStatus" placeholder="请选择" style="width: 100%">
|
||||||
|
<el-option v-for="item in maritalStatusList" :key="item.label" :label="item.label" :value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="紧急联系人:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="紧急联系电话:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="开始工作日期:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="岗前培训日期:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<el-form-item label="邮箱:" prop="engineeringName">
|
||||||
|
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer class="footer flx-center">
|
||||||
|
<el-button class="cancelButtonStyle" @click="visible1 = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm(form)">保存</el-button>
|
||||||
|
</footer>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { onMounted, ref, watch } from "vue";
|
||||||
|
import type { UploadProps } from "element-plus";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { getDicList } from "@/api/modules/jxjview";
|
||||||
|
const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
|
const props = defineProps({
|
||||||
|
newMemberDialog: Boolean
|
||||||
|
});
|
||||||
|
const visible1 = ref(false);
|
||||||
|
const changeType = ref(1);
|
||||||
|
const filelist = ref([]);
|
||||||
|
const emits = defineEmits(["update:newMemberDialog"]);
|
||||||
|
const rules = ref({
|
||||||
|
personName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
sex: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
birthday: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
nation: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
address: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
idCard: [
|
||||||
|
{
|
||||||
|
pattern: /^[1-9]\d{5}(19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i,
|
||||||
|
message: "请输入正确的身份证号码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
issuingAuthorityForIdCard: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{
|
||||||
|
pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
|
||||||
|
message: "请输入合法手机号",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
companySn: [
|
||||||
|
{
|
||||||
|
pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
teamSn: [
|
||||||
|
{
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
workerType: [
|
||||||
|
{
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
legalPersonCard: [
|
||||||
|
{
|
||||||
|
pattern: /^[1-9]\d{5}(19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i,
|
||||||
|
message: "请输入正确的身份证号码",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
const enum Type {
|
||||||
|
One = 1,
|
||||||
|
Two = 2,
|
||||||
|
Three = 3,
|
||||||
|
Four = 4,
|
||||||
|
Five = 5
|
||||||
|
}
|
||||||
|
const politicsStatusList = ref([
|
||||||
|
{ label: "中共党员", value: 1 },
|
||||||
|
{ label: "共青团团员", value: 2 },
|
||||||
|
{ label: "普通居民", value: 3 },
|
||||||
|
{ label: "其他党派人士", value: 4 }
|
||||||
|
]);
|
||||||
|
const academicDegreeList = ref([
|
||||||
|
{ label: "学士", value: 1 },
|
||||||
|
{ label: "硕士", value: 2 },
|
||||||
|
{ label: "博士", value: 3 }
|
||||||
|
]);
|
||||||
|
const maritalStatusList = ref([
|
||||||
|
{ label: "未婚", value: 1 },
|
||||||
|
{ label: "已婚", value: 2 }
|
||||||
|
]);
|
||||||
|
const educationLevelList: any = ref([]);
|
||||||
|
const form = ref({
|
||||||
|
personName: "",
|
||||||
|
sex: 1,
|
||||||
|
birthday: "",
|
||||||
|
nation: "",
|
||||||
|
registerAddress: "",
|
||||||
|
idCard: "",
|
||||||
|
issuingAuthorityForIdCard: "",
|
||||||
|
idCardExpireDate: "",
|
||||||
|
idCardFront: "",
|
||||||
|
idCardBack: "",
|
||||||
|
portrait: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
companySn: "",
|
||||||
|
teamSn: "",
|
||||||
|
personType: Type["One"],
|
||||||
|
safetyEducation: Type["One"],
|
||||||
|
isPurchaseInsurance: Type["One"],
|
||||||
|
isContract: Type["One"],
|
||||||
|
isPhysicalExamination: Type["One"],
|
||||||
|
bankType: Type["One"],
|
||||||
|
bankCard: "",
|
||||||
|
realNameCardNumber: "",
|
||||||
|
bankName: "",
|
||||||
|
bankCode: "",
|
||||||
|
politicsStatus: null
|
||||||
|
});
|
||||||
|
// 图片上传成功后的钩子
|
||||||
|
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile) => {
|
||||||
|
console.log(response.result.url);
|
||||||
|
};
|
||||||
|
|
||||||
|
const beforeAvatarUpload: UploadProps["beforeUpload"] = rawFile => {
|
||||||
|
if (rawFile.type !== "image/png" && rawFile.type !== "image/jpg" && rawFile.type !== "image/jpeg") {
|
||||||
|
console.log(rawFile.type);
|
||||||
|
|
||||||
|
ElMessage.error("请上传jpg或者png格式的图片");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 限制文件大小
|
||||||
|
// else if (rawFile.size / 1024 / 1024 > 2) {
|
||||||
|
// ElMessage.error('Avatar picture size can not exceed 2MB!')
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
const uploadSuccess = (response: any) => {
|
||||||
|
ElMessage.success("上传成功");
|
||||||
|
// ruleForm.businessLicense = response.result.originalFilename;
|
||||||
|
// ruleForm.businessLicense = response.result.url;
|
||||||
|
// ruleForm.businessLicenseOriginalName = response.result.originalFilename;
|
||||||
|
|
||||||
|
// businessLicense.value = [{ name: response.result.originalFilename, url: response.result.downloadPath }];
|
||||||
|
};
|
||||||
|
// TODO: 提交表单操作
|
||||||
|
const submitForm = async (data: any) => {
|
||||||
|
// const formEl = formRef.value;
|
||||||
|
// if (!formEl) return;
|
||||||
|
// await formEl.validate((valid, fields) => {
|
||||||
|
// if (valid) {
|
||||||
|
// if (changeType.value == 2) {
|
||||||
|
// delete data.businessLicenseLifespan;
|
||||||
|
// }
|
||||||
|
// data.engineeringSn = initParam.engineeringSn;
|
||||||
|
// saveItem(data);
|
||||||
|
// } else {
|
||||||
|
// console.log("error submit!", fields);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
const getDicMainList = async () => {
|
||||||
|
const { result } = await getDicList({ dictType: "education_level" });
|
||||||
|
educationLevelList.value.length = 0;
|
||||||
|
educationLevelList.value.push(...result);
|
||||||
|
};
|
||||||
|
// 监听父组件的visible,用来简介控制el-dialog的弹框开关,一般是用于开
|
||||||
|
watch(
|
||||||
|
() => props.newMemberDialog,
|
||||||
|
(n, o) => {
|
||||||
|
visible1.value = n;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关
|
||||||
|
watch(visible1, (n, o) => {
|
||||||
|
emits("update:newMemberDialog", n);
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
getDicMainList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@mixin fullwidth {
|
||||||
|
width: -webkit-fill-available;
|
||||||
|
width: -moz-available;
|
||||||
|
width: stretch;
|
||||||
|
}
|
||||||
|
.overview {
|
||||||
|
// background-color: #fff;
|
||||||
|
flex: 1;
|
||||||
|
.form {
|
||||||
|
background-color: #fff;
|
||||||
|
.form-title {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-bottom: 32px;
|
||||||
|
div {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 6px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
border-left: 3px solid #008bff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.date-select {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.idCard-img {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
.avatar-uploader {
|
||||||
|
width: 178px;
|
||||||
|
height: 115px;
|
||||||
|
line-height: 150px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
.text-tip {
|
||||||
|
font-size: 10px;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #616161;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.avatar-uploader:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
.avatar-uploader:first-child {
|
||||||
|
background: url("@/assets/images/projectLogon/idCard-face.png") center center no-repeat;
|
||||||
|
}
|
||||||
|
.avatar-uploader:last-child {
|
||||||
|
background: url("@/assets/images/projectLogon/idCard-badge.png") center center no-repeat;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
width: 178px;
|
||||||
|
height: 115px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.idCard-tip {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #616161;
|
||||||
|
}
|
||||||
|
.face-img {
|
||||||
|
width: 100%;
|
||||||
|
align-self: flex-start;
|
||||||
|
:deep(.face-uploader .el-upload) {
|
||||||
|
border: 1px dashed #d9d9d9 !important;
|
||||||
|
border-radius: 6px !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
position: relative !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
.face-uploader .el-upload:hover {
|
||||||
|
border-color: #409eff !important;
|
||||||
|
}
|
||||||
|
:deep(.el-icon) {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #8c939d;
|
||||||
|
width: 53px;
|
||||||
|
height: 53px;
|
||||||
|
line-height: 53px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.face-avatar {
|
||||||
|
width: 53px;
|
||||||
|
height: 53px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.face-tip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
.tip-circle {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 15px;
|
||||||
|
background: #008bff;
|
||||||
|
opacity: 1;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: white;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
> :first-child,
|
||||||
|
> :last-child {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.el-input--default) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.continuous {
|
||||||
|
@include fullwidth;
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
width: 90%;
|
||||||
|
min-height: 40px;
|
||||||
|
padding-inline: 10px;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-radius: 5px;
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.calendar {
|
||||||
|
position: absolute;
|
||||||
|
inset-block: 1px;
|
||||||
|
right: 1px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 41px;
|
||||||
|
height: 31px;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #008aff;
|
||||||
|
border-top-right-radius: 2px;
|
||||||
|
border-bottom-right-radius: 2px;
|
||||||
|
.icon {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
v-deep {
|
||||||
|
.date {
|
||||||
|
@include fullwidth;
|
||||||
|
}
|
||||||
|
.el-input__prefix {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.face-register {
|
||||||
|
.face-top {
|
||||||
|
display: flex;
|
||||||
|
&-left {
|
||||||
|
width: 90px;
|
||||||
|
height: 91px;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 6px 6px 6px 6px;
|
||||||
|
opacity: 1;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
&-right {
|
||||||
|
width: 130px;
|
||||||
|
height: 91px;
|
||||||
|
line-height: 19px !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.face-bottom {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 20px;
|
||||||
|
&-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
&-require {
|
||||||
|
width: 100%;
|
||||||
|
height: 91px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.test :deep(.el-input__wrapper) {
|
||||||
|
box-shadow: 0 0 0 0;
|
||||||
|
}
|
||||||
|
.test :deep(.el-input__inner) {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
:deep(.el-table__empty-text) {
|
||||||
|
min-height: 200px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTable"
|
||||||
title="参建单位列表"
|
title="班组管理列表"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:requestApi="getTableList"
|
:requestApi="getTableList"
|
||||||
:dataCallback="dataCallback"
|
:dataCallback="dataCallback"
|
||||||
@ -10,21 +10,20 @@
|
|||||||
:pagination="true"
|
:pagination="true"
|
||||||
background
|
background
|
||||||
:isShowSearch="false"
|
:isShowSearch="false"
|
||||||
|
:initParam="initParam"
|
||||||
:onReset="true"
|
:onReset="true"
|
||||||
>
|
>
|
||||||
<template #formButton="scope">
|
<template #formButton="scope">
|
||||||
<el-button class="addButtonStyle" @click="handleAddItem(1)">新增</el-button>
|
<el-button class="addButtonStyle" @click="handleAddItem(1)">新增</el-button>
|
||||||
|
<el-button type="primary" @click="handleAddItem(1)">批量复职</el-button>
|
||||||
|
<el-button type="primary" @click="handleAddItem(1)">批量离场</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="primary" link @click="handleEditItem(row)">
|
|
||||||
<img src="@/assets/images/tableIcon/配置权限.png" alt="" class="configureIcon" />
|
|
||||||
<span>配置权限</span>
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" link @click="handleAddItem(2, row)">
|
<el-button type="primary" link @click="handleAddItem(2, row)">
|
||||||
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
||||||
<span>编辑</span>
|
<span>编辑</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" link :icon="Delete" @click="deleteAccount(row)">删除</el-button>
|
<el-button type="danger" link :icon="Delete" @click="deleteGroup(row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #state="{ row }">
|
<template #state="{ row }">
|
||||||
<span :class="row.state === 1 ? '' : 'redText'">{{ row.state == 1 ? "启用" : "禁用" }}</span>
|
<span :class="row.state === 1 ? '' : 'redText'">{{ row.state == 1 ? "启用" : "禁用" }}</span>
|
||||||
@ -43,7 +42,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
<engineeringDrawer v-model="engVisable" ref="engDrawer" :request="getengineering">
|
||||||
|
<template #default="{ data }">
|
||||||
|
<span style="margin-left: 10px" @click="onUpdate(data)">{{ data.engineeringName }}</span>
|
||||||
|
</template>
|
||||||
|
</engineeringDrawer>
|
||||||
|
<allEngineering @click="engVisable = true" />
|
||||||
|
<addMemberForm v-model:newMemberDialog="newMemberDialog"></addMemberForm>
|
||||||
<DialogForm
|
<DialogForm
|
||||||
:title="title"
|
:title="title"
|
||||||
:formConfig="formConfig"
|
:formConfig="formConfig"
|
||||||
@ -58,49 +63,108 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||||
import { ref, reactive, nextTick } from "vue";
|
import { ref, reactive, nextTick, onMounted } from "vue";
|
||||||
import { ElMessage, ElMessageBox, ElTree } from "element-plus";
|
import { ElMessage, ElMessageBox, ElTree, FormInstance } from "element-plus";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import { useHandleData } from "@/hooks/useHandleData";
|
import { useHandleData } from "@/hooks/useHandleData";
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import { jxj_User } from "@/api/types";
|
import { getRelevanceList } from "@/api/modules/common";
|
||||||
import TreeFilter from "@/components/TreeFilter/index.vue";
|
import TreeFilter from "@/components/TreeFilter/index.vue";
|
||||||
|
import engineeringDrawer from "@/components/engineeringDrawer/index.vue";
|
||||||
|
import allEngineering from "@/components/allEngineering/index.vue";
|
||||||
|
import { editRolePermissions, getSystemRole, getTreemRoleList, getTreeByIdList } from "@/api/modules/goverment";
|
||||||
import {
|
import {
|
||||||
getRoleList,
|
addClassGroup,
|
||||||
addRole,
|
updateClassGroup,
|
||||||
editRole,
|
deleteClassGroup,
|
||||||
deleteRole,
|
getClassGroupList,
|
||||||
editRolePermissions,
|
getBuildUnitAll,
|
||||||
getSystemRole,
|
classGroupInfo
|
||||||
getTreemRoleList,
|
} from "@/api/modules/project";
|
||||||
getTreeByIdList
|
|
||||||
} from "@/api/modules/goverment";
|
|
||||||
import DialogForm from "@/components/DialogForm/index.vue";
|
import DialogForm from "@/components/DialogForm/index.vue";
|
||||||
// import { getProjectRecordPage } from "@/api/modules/project";
|
import addMemberForm from "./components/addMemberForm.vue";
|
||||||
|
|
||||||
import { Delete } from "@element-plus/icons-vue";
|
import { Delete } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
|
||||||
const treeRef = ref(null);
|
const treeRef = ref(null);
|
||||||
|
const engVisable = ref(false);
|
||||||
const datas = reactive([]);
|
const datas = reactive([]);
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: (data, node) => node.data.meta.title
|
label: (data: any, node: { data: { meta: { title: any } } }) => node.data.meta.title
|
||||||
};
|
};
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const store = GlobalStore();
|
const store = GlobalStore();
|
||||||
const visible = ref(false);
|
|
||||||
const drawerVisible = ref(false);
|
const drawerVisible = ref(false);
|
||||||
|
const visible = ref(false);
|
||||||
|
const newMemberDialog = ref(false);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
const formData = ref({
|
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||||
roleName: "",
|
const initParam = reactive({
|
||||||
priority: 1,
|
solveFlag: 1,
|
||||||
state: 0,
|
engineeringSn: ""
|
||||||
roleDesc: ""
|
|
||||||
});
|
});
|
||||||
|
const formData = ref({});
|
||||||
|
// 弹窗中的配置
|
||||||
|
const formConfig = {
|
||||||
|
formItemConfig: [
|
||||||
|
{
|
||||||
|
label: "参建单位",
|
||||||
|
prop: "companySn",
|
||||||
|
type: "select",
|
||||||
|
data: []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "班组名称",
|
||||||
|
prop: "teamName",
|
||||||
|
type: "input"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "班组长",
|
||||||
|
prop: "leaderName",
|
||||||
|
type: "input"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "班组长电话",
|
||||||
|
prop: "leaderTel",
|
||||||
|
type: "input"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "进场时间",
|
||||||
|
prop: "entryTime",
|
||||||
|
type: "date",
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
valueFormat: "YYYY-MM-DD"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
companySn: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
teamName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
leaderTel: [
|
||||||
|
{
|
||||||
|
pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
|
||||||
|
message: "请输入合法手机号",
|
||||||
|
trigger: "change"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref();
|
const proTable = ref();
|
||||||
|
|
||||||
@ -110,88 +174,34 @@ const getId = ref<number | undefined>(undefined);
|
|||||||
const columns: ColumnProps[] = [
|
const columns: ColumnProps[] = [
|
||||||
{ type: "index", label: "序号", width: 80 },
|
{ type: "index", label: "序号", width: 80 },
|
||||||
{
|
{
|
||||||
prop: "roleName",
|
prop: "companyName",
|
||||||
label: "单位名称",
|
label: "工程名称"
|
||||||
search: { el: "input" }
|
|
||||||
},
|
},
|
||||||
// 多级 prop
|
|
||||||
{ prop: "priority", label: "显示顺序" },
|
|
||||||
{ prop: "state", label: "使用状态" },
|
|
||||||
{
|
{
|
||||||
prop: "state",
|
prop: "personType",
|
||||||
label: "状态",
|
label: "人员类别",
|
||||||
search: { el: "select" },
|
search: { el: "select" },
|
||||||
isShow: false,
|
|
||||||
enum: [
|
enum: [
|
||||||
{ label: "启用", value: 1 },
|
{ label: "管理", value: 1 },
|
||||||
{ label: "禁用", value: 0 }
|
{ label: "工人", value: 2 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{ prop: "teamName", label: "姓名", search: { el: "input" } },
|
||||||
|
{ prop: "teamName", label: "身份证号", search: { el: "input" } },
|
||||||
{
|
{
|
||||||
prop: "createTime",
|
prop: "inServiceType",
|
||||||
label: "创建时间",
|
label: "人员状态",
|
||||||
search: {
|
search: { el: "select" },
|
||||||
el: "date-picker",
|
enum: [
|
||||||
|
{ label: "在场", value: 1 },
|
||||||
props: {
|
{ label: "离场", value: 2 }
|
||||||
type: "daterange",
|
]
|
||||||
format: "YYYY-MM-DD",
|
|
||||||
valueFormat: "YYYY-MM-DD"
|
|
||||||
// defaultTime: defaultTime2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
{ prop: "leaderName", label: "班组长" },
|
||||||
|
{ prop: "leaderTel", label: "班组长电话" },
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
||||||
];
|
];
|
||||||
|
|
||||||
// 弹窗中的配置
|
|
||||||
const formConfig = {
|
|
||||||
formItemConfig: [
|
|
||||||
{
|
|
||||||
label: "角色名称",
|
|
||||||
prop: "roleName",
|
|
||||||
type: "input"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "角色顺序",
|
|
||||||
prop: "priority",
|
|
||||||
type: "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "状态",
|
|
||||||
prop: "state",
|
|
||||||
type: "radio",
|
|
||||||
data: [
|
|
||||||
{ label: "启用", value: 1 },
|
|
||||||
{ label: "禁用", value: 0 }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "备注",
|
|
||||||
prop: "roleDesc",
|
|
||||||
type: "input",
|
|
||||||
mapIcon: true
|
|
||||||
// 标记dialog
|
|
||||||
}
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
roleName: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入角色名称",
|
|
||||||
trigger: "blur"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
priority: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入角色顺序",
|
|
||||||
trigger: "blur"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// dataCallback 是对于返回的表格数据做处理,如果你后台返回的数据不是 list && total && pageNum && pageSize 这些字段,那么你可以在这里进行处理成这些字段
|
// dataCallback 是对于返回的表格数据做处理,如果你后台返回的数据不是 list && total && pageNum && pageSize 这些字段,那么你可以在这里进行处理成这些字段
|
||||||
// 或者直接去 hooks/useTable.ts 文件中把字段改为你后端对应的就行
|
// 或者直接去 hooks/useTable.ts 文件中把字段改为你后端对应的就行
|
||||||
const dataCallback = (data: any) => {
|
const dataCallback = (data: any) => {
|
||||||
@ -204,7 +214,7 @@ const dataCallback = (data: any) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeDrawer = done => {
|
const closeDrawer = (done: () => void) => {
|
||||||
datas.length = 0;
|
datas.length = 0;
|
||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
@ -215,7 +225,7 @@ const cacel = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const transfrom = (arr: Array<any>) => {
|
const transfrom = (arr: Array<any>) => {
|
||||||
const result = [];
|
const result: any[] | ConcatArray<{ authorityId: any; roleId: number | undefined; type: any }> = [];
|
||||||
return arr
|
return arr
|
||||||
.map(item => {
|
.map(item => {
|
||||||
if (arr.children && Array.isArray(arr.children)) {
|
if (arr.children && Array.isArray(arr.children)) {
|
||||||
@ -247,23 +257,20 @@ const getTableList = (params: any) => {
|
|||||||
newParams.createTime_end = newParams.createTime[1];
|
newParams.createTime_end = newParams.createTime[1];
|
||||||
delete newParams.createTime;
|
delete newParams.createTime;
|
||||||
}
|
}
|
||||||
return getRoleList(newParams);
|
return getClassGroupList(newParams);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAddItem = (index: number, row: any) => {
|
const handleAddItem = async (index: number, row: any) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
title.value = "新增角色";
|
title.value = "新增班组";
|
||||||
formData.value = reactive({
|
formData.value = reactive({});
|
||||||
roleName: "",
|
|
||||||
priority: 1,
|
|
||||||
state: 1,
|
|
||||||
roleDesc: ""
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
title.value = "编辑角色";
|
title.value = "编辑班组";
|
||||||
formData.value = reactive({ ...row });
|
console.log(row);
|
||||||
|
const res: any = await classGroupInfo({ id: row.id });
|
||||||
|
formData.value = reactive({ ...res.result });
|
||||||
}
|
}
|
||||||
visible.value = true;
|
newMemberDialog.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 修改数据按钮
|
// 修改数据按钮
|
||||||
@ -278,31 +285,54 @@ const handleEditItem = async (row: any) => {
|
|||||||
const res = await getTreeByIdList({ roleId: row.roleId });
|
const res = await getTreeByIdList({ roleId: row.roleId });
|
||||||
// 打开弹窗时调用上面的接口勾选
|
// 打开弹窗时调用上面的接口勾选
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value.setCheckedKeys(res.result.map(item => item.authorityId));
|
treeRef.value.setCheckedKeys(res.result.map((item: { authorityId: any }) => item.authorityId));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// TODO: 提交表单操作
|
||||||
const saveItem = async (form: any) => {
|
const saveItem = async (form: any) => {
|
||||||
if (form.roleId) {
|
form.engineeringSn = initParam.engineeringSn;
|
||||||
|
if (form.id) {
|
||||||
// console.log(form.dictCode);
|
// console.log(form.dictCode);
|
||||||
const res = await editRole(form);
|
const res = await updateClassGroup(form);
|
||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
ElMessage.success("编辑成功");
|
ElMessage.success("编辑成功");
|
||||||
} else {
|
} else {
|
||||||
const res = await addRole(form);
|
const res = await addClassGroup(form);
|
||||||
ElMessage.success("新增成功");
|
ElMessage.success("新增成功");
|
||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
}
|
}
|
||||||
visible.value = false;
|
newMemberDialog.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除用户信息
|
// 删除用户信息
|
||||||
const deleteAccount = async (params: jxj_User.ResUserList) => {
|
const deleteGroup = async (params: any) => {
|
||||||
await useHandleData(deleteRole, { roleId: params.roleId }, `删除【${params.roleName}】`);
|
await useHandleData(deleteClassGroup, { id: params.id }, `删除【${params.teamName}】`);
|
||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
};
|
};
|
||||||
|
// 点击抽屉的工程名称更新页面
|
||||||
const changeTreeFilter = () => {
|
const onUpdate = async row => {
|
||||||
console.log(11);
|
initParam.engineeringSn = row.engineeringSn;
|
||||||
|
getUnitList();
|
||||||
|
ElMessage.success("页面已更新");
|
||||||
};
|
};
|
||||||
|
const getengineering = (params: any) => {
|
||||||
|
// let newParams = JSON.parse(JSON.stringify(params));
|
||||||
|
return getRelevanceList();
|
||||||
|
};
|
||||||
|
// 获取参建单位列表
|
||||||
|
const getUnitList = async () => {
|
||||||
|
const res = await getBuildUnitAll({ engineeringSn: initParam.engineeringSn });
|
||||||
|
console.log(res);
|
||||||
|
formConfig.formItemConfig[0].data = res.result.map(item => {
|
||||||
|
console.log(item);
|
||||||
|
return {
|
||||||
|
label: item.companyName,
|
||||||
|
value: item.companySn
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getUnitList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
21
src/views/project/laborRealName/workTypeManage/index.scss
Normal file
21
src/views/project/laborRealName/workTypeManage/index.scss
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
.topCard {
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
:deep(.el-card__body) {
|
||||||
|
padding: 12px 0 12px 36px;
|
||||||
|
}
|
||||||
|
:deep(.el-select--default) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
// :deep(.el-dialog__body) {
|
||||||
|
// min-height: 300px;
|
||||||
|
// }
|
||||||
|
// 加上这个表格高度也变成230
|
||||||
|
:deep(.el-scrollbar) {
|
||||||
|
min-height: 230px;
|
||||||
|
}
|
||||||
|
// 三层弹窗嵌套加深透明度
|
||||||
|
:deep(.el-overlay) {
|
||||||
|
background-color: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
|
<el-card shodow="never" class="topCard">
|
||||||
|
<el-button class="addButtonStyle" @click="handleAddItem(1)">新增</el-button>
|
||||||
|
</el-card>
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTable"
|
||||||
title="工种管理列表"
|
title="工种管理列表"
|
||||||
@ -13,9 +16,6 @@
|
|||||||
:initParam="initParam"
|
:initParam="initParam"
|
||||||
:onReset="true"
|
:onReset="true"
|
||||||
>
|
>
|
||||||
<template #formButton="scope">
|
|
||||||
<el-button class="addButtonStyle" @click="handleAddItem(1)">新增</el-button>
|
|
||||||
</template>
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="primary" link @click="handleAddItem(2, row)">
|
<el-button type="primary" link @click="handleAddItem(2, row)">
|
||||||
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
||||||
@ -71,15 +71,9 @@ import TreeFilter from "@/components/TreeFilter/index.vue";
|
|||||||
import engineeringDrawer from "@/components/engineeringDrawer/index.vue";
|
import engineeringDrawer from "@/components/engineeringDrawer/index.vue";
|
||||||
import allEngineering from "@/components/allEngineering/index.vue";
|
import allEngineering from "@/components/allEngineering/index.vue";
|
||||||
import { editRolePermissions, getSystemRole, getTreemRoleList, getTreeByIdList } from "@/api/modules/goverment";
|
import { editRolePermissions, getSystemRole, getTreemRoleList, getTreeByIdList } from "@/api/modules/goverment";
|
||||||
import {
|
import { addWorkType, updateWorkType, deleteWorkType, getworkTypeList } from "@/api/modules/project";
|
||||||
addWorkType,
|
|
||||||
updateClassGroup,
|
|
||||||
deleteClassGroup,
|
|
||||||
getworkTypeList,
|
|
||||||
getBuildUnitAll,
|
|
||||||
classGroupInfo
|
|
||||||
} from "@/api/modules/project";
|
|
||||||
import DialogForm from "@/components/DialogForm/index.vue";
|
import DialogForm from "@/components/DialogForm/index.vue";
|
||||||
|
import { Delete } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
|
|
||||||
@ -132,8 +126,7 @@ const columns: ColumnProps[] = [
|
|||||||
{ type: "index", label: "序号", width: 80 },
|
{ type: "index", label: "序号", width: 80 },
|
||||||
{
|
{
|
||||||
prop: "typeName",
|
prop: "typeName",
|
||||||
label: "工种名称",
|
label: "工种名称"
|
||||||
search: { el: "input" }
|
|
||||||
},
|
},
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
||||||
];
|
];
|
||||||
@ -198,13 +191,12 @@ const getTableList = (params: any) => {
|
|||||||
|
|
||||||
const handleAddItem = async (index: number, row: any) => {
|
const handleAddItem = async (index: number, row: any) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
title.value = "新增工种管理";
|
title.value = "新增工种";
|
||||||
formData.value = reactive({});
|
formData.value = reactive({});
|
||||||
} else {
|
} else {
|
||||||
title.value = "编辑工种管理";
|
title.value = "编辑工种";
|
||||||
console.log(row);
|
console.log(row);
|
||||||
const res: any = await classGroupInfo({ id: row.id });
|
formData.value = reactive({ ...row });
|
||||||
formData.value = reactive({ ...res.result });
|
|
||||||
}
|
}
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
};
|
};
|
||||||
@ -229,7 +221,7 @@ const saveItem = async (form: any) => {
|
|||||||
form.engineeringSn = initParam.engineeringSn;
|
form.engineeringSn = initParam.engineeringSn;
|
||||||
if (form.id) {
|
if (form.id) {
|
||||||
// console.log(form.dictCode);
|
// console.log(form.dictCode);
|
||||||
const res = await updateClassGroup(form);
|
const res = await updateWorkType(form);
|
||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
ElMessage.success("编辑成功");
|
ElMessage.success("编辑成功");
|
||||||
} else {
|
} else {
|
||||||
@ -242,7 +234,7 @@ const saveItem = async (form: any) => {
|
|||||||
|
|
||||||
// 删除用户信息
|
// 删除用户信息
|
||||||
const deleteGroup = async (params: any) => {
|
const deleteGroup = async (params: any) => {
|
||||||
await useHandleData(deleteClassGroup, { id: params.id }, `删除【${params.teamName}】`);
|
await useHandleData(deleteWorkType, { id: params.id }, `删除【${params.typeName}】`);
|
||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
};
|
};
|
||||||
// 点击抽屉的工程名称更新页面
|
// 点击抽屉的工程名称更新页面
|
||||||
@ -254,20 +246,7 @@ const getengineering = (params: any) => {
|
|||||||
// let newParams = JSON.parse(JSON.stringify(params));
|
// let newParams = JSON.parse(JSON.stringify(params));
|
||||||
return getRelevanceList();
|
return getRelevanceList();
|
||||||
};
|
};
|
||||||
// 获取参建单位列表
|
|
||||||
const getUnitList = async () => {
|
|
||||||
const res = await getBuildUnitAll();
|
|
||||||
console.log(res);
|
|
||||||
formConfig.formItemConfig[0].data = []; // 每次调用先置空一次
|
|
||||||
formConfig.formItemConfig[0].data = res.result.map(item => {
|
|
||||||
console.log(item);
|
|
||||||
return {
|
|
||||||
label: item.companyName,
|
|
||||||
value: item.companySn
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onMounted(() => {
|
|
||||||
getUnitList();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./index.scss";
|
||||||
|
</style>
|
||||||
|
|||||||
@ -41,10 +41,10 @@ let initCount = ref(0);
|
|||||||
let oWebControl = ref(null);
|
let oWebControl = ref(null);
|
||||||
let cameraIndexCode = ref<Array<string>>([]);
|
let cameraIndexCode = ref<Array<string>>([]);
|
||||||
let objData = ref({
|
let objData = ref({
|
||||||
appkey: "24017757", //海康提供的appkey
|
appkey: "21582859", //海康提供的appkey
|
||||||
ip: "182.101.141.23", //海康提供的ip
|
ip: "120.236.122.37", //海康提供的ip
|
||||||
secret: "VJz0FbzmE6drPQ7egsBi", //海康提供的secret
|
secret: "CfxWWzB9MEC5y6R5CmWI", //海康提供的secret
|
||||||
port: 18443,
|
port: 81,
|
||||||
playMode: 0, // 0 预览 1回放
|
playMode: 0, // 0 预览 1回放
|
||||||
layout: "4x6" //页面展示的模块数【16】
|
layout: "4x6" //页面展示的模块数【16】
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user