diff --git a/src/views/database/connect_enterprises_management/components/editDialog.vue b/src/views/database/connect_enterprises_management/components/editDialog.vue
index 5027d8b..9f0c97d 100644
--- a/src/views/database/connect_enterprises_management/components/editDialog.vue
+++ b/src/views/database/connect_enterprises_management/components/editDialog.vue
@@ -92,23 +92,38 @@
-
-
+
@@ -184,6 +199,7 @@ import { getAreaListTree } from "@/request/data_dictionary.js";
import AppCascader from "@/components/cascader/index.vue";
import AppMap from "@/components/map/map.vue";
import { UNIFIED_SOCIAL_CREDIT_CODE } from "@/assets/js/regular.js";
+import { ArrowDown } from "@element-plus/icons-vue";
const { dictionariesList } = await getAreaListTree();
const visible = defineModel("visible", { type: Boolean, required: true });
const props = defineProps({
@@ -214,7 +230,6 @@ const form = ref({
isOpenSpecialInspection: 0, // 是否开启重点专项检查企业数据推送
isDustExplosion: 0, // 是否粉尘涉爆企业
});
-
const rules = {
companyName: [
{ required: true, message: "企业名称不能为空", trigger: "blur" },
@@ -376,6 +391,9 @@ const fnGetData = async () => {
? `${form.value.longitude}-${form.value.latitude}`
: "";
thirdList.value = data.thirdList;
+ thirdList.value.forEach((item) => {
+ item.majorHazardCode = JSON.parse(item.majorHazardCode);
+ });
};
fnGetData();
@@ -388,7 +406,7 @@ const thirdList = ref([
{
thirdPlatformId: "",
companyCode: "",
- majorHazardCode: "",
+ majorHazardCode: [{ code: "" }],
accessKey: "",
rsaPublicKey: "",
url: "",
@@ -402,7 +420,7 @@ const fnAddThirdList = () => {
thirdList.value.push({
thirdPlatformId: "",
companyCode: "",
- majorHazardCode: "",
+ majorHazardCode: [{ code: "" }],
accessKey: "",
rsaPublicKey: "",
url: "",
@@ -413,6 +431,7 @@ const fnAddThirdList = () => {
});
};
const fnReduceThirdList = (index) => {
+ if (thirdList.value.length <= 1) return;
thirdList.value.splice(index, 1);
};
const visibleMap = ref(false);
@@ -432,6 +451,12 @@ const checkThirdListItem = () => {
}
return true;
};
+const fnMajorHazardCodeAdd = (item) => {
+ item.majorHazardCode.push({ code: "" });
+};
+const fnMajorHazardCodeReduce = (item, index) => {
+ item.majorHazardCode.splice(index, 1);
+};
const sectorIdRef = ref("");
const fnSubmit = debounce(
@@ -444,6 +469,10 @@ const fnSubmit = debounce(
const [province = "", city = "", county = ""] = form.value.area;
const sectorId = form.value.sectorId.join(",");
+ thirdList.value.forEach((item) => {
+ if (item.majorHazardCode.length > 0)
+ item.majorHazardCode = JSON.stringify(item.majorHazardCode);
+ });
const params = {
...form.value,
sectorId,
diff --git a/src/views/database/connect_enterprises_management/info.vue b/src/views/database/connect_enterprises_management/info.vue
index 9b43d73..a193d42 100644
--- a/src/views/database/connect_enterprises_management/info.vue
+++ b/src/views/database/connect_enterprises_management/info.vue
@@ -109,6 +109,10 @@ const fnGetData = async () => {
info.value.address = `${info.value.longitude}-${info.value.latitude}`;
}
thirdList.value = info.value.thirdList;
+ thirdList.value.forEach((item) => {
+ const codeArr = JSON.parse(item.majorHazardCode);
+ item.majorHazardCode = codeArr.map((item) => item.code).join(",");
+ });
const { data: servicePlatformList } = await getBusServicePlatformListAll();
target.value = servicePlatformList.find(
(item) => item.id === info.value.servicePlatformId