From bcf0f349d1ad6dda474508f73d8d5fb412d6b27d Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Tue, 28 May 2024 17:51:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/style/table.css | 52 ++ src/assets/style/table.less | 1 + .../aiAnalysis/dealPushManage.vue | 541 +++++++++++------- .../projectFront/configManage/roleManage.vue | 3 +- .../laborManage/assessmentCentent.vue | 6 +- .../projectFront/laborManage/penalize.vue | 2 +- .../progressManagementAg/progressApproval.vue | 4 +- .../criterionModule/qualityProblemBank.vue | 2 + .../safeSame/inspectionLedger.vue | 4 +- .../recordsModule/inspectionRecord.vue | 4 +- 10 files changed, 386 insertions(+), 233 deletions(-) create mode 100644 src/assets/style/table.css diff --git a/src/assets/style/table.css b/src/assets/style/table.css new file mode 100644 index 00000000..625c17ea --- /dev/null +++ b/src/assets/style/table.css @@ -0,0 +1,52 @@ +.tables { + min-height: 550px; + width: 100%; + background-color: transparent; + max-height: calc(100% - 98px); + overflow: auto; +} +.tables.el-table td { + border-bottom: none; +} +.tables.el-table::before { + display: none; +} +.tables.el-table th { + padding: 8px 0; +} +.tables.el-table td { + height: 50px; + padding: 5px; +} +.tables.el-table tr:nth-child(2n-1) td { + background-color: #FBFBFB !important; +} +.tables .el-table__body tr.current-row > td { + background: rgba(0, 122, 255, 0.1); +} +.el-table { + background-color: transparent; +} +.tableBtns { + display: flex; + align-items: center; + justify-content: center; +} +.tableBtns .operationText { + display: inline-flex; + margin-right: 30px; +} +.tableBtns .operationText:last-child { + margin-right: 0; +} +.operation-style { + display: flex; + align-items: center; + justify-content: center; +} +.operation-style .operationText:not(:last-child) { + margin-right: 10px; +} +.el-table--enable-row-hover .el-table__body tr:hover > td { + background-color: rgba(85, 129, 255, 0.2) !important; +} diff --git a/src/assets/style/table.less b/src/assets/style/table.less index 242481ca..c3fb8bb5 100644 --- a/src/assets/style/table.less +++ b/src/assets/style/table.less @@ -35,6 +35,7 @@ .tableBtns{ display: flex; align-items: center; + justify-content: center; .operationText{ display: inline-flex; margin-right: 30px; diff --git a/src/views/projectFront/aiAnalysis/dealPushManage.vue b/src/views/projectFront/aiAnalysis/dealPushManage.vue index 4f227bdb..c936a782 100644 --- a/src/views/projectFront/aiAnalysis/dealPushManage.vue +++ b/src/views/projectFront/aiAnalysis/dealPushManage.vue @@ -2,18 +2,23 @@
-

{{ $t('message.sixComplete.carDense.noWarn') }}

+

{{ $t("message.sixComplete.carDense.noWarn") }}

- +
- + - - - + + + + - - + +
@@ -210,24 +310,25 @@ import { aiAnalyseHardWareAlarmRecordApi, aiAnalyseHardWareAlarmRecordEdit, - getViolatorList -} from '@/assets/js/api/equipmentCenter/electricBox' + getViolatorList, +} from "@/assets/js/api/equipmentCenter/electricBox"; import { getAlarmDealPageApi, violationPushDataApi, - PositiveDeletionDataApi -} from '@/assets/js/api/electricBox' -import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js' -import { getWorkerInfoList, selectHierarchyEnterpriseListApi } from '@/assets/js/api/laborPerson.js' + PositiveDeletionDataApi, +} from "@/assets/js/api/electricBox"; +import { getDictionaryItemApi } from "@/assets/js/api/companyDiagram.js"; import { - getQualityRegionListApi -} from '@/assets/js/api/quality.js' + getWorkerInfoList, + selectHierarchyEnterpriseListApi, +} from "@/assets/js/api/laborPerson.js"; +import { getQualityRegionListApi } from "@/assets/js/api/quality.js"; export default { data() { return { handleResultStatus: [ - {name: '未处置', value: false}, - {name: '已处置', value: true} + { name: "未处置", value: false }, + { name: "已处置", value: true }, ], // 对应的字段 defaultProps: { @@ -245,78 +346,75 @@ export default { selectVal: "", selectEnterpriseVal: "", isDetail: false, - pageType: 'list', + pageType: "list", workerList: [], pageInfo: { pageNo: 1, //页数 pageSize: 10, //条数 - total: 0 //总条数 + total: 0, //总条数 }, - itemId: '', + itemId: "", formInline: { - alarmType: '', + alarmType: "", handleDone: "", - endTime: '', - startTime: '', - hardwareId: '', - qualityRegionId: '', - enterpriseId: '' + endTime: "", + startTime: "", + hardwareId: "", + qualityRegionId: "", + enterpriseId: "", }, dateRangeArr: [], alarmTypeArrList: [], recordShow: false, addEditForm: { workerInfoList: [], - handleResult: '', - dutyId: '', - desc: '', - deductScore: 0 + handleResult: "", + dutyId: "", + desc: "", + deductScore: 0, }, addEditRules: { dutyId: [ { required: true, - message: '请选择', - trigger: 'change' - } + message: "请选择", + trigger: "change", + }, ], handleResult: [ { required: true, - message: '必填', - trigger: 'blur' - } - ] + message: "必填", + trigger: "blur", + }, + ], }, workerListOptions: [], - selectList: [] - } + selectList: [], + }; }, mounted() { - this.selectNowDate() - this.getList() - this.getDictionaryList() - this.getDutyPerson() + this.selectNowDate(); + this.getList(); + this.getDictionaryList(); + this.getDutyPerson(); this.getPositionList(); this.getTreeList(); }, methods: { pushAlarm(obj) { console.log("删除", obj); - this.$confirm("确定进行此操作吗?", + this.$confirm( + "确定进行此操作吗?", this.$t("message.personnelPosition.beaconManage.table.Tips"), { - confirmButtonText: this.$t( - "message.personnelPosition.confirmButtonText" - ), - cancelButtonText: this.$t( - "message.personnelPosition.cancelButtonText" - ), - type: "warning" + confirmButtonText: this.$t("message.personnelPosition.confirmButtonText"), + cancelButtonText: this.$t("message.personnelPosition.cancelButtonText"), + type: "warning", } ) .then(() => { - violationPushDataApi({ id: obj.id }).then(result => { + violationPushDataApi({ id: obj.id }).then((result) => { if (result.success) { this.$message.success(result.message); this.getList(); @@ -327,20 +425,17 @@ export default { }, deleteDev(obj) { console.log("删除", obj); - this.$confirm("确定进行此操作吗?", + this.$confirm( + "确定进行此操作吗?", this.$t("message.personnelPosition.beaconManage.table.Tips"), { - confirmButtonText: this.$t( - "message.personnelPosition.confirmButtonText" - ), - cancelButtonText: this.$t( - "message.personnelPosition.cancelButtonText" - ), - type: "warning" + confirmButtonText: this.$t("message.personnelPosition.confirmButtonText"), + cancelButtonText: this.$t("message.personnelPosition.cancelButtonText"), + type: "warning", } ) .then(() => { - PositiveDeletionDataApi({ id: obj.id }).then(result => { + PositiveDeletionDataApi({ id: obj.id }).then((result) => { if (result.success) { this.$message.success(result.message); this.getList(); @@ -372,15 +467,15 @@ export default { //获取承包商/厂区 getPositionList() { let data = { - projectSn: this.$store.state.projectSn - } + projectSn: this.$store.state.projectSn, + }; getQualityRegionListApi(data).then((res) => { - console.log('res=================', res); + console.log("res=================", res); if (res.code == 200) { - this.areaList = res.result - console.log(this.areaList,135456) + this.areaList = res.result; + console.log(this.areaList, 135456); } - }) + }); }, selectChange(val) { console.log(val, 123); @@ -390,7 +485,7 @@ export default { this.formInline.qualityRegionId = ""; } }, - selectEnterpriseChange(val){ + selectEnterpriseChange(val) { console.log(val, 123); if (!val) { this.selectEnterpriseVal = ""; @@ -413,102 +508,102 @@ export default { dutySelectChange(e) { // const item = this.dutyList.find(item => item.userId === e) // this.addEditForm.dutyUserName = item.realName - const newArray = e.map(item => ({ id: item })) - this.addEditForm.workerInfoList = newArray - console.log('下拉选择', newArray) + const newArray = e.map((item) => ({ id: item })); + this.addEditForm.workerInfoList = newArray; + console.log("下拉选择", newArray); }, close() { - this.addEditForm = {} - this.selectList = [] - this.isDetail = false + this.addEditForm = {}; + this.selectList = []; + this.isDetail = false; this.$nextTick(() => { - this.$refs.addEditForm.clearValidate() - }) + this.$refs.addEditForm.clearValidate(); + }); }, //查询选择人员下拉 getPersonDetail(itemId) { let data = { projectSn: this.$store.state.projectSn, - aiAnalyseHardWareAlarmRecordId: itemId - } - getViolatorList(data).then(res => { + aiAnalyseHardWareAlarmRecordId: itemId, + }; + getViolatorList(data).then((res) => { if (res.code == 200) { - this.selectList = res.result.map(items => items.id) - console.log('回显选择人员', this.selectList) + this.selectList = res.result.map((items) => items.id); + console.log("回显选择人员", this.selectList); } else { - this.$message.error(res.message) + this.$message.error(res.message); } - }) + }); }, //查询选择人员下拉 getDutyPerson() { let data = { projectSn: this.$store.state.projectSn, - isFilterQualityRegionEnterprise: 1 - } - getWorkerInfoList(data).then(res => { + isFilterQualityRegionEnterprise: 1, + }; + getWorkerInfoList(data).then((res) => { if (res.code == 200) { - this.workerListOptions = res.result.records - console.log('获取施工人员下拉', this.workerListOptions) + this.workerListOptions = res.result.records; + console.log("获取施工人员下拉", this.workerListOptions); } else { - this.$message.error(res.message) + this.$message.error(res.message); } - }) + }); }, // 打开处置弹窗 openDialog(item) { - this.recordShow = true - this.addEditForm = JSON.parse(JSON.stringify(item)) - this.getPersonDetail(item.id) - console.log('打开处置弹窗', item) + this.recordShow = true; + this.addEditForm = JSON.parse(JSON.stringify(item)); + this.getPersonDetail(item.id); + console.log("打开处置弹窗", item); }, // 打开 详情处置弹窗 openDialogDetail(item) { - this.recordShow = true - this.isDetail = true - this.addEditForm = JSON.parse(JSON.stringify(item)) - this.getPersonDetail(item.id) - console.log('打开处置弹窗', item) + this.recordShow = true; + this.isDetail = true; + this.addEditForm = JSON.parse(JSON.stringify(item)); + this.getPersonDetail(item.id); + console.log("打开处置弹窗", item); }, // 保存 addBtn() { - let params = JSON.parse(JSON.stringify(this.addEditForm)) - params.projectSn = this.$store.state.projectSn - if(this.addEditForm.handleResult == 1){ + let params = JSON.parse(JSON.stringify(this.addEditForm)); + params.projectSn = this.$store.state.projectSn; + if (this.addEditForm.handleResult == 1) { params.handleDone = true; } - this.$refs.addEditForm.validate(valid => { + this.$refs.addEditForm.validate((valid) => { if (valid) { - console.log('保存', params) - aiAnalyseHardWareAlarmRecordEdit(params).then(result => { + console.log("保存", params); + aiAnalyseHardWareAlarmRecordEdit(params).then((result) => { if (result.success) { - this.$message.success(result.message) - this.getList() - this.recordShow = false + this.$message.success(result.message); + this.getList(); + this.recordShow = false; } - }) + }); } else { - return false + return false; } - }) + }); }, //获取字典施工阶段 getDictionaryList() { getDictionaryItemApi({ - dictionaryEncoding: 'ai_analyse_hard_ware_alarm_record_type', - projectSn: this.$store.state.projectSn - }).then(res => { + dictionaryEncoding: "ai_analyse_hard_ware_alarm_record_type", + projectSn: this.$store.state.projectSn, + }).then((res) => { if (res.result.length > 0) { - console.log('获取字典施工阶段', res.result) - this.alarmTypeArrList = res.result + console.log("获取字典施工阶段", res.result); + this.alarmTypeArrList = res.result; } - }) + }); }, // 获取当前时间 返回YYYY-MM-DD HH:mm:ss selectNowDate() { @@ -518,47 +613,47 @@ export default { day = date.getDate(), hours = date.getHours(), //获取当前小时数(0-23) minutes = date.getMinutes(), //获取当前分钟数(0-59) - seconds = date.getSeconds() - month >= 1 && month <= 9 ? (month = '0' + month) : '' - day >= 0 && day <= 9 ? (day = '0' + day) : '' - hours >= 0 && hours <= 9 ? (hours = '0' + hours) : '' - minutes >= 0 && minutes <= 9 ? (minutes = '0' + minutes) : '' - seconds >= 0 && seconds <= 9 ? (seconds = '0' + seconds) : '' + seconds = date.getSeconds(); + month >= 1 && month <= 9 ? (month = "0" + month) : ""; + day >= 0 && day <= 9 ? (day = "0" + day) : ""; + hours >= 0 && hours <= 9 ? (hours = "0" + hours) : ""; + minutes >= 0 && minutes <= 9 ? (minutes = "0" + minutes) : ""; + seconds >= 0 && seconds <= 9 ? (seconds = "0" + seconds) : ""; // var timer = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds // 获取至当前的时间 - var timer = year + '-' + month + '-' + day + ' ' + '23:59:59' - var timer2 = year + '-' + month + '-' + day + ' ' + '00:00:00' - this.dateRangeArr = [timer2, timer] - this.formInline.startTime = this.dateRangeArr[0] - this.formInline.endTime = this.dateRangeArr[1] - console.log(timer) + var timer = year + "-" + month + "-" + day + " " + "23:59:59"; + var timer2 = year + "-" + month + "-" + day + " " + "00:00:00"; + this.dateRangeArr = [timer2, timer]; + this.formInline.startTime = this.dateRangeArr[0]; + this.formInline.endTime = this.dateRangeArr[1]; + console.log(timer); // return timer; }, getTypeName(val) { - let text = '' - this.alarmTypeArrList.forEach(item => { + let text = ""; + this.alarmTypeArrList.forEach((item) => { if (item.data == val) { - text = item.name + text = item.name; } - }) - return text + }); + return text; }, changeTime() { if (this.dateRangeArr) { - this.formInline.startTime = this.dateRangeArr[0] - this.formInline.endTime = this.dateRangeArr[1] + this.formInline.startTime = this.dateRangeArr[0]; + this.formInline.endTime = this.dateRangeArr[1]; } else { - this.formInline.startTime = '' - this.formInline.endTime = '' + this.formInline.startTime = ""; + this.formInline.endTime = ""; } }, refresh() { - this.pageInfo.pageNo = 1 - this.formInline.hardwareId = '' - this.formInline.startTime = '' - this.formInline.endTime = '' - this.formInline.alarmType = '' - this.formInline.handleDone = "" - this.dateRangeArr = [] + this.pageInfo.pageNo = 1; + this.formInline.hardwareId = ""; + this.formInline.startTime = ""; + this.formInline.endTime = ""; + this.formInline.alarmType = ""; + this.formInline.handleDone = ""; + this.dateRangeArr = []; // 区域内容清空 this.selectVal = ""; this.areaSelectVal = ""; @@ -566,69 +661,73 @@ export default { // 企业内容情况 this.selectEnterpriseVal = ""; this.formInline.enterpriseId = ""; - this.getList() + this.getList(); }, getList(val) { if (val == 1) { - this.pageInfo.pageNo = 1 + this.pageInfo.pageNo = 1; } - let json = Object.assign(this.pageInfo, this.formInline) - json.projectSn = this.$store.state.projectSn + let json = Object.assign(this.pageInfo, this.formInline); + json.projectSn = this.$store.state.projectSn; json.isPushed = 0; - getAlarmDealPageApi(json).then(res => { - this.workerList = res.result.records - this.pageInfo.total = res.result.total + getAlarmDealPageApi(json).then((res) => { + this.workerList = res.result.records; + this.pageInfo.total = res.result.total; setTimeout(() => { - this.$previewRefresh() - }, 100) - }) + this.$previewRefresh(); + }, 100); + }); }, goBack() { - this.pageType = 'list' - this.getList() + this.pageType = "list"; + this.getList(); }, // addFn() { // this.itemId = ""; // this.pageType = "add"; // }, editBefore(item) { - this.itemId = item.id - this.pageType = 'detail' + this.itemId = item.id; + this.pageType = "detail"; }, deleteBefore(item) { - this.$confirm(this.$t('message.sixComplete.carWash.tipText') + '?', this.$t('message.sixComplete.carWash.tip'), { - confirmButtonText: this.$t('message.sixComplete.carWash.confirm'), - cancelButtonText: this.$t('message.sixComplete.carWash.cancel'), - type: 'warning' - }) + this.$confirm( + this.$t("message.sixComplete.carWash.tipText") + "?", + this.$t("message.sixComplete.carWash.tip"), + { + confirmButtonText: this.$t("message.sixComplete.carWash.confirm"), + cancelButtonText: this.$t("message.sixComplete.carWash.cancel"), + type: "warning", + } + ) .then(() => { - workerSafeEducationDeleteApi({ id: item.id }).then(res => { + workerSafeEducationDeleteApi({ id: item.id }).then((res) => { this.$message({ - type: 'success', - message: this.$t('message.sixComplete.carWash.deleteSuccess') + '!' - }) - this.getList() - }) + type: "success", + message: this.$t("message.sixComplete.carWash.deleteSuccess") + "!", + }); + this.getList(); + }); }) .catch(() => { this.$message({ - type: 'info', - message: this.$t('message.sixComplete.carWash.cancelDelete') - }) - }) + type: "info", + message: this.$t("message.sixComplete.carWash.cancelDelete"), + }); + }); }, SizeChange(val) { - console.log(val) - this.pageInfo.pageSize = val - this.getList() + console.log(val); + this.pageInfo.pageSize = val; + this.getList(); }, CurrentChange(val) { - console.log(val) - this.pageInfo.pageNo = val - this.getList() - } - } -} + console.log(val); + this.pageInfo.pageNo = val; + this.getList(); + }, + }, +}; diff --git a/src/views/projectFront/configManage/roleManage.vue b/src/views/projectFront/configManage/roleManage.vue index 17057ba5..3fbb4be2 100644 --- a/src/views/projectFront/configManage/roleManage.vue +++ b/src/views/projectFront/configManage/roleManage.vue @@ -50,7 +50,8 @@