Squashed commit of the following:

commit c2c2b1739bed0cf47aa2f3bae6c035704d47a121
Author: 严妍 <3096114695@qq.com>
Date:   Thu Jul 6 21:47:47 2023 +0800

    fix: 验收汇总73个BUG以及优化点修改
This commit is contained in:
严妍 2023-07-06 21:53:07 +08:00
parent 0b3c8ac814
commit 555847aa78
20 changed files with 270 additions and 103 deletions

View File

@ -23,7 +23,7 @@ export default {
add: '新增电箱设备',
},
rules: {devName: '请输入设备名称'},
isClosedArr: ['在线', '离线'],
isClosedArr: ['离线', '在线'],
voltageA: 'A相相电压阈值',
voltageB: 'B相相电压阈值',
voltageC: 'C相相电压阈值',

View File

@ -51,7 +51,7 @@
data() {
return {
options: {
target: this.$http.defaults.baseURL+'filetransfer/uploadfile', // URL
target: this.$http.defaults.baseURL+'/filetransfer/uploadfile', // URL
chunkSize: 1024 * 1024,
fileParameterName: 'file',
maxChunkRetries: 3,
@ -116,6 +116,7 @@
},
//
onFileSuccess(rootFile, file, response, chunk){
console.log('上传成功')
if (response == "") {
this.statusSet(file.id, 'failed');
return
@ -130,12 +131,13 @@
this.$EventBus.$emit('refreshList', "")
this.$EventBus.$emit('refreshStorage', "")
} else {
this.$message.error(result.errorMessage)
this.$message.error(result.message)
this.statusSet(file.id, 'failed');
}
console.log(chunk)
},
onFileError(rootFile, file, response, chunk) {
console.log('上传失败')
this.$message({
message: response,
type: 'error'

View File

@ -292,10 +292,10 @@ export default {
// mqtt +"/#" +workerId
client.on('connect', e => {
console.log('连接成功:', this.topicName + this.userId)
// console.log(':', this.topicName + this.userId)
client.subscribe(this.topicName + this.userId, { qos: 0 }, error => {
if (!error) {
console.log('订阅成功')
// console.log('')
} else {
console.log('订阅失败')
}

View File

@ -25,12 +25,12 @@
align="center"
></el-table-column>
<el-table-column
prop="gateStatus"
prop="online"
:label="$t('message.alarmValueSet.isClosed')"
align="center"
>
<template slot-scope="scope">{{
$t('message.deviceManage.isClosedArr')[scope.row.gateStatus - 1]
$t('message.deviceManage.isClosedArr')[scope.row.online] || '离线'
}}</template>
</el-table-column>
<el-table-column
@ -102,13 +102,13 @@
</el-form-item> -->
<el-form-item
:label="$t('message.alarmValueSet.dialog_edit.isEnable')"
prop="isEnable"
prop="online"
>
<el-radio-group v-model="addEditForm.isEnable">
<el-radio :label="0">{{
<el-radio-group v-model="addEditForm.online">
<el-radio :label="1">{{
$t('message.alarmValueSet.dialog_edit.isEnableArr')[0]
}}</el-radio>
<el-radio :label="1">{{
<el-radio :label="0">{{
$t('message.alarmValueSet.dialog_edit.isEnableArr')[1]
}}</el-radio>
</el-radio-group>

View File

@ -29,9 +29,9 @@
:label="$t('message.alarmValueSet.isClosed')"
align="center"
>
<template slot-scope="scope">{{
$t('message.deviceManage.isClosedArr')[scope.row.online - 1]
}}</template>
<template slot-scope="scope">
{{$t('message.deviceManage.isClosedArr')[scope.row.online]}}
</template>
</el-table-column>
<el-table-column
prop="waterPosition"
@ -100,11 +100,11 @@
:label="$t('message.alarmValueSet.dialog_edit.isEnable')"
prop="isEnable"
>
<el-radio-group v-model="addEditForm.isEnable">
<el-radio :label="0">{{
<el-radio-group v-model="addEditForm.online">
<el-radio :label="1">{{
$t('message.alarmValueSet.dialog_edit.isEnableArr')[0]
}}</el-radio>
<el-radio :label="1">{{
<el-radio :label="0">{{
$t('message.alarmValueSet.dialog_edit.isEnableArr')[1]
}}</el-radio>
</el-radio-group>

View File

@ -890,13 +890,13 @@ export default {
mqttMSG() {
// mqtt +"/#" +workerId
client.on('connect', (e) => {
console.log('连接成功:', this.topicName + this.$store.state.projectSn)
// console.log(':', this.topicName + this.$store.state.projectSn)
client.subscribe(
this.topicName + this.$store.state.projectSn,
{ qos: 0 },
(error) => {
if (!error) {
console.log('订阅成功')
// console.log('')
} else {
console.log('订阅失败')
}

View File

@ -709,13 +709,13 @@ export default {
mqttMSG() {
// mqtt +"/#" +workerId
client.on('connect', (e) => {
console.log('连接成功:', this.topicName + this.$store.state.projectSn)
// console.log(':', this.topicName + this.$store.state.projectSn)
client.subscribe(
this.topicName + this.$store.state.projectSn,
{ qos: 0 },
(error) => {
if (!error) {
console.log('订阅成功')
// console.log('')
} else {
console.log('订阅失败')
}

View File

@ -849,13 +849,13 @@ export default {
mqttMSG() {
// mqtt +"/#" +workerId
client.on('connect', (e) => {
console.log('连接成功:', this.topicName + this.$store.state.projectSn)
// console.log(':', this.topicName + this.$store.state.projectSn)
client.subscribe(
this.topicName + this.$store.state.projectSn,
{ qos: 0 },
(error) => {
if (!error) {
console.log('订阅成功')
// console.log('')
} else {
console.log('订阅失败')
}

View File

@ -709,13 +709,13 @@ export default {
mqttMSG() {
// mqtt +"/#" +workerId
client.on('connect', (e) => {
console.log('连接成功:', this.topicName + this.$store.state.projectSn)
// console.log(':', this.topicName + this.$store.state.projectSn)
client.subscribe(
this.topicName + this.$store.state.projectSn,
{ qos: 0 },
(error) => {
if (!error) {
console.log('订阅成功')
// console.log('')
} else {
console.log('订阅失败')
}

View File

@ -446,9 +446,12 @@ export default {
if (this.isAdd) {
if (this.addBuildForm.modelUrl == "") {
//
console.log('this.addBuildForm.modelUrl',this.addBuildForm.modelUrl)
this.$message.error(
this.$t("message.BIMmanage.pleaseChooseFile")
);
return
} else {
this.uploadParams.modelName = this.addBuildForm.modelName;
this.uploadParams.projectSn = this.$store.state.projectSn;

View File

@ -501,11 +501,11 @@ export default {
roleName: "",
roleDesc: "",
projectSn: "",
seeEquipment: 1
seeEquipment: "0"
};
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate();
});
// this.$nextTick(() => {
// this.$refs.addEditForm.clearValidate();
// });
},
// SizeChange(val) {
// this.pagInfo.pageSize = val;

View File

@ -2,7 +2,7 @@
<div class="move-dialog-wrapper">
<!-- 移动文件-选择目录模态框 -->
<!-- 选择目录 -->
<el-dialog :title="$t('message.fileManage.chooseCatalogue')" :visible.sync="dialogMoveFile.visible">
<el-dialog :title="$t('message.fileManage.chooseCatalogue')" :visible.sync="dialogMoveFile.visible" :modal-append-to-body="false" >
<div class="el-dialog-div">
<el-tree
:modal-append-to-body="false"

View File

@ -167,6 +167,9 @@ export default {
upload() {
//
console.log(this.uploadFileData)
// this.$EventBus.$on('refreshList', () => {
// this.$emit('getTableDataByType')
// })
this.$EventBus.$emit('openUploader', this.uploadFileData)
},
//
@ -178,10 +181,10 @@ export default {
inputErrorMessage: '请输入文件夹名称!'
}).then(({ value }) => {
this.createFile(value)
this.$message({
type: 'success',
message: '新增成功'
});
// this.$message({
// type: 'success',
// message: ''
// });
}).catch(() => {
this.$message({

View File

@ -409,6 +409,12 @@ export default {
components: {},
data() {
return {
workTypeOption: null,
chockInOption: null,
classGroupOption: null,
modeType: null,
showMenu: true,
visible: false,
left: 0,
@ -475,20 +481,97 @@ export default {
created() {
//
// this.initLED()
// this.getChockList()
// this.getWorkTypeList()
// this.getClassGroupList()
this.getChockList()
this.getWorkTypeList()
this.getClassGroupList()
this.getLargeScreenList()
},
methods: {
getModelData(e) {
if(e == 1) {
return this.workTypeOption
}
else if(e == 2) {
return this.classGroupOption
}
else if(e == 3) {
return this.chockInOption
}
else {
return null
}
},
getLargeScreenList() {
let data = {}
let data = {
projectSn: this.$store.state.projectSn,
}
getLEDList(data).then((res) => {
console.log('LED',res)
let ledData = res.result.ledBigScreenRegions.map((item,index) => {
return {
col: item.customColumnNum,//col
row: item.customRowNum, //row
modelData: this.getModelData(item.dataModule), // modelData
modeType : item.dataModule,
fontSize: item.fontSize, //fontSize
value: item.regionContent, //value
height: item.regionHeight, //height
direction: item.regionScrollEffect, //type
animationTime: item.scrollDuration, //animationTime
type: item.type
}
})
this.boxHeight = res.result.high,
this.boxWidth = res.result.wide,
this.LEDContentList = ledData,
console.log('LED',ledData)
});
},
saveLargeScreenList() {
console.log('LEDTYPE',this.LEDContentList)
let ledData = this.LEDContentList.map((item,index)=>
{
return {
customColumnNum: item.col,//col
customRowNum: item.row, //row
dataModule: item.modeType, // modelData
fontSize: item.fontSize, //fontSize
regionContent: item.value, //value
regionHeight: item.height, //height
regionScrollEffect: item.direction, //type
scrollDuration: item.animationTime, //animationTime
type: item.type
}
})
let data = {
high: this.boxHeight - 0,
wide: this.boxWidth - 0,
projectSn: this.$store.state.projectSn,
ledBigScreenRegions: ledData,
// id: 0,
// ledBigScreenRegions: [
// {
// createTime: "",
// customColumnNum: 0,
// customRowNum: 0,
// dataModule: 0,
// fontSize: 0,
// id: 0,
// ledBigScreenId: 0,
// projectSn: "",
// regionContent: "",
// regionHeight: 0,
// regionScrollEffect: 0,
// scrollDuration: 0,
// updateTime: ""
// }
// ],
}
console.log('LED',data)
saveLEDList(data).then((res) => {
console.log('LED',res)
});
@ -496,27 +579,74 @@ export default {
getChockList() {
let data = {
projectSn: '',
projectSn: this.$store.state.projectSn,
}
getChockingList(data).then((res) => {
console.log('考勤',res)
let data = res.result.personType.toaltPerson
this.chockInOption = [
{
name:'管理人员人数',
num:data.glPersonTotal,
},
{
name:'临时工人数',
num:data.lsPersonTotal,
},
{
name:'劳务工人数',
num:data.lwPersonTotal,
},
{
name:'总人数',
num:data.totalPerson,
},
// {
// name:'',
// num:data.total_team_num,
// },
]
// let arr = res.result.map((item,index)=>
// {
// return {
// name: item.typeName,
// num: item.num
// }
// })
// this.OptionchockInOption = arr
console.log('考勤',this.chockInOption)
});
},
getWorkTypeList() {
let data = {
projectSn: '',
projectSn: this.$store.state.projectSn,
}
getWorkList(data).then((res) => {
console.log('工种',res)
let arr = res.result.map((item,index)=>
{
return {
name: item.typeName,
num: item.num
}
})
this.workTypeOption = arr
console.log('工种',arr)
});
},
getClassGroupList() {
let data = {
projectSn: '',
projectSn: this.$store.state.projectSn,
}
getClassGroupList(data).then((res) => {
console.log('班组',res)
let arr = res.result.map((item,index)=>
{
return {
name: item.name,
num: item.totalPerson
}
})
this.classGroupOption = arr
console.log('班组',arr)
});
},
@ -566,6 +696,7 @@ export default {
},
saveLED() {
this.saveLargeScreenList()
console.log('打印LED',this.LEDContentList)
},
@ -771,46 +902,34 @@ export default {
this.LEDContentList.splice(val, 1);
},
checkModel(val, type) {
val.modeType = type;
val.modelData = [
{
name: "木工班组",
num: "22",
},
{
name: "木工班组",
num: "23",
},
{
name: "木工班组",
num: "24",
},
{
name: "木工班组",
num: "25",
},
{
name: "木工班组",
num: "26",
},
{
name: "木工班组",
num: "27",
},
{
name: "木工班组",
num: "28",
},
{
name: "木工班组",
num: "29",
},
{
name: "木工班组",
num: "30",
},
];
console.log(val);
// val.modeType = type;
// console.log(type)
// val.modelData = [
// {
// name: "",
// num: "22",
// },
// {
// name: "",
// num: "23",
// },
// ];
// console.log(val);
// console.log('',this.workTypeOption)
// console.log('',this.classGroupOption)
if(type == 1) {
val.modeType = type;
val.modelData = this.workTypeOption
}
if(type == 2) {
val.modeType = type;
val.modelData = this.classGroupOption
}
if(type == 3) {
val.modeType = type;
val.modelData = this.chockInOption
}
},
},
};
@ -1189,14 +1308,21 @@ export default {
// from { right: 100%; }
// to { left: 100%; }
0% {
transform: translateX(0px);
-webkit-transform: translateX(0px);
}
100% {
transform: translateX(-100%);
-webkit-transform: translateX(-100%);
}
100% {
transform: translateX(100%);
-webkit-transform: translateX(100%);
}
// 0% {
// transform: translateX(-100%);
// -webkit-transform: translateX(-100%);
// }
// 100% {
// transform: translateX(0px);
// -webkit-transform: translateX(0px);
// }
}
@-webkit-keyframes wordsLoop2 {

View File

@ -572,13 +572,13 @@ export default {
mqttMSG() {
// mqtt +"/#" +workerId
client2.on('connect', (e) => {
console.log('连接成功:', this.topicName + this.$store.state.projectSn)
// console.log(':', this.topicName + this.$store.state.projectSn)
client2.subscribe(
this.topicName + this.$store.state.projectSn,
{ qos: 0 },
(error) => {
if (!error) {
console.log('订阅成功')
// console.log('')
} else {
console.log('订阅失败')
}

View File

@ -290,6 +290,7 @@
@input="transformFn"
v-model="dialogForm.finePrice"
type="number"
oninput="if(value.length>12)value=value.slice(0,12)"
>
</el-input>
<span v-else>{{ dialogForm.finePrice }}</span>
@ -325,6 +326,7 @@
name="files"
:file-list="fileList"
style="width: 100%"
limit="3"
>
<el-button size="small" type="primary">{{
$t("message.laborMange.clickOnTheUpload")
@ -456,7 +458,8 @@ export default {
created() {
this.projectSn = this.$store.state.projectSn;
this.projectName = this.$store.state.currentProDetail.projectName;
this.uploadUrl = this.$store.state.UPLOADURL;
this.uploadUrl = 'http://192.168.34.221:8079/upload/image';
console.log(this.$store.state,'文件服务')
this.fileUrl = this.$store.state.FILEURL;
this.selectData();
},

View File

@ -295,7 +295,7 @@
</el-col>
</el-row>
<!-- <el-row :gutter="24">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="开户行" prop="payRollBankName">
<el-input
@ -319,7 +319,7 @@
<span v-else>{{ workerInfo.payRollBankNumber }}</span>
</el-form-item>
</el-col>
</el-row> -->
</el-row>
<el-row :gutter="24">
<el-col :span="12">
@ -1416,7 +1416,7 @@
v-model="scope.row.personHeight"
:placeholder="$t('message.laborMange.placeholder2')"
type="number"
oninput="if(value.length>3)value=value.slice(0,3)"
oninput="if(value < 0) value = ''; if(value.length>3)value=value.slice(0,3)"
></el-input>
<span v-else>{{ scope.row.personHeight }}</span>
</template>
@ -1432,7 +1432,7 @@
v-model="scope.row.personWeight"
:placeholder="$t('message.laborMange.placeholder2')"
type="number"
oninput="if(value.length>3)value=value.slice(0,3)"
oninput="if(value < 0) value = ''; if(value.length>3)value=value.slice(0,3)"
></el-input>
<span v-else>{{ scope.row.personWeight }}</span>
</template>
@ -2926,8 +2926,11 @@ export default {
},
//-----
cancelEditTableInfo(type, index) {
//type == 1 2 3 4 5 6
let data = JSON.parse(JSON.stringify(this.originalData));
// console.log('',index,this.physicalsList)
if (type == 1) {
//
if (data.certificateList.length > 0) {
@ -2941,7 +2944,8 @@ export default {
}
});
}
this.certificateList = data.certificateList;
this.certificateList.splice(index, 1)
// rows.splice(index, 1);
} else if (type == 2) {
//
if (data.physicalsList.length > 0) {
@ -2949,7 +2953,7 @@ export default {
item.physicalState = false; //
});
}
this.physicalsList = data.physicalsList;
this.physicalsList.splice(index, 1)
} else if (type == 3) {
//
if (data.insuranceList.length > 0) {
@ -2957,7 +2961,7 @@ export default {
item.insuranceState = false; //
});
}
this.insuranceList = data.insuranceList;
this.insuranceList.splice(index, 1)
} else if (type == 4) {
//
if (data.contractList.length > 0) {
@ -2990,8 +2994,17 @@ export default {
saveTableInfo(type, index) {
//type == 1 2 3
if (type == 1) {
let date1_s=this.certificateList[index].effectTime.replace(/\-/g,'/')
let date2_s=this.certificateList[index].issueTime.replace(/\-/g,'/')
let date1_unix=Date.parse(date1_s) //1970
let date2_unix=Date.parse(date2_s) //1970
//
console.log('effectTime issueTime',this.certificateList[index].effectTime, this.certificateList[index].issueTime)
if (!this.certificateList[index].id) {
if (date1_unix < date2_unix) {
this.$message.error('开始日期不能大于截止有效期');
return;
}
if (this.certificateList[index].certificateType == "") {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +
@ -2999,6 +3012,8 @@ export default {
);
return;
}
addCertificateApi(this.certificateList[index]).then((res) => {
if (res.code == 200) {
this.certificateList[index].certificateState = false;
@ -3019,7 +3034,9 @@ export default {
}
});
}
} else if (type == 2) {
}
else if (type == 2) {
if (this.physicalsList[index].personHeight == "") {
this.$message.error(
this.$t("message.laborMange.placeholder2") +
@ -3050,6 +3067,16 @@ export default {
});
}
} else if (type == 3) {
let date1_s=this.insuranceList[index].insuranceTime.replace(/\-/g,'/')
let date2_s=this.insuranceList[index].expireTime.replace(/\-/g,'/')
let date1_unix=Date.parse(date1_s) //1970
let date2_unix=Date.parse(date2_s) //1970
console.log('日期',date1_unix,date2_unix)
if (date1_unix > date2_unix) {
this.$message.error('到期日期不能大于购买日期');
return;
}
if (this.insuranceList[index].state == "") {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +

View File

@ -2028,7 +2028,7 @@ export default {
exportM() {
window.location.href =
this.$http.defaults.baseURL +
'xmgl/download/exporExcelWorkerTemplate?projectSn=' +
'/xmgl/download/exporExcelWorkerTemplate?projectSn=' +
this.projectSn
},
//

View File

@ -2301,7 +2301,7 @@ export default {
exportM() {
window.location.href =
this.$http.defaults.baseURL +
'xmgl/download/exporExcelWorkerTemplate?projectSn=' +
'/xmgl/download/exporExcelWorkerTemplate?projectSn=' +
this.projectSn
},
//

View File

@ -372,6 +372,9 @@
class="tableInput"
v-model="scope.row.score"
:placeholder="$t('message.personnelPosition.please_enter')"
onkeyup="if(isNaN(value))execCommand('undo')"
onafterpaste="if(isNaN(value))execCommand('undo')"
oninput="if(value > 100) value = 100; if(value < 0 || value == '' || value == null) value = ''; if(value.length>3)value=value.slice(0,3);"
></el-input>
</template>
</el-table-column>