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