fix: BUG修改
This commit is contained in:
parent
047229b9b2
commit
66eadec2a3
10
package-lock.json
generated
10
package-lock.json
generated
@ -17,7 +17,7 @@
|
||||
"dom-to-image": "^2.6.0",
|
||||
"echarts": "^5.1.0",
|
||||
"echarts4": "npm:echarts@^4.8.0",
|
||||
"element-ui": "^2.8.2",
|
||||
"element-ui": "^2.13.2",
|
||||
"ezuikit-js": "^0.1.7",
|
||||
"flv.js": "^1.6.2",
|
||||
"gantt-elastic": "^1.0.12",
|
||||
@ -8162,9 +8162,9 @@
|
||||
"integrity": "sha512-tRbzkaRI5gbUn5DEvF0dV4TQbMZ5CLkWeTAXmpC9IrYT+GE+x76i9p+o3RJ5l9XmdQlI1pPhVtE9uNcJJ0G0EA=="
|
||||
},
|
||||
"node_modules/element-ui": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.8.2.tgz",
|
||||
"integrity": "sha512-LABKHKGUyewFNvpf9BQLecB659Wq0XYvyP1tBveZ4RWpdlPSylDfGW/RLvDYU7zuCBoRasdZAz7ryjOwq1lLNg==",
|
||||
"version": "2.13.2",
|
||||
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.13.2.tgz",
|
||||
"integrity": "sha512-r761DRPssMPKDiJZWFlG+4e4vr0cRG/atKr3Eqr8Xi0tQMNbtmYU1QXvFnKiFPFFGkgJ6zS6ASkG+sellcoHlQ==",
|
||||
"dependencies": {
|
||||
"async-validator": "~1.8.1",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.0",
|
||||
@ -8174,7 +8174,7 @@
|
||||
"throttle-debounce": "^1.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^2.5.16"
|
||||
"vue": "^2.5.17"
|
||||
}
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
"dom-to-image": "^2.6.0",
|
||||
"echarts": "^5.1.0",
|
||||
"echarts4": "npm:echarts@^4.8.0",
|
||||
"element-ui": "^2.8.2",
|
||||
"element-ui": "^2.13.2",
|
||||
"ezuikit-js": "^0.1.7",
|
||||
"flv.js": "^1.6.2",
|
||||
"gantt-elastic": "^1.0.12",
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
<div class="accountBox">
|
||||
<div class="flex2 accountInfo" v-show="$store.state.userInfo.accountType != 1">
|
||||
<!-- <i class="el-icon-user-solid"></i> -->
|
||||
<el-avatar size="large" icon="el-icon-user-solid"></el-avatar>
|
||||
<img :src="$store.state.FILEURL + $store.state.userInfo.avatar" style="width: 40px;height: 40px;" v-if="$store.state.userInfo.avatar"/>
|
||||
<el-avatar size="large" icon="el-icon-user-solid" v-else></el-avatar>
|
||||
<div style="margin-left: 10px">
|
||||
<p>{{ $store.state.userInfo.companyName }}</p>
|
||||
<!-- 横琴和鹤洲不需要客服电话-->
|
||||
|
||||
@ -283,8 +283,9 @@ export default {
|
||||
this.$refs.cont.style.width = "100%";
|
||||
return;
|
||||
} else {
|
||||
let width = this.$store.state.menuList.length * 150// 动态计算出滚动区域的大小,前面已经说过了,产生滚动的原因是滚动区域宽度大于父盒子宽度
|
||||
this.$refs.cont.style.width = width + 'px'
|
||||
// let width = this.$store.state.menuList.length * 150// 动态计算出滚动区域的大小,前面已经说过了,产生滚动的原因是滚动区域宽度大于父盒子宽度
|
||||
// this.$refs.cont.style.width = width + 'px'
|
||||
this.$refs.cont.style.width = 'max-content';
|
||||
this.$nextTick(() => {
|
||||
if (!this.scroll) {
|
||||
this.scroll = new BScroll(this.$refs.wrapper, {
|
||||
|
||||
@ -206,8 +206,9 @@ export default {
|
||||
this.$refs.cont.style.width = "100%";
|
||||
return;
|
||||
} else {
|
||||
let width = this.$store.state.menuList.length * 150// 动态计算出滚动区域的大小,前面已经说过了,产生滚动的原因是滚动区域宽度大于父盒子宽度
|
||||
this.$refs.cont.style.width = width + 'px'
|
||||
// let width = this.$store.state.menuList.length * 150// 动态计算出滚动区域的大小,前面已经说过了,产生滚动的原因是滚动区域宽度大于父盒子宽度
|
||||
// this.$refs.cont.style.width = width + 'px'
|
||||
this.$refs.cont.style.width = 'max-content';
|
||||
this.$nextTick(() => {
|
||||
if (!this.scroll) {
|
||||
this.scroll = new BScroll(this.$refs.wrapper, {
|
||||
|
||||
@ -8,12 +8,16 @@
|
||||
ref="searchForm"
|
||||
>
|
||||
<el-form-item label="安全规则履职类型">
|
||||
<el-input
|
||||
v-model="searchForm.type"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-select v-model="searchForm.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 label="企业名称">
|
||||
<el-input
|
||||
v-model="searchForm.enterpriseName"
|
||||
@ -68,11 +72,11 @@
|
||||
align="center"
|
||||
:label="$t('message.personnelPosition.beaconManage.table.index')"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="安全履职规则类型"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column prop="type" label="安全履职规则类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.type | typeText(rulesTypeList) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dayNum"
|
||||
label="连续未履职天数"
|
||||
@ -200,6 +204,12 @@ import {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rulesTypeList: [
|
||||
{ name: "人员日常考勤", value: 1 },
|
||||
{ name: "每个项目自检任务", value: 2 },
|
||||
{ name: "一个月内缺勤超过", value: 3 },
|
||||
{ name: "一个月内迟到超过", value: 4 },
|
||||
],
|
||||
timeRange: [],
|
||||
searchForm: {
|
||||
type: "",
|
||||
@ -253,13 +263,22 @@ export default {
|
||||
this.loadAllPerson();
|
||||
this.loadCardData();
|
||||
},
|
||||
filters: {
|
||||
typeText(val, list) {
|
||||
let findItem = list.find((item) => val == item.value);
|
||||
return findItem ? findItem.name : "";
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
exportFn() {
|
||||
fetch(this.$http.defaults.baseURL + "xmgl/xzWorkerSafeWatchAlarm/exportXls", {
|
||||
headers: {
|
||||
Authorization: this.$store.state.userInfo.token,
|
||||
},
|
||||
})
|
||||
fetch(
|
||||
this.$http.defaults.baseURL + "xmgl/xzWorkerSafeWatchAlarm/exportXls",
|
||||
{
|
||||
headers: {
|
||||
Authorization: this.$store.state.userInfo.token,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then((response) => {
|
||||
// 处理响应
|
||||
if (!response.ok) {
|
||||
|
||||
@ -36,22 +36,26 @@
|
||||
<div class="table_wrap whiteBlock">
|
||||
<vue-scroll>
|
||||
<el-table class="tables" :data="rulesList">
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="安全履职规则类型"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-table-column prop="type" label="安全履职规则类型">
|
||||
<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
|
||||
<!-- <el-input
|
||||
v-if="row.isEdit"
|
||||
v-model="row.dayNum"
|
||||
placeholder="请输入内容"
|
||||
style="width: 200px"
|
||||
></el-input>
|
||||
></el-input> -->
|
||||
<el-input-number
|
||||
v-if="row.isEdit"
|
||||
v-model="row.dayNum"
|
||||
:min="0"
|
||||
placeholder="请输入内容"
|
||||
style="width: 200px"
|
||||
></el-input-number>
|
||||
<span v-else>{{ row.dayNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -133,10 +137,16 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="dayNum" label="连续未履职(天数)">
|
||||
<el-input
|
||||
<!-- <el-input
|
||||
v-model="workerInfo.dayNum"
|
||||
:placeholder="$t('message.workType.placeholder')"
|
||||
></el-input>
|
||||
></el-input> -->
|
||||
<el-input-number
|
||||
v-model="workerInfo.dayNum"
|
||||
:min="0"
|
||||
placeholder="请输入内容"
|
||||
style="min-width: 320px;"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
@ -227,7 +237,7 @@
|
||||
<el-button
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="deleteDialogItem(scope.row,scope.$index)"
|
||||
@click="deleteDialogItem(scope.row, scope.$index)"
|
||||
style="margin-right: 10px"
|
||||
>删除</el-button
|
||||
>
|
||||
@ -377,8 +387,8 @@ export default {
|
||||
this.getEnterpriseListFn();
|
||||
},
|
||||
// 删除弹窗数据
|
||||
deleteDialogItem(obj,index) {
|
||||
if(obj.id){
|
||||
deleteDialogItem(obj, index) {
|
||||
if (obj.id) {
|
||||
this.$confirm("请确认是否删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
@ -407,7 +417,7 @@ export default {
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.dialogPushList.splice(index,1)
|
||||
this.dialogPushList.splice(index, 1);
|
||||
}
|
||||
},
|
||||
// 切换弹窗保存
|
||||
@ -416,6 +426,17 @@ export default {
|
||||
...obj,
|
||||
watchConfigId: this.rowObj.id,
|
||||
};
|
||||
if (
|
||||
!requestData.enterpriseId ||
|
||||
!requestData.userId ||
|
||||
!requestData.userId.length
|
||||
) {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "请完整填写数据",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (requestData.userId) {
|
||||
requestData.userId = requestData.userId.join(",");
|
||||
}
|
||||
@ -518,6 +539,7 @@ export default {
|
||||
let that = this;
|
||||
let requestData = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
watchConfigId: this.rowObj.id,
|
||||
};
|
||||
// if (this.timeRange && this.timeRange.length > 0) {
|
||||
// requestData.alarmTime_begin = this.timeRange[0];
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
$store.state.userInfo.account
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'头像'" prop="loginLogo">
|
||||
<el-form-item :label="'头像'" prop="avatar">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:action="$store.state.UPLOADURL"
|
||||
@ -22,11 +22,18 @@
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<img
|
||||
<!-- <img
|
||||
v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar"
|
||||
/>
|
||||
/> -->
|
||||
<el-image v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar">
|
||||
<div slot="error" class="image-slot">
|
||||
<el-avatar size="large" icon="el-icon-user-solid"></el-avatar>
|
||||
</div>
|
||||
</el-image>
|
||||
<div class="avatar-uploader-icon" v-else>
|
||||
<i class="el-icon-plus icon-item"></i>
|
||||
<span>上传头像</span>
|
||||
@ -39,6 +46,12 @@
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别:" prop="sex">
|
||||
<el-radio-group v-model="ruleForm.sex">
|
||||
<el-radio :label="1">男</el-radio>
|
||||
<el-radio :label="2">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱:" prop="personMail">
|
||||
<el-input
|
||||
v-model="ruleForm.personMail"
|
||||
@ -84,10 +97,33 @@ export default {
|
||||
realName: "",
|
||||
personMail: "",
|
||||
userTel: "",
|
||||
sex: 1,
|
||||
},
|
||||
rules: {
|
||||
avatar: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
realName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sex: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
personMail: [
|
||||
{
|
||||
required: true,
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱格式",
|
||||
trigger: "blur",
|
||||
@ -95,11 +131,12 @@ export default {
|
||||
],
|
||||
userTel: [
|
||||
{
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur',
|
||||
pattern: /^1(3|4|5|6|7|8|9)\d{9}$/
|
||||
}
|
||||
]
|
||||
required: true,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
pattern: /^1(3|4|5|6|7|8|9)\d{9}$/,
|
||||
},
|
||||
],
|
||||
},
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
@ -121,16 +158,18 @@ export default {
|
||||
});
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
// const isJPG = file.type === "image/jpeg";
|
||||
const isImage = file.type.indexOf("image/");
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
// if (!isJPG) {
|
||||
// this.$message.error("上传头像图片只能是 JPG 格式!");
|
||||
// }
|
||||
if (isImage == -1) {
|
||||
this.$message.error("上传头像只能是图片格式!");
|
||||
return false;
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||
return false;
|
||||
}
|
||||
return isLt2M;
|
||||
return true;
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.ruleForm.avatar = res.data[0].imageUrl;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user