Merge branch 'bjxz-rain' of http://139.9.66.234:18023/dhp/zhgdyun into bjxz-rain

This commit is contained in:
”Rain“ 2024-05-25 20:19:35 +08:00
commit 732e1e1ab1
4 changed files with 360 additions and 164 deletions

View File

@ -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://jxj.zhgdyun.com:61212/' //彭洁远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈

View File

@ -50,17 +50,15 @@ export default new Vuex.Store({
// FILEURL:' http://101.43.164.214:11111/image/',// 百色
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',
// FILEURL:'http://182.90.224.237:51234/image/',
// UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
// FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地
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',//坤工作流地址(本地)
WORKFLOWURL: 'http://192.168.34.126:88/#/workspace/forms',//罗峰工作流地址(本地)
// FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄本地
// WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地)
WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地)
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
// FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程
// UPLOADURL:'http://jxj.zhgdyun.com:15551/upload/image',//测试
// FILEURL:'http://jxj.zhgdyun.com:15551/image/',//测试
// UPLOADURL:'http://42.180.188.17:11211/upload/image',//测试
// FILEURL:'http://42.180.188.17:11211/image/',//测试
// BASEURL: baseUrl
// ? baseUrl
@ -71,9 +69,9 @@ export default new Vuex.Store({
// window.location.host +
// "/upload/image", //正式环境
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
// // WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址(弃用)
// // WORKFLOWURL: 'http://47.93.215.234:19098/#/workspace/forms',//鞍钢测试平台工作流地址(弃用)
// // WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms',//鞍钢平台工作流地址
// WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址(弃用)
// WORKFLOWURL: 'http://47.93.215.234:19098/#/workspace/forms',//鞍钢测试平台工作流地址(弃用)
// WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms',//鞍钢平台工作流地址
// WORKFLOWURL: 'http://42.180.188.17:19098/#/workspace/forms',//鞍钢测试平台工作流地址
//---------------------------------------------------------------------------------------------
// BASEURL: baseUrl

View File

@ -28,15 +28,20 @@
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="单位类型">
<!-- 筛选 -->
<el-select v-model="screenStr" class="screen" placeholder="请选择" clearable>
<el-select
v-model="screenStr"
class="screen"
placeholder="请选择"
clearable
>
<el-option
v-for="(item) in screen"
v-for="item in screen"
:key="item.id"
:label="item.name"
:value="item.id"
:value="item.id"
>
</el-option>
</el-select>
@ -48,7 +53,7 @@
v-model="workerName"
:placeholder="
$t('message.projectInfo.placeholder') +
$t('message.projectInfo.name')
$t('message.projectInfo.name')
"
></el-input>
</el-form-item>
@ -57,7 +62,7 @@
<el-button type="primary" plain @click="query">{{
$t("message.alarmWarning.query")
}}</el-button>
<!-- <el-button type="primary" info @click="filter">{{
$t("message.alarmWarning.query")
}}</el-button> -->
@ -77,95 +82,104 @@
<el-dropdown-item v-for="(item) in screen" :key="item.id" :command="item.id">{{item.name}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
</el-form-item>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<!-- <vue-scroll style="height: calc(100% - 20px)"> -->
<el-table class="tables" style="height: calc(100% - 20px); max-height: calc(100% - 20px);" :data="List">
<el-table-column
prop="account"
:label="$t('message.personnelAccess.Labid')"
></el-table-column>
<el-table-column
prop="projectOrgName"
label="组织名称"
>
<el-table
class="tables"
style="height: calc(100% - 20px); max-height: calc(100% - 20px)"
:data="List"
>
<el-table-column
prop="account"
:label="$t('message.personnelAccess.Labid')"
></el-table-column>
<el-table-column prop="projectOrgName" label="组织名称">
<template slot-scope="scope">
<div>{{ scope.row.projectOrgName }}</div>
</template>
</el-table-column>
<el-table-column
prop="workerName"
:label="$t('message.personnelAccess.Labname')"
align="center"
></el-table-column>
<el-table-column
prop="personMail"
label="邮箱"
align="center"
></el-table-column>
<el-table-column
prop="roleName"
:label="$t('message.personnelAccess.Labjuese')"
align="center"
>
</el-table-column>
<el-table-column
width="600px"
:label="$t('message.alarmValueSet.operation')"
align="center"
>
<template slot-scope="scope">
<div class="tableBtns">
<el-button
<div>{{ scope.row.projectOrgName }}</div>
</template>
</el-table-column>
<el-table-column
prop="workerName"
:label="$t('message.personnelAccess.Labname')"
align="center"
></el-table-column>
<el-table-column
prop="personMail"
label="邮箱"
align="center"
></el-table-column>
<el-table-column
prop="roleName"
:label="$t('message.personnelAccess.Labjuese')"
align="center"
>
</el-table-column>
<el-table-column
width="600px"
:label="$t('message.alarmValueSet.operation')"
align="center"
>
<template slot-scope="scope">
<div class="tableBtns">
<!-- <el-button
size="mini"
type="primary"
class="operationText"
@click="configFn(scope.row)"
>
<!-- 配置企业 -->
配置企业
{{ $t("message.projectInfo.configCompany") }}
</el-button>
<el-button
size="mini"
type="warning"
class="operationText"
@click="configFn2(scope.row, 1)"
>
<!-- 配置闸机 -->
{{ $t("message.projectInfo.configGate") }}
</el-button>
<el-button
size="mini"
type="success"
class="operationText"
@click="configFn2(scope.row, 2)"
>
<!-- 配置视频 -->
{{ $t("message.projectInfo.configVideo") }}
</el-button>
<div @click="edit(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>{{ $t("message.alarmValueSet.edit") }}</span>
</div>
<div @click="deleteDev(scope.row)" class="operationText">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>{{ $t("message.alarmValueSet.delete") }}</span>
</div>
</el-button> -->
<el-button
size="mini"
type="primary"
class="operationText"
@click="configTreeFn(scope.row)"
>
<!-- 配置企业 -->
{{ $t("message.projectInfo.configCompany") }}
</el-button>
<el-button
size="mini"
type="warning"
class="operationText"
@click="configFn2(scope.row, 1)"
>
<!-- 配置闸机 -->
{{ $t("message.projectInfo.configGate") }}
</el-button>
<el-button
size="mini"
type="success"
class="operationText"
@click="configFn2(scope.row, 2)"
>
<!-- 配置视频 -->
{{ $t("message.projectInfo.configVideo") }}
</el-button>
<div @click="edit(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>{{ $t("message.alarmValueSet.edit") }}</span>
</div>
</template>
</el-table-column>
</el-table>
<div @click="deleteDev(scope.row)" class="operationText">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>{{ $t("message.alarmValueSet.delete") }}</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<!-- </vue-scroll> -->
<!-- <el-pagination
class="pagerBox"
@ -206,7 +220,7 @@
></el-input>
</el-form-item>
<el-form-item
style="margin-bottom: 30px;"
style="margin-bottom: 30px"
:label="$t('message.personnelAccess.LabPwd')"
prop="password"
v-if="!addEditForm.showPassword && addEditForm.showPassword != ''"
@ -219,7 +233,7 @@
></el-input>
</el-form-item>
<el-form-item
style="margin-bottom: 30px;"
style="margin-bottom: 30px"
:label="$t('message.personnelAccess.LabPwd')"
prop="showPassword"
v-else
@ -233,7 +247,7 @@
</el-form-item>
<el-form-item label="选择组织" prop="xzProjectOrgId">
<el-select v-model="selectVal" placeholder="请选择">
<el-option style="height:auto" :value="[]">
<el-option style="height: auto" :value="[]">
<el-tree
:data="treeList"
node-key="id"
@ -286,12 +300,8 @@
</el-select>
</el-form-item>
<!-- 邮箱 -->
<el-form-item label="邮箱"
prop="personMail">
<el-input
disabled
v-model="addEditForm.personMail"
></el-input>
<el-form-item label="邮箱" prop="personMail">
<el-input disabled v-model="addEditForm.personMail"></el-input>
</el-form-item>
<!-- 外部登录标识 -->
<el-form-item
@ -323,12 +333,63 @@
</div>
</el-dialog>
<!-- 选择可查看的企业 -->
<!-- 树形选择版 -->
<el-dialog
:title="$t('message.projectInfo.chooseCanLookCompany')"
:modal-append-to-body="false"
kbox__label
:visible.sync="companyDialog"
width="667px"
>
<div class="dialog_tree_content">
<vue-scroll style="height: 500px; width: 600px">
<div class="selectAll-title">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleTreeCheckAllChange"
>
<!-- {{ $t("message.projectInfo.allChoose") }} -->
</el-checkbox>
<span>{{ $t("message.projectInfo.allChoose") }}</span>
</div>
<div style="margin: 15px 0"></div>
<el-tree
ref="treeRef"
:default-expand-all="false"
:data="treeDatas"
show-checkbox
node-key="id"
:props="defaultTreeProps"
@check-change="testCheckChange"
>
</el-tree>
</vue-scroll>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="companyDialog = false"
icon="el-icon-circle-close"
size="medium"
>{{ $t("message.alarmValueSet.cancel") }}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="saveTreeCompanyFn"
size="medium"
>{{ $t("message.alarmValueSet.save") }}
</el-button>
</div>
</div>
</el-dialog>
<!-- 按钮组版 -->
<!-- <el-dialog
:title="$t('message.projectInfo.chooseCanLookCompany')"
:modal-append-to-body="false"
kbox__label
:visible.sync="companyDialog"
width="667px"
>
<div class="dialog_content">
<vue-scroll style="height: 500px; width: 600px">
@ -337,7 +398,7 @@
v-model="checkAll"
@change="handleCheckAllChange"
>
<!-- 全选 -->
全选
{{ $t("message.projectInfo.allChoose") }}
</el-checkbox>
<div style="margin: 15px 0"></div>
@ -372,7 +433,7 @@
</el-button>
</div>
</div>
</el-dialog>
</el-dialog> -->
<!-- 选择可查看的视频 -->
<el-dialog
:modal-append-to-body="false"
@ -464,6 +525,7 @@ import {
import {
getEnterpriseInfoList,
ufaceDevList,
selectHierarchyEnterpriseListApi,
} from "@/assets/js/api/laborPerson";
import { deleteSystemUserApi } from "@/assets/js/api/account";
export default {
@ -475,11 +537,18 @@ export default {
this.getList();
this.getProjectList();
this.getTreeList();
this.getTreeEnterpriseList();
},
data() {
return {
treeDatas: [],
groupName: "",
defaultExpandArr: [],
//
defaultTreeProps: {
children: "children",
label: "enterpriseName",
},
//
defaultProps: {
children: "children",
@ -497,22 +566,22 @@ export default {
userId: "",
externalAccount: "",
},
screen:[
screen: [
// {id:0,name:" "},
{id:1,name:"专业分包"},
{id:2,name:"设备分包"},
{id:3,name:"材料分包"},
{id:4,name:"后勤服务"},
{id:5,name:"特殊设备"},
{id:6,name:"劳务分包"},
{id:7,name:"监理单位"},
{id:8,name:"建设单位"},
{id:9,name:"总承包单位"},
{id:10,name:"勘查单位"},
{id:11,name:"设计单位"},
{id:12,name:"其他"},
{ id: 1, name: "专业分包" },
{ id: 2, name: "设备分包" },
{ id: 3, name: "材料分包" },
{ id: 4, name: "后勤服务" },
{ id: 5, name: "特殊设备" },
{ id: 6, name: "劳务分包" },
{ id: 7, name: "监理单位" },
{ id: 8, name: "建设单位" },
{ id: 9, name: "总承包单位" },
{ id: 10, name: "勘查单位" },
{ id: 11, name: "设计单位" },
{ id: 12, name: "其他" },
],
screenStr:'',
screenStr: "",
formRules: {
account: [
{
@ -528,7 +597,8 @@ export default {
trigger: "blur",
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
pattern:
/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message:
"密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
@ -541,7 +611,8 @@ export default {
trigger: "blur",
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
pattern:
/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
message:
"密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
@ -643,14 +714,66 @@ export default {
// }
// }
// },
workerSelect(){
let findItem = this.personList.find(item => {
return item.id == this.addEditForm.workerId
})
if(findItem){
this.addEditForm.personMail = findItem.personMail
handleTreeCheckAllChange(val) {
this.isIndeterminate = false;
if (this.checkAll == true) {
for (let i = 0; i < this.treeDatas.length; i++) {
this.$refs.treeRef.setChecked(this.treeDatas[i].id, true, true);
}
} else {
this.addEditForm.personMail = ""
this.$refs.treeRef.setCheckedKeys([]);
}
},
//
testCheckChange() {
const tree = this.$refs.treeRef;
let checkedCount = 0;
let disabledCount = 0;
let indeterminateFlag = false;
for (let i = 0; i < this.treeDatas.length; i++) {
if (tree.getNode(this.treeDatas[i]).disabled == true) {
disabledCount += 1; // 1
}
if (tree.getNode(this.treeDatas[i]).checked == true) {
checkedCount += 1; // 1
}
if (tree.getNode(this.treeDatas[i]).indeterminate == true) {
indeterminateFlag = true; // true
}
}
if (checkedCount == 0) {
this.isIndeterminate = false;
this.checkAll = false; // 0false
if (indeterminateFlag == true) {
this.isIndeterminate = true;
this.checkAll = false;
}
} else if (checkedCount + disabledCount == this.treeDatas.length) {
this.isIndeterminate = false;
this.checkAll = true;
} else {
this.isIndeterminate = true;
this.checkAll = false;
}
return;
},
getTreeEnterpriseList() {
selectHierarchyEnterpriseListApi({
projectSn: this.$store.state.projectSn,
}).then((result) => {
if (result.success) {
this.treeDatas = result.result;
}
});
},
workerSelect() {
let findItem = this.personList.find((item) => {
return item.id == this.addEditForm.workerId;
});
if (findItem) {
this.addEditForm.personMail = findItem.personMail;
} else {
this.addEditForm.personMail = "";
}
},
getTreeList() {
@ -665,7 +788,7 @@ export default {
//
treeClick(data) {
console.log(data);
if(data.status == 1){
if (data.status == 1) {
this.$message.warning("无法选中已禁用组织");
} else {
this.selectVal = data.deptName;
@ -674,36 +797,77 @@ export default {
// this.$refs.addEditForm.validateField("xzProjectOrgId")
}
},
configFn(item) {
//
configTreeFn(item) {
this.companyDialog = true;
this.addEditForm = JSON.parse(JSON.stringify(item));
selectUserEnterpriseByUserIdApi({ userId: item.userId }).then((res) => {
let arr = [];
if (res.result) {
let id = res.result.enterpriseId;
console.log(id);
this.editComapnyDataId = res.result.id;
if (id.indexOf(",") != -1) {
let arr = [];
this.enterpriseListData.forEach((item) => {
for (let i = 0; i < id.split(",").length; i++) {
if (item.id == id.split(",")[i]) {
arr.push(id.split(",")[i]);
}
}
});
this.selectCompanyData = arr;
} else {
this.selectCompanyData = [id];
for (let i = 0; i < id.split(",").length; i++) {
arr.push(id.split(",")[i]);
}
} else {
this.selectCompanyData = [];
this.editComapnyDataId = "";
console.log(arr, 777888);
this.$nextTick(() => {
this.$refs.treeRef.setCheckedKeys([]);
arr.map((item) => {
this.$refs.treeRef.setChecked(this.findNodeById(item),true);
});
});
}
this.$nextTick(() => {
this.handleCheckedCompanyChange();
});
});
},
findNodeById(id) {
function findNode(nodes, id) {
for(let i = 0;i<nodes.length;i++){
if (nodes[i].id === id) {
return { node: nodes[i], hasChildren: !!nodes[i].children && nodes[i].children.length > 0 };
}
if (nodes[i].children && nodes[i].children.length > 0) {
const found = findNode(nodes[i].children, id);
if (found) return found;
}
}
return null;
}
const result = findNode(this.treeDatas, id);
if (!result.hasChildren) {
return id;
} else {
return ""
}
},
// configFn(item) {
// this.companyDialog = true;
// this.addEditForm = JSON.parse(JSON.stringify(item));
// selectUserEnterpriseByUserIdApi({ userId: item.userId }).then((res) => {
// if (res.result) {
// let id = res.result.enterpriseId;
// console.log(id);
// this.editComapnyDataId = res.result.id;
// if (id.indexOf(",") != -1) {
// let arr = [];
// this.enterpriseListData.forEach((item) => {
// for (let i = 0; i < id.split(",").length; i++) {
// if (item.id == id.split(",")[i]) {
// arr.push(id.split(",")[i]);
// }
// }
// });
// this.selectCompanyData = arr;
// } else {
// this.selectCompanyData = [id];
// }
// } else {
// this.selectCompanyData = [];
// this.editComapnyDataId = "";
// }
// this.$nextTick(() => {
// this.handleCheckedCompanyChange();
// });
// });
// },
configFn2(item, devType) {
this.configDevDialog = true;
this.configDevType = devType;
@ -786,13 +950,29 @@ export default {
console.log(checkedCount, checkedCount, arr.length);
this.isIndeterminate = checkedCount > 0 && checkedCount < arr.length;
},
saveCompanyFn() {
let ids = "";
if (this.selectCompanyData.length > 0) {
ids = this.selectCompanyData.join(",");
}
// saveCompanyFn() {
// let ids = "";
// if (this.selectCompanyData.length > 0) {
// ids = this.selectCompanyData.join(",");
// }
// addOrEditUserEnterpriseApi({
// enterpriseId: ids,
// userId: this.addEditForm.userId,
// id: this.editComapnyDataId,
// }).then((result) => {
// this.companyDialog = false;
// });
// },
saveTreeCompanyFn() {
const checked = this.$refs.treeRef.getCheckedNodes();
const halfChecked = this.$refs.treeRef.getHalfCheckedNodes();
const concatArr = checked.concat(halfChecked);
let ids = [];
concatArr.map((item) => {
ids.push(item.id);
});
addOrEditUserEnterpriseApi({
enterpriseId: ids,
enterpriseId: ids.join(","),
userId: this.addEditForm.userId,
id: this.editComapnyDataId,
}).then((result) => {
@ -864,13 +1044,13 @@ export default {
console.log("查询的参数", this.queryInfo);
this.getList();
},
filter(){
filter() {
console.log(this.queryInfo.enterpriseTypeId);
getProjectChilderSystemUserListApi({
projectSn: this.$store.state.projectSn,
enterpriseTypeId: this.queryInfo.enterpriseTypeId,
}).then((res) => {
console.log("筛选参数"+res);
console.log("筛选参数" + res);
});
},
add() {
@ -880,7 +1060,7 @@ export default {
this.selectVal = "";
this.defaultExpandArr = [];
this.$refs.groupTree.setCurrentKey("");
})
});
},
edit(obj) {
console.log("编辑", obj);
@ -973,13 +1153,13 @@ export default {
},
refresh() {
this.workerName = "";
this.screenStr = ""
this.screenStr = "";
this.getList();
},
getList() {
getProjectChilderSystemUserListApi({
projectSn: this.$store.state.projectSn,
enterpriseTypeId:this.screenStr,
enterpriseTypeId: this.screenStr,
workerName: this.workerName,
}).then((result) => {
if (result.success) {
@ -1010,6 +1190,21 @@ export default {
width: 600px;
height: auto;
}
.dialog_tree_content {
width: 600px;
height: auto;
::v-deep .el-checkbox__input {
position: static;
}
.selectAll-title {
display: flex;
align-items: center;
margin-left: 24px;
span {
margin-left: 10px;
}
}
}
.el-checkbox-group {
display: flex;
flex-wrap: wrap;
@ -1054,10 +1249,12 @@ export default {
::v-deep .el-checkbox__input {
position: absolute;
}
/deep/.el-select-dropdown__item.hover,.el-select-dropdown__item.hover, .el-select-dropdown__item:hover{
/deep/.el-select-dropdown__item.hover,
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background-color: transparent;
}
.screen{
.screen {
margin-left: 10px;
}
</style>

View File

@ -408,7 +408,8 @@ export default {
filters: {
//
hideIdNum (val) {
return `${val.substring(0, 3)}*************${val.substring(val.length - 2)}`
// return `${val.substring(0, 3)}*************${val.substring(val.length - 2)}`
return `${val.substring(0, 3)}***********${val.substring(val.length - 4)}`
},
//
hideName (val) {