fix: BUG修改
This commit is contained in:
parent
c5c0cafa83
commit
047229b9b2
@ -5,6 +5,7 @@ import {get,post} from '../http'
|
||||
|
||||
export const addSystemUserApi = data => post('xmgl/systemUser/add', data); //添加账号信息
|
||||
export const editSystemUserApi = data => post('xmgl/systemUser/edit', data); //编辑账号信息
|
||||
export const getSystemUserInfoApi = data => post('xmgl/systemUser/queryById', data); //查询账号信息
|
||||
export const deleteSystemUserApi = data => post('xmgl/systemUser/delete', data); //删除账号信息
|
||||
export const getSystemUserBySnApi = data => post('xmgl/systemUser/getSystemUserBySn', data); //查找账号列表
|
||||
export const getSystemUserBySnPageApi = data => post('xmgl/systemUser/getSystemUserBySnPage', data); //查找账号分页列表
|
||||
|
||||
@ -87,7 +87,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
axios.defaults.baseURL ='http://192.168.34.221:19111/' //郭圣雄本地
|
||||
// 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://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
|
||||
|
||||
@ -50,11 +50,11 @@ 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://192.168.34.221:9111/upload/image/',// 郭圣雄本地
|
||||
// FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄本地
|
||||
UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
|
||||
FILEURL:'http://182.90.224.237:51234/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',//坤工作流地址(本地)
|
||||
// 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/',//测试
|
||||
|
||||
|
||||
@ -413,7 +413,7 @@ export default {
|
||||
// 打开处置弹窗
|
||||
openDialog(item) {
|
||||
this.addEditForm = JSON.parse(JSON.stringify(item))
|
||||
this.addEditForm.deductScore = item.aiDeductRule.deductScore
|
||||
this.addEditForm.deductScore = item.aiDeductRule?item.aiDeductRule.deductScore:0
|
||||
this.getPersonDetail(item.id)
|
||||
this.recordShow = true
|
||||
console.log('打开处置弹窗', item)
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-button
|
||||
v-permission="{
|
||||
key: 'add',
|
||||
menuPath: '/project/labor/attendanceRules',
|
||||
key: 'work_rules_add',
|
||||
menuPath: '/project/labor/safeWorkRules',
|
||||
}"
|
||||
size="medium"
|
||||
type="primary"
|
||||
@ -39,7 +39,11 @@
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="安全履职规则类型"
|
||||
></el-table-column>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.type | typeText(rulesTypeList) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dayNum" label="连续未履职(天数)">
|
||||
<template v-slot="{ row }">
|
||||
<el-input
|
||||
@ -115,10 +119,18 @@
|
||||
class="dialogFormBox"
|
||||
>
|
||||
<el-form-item prop="type" label="安全履职规则类型">
|
||||
<el-input
|
||||
<!-- <el-input
|
||||
v-model="workerInfo.type"
|
||||
:placeholder="$t('message.workType.placeholder')"
|
||||
></el-input>
|
||||
></el-input> -->
|
||||
<el-select v-model="workerInfo.type" placeholder="请选择">
|
||||
<el-option
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
v-for="(item, index) in rulesTypeList"
|
||||
:key="index"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="dayNum" label="连续未履职(天数)">
|
||||
<el-input
|
||||
@ -160,12 +172,12 @@
|
||||
<div class="dialog-table">
|
||||
<el-table class="tables" :data="dialogPushList">
|
||||
<el-table-column prop="name" label="企业名称">
|
||||
<template v-slot="{ row,$index }">
|
||||
<template v-slot="{ row, $index }">
|
||||
<el-select
|
||||
v-model="row.enterpriseId"
|
||||
placeholder="请选择"
|
||||
v-if="row.isEdit"
|
||||
@change="e => enterpriseChange(e,$index)"
|
||||
@change="(e) => enterpriseChange(e, $index)"
|
||||
>
|
||||
<el-option
|
||||
:label="item.enterpriseName"
|
||||
@ -215,7 +227,7 @@
|
||||
<el-button
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="deleteDialogItem(scope.row)"
|
||||
@click="deleteDialogItem(scope.row,scope.$index)"
|
||||
style="margin-right: 10px"
|
||||
>删除</el-button
|
||||
>
|
||||
@ -264,6 +276,12 @@ import {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rulesTypeList: [
|
||||
{ name: "人员日常考勤", value: 1 },
|
||||
{ name: "每个项目自检任务", value: 2 },
|
||||
{ name: "一个月内缺勤超过", value: 3 },
|
||||
{ name: "一个月内迟到超过", value: 4 },
|
||||
],
|
||||
pageInfo: {
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
@ -305,8 +323,14 @@ export default {
|
||||
this.getDataList();
|
||||
this.getProjectDetailFn();
|
||||
},
|
||||
filters: {
|
||||
typeText(val, list) {
|
||||
let findItem = list.find((item) => val == item.value);
|
||||
return findItem ? findItem.name : "";
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
enterpriseChange(e,index) {
|
||||
enterpriseChange(e, index) {
|
||||
this.getPersonListFn(e);
|
||||
this.dialogPushList[index].userId = [];
|
||||
},
|
||||
@ -353,34 +377,38 @@ export default {
|
||||
this.getEnterpriseListFn();
|
||||
},
|
||||
// 删除弹窗数据
|
||||
deleteDialogItem(obj) {
|
||||
this.$confirm("请确认是否删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
SafeWatchManagerDeleteApi({ id: obj.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getDialogDataList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.message,
|
||||
});
|
||||
}
|
||||
});
|
||||
deleteDialogItem(obj,index) {
|
||||
if(obj.id){
|
||||
this.$confirm("请确认是否删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "已取消删除",
|
||||
.then(() => {
|
||||
SafeWatchManagerDeleteApi({ id: obj.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getDialogDataList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: res.message,
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "已取消删除",
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.dialogPushList.splice(index,1)
|
||||
}
|
||||
},
|
||||
// 切换弹窗保存
|
||||
saveDialogForm(obj, index) {
|
||||
@ -407,7 +435,7 @@ export default {
|
||||
},
|
||||
// 切换弹窗编辑
|
||||
editDialogForm(index) {
|
||||
console.log(this.dialogPushList[index])
|
||||
console.log(this.dialogPushList[index]);
|
||||
this.getPersonListFn(this.dialogPushList[index].enterpriseId);
|
||||
if (this.dialogPushList[index].userId) {
|
||||
this.dialogPushList[index].userId =
|
||||
@ -466,7 +494,7 @@ export default {
|
||||
let reqeustData = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
enableWorkerSafeWatch: this.radioVal,
|
||||
workerSafeWatchTime: this.alarmTime
|
||||
workerSafeWatchTime: this.alarmTime,
|
||||
};
|
||||
editProjectInfo(reqeustData).then((res) => {
|
||||
if (res.success) {
|
||||
@ -497,9 +525,9 @@ export default {
|
||||
// }
|
||||
SafeWatchManagerListApi(requestData).then((res) => {
|
||||
that.dialogPushList = [];
|
||||
res.result.map(item => {
|
||||
that.dialogPushList.push({...item,isEdit: false})
|
||||
})
|
||||
res.result.map((item) => {
|
||||
that.dialogPushList.push({ ...item, isEdit: false });
|
||||
});
|
||||
});
|
||||
},
|
||||
getDataList() {
|
||||
@ -516,9 +544,9 @@ export default {
|
||||
SafeWatchConfigPageApi(requestData).then((res) => {
|
||||
let responseData = [...res.result.records];
|
||||
that.rulesList = [];
|
||||
responseData.map(item => {
|
||||
that.rulesList.push({...item,isEdit: false})
|
||||
})
|
||||
responseData.map((item) => {
|
||||
that.rulesList.push({ ...item, isEdit: false });
|
||||
});
|
||||
that.pageInfo.total = res.result.total;
|
||||
});
|
||||
},
|
||||
|
||||
@ -140,6 +140,7 @@
|
||||
prop="rejectReason"
|
||||
align="center"
|
||||
label="驳回原因"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="280">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<div class="main-content">
|
||||
<div class="form-content">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="120px"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-form-item label="当前账号:" class="defaultStyle">
|
||||
<span style="color: #5181f6">{{
|
||||
$store.state.userInfo.account
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'头像'" prop="loginLogo">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:action="$store.state.UPLOADURL"
|
||||
name="files"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<img
|
||||
v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar"
|
||||
/>
|
||||
<div class="avatar-uploader-icon" v-else>
|
||||
<i class="el-icon-plus icon-item"></i>
|
||||
<span>上传头像</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名:" prop="realName">
|
||||
<el-input
|
||||
v-model="ruleForm.realName"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱:" prop="personMail">
|
||||
<el-input
|
||||
v-model="ruleForm.personMail"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话号码:" prop="userTel">
|
||||
<el-input
|
||||
v-model="ruleForm.userTel"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain @click="resetForm('ruleForm')"
|
||||
>清空</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')"
|
||||
>确认</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
title="查看大图"
|
||||
>
|
||||
<img width="100%" :src="dialogImageUrl" alt="" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
editSystemUserApi,
|
||||
getSystemUserInfoApi,
|
||||
} from "@/assets/js/api/account";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
avatar: "",
|
||||
realName: "",
|
||||
personMail: "",
|
||||
userTel: "",
|
||||
},
|
||||
rules: {
|
||||
personMail: [
|
||||
{
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱格式",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
userTel: [
|
||||
{
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur',
|
||||
pattern: /^1(3|4|5|6|7|8|9)\d{9}$/
|
||||
}
|
||||
]
|
||||
},
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
created() {
|
||||
this.getSystemUserInfoFn();
|
||||
},
|
||||
methods: {
|
||||
getSystemUserInfoFn() {
|
||||
let that = this;
|
||||
let requestData = {
|
||||
id: this.$store.state.userInfo.userId,
|
||||
};
|
||||
getSystemUserInfoApi(requestData).then((res) => {
|
||||
that.ruleForm = { ...res.result };
|
||||
});
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
// const isJPG = file.type === "image/jpeg";
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
// if (!isJPG) {
|
||||
// this.$message.error("上传头像图片只能是 JPG 格式!");
|
||||
// }
|
||||
if (!isLt2M) {
|
||||
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||
}
|
||||
return isLt2M;
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.ruleForm.avatar = res.data[0].imageUrl;
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let requestData = {
|
||||
...this.ruleForm,
|
||||
};
|
||||
editSystemUserApi(requestData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("修改成功");
|
||||
this.getSystemUserInfoFn();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main-content {
|
||||
.form-content {
|
||||
width: 500px;
|
||||
margin-top: 25px;
|
||||
margin-left: 75px;
|
||||
:deep() {
|
||||
.defaultStyle .el-form-item__label {
|
||||
color: #5181f6;
|
||||
}
|
||||
}
|
||||
.imgCodeBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
width: 116px;
|
||||
margin-left: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
color: #8c939d;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.icon-item {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -16,25 +16,29 @@
|
||||
</vue-scroll>
|
||||
</div>
|
||||
<div class="right whiteBlock">
|
||||
<DataFormData v-if="checkedId == 1"></DataFormData>
|
||||
<DataListData v-if="checkedId == 2"></DataListData>
|
||||
<DataInfoFormData v-if="checkedId == 1"></DataInfoFormData>
|
||||
<DataFormData v-if="checkedId == 2"></DataFormData>
|
||||
<DataListData v-if="checkedId == 3"></DataListData>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DataListData from './componentsModule/dataListData'
|
||||
import DataFormData from './componentsModule/dataFormData'
|
||||
import DataInfoFormData from './componentsModule/dataInfoFormData'
|
||||
export default {
|
||||
components: {
|
||||
DataListData,
|
||||
DataFormData
|
||||
DataFormData,
|
||||
DataInfoFormData
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
checkedId: 1,
|
||||
centerModuleList: [
|
||||
{id: 1, name: '修改密码'},
|
||||
{id: 2, name: '安全日志'}
|
||||
{id: 1, name: '个人信息'},
|
||||
{id: 2, name: '修改密码'},
|
||||
{id: 3, name: '安全日志'}
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user