{
+ // 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({
diff --git a/src/views/projectFront/laborManage/LEDBigScreen/addLED.vue b/src/views/projectFront/laborManage/LEDBigScreen/addLED.vue
index be7300eb..690ba740 100644
--- a/src/views/projectFront/laborManage/LEDBigScreen/addLED.vue
+++ b/src/views/projectFront/laborManage/LEDBigScreen/addLED.vue
@@ -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 {
diff --git a/src/views/projectFront/laborManage/overview.vue b/src/views/projectFront/laborManage/overview.vue
index fa87c620..e6211fa8 100644
--- a/src/views/projectFront/laborManage/overview.vue
+++ b/src/views/projectFront/laborManage/overview.vue
@@ -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('订阅失败')
}
diff --git a/src/views/projectFront/laborManage/penalize.vue b/src/views/projectFront/laborManage/penalize.vue
index 5fb0ba24..682fca02 100644
--- a/src/views/projectFront/laborManage/penalize.vue
+++ b/src/views/projectFront/laborManage/penalize.vue
@@ -290,6 +290,7 @@
@input="transformFn"
v-model="dialogForm.finePrice"
type="number"
+ oninput="if(value.length>12)value=value.slice(0,12)"
>
{{ dialogForm.finePrice }}
@@ -325,6 +326,7 @@
name="files"
:file-list="fileList"
style="width: 100%"
+ limit="3"
>
{{
$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();
},
diff --git a/src/views/projectFront/laborManage/personDetails.vue b/src/views/projectFront/laborManage/personDetails.vue
index 848e5828..9fcd961a 100644
--- a/src/views/projectFront/laborManage/personDetails.vue
+++ b/src/views/projectFront/laborManage/personDetails.vue
@@ -295,7 +295,7 @@
-
+
@@ -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)"
>
{{ scope.row.personHeight }}
@@ -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)"
>
{{ scope.row.personWeight }}
@@ -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") +
diff --git a/src/views/projectFront/laborManage/personModule/administration.vue b/src/views/projectFront/laborManage/personModule/administration.vue
index 8ab80e1f..c374cfa8 100644
--- a/src/views/projectFront/laborManage/personModule/administration.vue
+++ b/src/views/projectFront/laborManage/personModule/administration.vue
@@ -2028,7 +2028,7 @@ export default {
exportM() {
window.location.href =
this.$http.defaults.baseURL +
- 'xmgl/download/exporExcelWorkerTemplate?projectSn=' +
+ '/xmgl/download/exporExcelWorkerTemplate?projectSn=' +
this.projectSn
},
// 下发通行设备
diff --git a/src/views/projectFront/laborManage/personModule/laborComponent.vue b/src/views/projectFront/laborManage/personModule/laborComponent.vue
index 336403e2..19f340a8 100644
--- a/src/views/projectFront/laborManage/personModule/laborComponent.vue
+++ b/src/views/projectFront/laborManage/personModule/laborComponent.vue
@@ -2301,7 +2301,7 @@ export default {
exportM() {
window.location.href =
this.$http.defaults.baseURL +
- 'xmgl/download/exporExcelWorkerTemplate?projectSn=' +
+ '/xmgl/download/exporExcelWorkerTemplate?projectSn=' +
this.projectSn
},
// 下发通行设备
diff --git a/src/views/projectFront/laborManage/safetyTrainManage.vue b/src/views/projectFront/laborManage/safetyTrainManage.vue
index f5c9d198..c4628bdf 100644
--- a/src/views/projectFront/laborManage/safetyTrainManage.vue
+++ b/src/views/projectFront/laborManage/safetyTrainManage.vue
@@ -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);"
>