bug优化

dev
WenShiJun 2024-03-29 18:06:37 +08:00
parent 88b97b8037
commit adf753755b
10 changed files with 133 additions and 79 deletions

View File

@ -88,7 +88,7 @@
</tr>
<tr>
<td class="title">检查照片</td>
<td colspan="3">
<td colspan="1">
<div>
<template
v-for="(item3, index3) in item1.IMG_PATH.split(',')"
@ -105,7 +105,25 @@
</template>
</div>
</td>
<td v-if="item.CHECKTYPE_NAME === '出车前'" class="title">
是否合格
</td>
<td v-if="item.CHECKTYPE_NAME === '出车前'" colspan="3">
<el-tag v-if="item1.pd2Children[0].STATUS === '0'"
>合格</el-tag
>
<el-tag v-else></el-tag>
</td>
</tr>
<!-- <tr v-if="item.CHECKTYPE_NAME === '出车前'">-->
<!-- <td class="title">是否合格</td>-->
<!-- <td colspan="7">-->
<!-- <el-tag v-if="item1.pd2Children[0].STATUS === '0'"-->
<!-- >合格</el-tag-->
<!-- >-->
<!-- <el-tag v-else></el-tag>-->
<!-- </td>-->
<!-- </tr>-->
</table>
</td>
</tr>
@ -128,6 +146,7 @@ const data = reactive({
});
const fnGetData = async () => {
const resData = await getSafetyDrivingLogView({ WAYBILLREGISTRATION_ID });
console.log(resData, "11111111111");
data.info = resData.pd;
data.commitmentList = resData.commitmentList;
};

View File

