Merge branch 'bjxz-dev' into bjxz-cjw
This commit is contained in:
commit
0ca7331c71
@ -34,6 +34,10 @@ const routes = [{
|
||||
path: 'laborDevManage',
|
||||
name: '劳务管理_设备管理',
|
||||
component: () => import('../views/equipmentCenter/laborManage/devConfig.vue'),
|
||||
}, {
|
||||
path: 'accessGroup',
|
||||
name: '劳务管理_门禁分组',
|
||||
component: () => import('../views/equipmentCenter/laborManage/accessGroup.vue'),
|
||||
}, {
|
||||
path: 'markingRoomDevManage',
|
||||
name: '标养室_设备管理',
|
||||
|
||||
@ -64,6 +64,13 @@ export const ufaceDevDelete = data => post('xmgl/ufaceDev/delete', data); //
|
||||
export const ufaceDevList = data => post('xmgl/ufaceDev/list', data); //列表查询人脸设备信息
|
||||
export const selectHousingListApi = data => get('xmgl/thirdPartyPlatformService/list', data); //查询住建列表
|
||||
|
||||
//劳务管理 --- 门禁分组
|
||||
export const getGroupPageApi = data => get('xmgl/ufaceDevGroup/page', data);//门禁分组分页列表
|
||||
export const getGroupListApi = data => get('xmgl/ufaceDevGroup/list', data);//门禁分组分页列表
|
||||
export const addGroupApi = data => post('xmgl/ufaceDevGroup/add', data);//门禁分组添加
|
||||
export const editGroupApi = data => post('xmgl/ufaceDevGroup/edit', data);//门禁分组编辑
|
||||
export const deleteGroupApi = data => post('xmgl/ufaceDevGroup/delete', data);//门禁分组删除
|
||||
|
||||
//工种信息
|
||||
export const workerTypeAdd = data => post('xmgl/workerType/add', data);//添加工种信息
|
||||
export const workerTypeEdit = data => post('xmgl/workerType/edit', data);//添加工种信息
|
||||
|
||||
@ -84,8 +84,8 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
||||
@ -94,6 +94,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//测试地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:19814/'//测试地址
|
||||
|
||||
|
||||
} else if (process.env.NODE_ENV == 'debug') {
|
||||
|
||||
@ -471,8 +471,8 @@ export default {
|
||||
console.log("当前跳转链接", this.newBigScreen);
|
||||
//-------------------- 跳转新版七参数
|
||||
this.jumpToken = localStorage.getItem("jumpToken");
|
||||
window.open(this.newBigScreen + "?token=" + this.jumpToken, "_self");
|
||||
// window.open('http://192.168.34.226:8081/#/large?token=' + this.jumpToken, "_self")//这里是后台跳到大屏的操作,携带token过去
|
||||
// window.open(this.newBigScreen + "?token=" + this.jumpToken + '&sn=' + this.$store.state.projectSn, "_self");
|
||||
window.open('http://192.168.34.138:8081/#/large?token=' + this.jumpToken + '&sn=' + this.$store.state.projectSn, "_self")//这里是后台跳到大屏的操作,携带token过去
|
||||
}
|
||||
// if (this.newBigScreen != null) {
|
||||
// console.log("当前跳转链接",this.newBigScreen)
|
||||
|
||||
@ -34,6 +34,10 @@ const routes = [{
|
||||
path: 'laborDevManage',
|
||||
name: '劳务管理_设备管理',
|
||||
component: () => import('../views/equipmentCenter/laborManage/devConfig.vue'),
|
||||
}, {
|
||||
path: 'accessGroup',
|
||||
name: '劳务管理_门禁分组',
|
||||
component: () => import('../views/equipmentCenter/laborManage/accessGroup.vue'),
|
||||
}, {
|
||||
path: 'markingRoomDevManage',
|
||||
name: '标养室_设备管理',
|
||||
|
||||
@ -3598,6 +3598,12 @@ const routes2 = [
|
||||
component: () =>
|
||||
import("../views/equipmentCenter/laborManage/devConfig.vue"),
|
||||
},
|
||||
{
|
||||
path: "accessGroup",
|
||||
name: "劳务管理_门禁分组",
|
||||
component: () =>
|
||||
import("../views/equipmentCenter/laborManage/accessGroup.vue"),
|
||||
},
|
||||
{
|
||||
path: "carCameraDev",
|
||||
name: "车辆管理_车辆相机管理",
|
||||
@ -4789,6 +4795,12 @@ var devRoutes = {
|
||||
component: () =>
|
||||
import("../views/equipmentCenter/laborManage/devConfig.vue"),
|
||||
},
|
||||
{
|
||||
path: "accessGroup",
|
||||
name: "劳务管理_门禁分组",
|
||||
component: () =>
|
||||
import("../views/equipmentCenter/laborManage/accessGroup.vue"),
|
||||
},
|
||||
{
|
||||
path: "markingRoomDevManage",
|
||||
name: "标养室_设备管理",
|
||||
|
||||
@ -48,23 +48,23 @@ export default new Vuex.Store({
|
||||
PAGESIZRS: [10, 20, 30, 50],
|
||||
// UPLOADURL:' http://101.43.164.214:11111/upload/image/',// 百色
|
||||
// FILEURL:' http://101.43.164.214:11111/image/',// 百色
|
||||
// UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
// FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
// WORKFLOWURL: 'http://192.168.181.67:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
// UPLOADURL:'http://jxj.zhgdyun.com:15551/upload/image',//测试
|
||||
// FILEURL:'http://jxj.zhgdyun.com:15551/image/',//测试
|
||||
|
||||
BASEURL: baseUrl
|
||||
? baseUrl
|
||||
: window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
UPLOADURL:
|
||||
window.location.protocol +
|
||||
"//" +
|
||||
window.location.host +
|
||||
"/upload/image", //正式环境
|
||||
FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
// WORKFLOWURL: 'http://jxj.zhgdyun.com:9811/#/workspace/forms',//正式工作流地址
|
||||
WORKFLOWURL: 'http://jxj.zhgdyun.com:9814/#/workspace/forms',//正式工作流地址
|
||||
// BASEURL: baseUrl
|
||||
// ? baseUrl
|
||||
// : window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
// UPLOADURL:
|
||||
// window.location.protocol +
|
||||
// "//" +
|
||||
// window.location.host +
|
||||
// "/upload/image", //正式环境
|
||||
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
// WORKFLOWURL: 'http://182.90.224.237:9811/#/workspace/forms',//测试平台工作流地址
|
||||
// WORKFLOWURL: 'http://182.90.224.237:9814/#/workspace/forms',//鞍钢平台工作流地址
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// BASEURL: baseUrl
|
||||
// ? baseUrl
|
||||
|
||||
@ -112,6 +112,13 @@ export default {
|
||||
id: 21,
|
||||
path: "/equipmentCenter/laborDevManage",
|
||||
},
|
||||
{
|
||||
menuName: "门禁分组", // 门禁分组
|
||||
subhead: "门禁分组", // 门禁分组
|
||||
operation: true,
|
||||
id: 21,
|
||||
path: "/equipmentCenter/accessGroup",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
508
src/views/equipmentCenter/laborManage/accessGroup.vue
Normal file
508
src/views/equipmentCenter/laborManage/accessGroup.vue
Normal file
@ -0,0 +1,508 @@
|
||||
<template>
|
||||
<div class="fullHeight whiteBlock">
|
||||
<div class="table_wrap">
|
||||
<div class="titleBox">
|
||||
<el-button type="primary" @click="addGroup" size="medium"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
<el-table class="tables" :data="tableList">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="分组名称"
|
||||
align="center"
|
||||
width="220"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="门禁点数"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.ufaceDevList">{{scope.row.ufaceDevList.length}}</span>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('message.personnelPosition.beaconManage.table.operation')"
|
||||
align="center"
|
||||
width="250"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="operation-style">
|
||||
<div @click="editPoint(scope.row)" class="operationText">
|
||||
<img
|
||||
src="@/assets/images/icon-edit.png"
|
||||
width="15px"
|
||||
height="15px"
|
||||
/>
|
||||
<span>{{
|
||||
$t("message.personnelPosition.beaconManage.table.edit")
|
||||
}}</span>
|
||||
</div>
|
||||
<div @click="removePoint(scope.row)" class="operationText">
|
||||
<img
|
||||
src="@/assets/images/icon-delete.png"
|
||||
width="15px"
|
||||
height="15px"
|
||||
/>
|
||||
<span>{{
|
||||
$t("message.personnelPosition.beaconManage.table.delete")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="SizeChange"
|
||||
@current-change="CurrentChange"
|
||||
:current-page="pageInfo.pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pageInfo.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="Number(pageInfo.total)"
|
||||
background
|
||||
></el-pagination>
|
||||
</div>
|
||||
<!-- 添加编辑分组 -->
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:title="addEditDialogTitle"
|
||||
:visible.sync="addEditDialog"
|
||||
width="967px"
|
||||
>
|
||||
<div class="dialog_content">
|
||||
<el-form
|
||||
size="medium"
|
||||
:model="addEditForm"
|
||||
ref="addEditForm"
|
||||
:rules="addEditFormRules"
|
||||
label-width="120px"
|
||||
class="dialogFormBox"
|
||||
>
|
||||
<el-form-item label="分组名称" prop="name">
|
||||
<el-input
|
||||
v-model="addEditForm.name"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="门禁点数" required>
|
||||
<div class="select-content">
|
||||
<div class="tip-text" @click="isSelectCompany = !isSelectCompany">
|
||||
<span>{{ selectCompanyName }}</span>
|
||||
<i class="el-icon-arrow-down" v-show="!isSelectCompany"></i>
|
||||
<i class="el-icon-arrow-up" v-show="isSelectCompany"></i>
|
||||
</div>
|
||||
<div class="select-list" v-if="isSelectCompany">
|
||||
<vue-scroll style="height: 100%">
|
||||
<div
|
||||
class="select-list-item"
|
||||
v-for="(item, index) in devList"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.devName }}</span>
|
||||
<el-checkbox
|
||||
:value="item.checked"
|
||||
@change="(e) => checkBoxChange(e, index)"
|
||||
style="margin-right: 7px;"
|
||||
><span></span>
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="addEditDialog = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.cancel") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="saveDevFn"
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.determine") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import tag from "@/components/tag";
|
||||
import {
|
||||
getGroupPageApi,
|
||||
addGroupApi,
|
||||
editGroupApi,
|
||||
deleteGroupApi,
|
||||
ufaceDevList,
|
||||
} from "../../../assets/js/api/laborPerson";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tag,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
checkList: [],
|
||||
checkAllEnter: false,
|
||||
isIndeterminate: false,
|
||||
checkAllOut: false,
|
||||
isIndeterminate2: false,
|
||||
record: [], //用于储存选择前的
|
||||
enableInList: [], //入场时间
|
||||
enableOutList: [], //出场时间
|
||||
tableList: [],
|
||||
addEditDialog: false,
|
||||
addEditDialogTitle: "",
|
||||
addEditForm: {
|
||||
name: "",
|
||||
ufaceDevList: true,
|
||||
},
|
||||
addEditFormRules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
},
|
||||
isSelectCompany: false,
|
||||
selectCompanyName: "请选择",
|
||||
devList: [],
|
||||
pageInfo: {
|
||||
pageNo: 1, //页数
|
||||
pageSize: 10, //条数
|
||||
total: 1, //总条数
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.company = COMPANY;
|
||||
console.log(this.company);
|
||||
this.getDevList();
|
||||
this.getList();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
checkBoxChange(e, index) {
|
||||
console.log(e, index);
|
||||
this.devList[index].checked = e;
|
||||
this.selectCompanyName = "请选择";
|
||||
this.devList.map((item) => {
|
||||
if (item.checked) {
|
||||
this.selectCompanyName = "已选择";
|
||||
}
|
||||
});
|
||||
},
|
||||
SizeChange(val) {
|
||||
this.pageInfo.pageSize = val;
|
||||
this.getList();
|
||||
},
|
||||
CurrentChange(val) {
|
||||
this.pageInfo.pageNo = val;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
let requestData = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: this.pageInfo.pageNo,
|
||||
pageSize: this.pageInfo.pageSize,
|
||||
};
|
||||
getGroupPageApi(requestData).then((res) => {
|
||||
console.log("门禁分组列表", res);
|
||||
this.tableList = res.result.records;
|
||||
this.pageInfo.total = res.result.total;
|
||||
});
|
||||
},
|
||||
getDevList() {
|
||||
ufaceDevList({ projectSn: this.$store.state.projectSn }).then((list) => {
|
||||
this.devList = list.result;
|
||||
this.devList.map((item) => {
|
||||
item.checked = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
addGroup() {
|
||||
this.addEditDialogTitle = "新增";
|
||||
this.resetForm();
|
||||
this.addEditDialog = true;
|
||||
},
|
||||
editPoint(devInfo) {
|
||||
this.addEditDialogTitle = "编辑";
|
||||
this.resetForm();
|
||||
this.addEditForm = {...devInfo};
|
||||
if (devInfo.ufaceDevList.length > 0) {
|
||||
this.selectCompanyName = "已选择";
|
||||
}
|
||||
this.devList.map((item) => {
|
||||
devInfo.ufaceDevList.map((item2) => {
|
||||
if (item.id == item2.id) {
|
||||
item.checked = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.addEditDialog = true;
|
||||
},
|
||||
removePoint(item) {
|
||||
this.$confirm(
|
||||
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
|
||||
"【" +
|
||||
item.name +
|
||||
"】?",
|
||||
this.$t("message.personnelPosition.beaconManage.table.Tips"),
|
||||
{
|
||||
confirmButtonText: this.$t(
|
||||
"message.personnelPosition.confirmButtonText"
|
||||
),
|
||||
cancelButtonText: this.$t(
|
||||
"message.personnelPosition.cancelButtonText"
|
||||
),
|
||||
type: "warning",
|
||||
}
|
||||
).then(() => {
|
||||
deleteGroupApi({ id: item.id }).then((res) => {
|
||||
this.$message.success(
|
||||
this.$t("message.personnelPosition.delete_success")
|
||||
); //删除成功!
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
//添加或编辑分组
|
||||
saveDevFn() {
|
||||
let findIndex = this.devList.findIndex((item) => {
|
||||
return item.checked == true;
|
||||
});
|
||||
console.log(findIndex,111222333)
|
||||
if (findIndex == -1) {
|
||||
this.$message.error("请选择门禁点数");
|
||||
return;
|
||||
}
|
||||
this.$refs["addEditForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
let requestData = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
name: this.addEditForm.name,
|
||||
};
|
||||
let arr = [];
|
||||
this.devList.map((item) => {
|
||||
if (item.checked) {
|
||||
console.log(item, 777888);
|
||||
arr.push({ id: item.id });
|
||||
}
|
||||
});
|
||||
requestData.ufaceDevList = arr;
|
||||
if (this.addEditDialogTitle == "新增") {
|
||||
addGroupApi(requestData).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.addEditDialog = false;
|
||||
this.getList();
|
||||
this.resetForm();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
requestData.id = this.addEditForm.id;
|
||||
editGroupApi(requestData).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.addEditDialog = false;
|
||||
this.getList();
|
||||
this.resetForm();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.selectCompanyName = "请选择";
|
||||
this.addEditForm.name = "";
|
||||
this.devList.map((item) => {
|
||||
item.checked = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.noData {
|
||||
.flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 5%;
|
||||
|
||||
> p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.topBox {
|
||||
padding: 20px 25px;
|
||||
|
||||
.item-main {
|
||||
.flex;
|
||||
|
||||
.item-select {
|
||||
.flex;
|
||||
align-items: center;
|
||||
padding-top: 16px;
|
||||
margin-right: 69px;
|
||||
|
||||
img {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.titleBox {
|
||||
padding: 20px 0 10px 25px;
|
||||
position: relative;
|
||||
// margin-top: 20px;
|
||||
}
|
||||
|
||||
.devList {
|
||||
.flex;
|
||||
flex-wrap: wrap;
|
||||
/*background-color: #f3f5fd;*/
|
||||
padding: 24px 25px;
|
||||
|
||||
> li {
|
||||
width: 33.33%;
|
||||
/*background-color: #f3f5fd;*/
|
||||
box-sizing: border-box;
|
||||
|
||||
> p {
|
||||
color: rgba(38, 45, 71, 100);
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
> div {
|
||||
padding: 18px 25px;
|
||||
word-break: break-word;
|
||||
border-radius: 3px;
|
||||
border: 1px solid @borderColor;
|
||||
margin: 0 24px 20px 0;
|
||||
|
||||
> div {
|
||||
opacity: 0.8;
|
||||
font-size: 14px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-Group {
|
||||
.flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 17px;
|
||||
|
||||
> div > span {
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.el-icon-edit,
|
||||
.el-icon-delete {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.el-icon-edit {
|
||||
color: #3a7bff;
|
||||
}
|
||||
|
||||
.el-icon-delete {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> li:nth-child(3n + 3) > div {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
// > li > div:hover {
|
||||
// background-color: rgba(243, 245, 255, 1);
|
||||
// box-shadow: 0 1px 8px 2px rgba(81, 129, 246, 0.16);
|
||||
// }
|
||||
}
|
||||
|
||||
.dialogFormBox {
|
||||
/*width: 840px;*/
|
||||
.select-content {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
line-height: 34px !important;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d7dbe9;
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
.tip-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
}
|
||||
.select-list {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
left: 0px;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 4px 6px 0px #606e9a;
|
||||
padding: 10px 8px;
|
||||
box-sizing: border-box;
|
||||
&-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
/deep/.el-checkbox__label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&-item:hover {
|
||||
background-color: #dee7ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.operation-style {
|
||||
.flex();
|
||||
justify-content: center;
|
||||
.operationText:not(:last-child) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.downloadBtn {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 25px;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@ -857,7 +857,7 @@ export default {
|
||||
this.isEdit = true
|
||||
this.isAdd = false
|
||||
// 详细
|
||||
this.dialogTitle = $t('message.dangerousBigProject.detailed')
|
||||
this.dialogTitle = this.$t('message.dangerousBigProject.detailed')
|
||||
this.detailId = val.id
|
||||
}
|
||||
}
|
||||
|
||||
5411
src/views/projectFront/laborManage/components/comboForm.vue
Normal file
5411
src/views/projectFront/laborManage/components/comboForm.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,207 @@
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.flex2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.flex3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.flex4 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.flex5 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.right2 {
|
||||
margin-left: 11px;
|
||||
width: calc(100% - 380px);
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
padding: 0 22px;
|
||||
height: 41px;
|
||||
line-height: 41px;
|
||||
// background: #fff;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
.team_number {
|
||||
opacity: 0.7;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
font-family: PingFangSC-Regular;
|
||||
.number {
|
||||
color: @--color-primary;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.team_list {
|
||||
padding: 20px 22px;
|
||||
// background: #fff;
|
||||
margin-bottom: 8px;
|
||||
position: relative;
|
||||
height: 79px;
|
||||
.team_addBtn {
|
||||
display: grid;
|
||||
padding: 10px 0;
|
||||
width: 79px;
|
||||
height: 79px;
|
||||
border-radius: 3px;
|
||||
/deep/ i {
|
||||
font-size: 30px;
|
||||
}
|
||||
/deep/ span {
|
||||
opacity: 0.7;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.team_addBtn:hover {
|
||||
/deep/ span {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.list_wrap {
|
||||
flex-grow: 22;
|
||||
flex-wrap: wrap;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
.list {
|
||||
width: 88px;
|
||||
height: 79px;
|
||||
margin-left: 12px;
|
||||
box-sizing: border-box;
|
||||
padding: 14px 0;
|
||||
margin-bottom: 12px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
background-color: #dce0ec;
|
||||
div {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
.checkedTeam {
|
||||
background-color: #3390ff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.laborComponent_table_wrap {
|
||||
box-sizing: border-box;
|
||||
// background: #fff;
|
||||
height: calc(100% - 170px);
|
||||
position: relative;
|
||||
padding-bottom: 60px;
|
||||
.search_wrap {
|
||||
padding: 25px 13px 13px 13px;
|
||||
border-bottom: 2px solid #e5ecfe;
|
||||
.el-button + .el-button {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.values {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
.table_wrap_bottom {
|
||||
padding: 0 13px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 46px;
|
||||
.table_wrap_btn {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
/deep/ .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.show_teamList {
|
||||
width: calc(100% - 128px);
|
||||
flex-grow: 22;
|
||||
flex-wrap: wrap;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
left: 110px;
|
||||
top: 7px;
|
||||
background: #fff;
|
||||
border: 1px solid #e5ecfe;
|
||||
border-radius: 5px;
|
||||
padding-top: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
.height_79 {
|
||||
height: 79px;
|
||||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
opacity: 0.5;
|
||||
color: rgba(42, 46, 63, 1);
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
font-family: PingFangSC-Regular;
|
||||
}
|
||||
|
||||
.bigImageDialog {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
text-align: center;
|
||||
z-index: 1000000;
|
||||
overflow-y: auto;
|
||||
// padding-bottom: 50px;
|
||||
height: 100%;
|
||||
.bigImageContent {
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
img {
|
||||
// margin-top: 10%;
|
||||
position: relative;
|
||||
top: 10%;
|
||||
max-height: 80%;
|
||||
max-width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.margin_top35 {
|
||||
margin-top: -35px;
|
||||
}
|
||||
|
||||
/deep/ .identity_card .el-upload-list__item-name {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.upload_btn_wrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.High_btn {
|
||||
position: absolute;
|
||||
right: 70px;
|
||||
top: 2px;
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
.personItemBottom {
|
||||
margin-top: 10px;
|
||||
}
|
||||
@ -229,7 +229,7 @@
|
||||
$t('message.laborMange.export') + $t('message.laborMange.template')
|
||||
}}</el-button>
|
||||
<el-upload
|
||||
style="display: inline-block; margin-left: 15px"
|
||||
style="display: inline-block; margin-left: 5px"
|
||||
class="upload-demo"
|
||||
name="excelFile"
|
||||
:action="
|
||||
@ -249,11 +249,18 @@
|
||||
$t('message.laborMange.bulkImport')
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
<el-button
|
||||
size="medium"
|
||||
@click="importImgOpen()"
|
||||
type="primary"
|
||||
style="margin-left: 5px"
|
||||
>导入照片</el-button
|
||||
>
|
||||
<el-button
|
||||
size="medium"
|
||||
@click="passEquipment()"
|
||||
type="primary"
|
||||
style="margin-left: 15px"
|
||||
style="margin-left: 5px"
|
||||
>下发通行设备</el-button
|
||||
>
|
||||
<br />
|
||||
@ -557,7 +564,75 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 照片导入弹框 -->
|
||||
<el-dialog
|
||||
class="importImgDialog"
|
||||
:modal-append-to-body="false"
|
||||
title="导入照片"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="imgImportDialog"
|
||||
width="668px"
|
||||
>
|
||||
<div class="import-content">
|
||||
<div class="alarm-content">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<div>
|
||||
向目标组织下批量导入人员正面免冠照,导入前建议使用人脸照片预处理工具进行质量清洗,并确认照片对应的人员信息是否存在。
|
||||
</div>
|
||||
</div>
|
||||
<div class="import-operation">
|
||||
<span>导入文件:</span>
|
||||
<div>
|
||||
<!-- :action="
|
||||
$http.defaults.baseURL + 'xmgl/workerInfo/uploadWorkerInfoImgs'
|
||||
" -->
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
name="files"
|
||||
:action="$store.state.UPLOADURL"
|
||||
:multiple="false"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleImportSuccess"
|
||||
:file-list="imgFileList"
|
||||
accept=".zip"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或<em>点击上传</em>
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="upload-tip"
|
||||
:style="{ 'margin-top': imgFileList.length > 0 ? '40px' : '5px' }"
|
||||
>
|
||||
支持导入200MB以内的ZIP文件,建议文件中包含照片的数量在1000张以内;
|
||||
照片命名规则为姓名_证件号码jpg,需露出眉毛和眼睛;单张照片文件大小10
|
||||
KB~200 KB。
|
||||
</div>
|
||||
<div class="upload-tip-sub">
|
||||
选择文件后将自动上传并进行数据校验
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="addEnterpriseDialog = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="saveImportFn()"
|
||||
size="medium"
|
||||
>导入</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 新增 || 编辑 人员录入弹窗 -->
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
@ -1432,7 +1507,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<div class="type-change">
|
||||
<el-radio-group v-model="typeRadio">
|
||||
<el-radio :label="1">设备</el-radio>
|
||||
<el-radio :label="2">分组</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row :gutter="24" v-if="typeRadio == 1" style="padding: 0px 12px;">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.faceDevice')"
|
||||
prop="ufaceDevList"
|
||||
@ -1459,6 +1540,33 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-if="typeRadio == 2" style="padding: 0px 12px;">
|
||||
<el-form-item
|
||||
label="分组名称2"
|
||||
prop="ufaceDevList"
|
||||
>
|
||||
<el-checkbox
|
||||
:indeterminate="isIndeterminate3"
|
||||
v-model="checkAllGroupDev"
|
||||
@change="handleCheckAllChangeGroup"
|
||||
>{{ $t("message.laborMange.checkAll") }}</el-checkbox
|
||||
>
|
||||
<el-checkbox-group
|
||||
key="group2"
|
||||
v-model="personForm.uGroupId"
|
||||
@change="handleUGroupChange"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="(item, index) in uGroupAllList"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
@ -1765,11 +1873,13 @@ import {
|
||||
getEnterpriseTypeList,
|
||||
selectHierarchyEnterpriseListApi,
|
||||
ufaceDevList,
|
||||
getGroupListApi,
|
||||
checkImgLibraryApi,
|
||||
batchSendWorkerInfoApi,
|
||||
sendWorkerInfoByIdApi,
|
||||
updateByIdWorkerInfo,
|
||||
sendBatchWokerApi
|
||||
sendBatchWokerApi,
|
||||
importImgDataApi
|
||||
} from '@/assets/js/api/laborPerson'
|
||||
import { selectUserDevAuthorityByUserIdApi } from '@/assets/js/api/configManage'
|
||||
import { getProjectConfigListApi } from '@/assets/js/api/project.js'
|
||||
@ -1788,13 +1898,17 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeRadio: 1,
|
||||
refreshPage: true,
|
||||
key: false,
|
||||
isCheckeedData: true, //判断一键下发是否有数据选中
|
||||
COMPANY: COMPANY,
|
||||
isIndeterminate2: false,
|
||||
isIndeterminate3: false,
|
||||
checkAllFaceDev: false,
|
||||
checkAllGroupDev: false,
|
||||
ufaceDevAllList: [],
|
||||
uGroupAllList: [], //所有分组
|
||||
enterpriseTreeData: [],
|
||||
projectSn: null, //projectSn 项目sn
|
||||
uploadUrl: '', //文件上传地址
|
||||
@ -1840,6 +1954,7 @@ export default {
|
||||
tableListData: [], //表格数据
|
||||
personDialogTitle: this.$t('message.laborMange.managementEntry'),
|
||||
titleType: 'add',
|
||||
imgImportDialog: false, //照片导入 弹窗
|
||||
addPersonDialog: false, //人员录入 弹窗
|
||||
//人员表单字段
|
||||
personForm: {
|
||||
@ -1872,6 +1987,7 @@ export default {
|
||||
personType: 2,
|
||||
ruleId: '',
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
personSerial: '',
|
||||
payRollBankName: '',
|
||||
payRollBankNumber: '',
|
||||
@ -1921,7 +2037,8 @@ export default {
|
||||
imgRadiolist: [],
|
||||
isSzProject: '',
|
||||
radio: '',
|
||||
showImgList: false
|
||||
showImgList: false,
|
||||
imgFileList: [], // 照片文件列表
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -1952,6 +2069,7 @@ export default {
|
||||
this.getAttendRuleList()
|
||||
this.getHierarchyEnterpriseList()
|
||||
this.getUfaceDevList()
|
||||
this.getUGroupDevList();
|
||||
this.getProjectConfig()
|
||||
},
|
||||
mounted() {
|
||||
@ -1966,6 +2084,42 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 导入照片数据
|
||||
saveImportFn() {
|
||||
if (this.imgFileList.length == 0) {
|
||||
this.$message.success("请先导入文件");
|
||||
return;
|
||||
}
|
||||
let data = new FormData(); //new出来的对象
|
||||
data.append("file", this.imgFileList[0].raw);
|
||||
data.append("projectSn", this.$store.state.projectSn);
|
||||
importImgDataApi(data).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("操作成功");
|
||||
this.imgImportDialog = false;
|
||||
this.getTableData();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleImportSuccess(response, file, fileList) {
|
||||
console.log(response, file, fileList);
|
||||
this.imgFileList = fileList;
|
||||
console.log(this.imgFileList);
|
||||
},
|
||||
handleImportExceed(files, fileList) {
|
||||
/*this.$message.warning(
|
||||
`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
|
||||
files.length + fileList.length
|
||||
} 个文件`
|
||||
);*/
|
||||
this.$message.warning(
|
||||
this.$t("message.docManage.dialog_upload_files.limitingChoice")
|
||||
); //当前限制选择 1 个文件
|
||||
},
|
||||
// 导入照片弹窗
|
||||
importImgOpen() {
|
||||
this.imgImportDialog = true;
|
||||
},
|
||||
handleUpload(fileData, type) {
|
||||
const file = fileData.file
|
||||
// 压缩图片
|
||||
@ -2103,6 +2257,18 @@ export default {
|
||||
checkedCount > 0 && checkedCount < allCheckList.length
|
||||
console.log('--------------------------', this.personForm.ufaceDevId)
|
||||
},
|
||||
handleUGroupChange(val) {
|
||||
let checkedCount = val.length;
|
||||
let allCheckList = [];
|
||||
for (let i = 0; i < this.uGroupAllList.length; i++) {
|
||||
if (!this.uGroupAllList[i].disabled) {
|
||||
allCheckList.push(this.uGroupAllList[i]);
|
||||
}
|
||||
}
|
||||
this.checkAllGroupDev = checkedCount === allCheckList.length;
|
||||
this.isIndeterminate3 =
|
||||
checkedCount > 0 && checkedCount < allCheckList.length;
|
||||
},
|
||||
handleCheckAllChangeFace(val) {
|
||||
if (val) {
|
||||
this.personForm.ufaceDevId = []
|
||||
@ -2115,6 +2281,53 @@ export default {
|
||||
console.log(val)
|
||||
this.isIndeterminate2 = false
|
||||
},
|
||||
handleCheckAllChangeGroup(val){
|
||||
if (val) {
|
||||
this.personForm.uGroupId = [];
|
||||
this.uGroupAllList.forEach((item) => {
|
||||
this.personForm.uGroupId.push(item.id);
|
||||
});
|
||||
} else {
|
||||
this.personForm.uGroupId = [];
|
||||
}
|
||||
this.isIndeterminate2 = false;
|
||||
},
|
||||
// 获取所有分组
|
||||
getUGroupDevList() {
|
||||
getGroupListApi({ projectSn: this.projectSn }).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.uGroupAllList = res.result;
|
||||
console.log(this.uGroupAllList,777888999)
|
||||
this.personForm.uGroupId = [...this.personForm.uGroupId];
|
||||
if (this.$store.state.userInfo.accountType == 6) {
|
||||
this.uGroupAllList.forEach((item) => {
|
||||
item.disabled = true;
|
||||
});
|
||||
// selectUserDevAuthorityByUserIdApi({
|
||||
// userId: this.$store.state.userInfo.userId,
|
||||
// devType: "1",
|
||||
// }).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// let arr = res.result.devId.split(",");
|
||||
// let id = "";
|
||||
// this.personForm.ufaceDevId = [];
|
||||
// for (let i = 0; i < arr.length; i++) {
|
||||
// console.log(parseInt(arr[i]));
|
||||
// this.personForm.ufaceDevId.push(parseInt(arr[i]));
|
||||
// id = parseInt(arr[i]);
|
||||
// for (let j = 0; j < this.ufaceDevAllList.length; j++) {
|
||||
// if (this.ufaceDevAllList[j].id == id) {
|
||||
// this.ufaceDevAllList[j].disabled = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取所有人脸设备
|
||||
getUfaceDevList() {
|
||||
ufaceDevList({ projectSn: this.projectSn }).then((res) => {
|
||||
@ -2427,6 +2640,7 @@ export default {
|
||||
jobName: '',
|
||||
personType: 2,
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
personSerial: ''
|
||||
}
|
||||
if (this.attendRulesList.length > 0) {
|
||||
@ -2561,6 +2775,7 @@ export default {
|
||||
if (!this.personForm.id) {
|
||||
let data = JSON.parse(JSON.stringify(this.personForm))
|
||||
data.projectSn = this.projectSn
|
||||
data.devType = this.typeRadio;
|
||||
data.departmentId = this.checkedTeamId
|
||||
data.longTerm = data.longTerm ? 1 : 0
|
||||
if (this.personForm.ufaceDevId.length > 0) {
|
||||
@ -2568,6 +2783,11 @@ export default {
|
||||
} else {
|
||||
data.ufaceDevId = ''
|
||||
}
|
||||
if (this.personForm.uGroupId.length > 0) {
|
||||
data.ufaceDevGroupId = this.personForm.uGroupId.join(",");
|
||||
} else {
|
||||
data.ufaceDevGroupId = "";
|
||||
}
|
||||
addWorkerInfo(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(this.$t('message.laborMange.addSuccess'))
|
||||
@ -2579,12 +2799,18 @@ export default {
|
||||
//编辑
|
||||
} else {
|
||||
let data = this.personForm
|
||||
data.devType = this.typeRadio;
|
||||
console.log('dadadaa', data)
|
||||
if (this.personForm.ufaceDevId.length > 0) {
|
||||
data.ufaceDevId = this.personForm.ufaceDevId.join(',')
|
||||
} else {
|
||||
data.ufaceDevId = ''
|
||||
}
|
||||
if (this.personForm.uGroupId.length > 0) {
|
||||
data.ufaceDevGroupId = this.personForm.uGroupId.join(",");
|
||||
} else {
|
||||
data.ufaceDevGroupId = "";
|
||||
}
|
||||
data.longTerm = data.longTerm ? 1 : 0
|
||||
delete data.addTime
|
||||
editWorkerInfo(data).then((res) => {
|
||||
@ -2646,6 +2872,7 @@ export default {
|
||||
jobName: '',
|
||||
personType: 2,
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
personSerial: ''
|
||||
}
|
||||
this.getUfaceDevList()
|
||||
@ -3513,6 +3740,9 @@ export default {
|
||||
.addPerson_content {
|
||||
height: 617px;
|
||||
padding-top: 10px;
|
||||
.type-change{
|
||||
margin: 5px 0px;
|
||||
}
|
||||
}
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
@ -3556,4 +3786,91 @@ export default {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
// 照片导入
|
||||
.importImgDialog {
|
||||
/deep/.el-dialog__body {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
}
|
||||
.import-content {
|
||||
.alarm-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 104px;
|
||||
.el-icon-warning-outline {
|
||||
color: #ea3941;
|
||||
font-size: 23px;
|
||||
}
|
||||
div {
|
||||
width: 405px;
|
||||
line-height: 18px;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #ea3941;
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
.import-operation {
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
margin-left: 136px;
|
||||
span {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #272d45;
|
||||
margin-right: 10px;
|
||||
}
|
||||
> div {
|
||||
.upload-demo {
|
||||
width: 321px;
|
||||
height: 45px;
|
||||
/deep/.el-upload {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.el-icon-upload {
|
||||
color: #a2a4af;
|
||||
font-size: 20px;
|
||||
margin: 0px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.el-upload__text {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #a2a4af;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.upload-tip {
|
||||
width: 321px;
|
||||
margin-left: 215px;
|
||||
margin-top: 5px;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #a2a4af;
|
||||
}
|
||||
.upload-tip-sub {
|
||||
width: 321px;
|
||||
margin-left: 215px;
|
||||
margin-top: 5px;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #5181f6;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -542,7 +542,7 @@
|
||||
name="files"
|
||||
:action="$store.state.UPLOADURL"
|
||||
:multiple="false"
|
||||
:on-exceed="handleExceed"
|
||||
:on-exceed="handleImportExceed"
|
||||
:on-success="handleImportSuccess"
|
||||
:file-list="imgFileList"
|
||||
accept=".zip"
|
||||
@ -568,7 +568,7 @@
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="addEnterpriseDialog = false"
|
||||
@click="imgImportDialog = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||||
@ -1515,7 +1515,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="type-change">
|
||||
<el-radio-group v-model="typeRadio">
|
||||
<el-radio :label="1">设备</el-radio>
|
||||
<el-radio :label="2">分组</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row v-if="typeRadio == 1">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.faceDevice')"
|
||||
prop="ufaceDevList"
|
||||
@ -1527,6 +1533,7 @@
|
||||
>{{ $t("message.laborMange.checkAll") }}</el-checkbox
|
||||
>
|
||||
<el-checkbox-group
|
||||
key="group1"
|
||||
v-model="personForm.ufaceDevId"
|
||||
@change="handleUfaceDevChange"
|
||||
>
|
||||
@ -1541,6 +1548,33 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row v-if="typeRadio == 2">
|
||||
<el-form-item
|
||||
label="分组名称2"
|
||||
prop="ufaceDevList"
|
||||
>
|
||||
<el-checkbox
|
||||
:indeterminate="isIndeterminate3"
|
||||
v-model="checkAllGroupDev"
|
||||
@change="handleCheckAllChangeGroup"
|
||||
>{{ $t("message.laborMange.checkAll") }}</el-checkbox
|
||||
>
|
||||
<el-checkbox-group
|
||||
key="group2"
|
||||
v-model="personForm.uGroupId"
|
||||
@change="handleUGroupChange"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="(item, index) in uGroupAllList"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row :gutter="24">
|
||||
@ -1690,6 +1724,7 @@
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<el-upload
|
||||
accept=".png, .jpg, .jpeg"
|
||||
class="upload-demo"
|
||||
action="uploadUrl"
|
||||
:on-remove="(file) => handleRemove(file, 7)"
|
||||
@ -2097,6 +2132,7 @@ import {
|
||||
batchSendWorkerInfoApi,
|
||||
selectHierarchyEnterpriseListApi,
|
||||
ufaceDevList,
|
||||
getGroupListApi,
|
||||
checkImgLibraryApi,
|
||||
updateByIdWorkerInfo,
|
||||
sendBatchWokerApi,
|
||||
@ -2122,12 +2158,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeRadio: 1,
|
||||
refreshPage: true, //静默刷新
|
||||
radio: "",
|
||||
key: false, //判断是否显示一件下发按钮
|
||||
COMPANY: COMPANY,
|
||||
isCheckeedData: true, //判断一键下发是否有数据选中
|
||||
ufaceDevAllList: [], //所有人脸设备
|
||||
uGroupAllList: [], //所有分组
|
||||
projectSn: null, //projectSn 项目sn
|
||||
uploadUrl: "", //文件上传地址
|
||||
fileUrl: "", //文件上传地址
|
||||
@ -2248,6 +2286,7 @@ export default {
|
||||
idCardDownPhotoUrl: "",
|
||||
ruleId: "",
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
personSerial: "",
|
||||
locationCardno: "", //人员定位标签号
|
||||
},
|
||||
@ -2295,7 +2334,9 @@ export default {
|
||||
enterpriseTreeData: [],
|
||||
defaultId: "",
|
||||
isIndeterminate2: false,
|
||||
isIndeterminate3: false,
|
||||
checkAllFaceDev: false,
|
||||
checkAllGroupDev: false,
|
||||
fileTemp: "",
|
||||
imgRadiolist: [],
|
||||
isSzProject: "",
|
||||
@ -2329,6 +2370,7 @@ export default {
|
||||
this.getAttendRuleList();
|
||||
this.getHierarchyEnterpriseList();
|
||||
this.getUfaceDevList();
|
||||
this.getUGroupDevList();
|
||||
this.getProjectConfig();
|
||||
},
|
||||
|
||||
@ -2349,7 +2391,7 @@ export default {
|
||||
this.imgFileList = fileList;
|
||||
console.log(this.imgFileList);
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
handleImportExceed(files, fileList) {
|
||||
/*this.$message.warning(
|
||||
`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
|
||||
files.length + fileList.length
|
||||
@ -2424,6 +2466,7 @@ export default {
|
||||
},
|
||||
// 导入照片弹窗
|
||||
importImgOpen() {
|
||||
this.imgFileList = [];
|
||||
this.imgImportDialog = true;
|
||||
},
|
||||
// 下发通行设备
|
||||
@ -2486,6 +2529,18 @@ export default {
|
||||
this.isIndeterminate2 =
|
||||
checkedCount > 0 && checkedCount < allCheckList.length;
|
||||
},
|
||||
handleUGroupChange(val) {
|
||||
let checkedCount = val.length;
|
||||
let allCheckList = [];
|
||||
for (let i = 0; i < this.uGroupAllList.length; i++) {
|
||||
if (!this.uGroupAllList[i].disabled) {
|
||||
allCheckList.push(this.uGroupAllList[i]);
|
||||
}
|
||||
}
|
||||
this.checkAllGroupDev = checkedCount === allCheckList.length;
|
||||
this.isIndeterminate3 =
|
||||
checkedCount > 0 && checkedCount < allCheckList.length;
|
||||
},
|
||||
handleCheckAllChangeFace(val) {
|
||||
if (val) {
|
||||
this.personForm.ufaceDevId = [];
|
||||
@ -2498,6 +2553,53 @@ export default {
|
||||
}
|
||||
this.isIndeterminate2 = false;
|
||||
},
|
||||
handleCheckAllChangeGroup(val){
|
||||
if (val) {
|
||||
this.personForm.uGroupId = [];
|
||||
this.uGroupAllList.forEach((item) => {
|
||||
this.personForm.uGroupId.push(item.id);
|
||||
});
|
||||
} else {
|
||||
this.personForm.uGroupId = [];
|
||||
}
|
||||
this.isIndeterminate2 = false;
|
||||
},
|
||||
// 获取所有分组
|
||||
getUGroupDevList() {
|
||||
getGroupListApi({ projectSn: this.projectSn }).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.uGroupAllList = res.result;
|
||||
console.log(this.uGroupAllList,777888999)
|
||||
this.personForm.uGroupId = [...this.personForm.uGroupId];
|
||||
if (this.$store.state.userInfo.accountType == 6) {
|
||||
this.uGroupAllList.forEach((item) => {
|
||||
item.disabled = true;
|
||||
});
|
||||
// selectUserDevAuthorityByUserIdApi({
|
||||
// userId: this.$store.state.userInfo.userId,
|
||||
// devType: "1",
|
||||
// }).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// let arr = res.result.devId.split(",");
|
||||
// let id = "";
|
||||
// this.personForm.ufaceDevId = [];
|
||||
// for (let i = 0; i < arr.length; i++) {
|
||||
// console.log(parseInt(arr[i]));
|
||||
// this.personForm.ufaceDevId.push(parseInt(arr[i]));
|
||||
// id = parseInt(arr[i]);
|
||||
// for (let j = 0; j < this.ufaceDevAllList.length; j++) {
|
||||
// if (this.ufaceDevAllList[j].id == id) {
|
||||
// this.ufaceDevAllList[j].disabled = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取所有人脸设备
|
||||
getUfaceDevList() {
|
||||
ufaceDevList({ projectSn: this.projectSn }).then((res) => {
|
||||
@ -3074,6 +3176,7 @@ export default {
|
||||
idCardUpPhotoUrl: "",
|
||||
idCardDownPhotoUrl: "",
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
personSerial: "",
|
||||
};
|
||||
if (this.attendRulesList.length > 0) {
|
||||
@ -3176,6 +3279,7 @@ export default {
|
||||
data.enterpriseId = this.checkedId;
|
||||
data.longTerm = this.personForm.longTerm ? 1 : 0;
|
||||
data.registerType = 1;
|
||||
data.devType = this.typeRadio;
|
||||
data.userId = this.$store.state.userInfo.userId;
|
||||
if (this.$store.state.userInfo.accountType == 6) {
|
||||
data.accountType = 2;
|
||||
@ -3187,6 +3291,11 @@ export default {
|
||||
} else {
|
||||
data.ufaceDevId = "";
|
||||
}
|
||||
if (this.personForm.uGroupId.length > 0) {
|
||||
data.ufaceDevGroupId = this.personForm.uGroupId.join(",");
|
||||
} else {
|
||||
data.ufaceDevGroupId = "";
|
||||
}
|
||||
addWorkerInfo(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(
|
||||
@ -3207,6 +3316,7 @@ export default {
|
||||
let data = this.personForm;
|
||||
data.longTerm = this.personForm.longTerm ? 1 : 0;
|
||||
data.registerType = 1;
|
||||
data.devType = this.typeRadio;
|
||||
// 跟杨珊对接需要再再次进场时多传入一个新的字段
|
||||
data.reEntry = 1;
|
||||
data.userId = this.$store.state.userInfo.userId;
|
||||
@ -3219,6 +3329,15 @@ export default {
|
||||
} else {
|
||||
data.ufaceDevId = "";
|
||||
}
|
||||
if (this.personForm.uGroupId.length > 0) {
|
||||
console.log(
|
||||
"this.personForm.uGroupId",
|
||||
this.personForm.uGroupId
|
||||
);
|
||||
data.ufaceDevGroupId = this.personForm.uGroupId.join(",");
|
||||
} else {
|
||||
data.ufaceDevGroupId = "";
|
||||
}
|
||||
if (this.$store.state.userInfo.accountType == 6) {
|
||||
data.accountType = 2;
|
||||
} else {
|
||||
@ -3298,6 +3417,7 @@ export default {
|
||||
idCardUpPhotoUrl: "",
|
||||
idCardDownPhotoUrl: "",
|
||||
ufaceDevId: [],
|
||||
uGroupId: [],
|
||||
personSerial: "",
|
||||
};
|
||||
this.getUfaceDevList();
|
||||
@ -4434,6 +4554,9 @@ export default {
|
||||
.el-form-item--small.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.type-change{
|
||||
margin: 5px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.shut_icon {
|
||||
|
||||
@ -1076,8 +1076,8 @@ export default {
|
||||
justify-content: center;
|
||||
}
|
||||
.temporary {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// width: 100%;
|
||||
height: auto;
|
||||
.placeholder {
|
||||
width: 100%;
|
||||
height: 41px;
|
||||
|
||||
@ -139,6 +139,7 @@
|
||||
<el-button type="primary" @click="crewExport" plain>{{
|
||||
$t("message.laborMange.crew") + $t("message.laborMange.export")
|
||||
}}</el-button>
|
||||
<!-- <el-button type="primary" @click="memberRegister">人员录入</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -791,6 +792,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 人员录入表单 -->
|
||||
<comboForm :comboFormVisible="comboFormVisible" @closeDialog="comboFormVisible = false"></comboForm>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -808,10 +811,15 @@ import {
|
||||
} from "@/assets/js/api/project.js";
|
||||
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
|
||||
import { getWorkerInfoList } from "@/assets/js/api/laborPerson";
|
||||
import comboForm from "./components/comboForm.vue"
|
||||
export default {
|
||||
name: "temporary",
|
||||
components: {
|
||||
comboForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
comboFormVisible: false,
|
||||
tableData: [],
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
@ -930,6 +938,10 @@ export default {
|
||||
this.getProjectSetting();
|
||||
},
|
||||
methods: {
|
||||
// 人员录入
|
||||
memberRegister(){
|
||||
this.comboFormVisible = true;
|
||||
},
|
||||
handleExport() {
|
||||
window.location.href =
|
||||
this.$http.defaults.baseURL +
|
||||
|
||||
@ -1451,7 +1451,7 @@ export default {
|
||||
imageUrl: imgList.join(','),
|
||||
inspectTypeId: this.formData.inspectTypeId,
|
||||
projectSn: this.projectSn,
|
||||
recordType: 1,
|
||||
recordType: this.formData.status == 1?2:1,
|
||||
rectifyRequire: this.formData.rectifyRequire,
|
||||
reviewId: this.$store.state.userInfo.userId,
|
||||
status: this.formData.status,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user