flx:新增违章再教育页面
This commit is contained in:
parent
15e80902b6
commit
745a187fde
BIN
src/assets/images/equipment_bg_img.png
Normal file
BIN
src/assets/images/equipment_bg_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
@ -35,4 +35,7 @@ export const addConstructionEquipmentCheckApi = data => post('/xmgl/construction
|
|||||||
// 删除施工设备机具安全检查信息
|
// 删除施工设备机具安全检查信息
|
||||||
export const deleteConstructionEquipmentCheckApi = data => post('/xmgl/constructionEquipmentToolCheck/delete', data);
|
export const deleteConstructionEquipmentCheckApi = data => post('/xmgl/constructionEquipmentToolCheck/delete', data);
|
||||||
// 编辑施工设备机具安全检查信息
|
// 编辑施工设备机具安全检查信息
|
||||||
export const editConstructionEquipmentCheckApi = data => post('/xmgl/constructionEquipmentToolCheck/edit', data);
|
export const editConstructionEquipmentCheckApi = data => post('/xmgl/constructionEquipmentToolCheck/edit', data);
|
||||||
|
|
||||||
|
// 批量图片下载
|
||||||
|
export const downloadConstructionEquipmentCheckFileApi = data => post('/xmgl/constructionEquipmentTool/downloadPicInfo', data);
|
||||||
@ -20,4 +20,19 @@ export const aiAnalyseHardWareAlarmRecordAdd = data => post('xmgl/carDangerDetec
|
|||||||
export const aiAnalyseHardWareAlarmRecordEdit = data => post('xmgl/carDangerDetectRecord/edit', data);
|
export const aiAnalyseHardWareAlarmRecordEdit = data => post('xmgl/carDangerDetectRecord/edit', data);
|
||||||
|
|
||||||
// 查询绑定的违章人员列表:
|
// 查询绑定的违章人员列表:
|
||||||
export const getViolatorList = data => post('xmgl/carDangerDetectRecord/getViolatorList', data);
|
export const getViolatorList = data => post('xmgl/carDangerDetectRecord/getViolatorList', data);
|
||||||
|
|
||||||
|
// 违章再教育
|
||||||
|
// 分页列表查询违章再教育信息
|
||||||
|
export const getViolationEducationPageApi = data => get('xmgl/violationReEducation/page', data);
|
||||||
|
// 添加违章再教育信息
|
||||||
|
export const addViolationEducationApi = data => post('xmgl/violationReEducation/add', data);
|
||||||
|
// 编辑违章再教育信息
|
||||||
|
export const editViolationEducationApi = data => post('xmgl/violationReEducation/edit', data);
|
||||||
|
// 删除违章再教育信息
|
||||||
|
export const deleteViolationEducationApi = data => post('xmgl/violationReEducation/delete', data);
|
||||||
|
// 通过id查询违章再教育信息
|
||||||
|
export const getViolationEducationByIdApi = data => post('xmgl/violationReEducation/get', data);
|
||||||
|
|
||||||
|
// 分页列表查询违章再教育的违章详情信息
|
||||||
|
export const getViolationDetailPageApi = data => get('xmgl/violationDetail/page', data);
|
||||||
590
src/views/projectFront/carViolation/violationReeducation.vue
Normal file
590
src/views/projectFront/carViolation/violationReeducation.vue
Normal file
@ -0,0 +1,590 @@
|
|||||||
|
<template>
|
||||||
|
<div class="fullHeight">
|
||||||
|
<div class="searchBox whiteBlock">
|
||||||
|
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
|
||||||
|
<el-form-item label="姓名" prop="workerName">
|
||||||
|
<el-input v-model="searchForm.workerName"
|
||||||
|
:placeholder="$t('message.personnelPosition.please_enter')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="企业名称" prop="enterpriseName">
|
||||||
|
<el-input v-model="searchForm.enterpriseName"
|
||||||
|
:placeholder="$t('message.personnelPosition.please_enter')" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="时间" prop="dateRangeArr">
|
||||||
|
<el-date-picker v-model="searchForm.dateRangeArr" type="datetimerange"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']"
|
||||||
|
:range-separator="$t('message.sixComplete.to')" :start-placeholder="$t('message.sixComplete.start')"
|
||||||
|
:end-placeholder="$t('message.sixComplete.end')">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="" prop="exampleProjectName">
|
||||||
|
<el-radio-group v-model="searchForm.exampleProjectName">
|
||||||
|
<el-radio :label="1">动态风险</el-radio>
|
||||||
|
<el-radio :label="2">静态风险</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<!-- v-permission="{key: 'renovate', menuPath: '/project/constructionManage/deviceManage'}" -->
|
||||||
|
<el-button type="primary" plain @click="loadCardData">
|
||||||
|
{{ $t("message.personnelPosition.beaconManage.query") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="warning" plain @click="resetForm">
|
||||||
|
{{ $t("message.personnelPosition.beaconManage.refresh") }}
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button type="primary" @click="isAddPoint(1)"> 新增 </el-button> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="table_wrap whiteBlock">
|
||||||
|
<el-table class="tables" :data="pointList">
|
||||||
|
<el-table-column type="index" width="50" align="center"
|
||||||
|
:label="$t('message.personnelPosition.beaconManage.table.index')"></el-table-column>
|
||||||
|
<el-table-column prop="enterpriseName" label="企业名称" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.enterpriseName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="workerName" label="姓名" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.workerName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="handleTime" label="处置时间" align="center"></el-table-column>
|
||||||
|
<el-table-column prop="violationsTime" label="违章次数" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="download" @click="isDetailFn(1, scope.row)">{{ scope.row.violationsTime }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="trainingTime" label="培训次数" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.trainingTime }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="attachment" label="附件" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="download" @click="downloadFn(item)" v-for="item in scope.row.attachment"
|
||||||
|
:key="item.uid">{{ item.name }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column :label="$t('message.personnelPosition.beaconManage.table.operation')" align="center"
|
||||||
|
width="250">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="tableBtns">
|
||||||
|
<div @click="isAddPoint(2, scope.row)" class="operationText">
|
||||||
|
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||||
|
<span>{{
|
||||||
|
$t("message.personnelPosition.beaconManage.table.edit")
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div @click="removePoint(scope.row)" class="operationText">
|
||||||
|
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||||
|
<span>{{
|
||||||
|
$t("message.personnelPosition.beaconManage.table.delete")
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <div slot="empty">{{$t('message.personnelPosition.empty')}}</div> -->
|
||||||
|
</el-table>
|
||||||
|
<el-pagination class="pagerBox" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
|
:current-page="pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next" :total="Number(total)" background></el-pagination>
|
||||||
|
</div>
|
||||||
|
<!-- 添加卡片弹框 -->
|
||||||
|
<el-dialog :destroy-on-close="true" :modal-append-to-body="false" :title="cardDialogTitle"
|
||||||
|
:visible.sync="cardDialog" width="667px" :before-close="handleClose">
|
||||||
|
<div class="dialog_content">
|
||||||
|
<el-form size="medium" :model="cardForm" ref="cardForm" :rules="cardFormRules" label-width="125px"
|
||||||
|
class="dialogFormBox">
|
||||||
|
<el-form-item label="承包商名称" prop="contractorName">
|
||||||
|
<el-input v-model="cardForm.contractorName"
|
||||||
|
:placeholder="$t('message.personnelPosition.please_enter')"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="时间" prop="time">
|
||||||
|
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="cardForm.time" type="datetime"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="附件" prop="attachment">
|
||||||
|
<el-upload class="upload-demo" name="files" :action="$store.state.UPLOADURL"
|
||||||
|
:on-remove="(file, fileList) => handleRemove(file, fileList, 1)" :multiple="false"
|
||||||
|
:on-success="(res, file) => handleSuccess(res, file, 1)" :file-list="cardForm.attachment"
|
||||||
|
accept="*">
|
||||||
|
<!-- .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf -->
|
||||||
|
<el-button type="primary"> 上传附件 </el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button class="cancleBtn" @click="handleClose" icon="el-icon-circle-close" size="medium">{{
|
||||||
|
$t("message.personnelPosition.cancel") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-circle-check" @click="saveCardFn" size="medium">{{
|
||||||
|
$t("message.personnelPosition.determine") }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 添加卡片弹框 -->
|
||||||
|
<el-dialog :destroy-on-close="true" :modal-append-to-body="false" :title="cardDialogTitle2"
|
||||||
|
:visible.sync="cardDialog2" width="1100px">
|
||||||
|
<div class="dialog_content">
|
||||||
|
<el-table class="tables" :data="reedDetailInfo.dataList">
|
||||||
|
<el-table-column type="index" width="50" align="center"
|
||||||
|
:label="$t('message.personnelPosition.beaconManage.table.index')"></el-table-column>
|
||||||
|
<el-table-column prop="violationTypeName" label="违规类型" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.violationTypeName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="violationLocation" label="违规位置" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.violationLocation }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="violationImage" label="违规图片" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image style="width: 80px; height: 80px;" :src="scope.row.violationImage"
|
||||||
|
:preview-src-list="[scope.row.violationImage]">
|
||||||
|
</el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="alarmTime" label="报警时间" align="center"></el-table-column>
|
||||||
|
<el-table-column prop="disposalTime" label="处置时间" align="center"></el-table-column>
|
||||||
|
|
||||||
|
<!-- <el-table-column prop="attachment" label="附件" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="download" @click="downloadFn(item)" v-for="item in scope.row.attachment"
|
||||||
|
:key="item.uid">{{ item.name }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column :label="$t('message.personnelPosition.beaconManage.table.operation')" align="center"
|
||||||
|
width="250">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="tableBtns">
|
||||||
|
<div @click="isAddPoint(2, scope.row)" class="operationText">
|
||||||
|
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||||
|
<span>{{
|
||||||
|
$t("message.personnelPosition.beaconManage.table.edit")
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div @click="removePoint(scope.row)" class="operationText">
|
||||||
|
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||||
|
<span>{{
|
||||||
|
$t("message.personnelPosition.beaconManage.table.delete")
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <div slot="empty">{{$t('message.personnelPosition.empty')}}</div> -->
|
||||||
|
</el-table>
|
||||||
|
<el-pagination class="pagerBox" @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
|
||||||
|
:current-page="reedDetailInfo.pageNo" :page-sizes="$store.state.PAGESIZRS"
|
||||||
|
:page-size="reedDetailInfo.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
|
:total="Number(reedDetailInfo.total)" background></el-pagination>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getDeviceUnitPage,
|
||||||
|
getProjectGroupPage,
|
||||||
|
} from "@/assets/js/api/project";
|
||||||
|
import {
|
||||||
|
addGreenConstructionManageInfo,
|
||||||
|
editGreenConstructionManageInfo,
|
||||||
|
deleteGreenConstructionManageInfo,
|
||||||
|
} from "@/assets/js/api/greenConstructionManage";
|
||||||
|
import {
|
||||||
|
getViolationEducationPageApi,
|
||||||
|
getViolationDetailPageApi,
|
||||||
|
} from "@/assets/js/api/carViolation";
|
||||||
|
import { getProjectChilderSystemUserListApi } from '@/assets/js/api/laborPerson.js'
|
||||||
|
import { isJSON } from "@/util/nowDate/index";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchForm: {
|
||||||
|
enterpriseName : "",
|
||||||
|
workerName: "",
|
||||||
|
dateRangeArr: "",
|
||||||
|
},
|
||||||
|
pointList: [],
|
||||||
|
total: 0,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
cardDialogTitle: "",
|
||||||
|
cardDialog: false,
|
||||||
|
cardForm: {},
|
||||||
|
contractingTypeList: [{
|
||||||
|
id: 1,
|
||||||
|
contractingName: "EPC",
|
||||||
|
}, {
|
||||||
|
id: 2,
|
||||||
|
contractingName: "E+P+C",
|
||||||
|
}], // 承包方式
|
||||||
|
technicalOperationList: [{
|
||||||
|
id: 1,
|
||||||
|
operationName: "土建",
|
||||||
|
}, {
|
||||||
|
id: 2,
|
||||||
|
operationName: "动设备",
|
||||||
|
}, {
|
||||||
|
id: 3,
|
||||||
|
operationName: "静设备",
|
||||||
|
}, {
|
||||||
|
id: 4,
|
||||||
|
operationName: "管道",
|
||||||
|
}, {
|
||||||
|
id: 5,
|
||||||
|
operationName: "电气",
|
||||||
|
}, {
|
||||||
|
id: 6,
|
||||||
|
operationName: "仪表",
|
||||||
|
}, {
|
||||||
|
id: 7,
|
||||||
|
operationName: "其它",
|
||||||
|
}], // 技术操作
|
||||||
|
cardFormRules: {
|
||||||
|
contractorName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("message.personnelPosition.required"),
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
time: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("message.personnelPosition.mandatory"),
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
isAdd: -1,
|
||||||
|
deviceUnitList: [], // 设备信息
|
||||||
|
enterpriseTypeList: [], // 项目组
|
||||||
|
cooperatorList: [], // 所有企业信息
|
||||||
|
projectGroupUnitList: [], // 项目组下的所有承包商
|
||||||
|
supervisingUnitList: [], // 当前项目组下的监理单位
|
||||||
|
epcContractorList: [], // 当前项目组下的承包商
|
||||||
|
constructionUnitList: [], // 当前epc承包商下的施工承包商
|
||||||
|
initialFlag: true, // 初始化标识首次进入
|
||||||
|
workerListOptions: [], // 人员列表
|
||||||
|
|
||||||
|
cardDialog2: false, // 添加卡片弹窗
|
||||||
|
cardDialogTitle2: "", // 添加卡片弹窗标题
|
||||||
|
isDetail: 0, // 是否详情
|
||||||
|
reedDetailInfo: {
|
||||||
|
dataList: [],
|
||||||
|
total: 0,
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
id: "",
|
||||||
|
}, // 详情信息
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initData();
|
||||||
|
this.projectGroupListFn();
|
||||||
|
this.getDutyPerson();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.loadList();
|
||||||
|
this.loadCardData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isDetailFn(type, item) {
|
||||||
|
this.isDetail = type;
|
||||||
|
this.reedDetailInfo.id = item.id;
|
||||||
|
if (type == 1) {
|
||||||
|
this.cardDialogTitle2 = "违章详情";
|
||||||
|
this.getViolationDetailPage();
|
||||||
|
} else if (type == 2) {
|
||||||
|
this.cardDialogTitle2 = this.$t("message.laborDev.btn_edit"); //编辑卡片
|
||||||
|
}
|
||||||
|
this.cardDialog2 = true;
|
||||||
|
},
|
||||||
|
getViolationDetailPage() {
|
||||||
|
getViolationDetailPageApi({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
pageNo: this.reedDetailInfo.pageNo,
|
||||||
|
pageSize: this.reedDetailInfo.pageSize,
|
||||||
|
violationReEducationId: this.reedDetailInfo.id,
|
||||||
|
// exampleProjectName: this.searchForm.exampleProjectName,
|
||||||
|
}).then((res) => {
|
||||||
|
|
||||||
|
this.reedDetailInfo.dataList = res.result.records.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
violationImage: item.violationImage.includes("http://") ? item.violationImage : this.$store.state.FILEURL + item.violationImage,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.reedDetailInfo.total = res.result.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查看条数
|
||||||
|
handleSizeChange2(val) {
|
||||||
|
this.reedDetailInfo.pageSize = val;
|
||||||
|
if (this.isDetail == 1) {
|
||||||
|
this.getViolationDetailPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//查看页
|
||||||
|
handleCurrentChange2(val) {
|
||||||
|
this.reedDetailInfo.pageNo = val;
|
||||||
|
if (this.isDetail == 1) {
|
||||||
|
this.getViolationDetailPage();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除文件
|
||||||
|
handleRemove(file, fileList, type) {
|
||||||
|
const fileTypeMap = {
|
||||||
|
1: 'attachment',
|
||||||
|
};
|
||||||
|
const key = fileTypeMap[type];
|
||||||
|
if (key) {
|
||||||
|
this.cardForm[key] = fileList;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSuccess(res, file, type) {
|
||||||
|
if (res.status == "SUCCESS") {
|
||||||
|
const fileTypeMap = {
|
||||||
|
1: 'attachment',
|
||||||
|
};
|
||||||
|
const key = fileTypeMap[type];
|
||||||
|
if (key) {
|
||||||
|
this.cardForm[key].push({
|
||||||
|
name: file.name,
|
||||||
|
url: this.$store.state.FILEURL + file.response.data[0].imageUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 初始化
|
||||||
|
initData() {
|
||||||
|
this.cardForm = {
|
||||||
|
contractorName: "",
|
||||||
|
time: "",
|
||||||
|
attachment: [],
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
isAddPoint(type, item) {
|
||||||
|
this.isAdd = type;
|
||||||
|
this.initialFlag = true;
|
||||||
|
if (type == 1) {
|
||||||
|
this.initData();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["cardForm"] && this.$refs["cardForm"].resetFields();
|
||||||
|
});
|
||||||
|
this.cardDialogTitle = this.$t("message.laborDev.add2");
|
||||||
|
} else if (type == 2) {
|
||||||
|
this.cardDialogTitle = this.$t("message.laborDev.btn_edit"); //编辑卡片
|
||||||
|
console.log(item);
|
||||||
|
this.cardForm = {
|
||||||
|
...item,
|
||||||
|
attachment: item.attachment.map(ele => ele),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
this.cardDialog = true;
|
||||||
|
},
|
||||||
|
removePoint(item) {
|
||||||
|
this.$confirm(
|
||||||
|
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
|
||||||
|
"【" +
|
||||||
|
item.contractorName +
|
||||||
|
"】?",
|
||||||
|
this.$t("message.personnelPosition.beaconManage.table.Tips"),
|
||||||
|
{
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
deleteGreenConstructionManageInfo({ id: item.id }).then((res) => {
|
||||||
|
this.loadCardData();
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("message.personnelPosition.delete_success")
|
||||||
|
); //删除成功!
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
loadList() {
|
||||||
|
let param = {
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: -1,
|
||||||
|
};
|
||||||
|
getDeviceUnitPage(param).then((res) => {
|
||||||
|
this.deviceUnitList = res.result.records;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取卡片列表
|
||||||
|
loadCardData() {
|
||||||
|
getViolationEducationPageApi({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
enterpriseName: this.searchForm.enterpriseName,
|
||||||
|
workerName: this.searchForm.workerName,
|
||||||
|
handleTime_begin: this.searchForm.dateRangeArr ? this.searchForm.dateRangeArr[0] : "",
|
||||||
|
handleTime_end: this.searchForm.dateRangeArr ? this.searchForm.dateRangeArr[1] : "",
|
||||||
|
}).then((res) => {
|
||||||
|
this.pointList = res.result.records.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
attachment: isJSON(item.attachment) && item.attachment != null ? JSON.parse(item.attachment) : [],
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.total = res.result.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//添加或编辑卡片
|
||||||
|
saveCardFn() {
|
||||||
|
this.$refs["cardForm"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const result = {
|
||||||
|
...this.cardForm,
|
||||||
|
attachment: JSON.stringify(this.cardForm.attachment),
|
||||||
|
}
|
||||||
|
console.log(result);
|
||||||
|
if (this.isAdd == 1) {
|
||||||
|
// this.cardForm.floorId = this.currentFloorDetail.floorId
|
||||||
|
addGreenConstructionManageInfo(result).then((res) => {
|
||||||
|
this.cardDialog = false;
|
||||||
|
this.initData();
|
||||||
|
this.loadCardData();
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("message.personnelPosition.add_success")
|
||||||
|
); //添加成功!
|
||||||
|
});
|
||||||
|
} else if (this.isAdd == 2) {
|
||||||
|
editGreenConstructionManageInfo(result).then((res) => {
|
||||||
|
this.cardDialog = false;
|
||||||
|
this.initData();
|
||||||
|
this.loadCardData();
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("message.personnelPosition.edit_success")
|
||||||
|
); //编辑成功!
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
downloadFn(row) {
|
||||||
|
// "http://42.180.188.17:11211/image/669b96b66b90a34a1aa4ec9c.jpg"
|
||||||
|
fetch(row.url).then((response) => {
|
||||||
|
// 处理响应
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error("导出失败");
|
||||||
|
}
|
||||||
|
return response.blob();
|
||||||
|
}).then((blob) => {
|
||||||
|
console.log("导出成功");
|
||||||
|
// 创建一个下载链接
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
// 创建一个<a>元素
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href = url;
|
||||||
|
link.download = row.name; // 指定下载文件的文件名
|
||||||
|
// 模拟点击下载链接
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
// 释放URL对象
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 处理错误
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.$refs["searchForm"].resetFields();
|
||||||
|
this.loadCardData();
|
||||||
|
},
|
||||||
|
//查询选择人员下拉
|
||||||
|
getDutyPerson() {
|
||||||
|
let data = {
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
isFilterQualityRegionEnterprise: 1
|
||||||
|
}
|
||||||
|
getProjectChilderSystemUserListApi(data).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.workerListOptions = res.result;
|
||||||
|
console.log('获取施工人员下拉', this.workerListOptions)
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//查看条数
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.loadCardData();
|
||||||
|
},
|
||||||
|
//查看页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageNo = val;
|
||||||
|
this.loadCardData();
|
||||||
|
},
|
||||||
|
// 关闭前执行
|
||||||
|
handleClose(done) {
|
||||||
|
this.initData();
|
||||||
|
this.$refs["cardForm"].resetFields();
|
||||||
|
|
||||||
|
if (done && typeof done === "function") {
|
||||||
|
done();
|
||||||
|
} else {
|
||||||
|
this.cardDialog = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取监理单位
|
||||||
|
projectGroupListFn() {
|
||||||
|
getProjectGroupPage({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: -1,
|
||||||
|
}).then((res) => {
|
||||||
|
this.enterpriseTypeList = res.result.records;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
cardDialog2: {
|
||||||
|
handler(val) {
|
||||||
|
if (val == false) {
|
||||||
|
this.reedDetailInfo = {
|
||||||
|
dataList: [],
|
||||||
|
total: 0,
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
id: "",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
computedName() {
|
||||||
|
return (dataList, id, name) => {
|
||||||
|
const find = dataList.find((item) => item.id == id);
|
||||||
|
return find ? find[name] : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.download {
|
||||||
|
color: #1684FC;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user