@ -74,32 +74,51 @@ const currentLatitude = ref("");
const fnMapInit = async () => {
loading.value = true;
await nextTick();
//
const defaultLongitude = "116.3972282409668";
const defaultLatitude = "39.90960456049752";
//
mapInstance = new window.BMapGL.Map("map_container");
mapInstance.centerAndZoom(
new window.BMapGL.Point(
props.longitude || "116.3972282409668",
props.latitude || "39.90960456049752"
)
// props
const centerPoint = new window.BMapGL.Point(
props.longitude || defaultLongitude,
props.latitude || defaultLatitude
);
//
mapInstance.centerAndZoom(centerPoint, 15); //
//
mapInstance.enableScrollWheelZoom(true);
mapInstance.setMapStyleV2({
styleId: "6f501abeb2a0cc0d961d110b9407b127",
});
loading.value = false;
if (props.longitude && props.latitude) {
const point = new window.BMapGL.Point(props.longitude, props.latitude);
const marker = new window.BMapGL.Marker(point);
//
const marker = new window.BMapGL.Marker(centerPoint);
mapInstance.addOverlay(marker);
}
currentLongitude.value = centerPoint.lng;
currentLatitude.value = centerPoint.lat;
loading.value = false;
//
mapInstance.addEventListener("click", function (event) {
mapInstance.clearOverlays();
const point = new window.BMapGL.Point(event.latlng.lng, event.latlng.lat);
const marker = new window.BMapGL.Marker(point);
mapInstance.addOverlay(marker);
const clickPoint = new window.BMapGL.Point(
event.latlng.lng,
event.latlng.lat
);
const clickMarker = new window.BMapGL.Marker(clickPoint);
mapInstance.addOverlay(clickMarker);
currentLatitude.value = event.latlng.lat;
currentLongitude.value = event.latlng.lng;
});
};
const searchLocation = () => {
if (searchKeyword.value.trim() === "") {
alert("请输入搜索关键字");

View File

@ -21,7 +21,7 @@
label="经营企业"
prop="OPERATINGCOMPANY"
>
<span>{{ operatingCompany }}</span>
<span>{{ form.OPERATINGCOMPANY }}</span>
</el-form-item>
<el-form-item label="会议附件" prop="file">
<layout-upload
@ -30,6 +30,7 @@
:limit="9"
:size="100"
/>
<!-- <span>{{ form.ATTACHMENT_NAME }}</span>-->
</el-form-item>
<el-form-item label="到期时间" prop="EXPIRYDATE">
<el-date-picker
@ -49,14 +50,13 @@
</template>
<script setup>
import { onMounted, ref, toRaw } from "vue";
import { ref, toRaw } from "vue";
import { useVModels } from "@vueuse/core";
import { ElMessage } from "element-plus";
import LayoutUpload from "@/components/upload/index.vue";
import {
addManagementAgreementView,
editManagementAgreementView,
getManagementAgreementList,
} from "@/request/management_agreement.js";
const props = defineProps({
@ -98,15 +98,6 @@ const rules = {
],
};
const operatingCompany = ref("");
const operationType = ref("");
onMounted(async () => {
const resData = await getManagementAgreementList();
if (resData && resData.varList && resData.varList.length > 0) {
operatingCompany.value = resData.varList[0].CORP_NAME;
operationType.value = resData.varList[0].OPERATIONTYPE;
}
});
const formRef = ref(null);
const fnClose = () => {
formRef.value.resetFields();

View File

@ -150,17 +150,29 @@ const data = reactive({
info: {},
},
});
const fnAddOrEdit = async (MANAGEMENTAGREEMENT_ID = "", type = "add") => {
data.addOrEditDialog.visible = true;
data.addOrEditDialog.type = type;
if (type === "edit" && MANAGEMENTAGREEMENT_ID) {
data.addOrEditDialog.form.MANAGEMENTAGREEMENT_ID = MANAGEMENTAGREEMENT_ID;
} else {
data.addOrEditDialog.form = {};
const resData = await infoManagementAgreementView({
MANAGEMENTAGREEMENT_ID,
});
if (resData && resData.result === "success") {
const detail = resData.pd;
const attachmentName = detail.ATTACHMENT_ROUTE.split("/").pop();
data.addOrEditDialog.form = {
...detail,
OPERATINGCOMPANY: detail.CORP_NAME,
ATTACHMENT_NAME: attachmentName,
};
}
} else {
data.addOrEditDialog.form = {}; //
}
await nextTick();
};
//
const deleteItem = async (value) => {
await ElMessageBox.confirm(`确定要删除吗?`, {

View File

@ -27,17 +27,17 @@
:limit="99"
/>
</el-form-item>
<el-form-item label="电子围栏" prop="ELECTRONIC_FENCE_NAME">
<div style="flex: 1; display: flex">
<el-input v-model="form.ELECTRONIC_FENCE_NAME" disabled />
<el-button type="primary" class="ml-10" @click="data.drawer = true">
添加
</el-button>
<el-button type="danger" class="ml-10" @click="fnRemoveRegName">
移除
</el-button>
</div>
</el-form-item>
<!-- <el-form-item label="电子围栏" prop="ELECTRONIC_FENCE_NAME">-->
<!-- <div style="flex: 1; display: flex">-->
<!-- <el-input v-model="form.ELECTRONIC_FENCE_NAME" disabled />-->
<!-- <el-button type="primary" class="ml-10" @click="data.drawer = true">-->
<!-- 添加-->
<!-- </el-button>-->
<!-- <el-button type="danger" class="ml-10" @click="fnRemoveRegName">-->
<!-- 移除-->
<!-- </el-button>-->
<!-- </div>-->
<!-- </el-form-item>-->
</el-form>
<template #footer>
<el-button @click="fnClose"></el-button>
@ -113,14 +113,14 @@ const fnClose = () => {
visible.value = false;
};
const fnRemoveRegName = debounce(
1000,
async () => {
form.value.ELECTRONIC_FENCE_NAME = "";
form.value.ELECTRONIC_FENCE_ID = "";
},
{ atBegin: true }
);
// const fnRemoveRegName = debounce(
// 1000,
// async () => {
// form.value.ELECTRONIC_FENCE_NAME = "";
// form.value.ELECTRONIC_FENCE_ID = "";
// },
// { atBegin: true }
// );
const fnSubmit = debounce(
1000,

View File

@ -74,9 +74,9 @@
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="24">
<el-form-item label="人员选择" prop="PERSON">
<div class="flexBox">
<div style="flex: 1; display: flex">
<el-input
v-model="data.form.PERSON"
type="textarea"
@ -84,7 +84,7 @@
disabled
></el-input>
<el-button
class="addBtn"
class="ml-10"
type="primary"
@click="data.SelectPersonDialogVisible = true"
>
@ -167,6 +167,13 @@ const rules = {
RECORDER: [{ required: true, message: "请输入记录人", trigger: "blur" }],
MEETING_CONTENT: [
{ required: true, message: "请输入会议记要", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value === "<p><br></p>") callback(new Error("请输入会议记要"));
else callback();
},
trigger: "blur",
},
],
};

View File

@ -43,7 +43,7 @@
ref="tableRef"
v-model:pagination="pagination"
:data="list"
row-key="RISKCHECKITEM_ID"
row-key="USER_ID"
@get-data="fnGetData"
>
<el-table-column reserve-selection type="selection" width="55" />
@ -94,7 +94,6 @@ const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
useListData(getUserListAll, {
key: "userList",
immediate: false,
clearSelection: false,
});
const stop = watch(

View File

@ -39,6 +39,20 @@
detailItems.realPersonNum
}}/
</el-descriptions-item>
<el-descriptions-item label="会议附件">
<a
:href="VITE_FILE_URL + detailItems.CONFIRM_MESSAGE_SIGN_ROUTE"
target="_blank"
rel="noopener noreferrer"
>查看会议附件</a
>
</el-descriptions-item>
<el-descriptions-item label="会议视频">
<video
:src="VITE_FILE_URL + detailItems.VIDEO_SIGN_ROUTE"
controls
></video>
</el-descriptions-item>
</el-descriptions>
<el-table
:border="true"
@ -117,6 +131,7 @@ const detailItems = ref({
const fnGetData = async () => {
const response = await getSafetyMeetingView({ SAFETY_MEETING_ID });
console.log(response, "1111111111111111111111111");
detailItems.value = response.pd;
};
fnGetData();

View File

@ -8,7 +8,7 @@
>
<el-divider content-position="left">添加</el-divider>
<el-row>
<el-col :span="8">
<el-col :span="12">
<el-form-item label="通知标题" prop="TITLE">
<el-input
v-model="data.form.TITLE"
@ -17,7 +17,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="12">
<el-form-item label="通知等级" prop="LEVEL">
<el-select
v-model="data.form.LEVEL"
@ -33,9 +33,9 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="24">
<el-form-item label="人员选择" prop="PERSON">
<div class="flexBox">
<div style="flex: 1; display: flex">
<el-input
v-model="data.form.PERSON"
type="textarea"
@ -43,7 +43,7 @@
disabled
></el-input>
<el-button
class="addBtn"
class="ml-10"
type="primary"
@click="data.SelectPersonDialogVisible = true"
>
@ -125,6 +125,13 @@ const rules = {
PERSON: [{ required: true, message: "请选择通知人员", trigger: "blur" }],
NOTIFICATIONCONTENT: [
{ required: true, message: "请输入通知内容", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (value === "<p><br></p>") callback(new Error("请输入通知内容"));
else callback();
},
trigger: "blur",
},
],
};
const relatedClassificationTempList =
@ -214,13 +221,4 @@ const fnSelectAllRiskSubmit = (allData) => {
};
</script>
<style scoped lang="scss">
.flexBox {
display: flex;
align-items: flex-end;
.addBtn {
margin-left: 12px;
}
}
</style>
<style scoped lang="scss"></style>

View File

@ -43,10 +43,10 @@
ref="tableRef"
v-model:pagination="pagination"
:data="list"
row-key="RISKCHECKITEM_ID"
row-key="USER_ID"
@get-data="fnGetData"
>
<el-table-column type="selection" width="55" />
<el-table-column reserve-selection type="selection" width="55" />
<el-table-column label="序号" width="70">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
@ -71,7 +71,6 @@ import { debounce } from "throttle-debounce";
import useListData from "@/assets/js/useListData.js";
import { watch } from "vue";
import { serialNumber } from "@/assets/js/utils.js";
import { differenceWith } from "lodash-es";
import { getUserListAll } from "@/request/safety_production_related.js";
import { PERSONTYPEMENU } from "@/assets/js/constant.js";
@ -94,32 +93,27 @@ const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
useListData(getUserListAll, {
key: "userList",
immediate: false,
clearSelection: false,
});
const stop = watch(
() => props.visible,
(value) => {
if (value) {
fnGetData();
fnResetPagination();
stop && stop();
}
}
);
const fnClose = () => {
tableRef.value.clearSelection();
visible.value = false;
};
const fnSubmit = debounce(
1000,
() => {
const selectionData = tableRef.value.getSelectionRows();
const listData = differenceWith(
selectionData,
props.listData,
(a, b) => a.RISKCHECKITEM_ID === b.RISKCHECKITEM_ID
);
emits("submit", selectionData);
fnClose();
emits("submit", listData);
},
{ atBegin: true }
);