Browse Source

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

gushoubang 8 months ago
parent
commit
fbb30b2a89
42 changed files with 4606 additions and 2280 deletions
  1. 18 1
      src/api/ghss/gdbh.js
  2. 603 8
      src/api/zt/ztApi.js
  3. 23 23
      src/components/Query/clickQuery/clickQuery.vue
  4. 0 0
      src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.js
  5. 160 174
      src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.vue
  6. 34 27
      src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/jzdjfxsmjg.vue
  7. 1 1
      src/views/ConstructionApplication3D/ConstructionModelInfo/addConstructionModelInfo.vue
  8. 140 106
      src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue
  9. 108 111
      src/views/ConstructionApplication3D/Demolition/CQShowInfo.vue
  10. 391 182
      src/views/ConstructionApplication3D/Demolition/DemolitionList.vue
  11. 9 2
      src/views/ConstructionApplication3D/Demolition/Property.vue
  12. 90 92
      src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue
  13. 48 140
      src/views/ConstructionApplication3D/Demolition/QMShowInfo.vue
  14. 142 203
      src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue
  15. 69 129
      src/views/ConstructionApplication3D/Demolition/ZDShowInfo.vue
  16. 0 0
      src/views/ConstructionApplication3D/Demolition/zdAnalyse.js
  17. 50 73
      src/views/ConstructionApplication3D/MXDBinfo/MXDBinfo.vue
  18. 191 126
      src/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue
  19. 8 14
      src/views/ConstructionApplication3D/RSAnalysis/RSAnalysis.vue
  20. 40 19
      src/views/ConstructionApplication3D/ZBFXAnalysisinfo/ZBFXAnalysisinfo.vue
  21. 843 244
      src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue
  22. 52 3
      src/views/ConstructionApplication3D/billboard/addBillboardPoject.vue
  23. 26 19
      src/views/ConstructionApplication3D/billboard/billboardCheckList.vue
  24. 196 102
      src/views/ConstructionApplication3D/billboard/billboardChekInfo.vue
  25. 540 104
      src/views/ConstructionApplication3D/billboard/billboardDesign.vue
  26. 11 4
      src/views/ConstructionApplication3D/billboard/billboarddetail.vue
  27. 171 28
      src/views/ConstructionApplication3D/billboard/billboarddetailInfo.vue
  28. 0 0
      src/views/ConstructionApplication3D/projectManagement/CheckParkAnalyse.js
  29. 79 18
      src/views/ConstructionApplication3D/projectManagement/projectManagement.vue
  30. 3 0
      src/views/ConstructionApplication3D/zt.scss
  31. 40 12
      src/views/cockpit/common/VectorSpace/BoxCommonVector.vue
  32. 11 0
      src/views/cockpit/js/tdsy.js
  33. 13 48
      src/views/complianceAnalysis/components/lsjl.vue
  34. 173 0
      src/views/farmlandProtection/components/fxjg.vue
  35. 31 50
      src/views/farmlandProtection/components/fzjcyp.vue
  36. 32 31
      src/views/farmlandProtection/components/zdyModelPop.vue
  37. 260 186
      static/Config/config.js
  38. BIN
      static/ModelData/billboard/1.jpg
  39. BIN
      static/ModelData/billboard/2.jpg
  40. BIN
      static/ModelData/billboard/3.jpg
  41. BIN
      static/ModelData/billboard/4.jpg
  42. BIN
      static/ModelData/billboard/5.jpg

+ 18 - 1
src/api/ghss/gdbh.js

@@ -13,4 +13,21 @@ export function GetFactorList(params) {
         method: 'get',
         params
     })
-}
+}
+//添加模型分析研判
+export function AddGdbh(data) {
+    return request({
+        url: '/apply/gdbh/AddGdbh',
+        method: 'post',
+        data:data
+    })
+}
+//历史记录查询
+export function SelectGdbhList(params) {
+    return request({
+        url: '/apply/gdbh/SelectGdbhList',
+        method: 'get',
+        params
+    })
+}
+

+ 603 - 8
src/api/zt/ztApi.js

@@ -7,6 +7,8 @@ import { Notification, MessageBox, Message, Loading } from "element-ui";
 import { saveAs } from "file-saver";
 import { getToken } from "@/utils/auth";
 axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
+// 是否显示重新登录
+export let isReloginShow = false;
 // 创建axios实例
 const request = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
@@ -42,6 +44,9 @@ request.interceptors.request.use(
             : config.data,
         time: new Date().getTime(),
       };
+      if (requestObj.data.length > 2048) {
+        requestObj.data = requestObj.data.substring(0, 2048);
+      }
       const sessionObj = cache.session.getJSON("sessionObj");
       if (
         sessionObj === undefined ||
@@ -151,6 +156,7 @@ request.interceptors.response.use(
     return Promise.reject(error);
   }
 );
+
 /**
  * 基准地价报告
  * @param {*} data
@@ -186,7 +192,6 @@ export async function getJZDJWord(data) {
   }
   return;
 }
-
 /**
  * 征收补偿报告
  * @param {*} data
@@ -200,7 +205,7 @@ export async function getZDBCWord(data) {
     data: data,
   });
   debugger;
-  var fileName = "分析报告";
+  var fileName = data.projectName;
   debugger;
   const contentDisposition = response.headers["content-disposition"];
   if (contentDisposition) {
@@ -222,7 +227,7 @@ export async function getZDBCWord(data) {
   }
   return;
 }
-
+/*************************报建项目******************** start */
 // 查询项目信息列表
 export async function listProjectinformation(query) {
   return await request({
@@ -309,8 +314,36 @@ export async function delConstructionmodel(id) {
   });
 }
 
+// 查询项目模型指标人工核算值详细
+export async function getZtProjectModelZb(id) {
+  return await request({
+    url: "/model/ZtProjectModelZb/" + id,
+    method: "get",
+  });
+}
+
+// 新增项目模型指标人工核算值
+export async function addZtProjectModelZb(data) {
+  return await request({
+    url: "/model/ZtProjectModelZb",
+    method: "post",
+    data: data,
+  });
+}
+
+// 修改项目模型指标人工核算值
+export async function updateZtProjectModelZb(data) {
+  return await request({
+    url: "/model/ZtProjectModelZb",
+    method: "put",
+    data: data,
+  });
+}
+/*************************报建项目******************** end */
+
+/*************************基准地价******************** start */
 // 查询基准地价信息列表
-export function listBenchmarkLandPrices(query) {
+export async function listBenchmarkLandPrices(query) {
   return request({
     url: "/model/BenchmarkLandPrices/list",
     method: "get",
@@ -319,7 +352,7 @@ export function listBenchmarkLandPrices(query) {
 }
 
 // 查询基准地价信息详细
-export function getBenchmarkLandPrices(id) {
+export async function getBenchmarkLandPrices(id) {
   return request({
     url: "/model/BenchmarkLandPrices/" + id,
     method: "get",
@@ -327,7 +360,7 @@ export function getBenchmarkLandPrices(id) {
 }
 
 // 新增基准地价信息
-export function addBenchmarkLandPrices(data) {
+export async function addBenchmarkLandPrices(data) {
   return request({
     url: "/model/BenchmarkLandPrices",
     method: "post",
@@ -336,7 +369,7 @@ export function addBenchmarkLandPrices(data) {
 }
 
 // 修改基准地价信息
-export function updateBenchmarkLandPrices(data) {
+export async function updateBenchmarkLandPrices(data) {
   return request({
     url: "/model/BenchmarkLandPrices",
     method: "put",
@@ -345,9 +378,571 @@ export function updateBenchmarkLandPrices(data) {
 }
 
 // 删除基准地价信息
-export function delBenchmarkLandPrices(id) {
+export async function delBenchmarkLandPrices(id) {
   return request({
     url: "/model/BenchmarkLandPrices/" + id,
     method: "delete",
   });
 }
+// 查询基准地价分析结果列表
+export function listZtBenchmarkLandPriceResults(query) {
+  return request({
+    url: "/model/ZtBenchmarkLandPriceResults/list",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询基准地价分析结果详细
+export function getZtBenchmarkLandPriceResults(id) {
+  return request({
+    url: "/model/ZtBenchmarkLandPriceResults/" + id,
+    method: "get",
+  });
+}
+
+// 新增基准地价分析结果
+export function addZtBenchmarkLandPriceResults(data) {
+  return request({
+    url: "/model/ZtBenchmarkLandPriceResults",
+    method: "post",
+    data: data,
+  });
+}
+
+// 修改基准地价分析结果
+export function updateZtBenchmarkLandPriceResults(data) {
+  return request({
+    url: "/model/ZtBenchmarkLandPriceResults",
+    method: "put",
+    data: data,
+  });
+}
+
+// 删除基准地价分析结果
+export function delZtBenchmarkLandPriceResults(id) {
+  return request({
+    url: "/model/ZtBenchmarkLandPriceResults/" + id,
+    method: "delete",
+  });
+}
+/*************************基准地价******************** end */
+
+/*************************征收补偿******************** start */
+// 01 征地补偿标准列表 list
+export function getZdBcbzList(query) {
+  return request({
+    url: "/model/zdbcbz/list",
+    method: "get",
+    params: query,
+  });
+}
+// 征地  补偿标准 getbyid
+export function getZdBcbzById(id) {
+  return request({
+    url: "/model/zdbcbz/getInfo/" + id,
+    method: "get",
+  });
+}
+//添加  征地  补偿标准 add
+export function addZdBcbz(data) {
+  return request({
+    url: "/model/zdbcbz/",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 征地  补偿标准 update
+export function updateZdBcbz(data) {
+  return request({
+    url: "/model/zdbcbz/",
+    method: "put",
+    data: data,
+  });
+}
+// 删除 征地  补偿标准 delbyid
+export function delZdBcbz(id) {
+  return request({
+    url: "/model/zdbcbz/" + id,
+    method: "delete",
+  });
+}
+
+// 02 青苗 补偿标准列表 list
+export function getQmbcbzList(query) {
+  return request({
+    url: "/model/qmbcbz/list",
+    method: "get",
+    params: query,
+  });
+}
+// 青苗 补偿标准 getbyid
+export function getQmbcbzById(id) {
+  return request({
+    url: "/model/qmbcbz/" + id,
+    method: "get",
+  });
+}
+//添加 青苗 补偿标准 add
+export function addQmbcbz(data) {
+  return request({
+    url: "/model/qmbcbz",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 青苗 补偿标准 update
+export function updateQmbcbz(data) {
+  return request({
+    url: "/model/qmbcbz",
+    method: "put",
+    data: data,
+  });
+}
+// 删除 青苗 补偿标准 delbyid
+export function delQmbcbz(id) {
+  return request({
+    url: "/model/qmbcbz/" + id,
+    method: "delete",
+  });
+}
+
+// 03 拆迁 补偿标准列表 list
+export function getCqBcbzList(query) {
+  return request({
+    url: "/model/cqbczd/list",
+    method: "get",
+    params: query,
+  });
+}
+// 拆迁 补偿标准 getbyid
+export function getCqBcbzById(id) {
+  return request({
+    url: "/model/cqbcbz/" + id,
+    method: "get",
+  });
+}
+//添加 拆迁 补偿标准 add
+export function addCqBcbz(data) {
+  return request({
+    url: "/model/cqbcbz",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 拆迁 补偿标准 update
+export function updateCqBcbz(data) {
+  return request({
+    url: "/model/cqbcbz",
+    method: "post",
+    data: data,
+  });
+}
+// 删除 拆迁 补偿标准 delbyid
+export function delCqBcbz(id) {
+  return request({
+    url: "/model/cqbcbz/" + id,
+    method: "delete",
+  });
+}
+// 03-1 拆迁 补偿标准项 list
+export function getCqBcbzItemList(query) {
+  return request({
+    url: "/model/cqbcbzitem/list",
+    method: "get",
+    params: query,
+  });
+}
+// 拆迁 补偿标准项 getbyid
+export function getCqBcbzItemById(id) {
+  return request({
+    url: "/model/cqbcbzitem/" + id,
+    method: "get",
+  });
+}
+//添加 拆迁 补偿标准项 add
+export function addCqBcbzItem(data) {
+  return request({
+    url: "/model/cqbcbzitem",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 拆迁 补偿标准项 update
+export function updateCqBcbzItem(data) {
+  return request({
+    url: "/model/cqbcbzitem",
+    method: "put",
+    data: data,
+  });
+}
+// 删除 拆迁 补偿标准项 delbyid
+export function delCqBcbzItem(id) {
+  return request({
+    url: "/model/cqbcbzitem/" + id,
+    method: "delete",
+  });
+}
+
+// 04 拆迁 分析结果 列表 list
+export function getCqResultList(query) {
+  return request({
+    url: "/model/cqresult/list",
+    method: "get",
+    params: query,
+  });
+}
+// 拆迁 分析结果 getbyid
+export function getCqResultById(id) {
+  return request({
+    url: "/model/cqresult/" + id,
+    method: "get",
+  });
+}
+//添加 拆迁 分析结果 add
+export function addCqResult(data) {
+  return request({
+    url: "/model/cqresult",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 拆迁 分析结果 update
+export function updateCqResult(data) {
+  return request({
+    url: "/model/cqresult",
+    method: "post",
+    data: data,
+  });
+}
+// 删除 拆迁 分析结果 delbyid
+export function delCqResult(id) {
+  return request({
+    url: "/model/cqresult/" + id,
+    method: "delete",
+  });
+}
+
+// 05 征地 分析结果 列表 list
+export function getZdResultList(query) {
+  return request({
+    url: "/model/zdresult/list",
+    method: "get",
+    params: query,
+  });
+}
+// 征地 分析结果 getbyid
+export function getZdResultById(id) {
+  return request({
+    url: "/model/zdresult/" + id,
+    method: "get",
+  });
+}
+//添加 征地 分析结果 add
+export function addZdResult(data) {
+  return request({
+    url: "/model/zdresult",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 征地 分析结果 update
+export function updateZdResult(data) {
+  return request({
+    url: "/model/zdresult",
+    method: "post",
+    data: data,
+  });
+}
+// 删除 征地 分析结果 delbyid
+export function delZdResult(id) {
+  return request({
+    url: "/model/zdresult/" + id,
+    method: "delete",
+  });
+}
+
+// 06 青苗 分析结果 列表 list
+export function getQmResultList(query) {
+  return request({
+    url: "/model/qmresult/list",
+    method: "get",
+    params: query,
+  });
+}
+// 青苗 分析结果 getbyid
+export function getQmResultById(id) {
+  return request({
+    url: "/model/qmresult/" + id,
+    method: "get",
+  });
+}
+//添加 青苗 分析结果 add
+export function addQmResult(data) {
+  return request({
+    url: "/model/qmresult",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 青苗 分析结果 update
+export function updateQmResult(data) {
+  return request({
+    url: "/model/qmresult",
+    method: "post",
+    data: data,
+  });
+}
+// 删除 青苗 分析结果 delbyid
+export function delQmResult(id) {
+  return request({
+    url: "/model/qmresult/" + id,
+    method: "delete",
+  });
+}
+// 07 征收补偿项目  列表 list
+export function getZdProjectList(query) {
+  return request({
+    url: "/model/zdproject/list",
+    method: "get",
+    params: query,
+  });
+}
+// 征收补偿项目  getbyid
+export function getZdProjectById(id) {
+  return request({
+    url: "/model/zdproject/" + id,
+    method: "get",
+  });
+}
+//添加 征收补偿项目  add
+export function addZdProject(data) {
+  return request({
+    url: "/model/zdproject",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 征收补偿项目 update
+export function updateZdProject(data) {
+  return request({
+    url: "/model/zdproject",
+    method: "post",
+    data: data,
+  });
+}
+// 删除 征收补偿项目 delbyid
+export function delZdProject(id) {
+  return request({
+    url: "/model/zdproject/" + id,
+    method: "delete",
+  });
+}
+export async function expotZDBCWord(data) {
+  let response = await request({
+    url: "/model/zdproject/exportWord",
+    method: "post",
+    responseType: "blob",
+    data: data,
+  });
+  debugger;
+
+  var fileName = "分析报告";
+  if (data.projectName) fileName = data.projectName;
+  debugger;
+  const contentDisposition = response.headers["content-disposition"];
+  if (contentDisposition) {
+    fileName = window.decodeURI(
+      response.headers["content-disposition"].split("=")[1],
+      "UTF-8"
+    );
+  }
+  const isBlob = blobValidate(response.data);
+  debugger;
+  if (isBlob) {
+    const blob = new Blob([response.data]);
+    saveAs(blob, fileName);
+  } else {
+    const resText = await response.text();
+    const rspObj = JSON.parse(resText);
+    const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
+    Message.error(errMsg);
+  }
+  return;
+}
+
+// 08 权属 分析结果 列表 list
+export function getQsResultList(query) {
+  return request({
+    url: "/model/qsresult/list",
+    method: "get",
+    params: query,
+  });
+}
+// 权属 分析结果 getbyid
+export function getQsResultById(id) {
+  return request({
+    url: "/model/qsresult/" + id,
+    method: "get",
+  });
+}
+//添加 权属 分析结果 add
+export function addQsResult(data) {
+  return request({
+    url: "/model/qsresult",
+    method: "post",
+    data: data,
+  });
+}
+// 更新 权属 分析结果 update
+export function updateQsResult(data) {
+  return request({
+    url: "/model/qsresult",
+    method: "post",
+    data: data,
+  });
+}
+// 删除 权属 分析结果 delbyid
+export function delQsResult(id) {
+  return request({
+    url: "/model/qsresult/" + id,
+    method: "delete",
+  });
+}
+
+/*************************征收补偿******************** end */
+
+/*************************夜景灯光******************** start */
+// 查询夜景灯光列列表
+export function listZtLightList(query) {
+  return request({
+    url: "/model/ZtLightList/list",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询夜景灯光列详细
+export function getZtLightList(id) {
+  return request({
+    url: "/model/ZtLightList/" + id,
+    method: "get",
+  });
+}
+
+// 新增夜景灯光列
+export function addZtLightList(data) {
+  return request({
+    url: "/model/ZtLightList",
+    method: "post",
+    data: data,
+  });
+}
+
+// 修改夜景灯光列
+export function updateZtLightList(data) {
+  return request({
+    url: "/model/ZtLightList",
+    method: "put",
+    data: data,
+  });
+}
+
+// 删除夜景灯光列
+export function delZtLightList(id) {
+  return request({
+    url: "/model/ZtLightList/" + id,
+    method: "delete",
+  });
+}
+/*************************夜景灯光******************** end */
+
+/*************************广告信息******************** start */
+
+// 查询广告项目信息列表
+export function listZtBillboardInfoList(query) {
+  return request({
+    url: "/model/ZtBillboardInfoList/list",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询广告项目信息详细
+export function getZtBillboardInfoList(id) {
+  return request({
+    url: "/model/ZtBillboardInfoList/" + id,
+    method: "get",
+  });
+}
+
+// 新增广告项目信息
+export function addZtBillboardInfoList(data) {
+  return request({
+    url: "/model/ZtBillboardInfoList",
+    method: "post",
+    data: data,
+  });
+}
+
+// 修改广告项目信息
+export function updateZtBillboardInfoList(data) {
+  return request({
+    url: "/model/ZtBillboardInfoList",
+    method: "put",
+    data: data,
+  });
+}
+
+// 删除广告项目信息
+export function delZtBillboardInfoList(id) {
+  return request({
+    url: "/model/ZtBillboardInfoList/" + id,
+    method: "delete",
+  });
+}
+
+// 查询广告模型信息列表
+export function listBillboardModelList(query) {
+  return request({
+    url: "/model/billboardModelList/list",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询广告模型信息详细
+export function getBillboardModelList(id) {
+  return request({
+    url: "/model/billboardModelList/" + id,
+    method: "get",
+  });
+}
+
+// 新增广告模型信息
+export function addBillboardModelList(data) {
+  return request({
+    url: "/model/billboardModelList",
+    method: "post",
+    data: data,
+  });
+}
+
+// 修改广告模型信息
+export function updateBillboardModelList(data) {
+  return request({
+    url: "/model/billboardModelList",
+    method: "put",
+    data: data,
+  });
+}
+
+// 删除广告模型信息
+export function delBillboardModelList(id) {
+  return request({
+    url: "/model/billboardModelList/" + id,
+    method: "delete",
+  });
+}
+
+/*************************广告信息******************** end */

+ 23 - 23
src/components/Query/clickQuery/clickQuery.vue

@@ -106,7 +106,7 @@ import * as turf from "@turf/turf";
 let gwtype;
 let query_click = null;
 let manager_layer_png = null;
-
+let dataSourceLayer =null
 export default {
   name: "clickQuery",
   components: { CockpitVector, MultiLevelQuery },
@@ -136,7 +136,7 @@ export default {
       queryResultsGeom: {},
       queryResultsGeomPart: {},
       viewer: null,
-      dataSourceLayer: null,
+      // dataSourceLayer: null,
       actionOptions: [
         {
           index: 1,
@@ -202,11 +202,11 @@ export default {
     PoinyQueryShow(val) {
       if (!this.inited) {
         this.inited = !this.inited;
-        this.viewer = viewer;
-        this.viewer.entities.removeAll();
+        // viewer = viewer;
+        viewer.entities.removeAll();
         this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
-        this.dataSourceLayer = new Cesium.CustomDataSource("query");
-        this.viewer.dataSources.add(this.dataSourceLayer);
+        dataSourceLayer = new Cesium.CustomDataSource("query");
+        viewer.dataSources.add(dataSourceLayer);
       }
     },
   },
@@ -244,8 +244,8 @@ export default {
       store.state.vectorData = [];
     },
     addGeometrys(fill) {
-      this.viewer.entities.removeAll();
-      this.dataSourceLayer.entities.removeAll();
+      viewer.entities.removeAll();
+      dataSourceLayer.entities.removeAll();
       let geoms = this.queryResultsGeom[this.activeLayerId];
       let parts = this.queryResultsGeomPart[this.activeLayerId];
       for (let i = 0; i < geoms.length; i++) {
@@ -266,7 +266,7 @@ export default {
             points.push(cy);
           }
           if (fill) {
-            this.viewer.entities.add({
+            viewer.entities.add({
               polyline: new Cesium.PolylineGraphics({
                 positions: Cesium.Cartesian3.fromDegreesArray(points),
                 width: 3,
@@ -286,7 +286,7 @@ export default {
               },
             });
           } else {
-            this.viewer.entities.add({
+            viewer.entities.add({
               polyline: new Cesium.PolylineGraphics({
                 positions: Cesium.Cartesian3.fromDegreesArray(points),
                 width: 3,
@@ -296,11 +296,11 @@ export default {
             });
           }
         }
-        // this.viewer.flyTo(this.viewer.entities);
+        // viewer.flyTo(viewer.entities);
       }
     },
     flyTo(index) {
-      this.dataSourceLayer.entities.removeAll();
+      dataSourceLayer.entities.removeAll();
       let geoms = this.queryResultsGeom[this.activeLayerId];
       let parts = this.queryResultsGeomPart[this.activeLayerId];
       let cur = geoms[index];
@@ -320,8 +320,8 @@ export default {
             points.push(cx);
             points.push(cy);
           }
-          // let e = this.dataSourceLayer.entities.
-          let e = this.viewer.entities.add({
+          // let e = dataSourceLayer.entities.
+          let e = viewer.entities.add({
             polyline: new Cesium.PolylineGraphics({
               positions: Cesium.Cartesian3.fromDegreesArray(points),
               width: 3,
@@ -330,7 +330,7 @@ export default {
             }),
           });
         }
-        this.viewer.flyTo(e);
+        viewer.flyTo(e);
       } else {
         this.$message({
           message: "空间范围为空!",
@@ -343,8 +343,8 @@ export default {
     },
     // 设置数据
     setData() {
-      this.dataSourceLayer = new Cesium.CustomDataSource("query");
-      this.viewer.dataSources.add(this.dataSourceLayer);
+      dataSourceLayer = new Cesium.CustomDataSource("query");
+      viewer.dataSources.add(dataSourceLayer);
       this.activeLayerId = "0";
       this.queryResults = {};
       this.queryResultsGeom = {};
@@ -666,8 +666,8 @@ export default {
       this.activeLayerId = "0";
       this.layerList = [];
       this.layersData = [];
-      this.viewer.entities.removeAll();
-      this.dataSourceLayer.entities.removeAll();
+      viewer.entities.removeAll();
+      dataSourceLayer.entities.removeAll();
       let title;
       if (store.state.checkedData) title = store.state.checkedData.title;
       //  超图分层分户
@@ -754,11 +754,11 @@ export default {
       this.queryResultsGeom = {};
       this.queryResultsGeomPart = {};
       this.layerList = [];
-      this.viewer.entities.removeAll();
+      viewer.entities.removeAll();
       this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
       this.handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
-      this.dataSourceLayer.entities.removeAll();
-      this.viewer.dataSources.remove(this.dataSourceLayer);
+      dataSourceLayer.entities.removeAll();
+      viewer.dataSources.remove(dataSourceLayer);
     },
     /**
      * 笛卡尔坐标系转WGS84坐标系(经纬度)
@@ -824,7 +824,7 @@ export default {
         case 1: {
           this.mapQuerys("mapLayerQuery"); //图层点击事件
           this.remove_query_click();
-          this.viewer.entities.removeAll();
+          viewer.entities.removeAll();
           break;
         }
         case 2: {

File diff suppressed because it is too large
+ 0 - 0
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.js


+ 160 - 174
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.vue

@@ -1,8 +1,5 @@
 <template>
-  <div
-    class="ZTGlobal"
-    style="width: 100%; padding: 1rem 1rem 0rem 1rem; color: white"
-  >
+  <div class="ZTGlobal" style="width: 100%; padding: 1rem 1rem 0rem 1rem; color: white">
     <el-row :gutter="10">
       <el-col :span="24">
         基于三亚市控制性详细规划数据和2020年《三亚市国有建设用地土地定级与基准地价》编制成果,实现指定范围内国有建设用地的基准地价预估。
@@ -11,18 +8,9 @@
     </el-row>
     <el-row :gutter="10">
       <el-col :span="24">
-        <el-tabs
-          v-model="activeName"
-          style="height: 100%"
-          @tab-click="handleClick"
-        >
+        <el-tabs v-model="activeName" style="height: 100%" @tab-click="handleClick">
           <el-tab-pane label="基准地价分析" name="first">
-            <el-form
-              ref="ruleForm"
-              :model="form"
-              :rules="rules"
-              label-width="90px"
-            >
+            <el-form ref="ruleForm" :model="form" :rules="rules" label-width="90px">
               <el-form-item label="项目名称" size="mini" prop="ProjectName">
                 <el-col :span="20">
                   <el-input size="mini" v-model="form.ProjectName"></el-input>
@@ -38,66 +26,41 @@
                   <input @change="handleUpload" type="file" style="display:none" id="fileInput" accept=".zip"></input>
                   <el-button type="primary" @click="inputGeometry">导入</el-button>
                   <!-- <el-button type="primary">导入范围</el-button> -->
-                  <el-button type="primary" @click="getProjectScope"
-                    >绘制
+                  <el-button type="primary" @click="getProjectScope">绘制
                   </el-button>
-                  <el-button type="primary" @click="resetForm('ruleForm')"
-                    >清除
+                  <el-button type="primary" @click="resetForm('ruleForm')">清除
                   </el-button>
                 </el-col>
               </el-form-item>
-              <el-form-item
-                label="建设单位"
-                size="mini"
-                prop="ConstructionUnit"
-              >
+              <el-form-item label="建设单位" size="mini" prop="ConstructionUnit">
                 <el-col :span="20">
-                  <el-input
-                    size="mini"
-                    v-model="form.ConstructionUnit"
-                  ></el-input>
+                  <el-input size="mini" v-model="form.ConstructionUnit"></el-input>
                 </el-col>
               </el-form-item>
             </el-form>
             <div class="SaveCenter">
-              <el-button type="primary" @click="submitForm('ruleForm')"
-                >开始分析</el-button
-              >
+              <el-button type="primary" @click="submitForm('ruleForm')">开始分析</el-button>
               <el-button @click="resetForm('ruleForm')">重置</el-button>
             </div>
           </el-tab-pane>
           <el-tab-pane label="分析记录" name="second">
             <el-row :gutter="10">
-              <el-col :span="10">
-                <el-input
-                  size="mini"
-                  placeholder="请输入项目名称"
-                  v-model="input3"
-                  class="input-with-select"
-                >
-                  <el-button slot="append" icon="el-icon-search"></el-button>
+              <el-col :span="8">
+                <el-input size="mini" placeholder="请输入项目名称" v-model="input3" class="input-with-select">
                 </el-input>
               </el-col>
-              <el-col :span="14">
-                <el-date-picker
-                  size="mini"
-                  v-model="datevalue"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  type="daterange"
-                  range-separator=""
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                >
+              <el-col :span="12">
+                <el-date-picker size="mini" v-model="datevalue" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
+                  range-separator="" start-placeholder="开始日期" end-placeholder="结束日期">
                 </el-date-picker>
               </el-col>
+              <el-col :span="4">
+                <el-button size="mini" icon="el-icon-search" @click="getBenchmarkLandPriceList()"></el-button>
+              </el-col>
             </el-row>
             <el-row>
               <el-col>
-                <el-row
-                  :gutter="10"
-                  v-for="itemModel in BenchmarkLandPriceList"
-                  :key="itemModel.id"
-                >
+                <el-row :gutter="10" v-for="itemModel in BenchmarkLandPriceList" :key="itemModel.id">
                   <el-col :span="24">
                     <el-card shadow="hover" class="card_body_style hover_style">
                       <el-row>
@@ -112,57 +75,36 @@
                       </el-row>
                       <el-row>
                         <el-col :span="12">
-                          <el-button
-                            v-if="itemModel.AnalysisStatus == '完成'"
-                            size="mini"
-                            type="primary"
-                            >{{ itemModel.AnalysisStatus }}</el-button
-                          >
-                          <el-button
-                            v-if="itemModel.AnalysisStatus == '正在分析'"
-                            size="mini"
-                            type="success"
-                            >{{ itemModel.AnalysisStatus }}</el-button
-                          >
-                          <el-button
-                            v-if="itemModel.AnalysisStatus == '异常'"
-                            size="mini"
-                            type="danger"
-                            >{{ itemModel.AnalysisStatus }}</el-button
-                          >
-                          <el-button
-                            v-if="itemModel.AnalysisStatus == '异常'"
-                            size="mini"
-                            type="danger"
-                            >{{ itemModel.AnalysisStatus }}</el-button
-                          >
+                          <el-button v-if="itemModel.AnalysisStatus == '完成'" size="mini" type="primary">{{
+                            itemModel.AnalysisStatus }}</el-button>
+                          <el-button v-if="itemModel.AnalysisStatus == '正在分析'" size="mini" type="success">{{
+                            itemModel.AnalysisStatus }}</el-button>
+                          <el-button v-if="itemModel.AnalysisStatus == '异常'" size="mini" type="danger">{{
+                            itemModel.AnalysisStatus }}</el-button>
+                          <el-button v-if="itemModel.AnalysisStatus == '异常'" size="mini" type="danger">{{
+                            itemModel.AnalysisStatus }}</el-button>
                         </el-col>
                         <el-col :span="12">
                           <div style="float: right">
                             <!-- <el-button size="mini" type="default">日志</el-button> -->
-                            <el-button
-                              size="mini"
-                              type="default"
-                              @click="openAnalyzeResults(itemModel)"
-                              >结果</el-button
-                            >
-                            <el-button
-                              size="mini"
-                              type="default"
-                              @click="handleGetBG(itemModel)"
-                              >报告</el-button
-                            >
+                            <el-button size="mini" type="default"
+                              @click="openAnalyzeResults(itemModel.id)">结果</el-button>
+                            <el-button size="mini" type="default" @click="handleGetBG(itemModel.id)">报告</el-button>
                           </div>
                         </el-col>
                       </el-row>
                     </el-card>
                   </el-col>
                 </el-row>
+                <el-pagination :hide-on-single-page="true" style="color: white" @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange" :page-size="queryParams.pageSize" layout="prev, pager, next"
+                  :total="queryParams.total">
+                </el-pagination>
               </el-col>
             </el-row>
           </el-tab-pane>
           <el-tab-pane label="分析结果" name="third">
-            <jzdjfxsmjg  v-if="iSjzdjfxsmjgShow" :info="{BenchmarkLandPrice:BenchmarkLandPriceinfo}"></jzdjfxsmjg>
+            <jzdjfxsmjg v-if="iSjzdjfxsmjgShow" :info="{ BenchmarkLandPrice: BenchmarkLandPriceinfo }"></jzdjfxsmjg>
           </el-tab-pane>
         </el-tabs>
       </el-col>
@@ -191,8 +133,8 @@ import {
   midpoint,
   difference,
 } from "@turf/turf";
-import { getJZDJWord, listBenchmarkLandPrices } from "@/api/zt/ztApi.js";
-let handlerPolygon;var polygonEntity = null;
+import { getJZDJWord, listBenchmarkLandPrices, addBenchmarkLandPrices, updateBenchmarkLandPrices, addZtBenchmarkLandPriceResults, getBenchmarkLandPrices, listZtBenchmarkLandPriceResults } from "@/api/zt/ztApi.js";
+let handlerPolygon; var polygonEntity = null;
 export default {
   data() {
     return {
@@ -204,18 +146,18 @@ export default {
       activeName: "first",
       //绘制事件
       // handlerPolygon: null,
-      iSjzdjfxsmjgShow:false,
-      BenchmarkLandPriceinfo:null,
+      iSjzdjfxsmjgShow: false,
+      BenchmarkLandPriceinfo: null,
       form: {
         id: "",
         ProjectScope: [],
         ProjectName: "",
         ProjectType: "",
         ConstructionUnit: "",
-        ztBenchmarkLandPriceResultsList:{}
+        // ztBenchmarkLandPriceResultsList: []
       },
-      input3:"",
-      datevalue:[],
+      input3: "",
+      datevalue: [],
       // datevalue:[moment().add(-1, 'days').startOf("day").format('YYYY-MM-DD HH:mm:ss'),moment().endOf("day").format('YYYY-MM-DD HH:mm:ss')],
       rules: {
         ProjectName: [
@@ -232,6 +174,11 @@ export default {
       LayerData: {
         GHDKData: [],
       },
+      queryParams: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+      },
     };
   },
   components: {
@@ -242,27 +189,40 @@ export default {
   },
   methods: {
     async init() {
-      var date=new Date()
-      this.form.ProjectName="基准地价分析_"+this.formatDateTime(date)
-      this.form.ConstructionUnit="建设单位"
-      
+      var date = new Date()
+      this.form.ProjectName = "基准地价分析_" + this.formatDateTime(date)
+      this.form.ConstructionUnit = "建设单位"
+
       await this.getBenchmarkLandPriceList();
     },
-/**
- * 获取基准地价信息
- */
+    //页大小触发
+    handleSizeChange(val) {
+      this.queryParams.pageSize = val;
+      this.queryParams.pageNum = 1;
+      this.getBenchmarkLandPriceList();
+    },
+    //跳转页触发
+    handleCurrentChange(val) {
+      this.queryParams.pageNum = val;
+      this.getBenchmarkLandPriceList();
+    },
+    /**
+     * 获取基准地价信息
+     */
     async getBenchmarkLandPriceList() {
-      // debugger
-      // let BenchmarkLandPrices = await listBenchmarkLandPrices({
-      //   params:{
-      //     beginTime: this.datevalue[0],
-      //     endTime:this.datevalue[1]
-      //   },
-      //   ProjectName: this.input3,
-      // });
-      // this.BenchmarkLandPriceList=BenchmarkLandPrices.rows;
-      this.BenchmarkLandPriceList = window.BenchmarkLandPriceList;
-    
+      debugger
+      let BenchmarkLandPrices = await listBenchmarkLandPrices({
+        params: {
+          beginTime: this.datevalue ? this.datevalue[0] : '',
+          endTime: this.datevalue ? this.datevalue[1] : ''
+        },
+        ProjectName: this.input3,
+        ...this.queryParams
+      });
+      this.queryParams.total = BenchmarkLandPrices.total;
+      this.BenchmarkLandPriceList = BenchmarkLandPrices.rows;
+      // this.BenchmarkLandPriceList = window.BenchmarkLandPriceList;
+
     },
     formatDateTime(date) {
       var y = date.getFullYear();
@@ -276,7 +236,7 @@ export default {
       minute = minute < 10 ? ('0' + minute) : minute;
       var second = date.getSeconds();
       second = second < 10 ? ('0' + second) : second;
-      return y.toString() + m.toString()  + d.toString()  + h.toString()  + minute.toString() + second.toString();
+      return y.toString() + m.toString() + d.toString() + h.toString() + minute.toString() + second.toString();
     },
     /**
      * tas切换
@@ -285,11 +245,11 @@ export default {
      */
     handleClick(tab, event) {
       if (this.activeName == "third") {
-        this.iSjzdjfxsmjgShow=true;
-      }else{
-        this.iSjzdjfxsmjgShow=false;
+        this.iSjzdjfxsmjgShow = true;
+      } else {
+        this.iSjzdjfxsmjgShow = false;
       }
-      
+
     },
 
     /**
@@ -353,9 +313,9 @@ export default {
         handlerPolygon.polyline.show = false;
         debugger
         handlerPolygon.polygon.polygon.material.color = Cesium.Color.WHITE.withAlpha(0.3);
-        handlerPolygon.polygon.polygon.outline= true;
-        handlerPolygon.polygon.polygon.outlineColor= Cesium.Color.RED;
-          handlerPolygon.polygon.polygon.outlineWidth= 2.0;
+        handlerPolygon.polygon.polygon.outline = true;
+        handlerPolygon.polygon.polygon.outlineColor = Cesium.Color.RED;
+        handlerPolygon.polygon.polygon.outlineWidth = 2.0;
         that.tooltip.setVisible(false);
         var polygon = result.object;
         if (!polygon) {
@@ -383,36 +343,50 @@ export default {
     },
     submitForm(formName) {
       let that = this;
-      this.$refs[formName].validate((valid) => {
+      this.$refs[formName].validate(async (valid) => {
         if (valid) {
           that.form.id = uuidv4();
           that.form.analysisDate = moment(new Date()).format(
             "YYYY-MM-DD HH:mm:ss"
           );
           that.form.AnalysisStatus = "正在分析";
-          window.BenchmarkLandPriceList.push(
-            JSON.parse(JSON.stringify(that.form))
-          );
-          this.init();
-          let data=this.BenchmarkLandPriceList.find(c=>c.id==that.form.id);
-          BenchmarkLandPrice.calculateLandPrice(data,true,function(response){
-            if(response){
+          // window.BenchmarkLandPriceList.push(
+          //   JSON.parse(JSON.stringify(that.form))
+          // );
+          that.form.ProjectScope = JSON.stringify(that.form.ProjectScope);
+          var rownum = await addBenchmarkLandPrices(that.form);
+          debugger
+          if (rownum.code == 200) {
+
+            debugger
+            let data = JSON.parse(JSON.stringify(that.form));
+            BenchmarkLandPrice.calculateLandPrice(data, true, async function (response) {
+              if (response) {
+                response.id = uuidv4();
+                response.BenchmarkLandPriceid = data.id;
                 data.AnalysisStatus = "完成";
-                data.ztBenchmarkLandPriceResultsList=response;
-                 that.openAnalyzeResults(data);
-            }else{
-              data.AnalysisStatus = "异常";
-                data.ztBenchmarkLandPriceResultsList=response;
-            }
-            that.resetForm(formName);
-          });
-          that.$message({
-            message: "开始分析",
-            type: "success",
-          });
-          
-          
-          
+                var urownum = await updateBenchmarkLandPrices({ id: data.id, AnalysisStatus: data.AnalysisStatus });
+                if (urownum.code == 200) {
+                  debugger
+                  await addZtBenchmarkLandPriceResults(response);
+                }
+                await that.openAnalyzeResults(data.id);
+              } else {
+                that.$message.error("分析异常");
+                data.AnalysisStatus = "异常";
+                var urownum = await updateBenchmarkLandPrices({ id: data.id, AnalysisStatus: data.AnalysisStatus });
+              }
+              that.resetForm(formName);
+              that.init();
+            });
+            that.init();
+            that.$message({
+              message: "开始分析",
+              type: "success",
+            });
+          } else {
+            this.$message.error("项目保存失败");
+          }
         } else {
           return false;
         }
@@ -422,14 +396,14 @@ export default {
       debugger
       this.clear();
       this.$refs[formName].resetFields();
-      var date=new Date();
-      this.form.ProjectName="基准地价分析_"+this.formatDateTime(date);
-      this.form.ConstructionUnit="建设单位";
+      var date = new Date();
+      this.form.ProjectName = "基准地价分析_" + this.formatDateTime(date);
+      this.form.ConstructionUnit = "建设单位";
     },
     /**
      * 点击导入范围
      */
-     inputGeometry() {
+    inputGeometry() {
       var element = document.getElementById('fileInput')
       // debugger
       // document.getElementsByClassName("el-upload__input")= ""
@@ -440,11 +414,11 @@ export default {
     handleUpload(event) {
       this.clearScope();
       debugger
-      
+
       // let fileName = document.getElementsByClassName("el-upload__input")[0].value
       let fileName = event.target.files[0];
       var size = fileName.size
-      if (size > 512*1024) {
+      if (size > 512 * 1024) {
         {
           this.$message("文件大小超限,请重新输入!");
           event.target.value = ''
@@ -474,10 +448,10 @@ export default {
       };
       // this.parsingZip();
     },
-        /**
-     * 导入范围添加图形
-     */
-     addGeometry(geojson) {
+    /**
+ * 导入范围添加图形
+ */
+    addGeometry(geojson) {
       var that = this;
       debugger
       var coordinates = geojson.features[0].geometry.coordinates;
@@ -498,7 +472,7 @@ export default {
       }
       viewer.entities.removeById('polygon');
       polygonEntity = new Cesium.Entity({
-        id:'polygon',
+        id: 'polygon',
 
         position: Cesium.Cartesian3.fromDegreesArray([
           centerX,
@@ -516,7 +490,7 @@ export default {
           outlineWidth: 2.0,
         },
       });
-      
+
       viewer.entities.add(polygonEntity);
       viewer.flyTo(polygonEntity)
     },
@@ -526,12 +500,14 @@ export default {
      *  打开分析结果弹窗
      * @param BenchmarkLandPrice 基准地价信息
      */
-    openAnalyzeResults(BenchmarkLandPrice) {
+    async openAnalyzeResults(BenchmarkLandPriceid) {
       debugger
-      this.BenchmarkLandPriceinfo=JSON.parse(JSON.stringify(BenchmarkLandPrice));
-      this.iSjzdjfxsmjgShow=true;
+
+      this.BenchmarkLandPriceinfo = (await getBenchmarkLandPrices(BenchmarkLandPriceid)).data;
+      this.BenchmarkLandPriceinfo.ztBenchmarkLandPriceResultsList = (await listZtBenchmarkLandPriceResults({ BenchmarkLandPriceid: this.BenchmarkLandPriceinfo.id })).rows;
+      this.iSjzdjfxsmjgShow = true;
       this.activeName = "third";
-      
+
 
       // debugger
       // if (this.FXJGInfolayerid) {
@@ -597,8 +573,8 @@ export default {
         getFeatureMode: "SQL",
         datasetNames: [
           layer.date_server.datasourcename +
-            ":" +
-            layer.date_server.datasetname,
+          ":" +
+          layer.date_server.datasetname,
         ],
         queryParameter: {
           attributeFilter: sql,
@@ -622,11 +598,11 @@ export default {
           feature.fieldNames.forEach((fieldName, i) => {
             let Field = e.datasetInfos
               ? e.datasetInfos[0].fieldInfos.find(
-                  (c) =>
-                    c.name &&
-                    c.name.toUpperCase() == fieldName.toUpperCase() &&
-                    c.name.toUpperCase().indexOf("SM") == -1
-                )
+                (c) =>
+                  c.name &&
+                  c.name.toUpperCase() == fieldName.toUpperCase() &&
+                  c.name.toUpperCase().indexOf("SM") == -1
+              )
               : null;
             if (Field) {
               featureData.data.push({
@@ -706,11 +682,18 @@ export default {
         });
       }
     },
-    async handleGetBG(item) {
-      debugger;
-      if (item) {
-        await getJZDJWord(item);
+    async handleGetBG(id) {
+
+
+      var item = (
+        await listZtBenchmarkLandPriceResults({
+          BenchmarkLandPriceid: id,
+        })
+      ).rows;
+      if (item.length > 0) {
+        await getJZDJWord(item[0]);
       }
+
     },
     /**
      * 与已有的规划地块比较看是否包含
@@ -814,12 +797,15 @@ export default {
   background-color: rgba(4, 28, 50, 0.5);
   border: 1px solid rgba(15, 122, 200, 0.4);
 }
+
 .card_body_style {
   border: 1px dashed #02a7f0;
 }
+
 .hover_style:hover {
   border: 1px solid #02a7f0;
 }
+
 .con-col {
   display: flex;
   flex-flow: column nowrap;

+ 34 - 27
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/jzdjfxsmjg.vue

@@ -12,7 +12,10 @@
             {{ info.BenchmarkLandPrice.ProjectName }}
           </el-col>
           <el-col :span="6">
-            <el-button size="mini" type="default" @click="handleGetBG"
+            <el-button
+              size="mini"
+              type="default"
+              @click="handleGetBG(info.BenchmarkLandPrice.id)"
               >导出报告</el-button
             >
           </el-col>
@@ -41,7 +44,7 @@
                   <a style="color: white">分析总范围(亩)</a>
                   <a style="font-weight: bold; color: rgba(2, 167, 240, 1)">{{
                     Number(
-                      info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+                      info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
                         .analysisArea
                     ).toFixed(2)
                   }}</a>
@@ -72,7 +75,7 @@
                   <a style="color: white">(亩)</a>
                   <a style="font-weight: bold; color: rgba(2, 167, 240, 1)">{{
                     Number(
-                      info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+                      info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
                         .ParticipationArea
                     ).toFixed(2)
                   }}</a>
@@ -104,7 +107,7 @@
                   <a style="color: white">总地价(万元)</a>
                   <a style="font-weight: bold; color: rgba(2, 167, 240, 1)">{{
                     Number(
-                      info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+                      info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
                         .totalLandPrice
                     ).toFixed(2)
                   }}</a>
@@ -184,7 +187,11 @@
 <script>
 import elementResizeDetectorMaker from "element-resize-detector";
 import PlanningPlotInfo from "@/views/ConstructionApplication3D/PlanningPlot/PlanningPlotInfo.vue";
-import { getJZDJWord, getWord } from "@/api/zt/ztApi.js";
+import {
+  getJZDJWord,
+  getWord,
+  listZtBenchmarkLandPriceResults,
+} from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
@@ -232,14 +239,14 @@ export default {
   mounted() {
     if (this.info.BenchmarkLandPrice != null) {
       if (
-        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
           .ghdkDetailedDjList &&
-        typeof this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+        typeof this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
           .ghdkDetailedDjList === "string"
       ) {
-        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList =
+        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList =
           JSON.parse(
-            this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+            this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
               .ghdkDetailedDjList
           );
       }
@@ -262,14 +269,14 @@ export default {
     async init() {
       // 设置用地类型图层颜色
       let ghyts = [];
-      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList.forEach(
+      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList.forEach(
         (ghdkDetailedDj) => {
           if (!ghyts[ghdkDetailedDj.ghyt]) {
             ghyts[ghdkDetailedDj.ghyt] = this.getLandColor(ghdkDetailedDj.ghyt);
           }
         }
       );
-      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList.forEach(
+      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList.forEach(
         (ghdkDetailedDj) => {
           ghdkDetailedDj.ColorString = ghyts[ghdkDetailedDj.ghyt];
         }
@@ -289,7 +296,7 @@ export default {
      * 渲染绘制范围
      */
     DrawScope() {
-      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList.forEach(
+      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList.forEach(
         (ghdkDetailedDj) => {
           let point3ds = [];
           let pointholes = [];
@@ -359,7 +366,7 @@ export default {
         }
       );
 
-      let ProjectScope = this.info.BenchmarkLandPrice.ProjectScope;
+      let ProjectScope = JSON.parse(this.info.BenchmarkLandPrice.ProjectScope);
       if (ProjectScope.length > 0) {
         if (ProjectScope[0] != ProjectScope[ProjectScope.length - 1]) {
           ProjectScope.push(ProjectScope[0]);
@@ -382,7 +389,7 @@ export default {
     },
 
     initTable() {
-      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList.forEach(
+      this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList.forEach(
         (ghdkDetailedDj, i) => {
           if (ghdkDetailedDj.zytdList.length > 0) {
             this.spanArray.push(ghdkDetailedDj.zytdList.length);
@@ -456,7 +463,7 @@ export default {
       if (that.entitieid != "") {
         var entitie = viewer.entities.getById(that.entitieid);
         let ghdkDetailedDj =
-          this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList.find(
+          this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList.find(
             (c) => c.id == that.entitieid
           );
         let col = Cesium.Color.fromCssColorString(
@@ -509,7 +516,7 @@ export default {
         if (pick && pick.id.id) {
           id = pick.id.id;
           info =
-            that.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList.find(
+            that.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList.find(
               (c) => c.id == id
             );
           if (info) {
@@ -548,14 +555,14 @@ export default {
     /**
      * 打印分析报告
      */
-    async handleGetBG() {
-      if (
-        this.info.BenchmarkLandPrice &&
-        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
-      ) {
-        await getJZDJWord(
-          this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
-        );
+    async handleGetBG(id) {
+      var item = (
+        await listZtBenchmarkLandPriceResults({
+          BenchmarkLandPriceid: id,
+        })
+      ).rows;
+      if (item.length > 0) {
+        await getJZDJWord(item[0]);
       }
     },
 
@@ -564,16 +571,16 @@ export default {
       for (
         let index = 0;
         index <
-        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+        this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
           .ghdkDetailedDjList.length;
         index++
       ) {
         const element =
-          this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList
+          this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0]
             .ghdkDetailedDjList[index];
         viewer.entities.removeById(element.id);
       }
-      // this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList.ghdkDetailedDjList = [];
+      // this.info.BenchmarkLandPrice.ztBenchmarkLandPriceResultsList[0].ghdkDetailedDjList = [];
       //删除绘制范围
       viewer.entities.removeById("HZFW");
     },

+ 1 - 1
src/views/ConstructionApplication3D/ConstructionModelInfo/addConstructionModelInfo.vue

@@ -120,7 +120,7 @@ export default {
       this.$refs[formName].validate(async (valid) => {
         if (valid) {
           that.form.projectinformationid = that.info.id;
-          window.constructionmodel.push(that.form);
+          // window.constructionmodel.push(that.form);
           // // that.lyoption.cancel();
           // that.$layer.close(that.layerid);
 

+ 140 - 106
src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue

@@ -4,75 +4,47 @@
     <el-row :gutter="10">
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
-        <el-select
-          v-model="bcbz"
-          style="width: 90%"
-          @change="selectZDBZ"
-          placeholder="请选择"
-        >
-          <el-option
-            v-for="item in bcbzList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
+        <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ" placeholder="请选择">
+          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-col>
     </el-row>
     <!-- :span-method="arraySpanMethod" -->
-    <el-table :data="curBCBZ.BCBZ" fit border style="width: 100%">
+    <el-table :data="curBCBZ.bcbz" fit border style="width: 100%">
       <!-- <el-table-column prop="id" label="ID" width="180">
             </el-table-column> -->
-      <el-table-column prop="JG" label="房屋结构" width="80">
+      <el-table-column prop="jg" label="房屋结构" width="80">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.JG"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.JG }}</div>
+          <el-input v-model="scope.row.jg" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.jg }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="GRADE" label="等级" width="60">
+      <el-table-column prop="grade" label="等级" width="60">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.GRADE"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.GRADE }}</div>
+          <el-input v-model="scope.row.grade" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.grade }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="BZ" label="单价(元/平方米)" width="80">
+      <el-table-column prop="bz" label="单价(元/平方米)" width="80">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.BZ"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.BZ }}</div>
+          <el-input v-model="scope.row.bz" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.bz }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="DES" label="结构及装饰特征(规格)">
+      <el-table-column prop="des" label="结构及装饰特征(规格)">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.DES"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.DES }}</div>
+          <el-input v-model="scope.row.des" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.des }}</div>
         </template>
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
-          <el-button @click="handleClick(scope.row)" type="text" size="small"
-            >编辑</el-button
-          >
-          <el-button type="text" size="small">删除</el-button>
+          <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
+          <el-button type="text" size="small" @click="handleDeleteClick(scope.row)">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -81,12 +53,7 @@
       <el-button type="primary" @click="saveAs()">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
     </el-row>
-    <el-dialog
-      title="标准名称设置"
-      :modal="false"
-      :visible.sync="dialogFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
@@ -94,21 +61,13 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
       </div>
     </el-dialog>
-
-    <el-dialog
-      title="编辑"
-      :modal="false"
-      :visible.sync="editFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="编辑" :modal="false" :visible.sync="editFormVisible" modal-append-to-body>
       <el-form :model="oldRow" :rules="rules" ref="oldRow">
-        <el-form-item label="房屋结构" prop="JG">
-          <el-select v-model="oldRow.JG">
+        <el-form-item label="房屋结构" prop="jg">
+          <el-select v-model="oldRow.jg">
             <el-option label="框架结构" value="框架结构"></el-option>
             <el-option label="混合结构" value="混合结构"></el-option>
             <el-option label="砖木结构" value="砖木结构"></el-option>
@@ -116,43 +75,28 @@
             <el-option label="凉棚" value="凉棚"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="房屋等级" prop="GRADE">
-          <el-input
-            v-model="oldRow.GRADE"
-            type="number"
-            min="1"
-            max="5"
-            autocomplete="off"
-          ></el-input>
+        <el-form-item label="房屋等级" prop="grade">
+          <el-input v-model="oldRow.grade" type="number" min="1" max="5" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="单价(元/平方米)" prop="BZ">
-          <el-input
-            type="number"
-            min="0"
-            max="100000000"
-            v-model="oldRow.BZ"
-            autocomplete="off"
-          ></el-input>
+        <el-form-item label="单价(元/平方米)" prop="bz">
+          <el-input type="number" min="0" max="100000000" v-model="oldRow.bz" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="规格" prop="DES">
-          <el-input
-            type="textarea"
-            :rows="4"
-            v-model="oldRow.DES"
-            autocomplete="off"
-          ></el-input>
+        <el-form-item label="规格" prop="des">
+          <el-input type="textarea" :rows="4" v-model="oldRow.des" autocomplete="off"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="editFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitEditForm('rowForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitEditForm('rowForm')">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
+import {
+  getCqBcbzList, getCqBcbzItemList,
+  addCqBcbz, updateCqBcbz, addCqBcbzItem, updateCqBcbzItem, delCqBcbzItem
+} from "@/api/zt/ztApi.js";
 export default {
   props: ["cqValue"],
   name: "ZDShowInfo",
@@ -176,19 +120,19 @@ export default {
       //     DES: ''
       // },
       rowRules: {
-        JG: [
+        jg: [
           { required: true, message: "请选择结构", trigger: "blur" },
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
-        GRADE: [
+        grade: [
           { required: true, message: "请选择等级", trigger: "blur" },
           // { min: 1, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
-        BZ: [
+        bz: [
           { required: true, message: "请输入名称", trigger: "blur" },
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
-        DES: [
+        des: [
           { required: true, message: "请输入规划", trigger: "blur" },
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
@@ -201,14 +145,14 @@ export default {
       /**
        * 补偿标准列表
        */
-      bcbzList: JSON.parse(JSON.stringify(window.ZSBC.CQBCList)),
+      bcbzList: [],
       /**
        * 当前标准
        */
       curBCBZ: {
-        label: "",
-        value: "",
-        BCBZ: [
+        name: "",
+        id: "",
+        bcbz: [
           // {
           //     JG: "框架结构",
           //     GRADE: "1",
@@ -318,10 +262,54 @@ export default {
     initForm() {
       debugger;
       console.log(this.cqValue);
-      if (this.cqValue && this.cqValue != "") {
-        this.bcbz = this.cqValue;
-        var item = this.bcbzList.find((t) => t.value == this.bcbz);
-        this.curBCBZ = item;
+      // if (this.cqValue && this.cqValue != "") {
+      //   this.bcbz = this.cqValue;
+      //   var item = this.bcbzList.find((t) => t.value == this.bcbz);
+      //   this.curBCBZ = item;
+      // }
+      this.getInitData();
+    },
+    getInitData() {
+      var that = this;
+      that.bcbz = that.cqValue;
+      if (window.isUseDB) {
+        that.curBCBZ = {
+          id: '',
+          name: '',
+          bcbz: []
+        }
+        getCqBcbzList().then((res) => {
+          that.bcbzList = res.rows;
+          var item = that.bcbzList.find(t => t.id == that.bcbz)
+          if (item) {
+            that.curBCBZ.id = item.id;
+            that.curBCBZ.name = item.name;
+          }
+          var queryParams =
+          {
+            "bz": null,
+            "des": null,
+            "grade": null,
+            "id": null,
+            "jg": null,
+            "pid": that.bcbz
+          }
+          getCqBcbzItemList(queryParams).then((response) => {
+            if (response) {
+              that.curBCBZ.bcbz = response.rows;
+            }
+          }).catch((err) => {
+            console.log(err)
+          })
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+      else {
+        this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
+        if (this.cqValue != undefined && this.cqValue != "") {
+          this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
+        }
       }
     },
     /**
@@ -402,9 +390,26 @@ export default {
      * 编辑按钮
      */
     handleClick(row) {
+      debugger
       this.oldRow = row;
       this.editFormVisible = true;
     },
+    handleDeleteClick(row) {
+      if (row == undefined)
+        return;
+      this.$layer.confirm("确定要删除吗?", {}, function () {
+        delCqBcbzItem([row.id]).then((res) => {
+          if (res)
+          this.$layer.alert("数据已删除!");
+        }).catch((err) => {
+            console.log(err)
+          })
+
+      }, function () {
+        return
+      });
+
+    },
     /**
      * 开启行编辑
      * @param {object} row
@@ -414,6 +419,30 @@ export default {
     },
     submitEditForm() {
       this.editFormVisible = false;
+      this.updateItem()
+    },
+    /**
+     * 
+     */
+    updateItem() {
+      var that = this
+      var model =
+      {
+        "bz": that.oldRow.bz,
+        "des": that.oldRow.des,
+        "grade": that.oldRow.grade,
+        "id": that.oldRow.id,
+        "jg": that.oldRow.jg,
+        "pid": that.oldRow.pid,
+
+      }
+      updateCqBcbzItem(model).then((res) => {
+        if (res)
+          that.$layer.alert("保存完成");
+
+      }).catch((err) => {
+        console.log(err)
+      })
     },
     /**
      * 保存当前行
@@ -434,9 +463,10 @@ export default {
     color: #02a7f0;
     font-weight: 400;
 } */
-.el-input >>> .el-input__inner {
+.el-input>>>.el-input__inner {
   text-align: right !important;
 }
+
 /* .el -input>input, .el-select-dropdown, .el-textarea>textarea
 {
     color: #fff !important;
@@ -445,6 +475,10 @@ export default {
     text-align: center;
 
 } */
+.el-form-item {
+  margin: 0;
+}
+
 .el-input__inner {
   text-align: end;
 }

+ 108 - 111
src/views/ConstructionApplication3D/Demolition/CQShowInfo.vue

@@ -4,68 +4,41 @@
     <el-row :gutter="10">
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
-        <el-select
-          size="mini"
-          v-model="bcbz"
-          style="width: 90%"
-          @change="selectZDBZ"
-          placeholder="请选择"
-        >
-          <el-option
-            v-for="item in bcbzList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
+        <el-select size="mini" v-model="bcbz" style="width: 90%" @change="selectZDBZ" placeholder="请选择">
+          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-col>
     </el-row>
     <!-- :span-method="arraySpanMethod" -->
-    <el-table :data="curBCBZ.BCBZ" fit border style="width: 100%">
+    <el-table :data="curBCBZ.bcbz" fit border style="width: 100%">
       <!-- <el-table-column prop="id" label="ID" width="180">
             </el-table-column> -->
-      <el-table-column prop="JG" label="房屋结构" width="80">
+      <el-table-column prop="jg" label="房屋结构" width="80">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.JG"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.JG }}</div>
+          <el-input v-model="scope.row.jg" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.jg }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="GRADE" label="等级" width="60">
+      <el-table-column prop="grade" label="等级" width="60">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.GRADE"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.GRADE }}</div>
+          <el-input v-model="scope.row.GRgradeADE" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.grade }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="BZ" label="单价(元/平方米)" width="80">
+      <el-table-column prop="bz" label="单价(元/平方米)" width="80">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.BZ"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.BZ }}</div>
+          <el-input v-model="scope.row.bz" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.bz }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="DES" label="结构及装饰特征(规格)">
+      <el-table-column prop="des" label="结构及装饰特征(规格)">
         <template slot-scope="scope">
-          <el-input
-            v-model="scope.row.DES"
-            v-show="scope.row.seen"
-            @focus="handleSetFoucsSetData(scope.row)"
-            @blur="loseFoucs(scope.row)"
-          ></el-input>
-          <div v-show="!scope.row.seen">{{ scope.row.DES }}</div>
+          <el-input v-model="scope.row.des" v-show="scope.row.seen" @focus="handleSetFoucsSetData(scope.row)"
+            @blur="loseFoucs(scope.row)"></el-input>
+          <div v-show="!scope.row.seen">{{ scope.row.des }}</div>
         </template>
       </el-table-column>
       <!-- <el-table-column fixed="right" label="操作" width="100">
@@ -80,12 +53,7 @@
             <el-button type="primary" @click="saveAs()">另存为</el-button>
             <el-button type="primary" @click="reset()">重置</el-button>
         </el-row> -->
-    <el-dialog
-      title="标准名称设置"
-      modal="false"
-      :visible.sync="dialogFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="标准名称设置" modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
@@ -93,18 +61,11 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
       </div>
     </el-dialog>
 
-    <el-dialog
-      title="编辑"
-      modal="false"
-      :visible.sync="editFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="编辑" modal="false" :visible.sync="editFormVisible" modal-append-to-body>
       <el-form :model="oldRow" :rules="rules" ref="oldRow">
         <el-form-item label="房屋结构" prop="JG">
           <el-select v-model="oldRow.JG">
@@ -115,43 +76,27 @@
             <el-option label="凉棚" value="凉棚"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="房屋等级" prop="GRADE">
-          <el-input
-            v-model="oldRow.GRADE"
-            type="number"
-            min="1"
-            max="5"
-            autocomplete="off"
-          ></el-input>
+        <el-form-item label="房屋等级" prop="grade">
+          <el-input v-model="oldRow.grade" type="number" min="1" max="5" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="单价(元/平方米)" prop="BZ">
-          <el-input
-            type="number"
-            min="0"
-            max="100000000"
-            v-model="oldRow.BZ"
-            autocomplete="off"
-          ></el-input>
+        <el-form-item label="单价(元/平方米)" prop="bz">
+          <el-input type="number" min="0" max="100000000" v-model="oldRow.bz" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="规格" prop="DES">
-          <el-input
-            type="textarea"
-            :rows="4"
-            v-model="oldRow.DES"
-            autocomplete="off"
-          ></el-input>
+        <el-form-item label="规格" prop="des">
+          <el-input type="textarea" :rows="4" v-model="oldRow.des" autocomplete="off"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="editFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitEditForm('rowForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitEditForm('rowForm')">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
+import {
+  getCqBcbzList, updateCqBcbz, getCqBcbzItemList
+} from "@/api/zt/ztApi.js";
 export default {
   props: ["cqValue"],
   name: "ZDShowInfo",
@@ -175,19 +120,19 @@ export default {
       //     DES: ''
       // },
       rowRules: {
-        JG: [
+        jg: [
           { required: true, message: "请选择结构", trigger: "blur" },
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
-        GRADE: [
+        grade: [
           { required: true, message: "请选择等级", trigger: "blur" },
           // { min: 1, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
-        BZ: [
+        bz: [
           { required: true, message: "请输入名称", trigger: "blur" },
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
-        DES: [
+        des: [
           { required: true, message: "请输入规划", trigger: "blur" },
           // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
         ],
@@ -200,14 +145,14 @@ export default {
       /**
        * 补偿标准列表
        */
-      bcbzList: JSON.parse(JSON.stringify(window.ZSBC.CQBCList)),
+      bcbzList: [],
       /**
        * 当前标准
        */
       curBCBZ: {
-        label: "",
-        value: "",
-        BCBZ: [
+        id: "",
+        name: "",
+        bcbz: [
           // {
           //     JG: "框架结构",
           //     GRADE: "1",
@@ -316,11 +261,49 @@ export default {
      */
     initForm() {
       debugger;
-      console.log(this.cqValue);
-      if (this.cqValue && this.cqValue != "") {
-        this.bcbz = this.cqValue;
-        var item = this.bcbzList.find((t) => t.value == this.bcbz);
-        this.curBCBZ = item;
+      this.getInitData();
+    },
+    getInitData() {
+      var that = this;
+      that.bcbz = that.cqValue;
+      if (window.isUseDB) {
+        that.curBCBZ = {
+          id: '',
+          name: '',
+          bcbz: []
+        }
+        getCqBcbzList().then((res) => {
+          that.bcbzList = res.rows;
+          var item = that.bcbzList.find(t => t.id == that.bcbz)
+          if (item) {
+            that.curBCBZ.id = item.id;
+            that.curBCBZ.name = item.name;
+          }
+          var queryParams =
+          {
+            "bz": null,
+            "des": null,
+            "grade": null,
+            "id": null,
+            "jg": null,
+            "pid": that.bcbz
+          }
+          getCqBcbzItemList(queryParams).then((response) => {
+            if (response) {
+              that.curBCBZ.bcbz = response.rows;
+            }
+          }).catch((err) => {
+            console.log(err)
+          })
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+      else {
+        this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
+        if (this.cqValue != undefined && this.cqValue != "") {
+          this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
+        }
       }
     },
     /**
@@ -328,20 +311,24 @@ export default {
      */
     selectZDBZ() {
       debugger;
-      if (this.bcbz && this.bcbz != "") {
+      if (this.bcbz == undefined && this.bcbz == "") {
+        return;
+      }
+      if (window.isUseDB) {
+
+        var name
+      }
+      else {
         this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
       }
+
     },
 
     /**
      * 重置
      */
     reset() {
-      // var val = this.bcbz
-      this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
-      var item = this.bcbzList.find((t) => t.value == this.bcbz);
-      debugger;
-      this.curBCBZ = item;
+      this.getInitData();
     },
 
     /**
@@ -353,10 +340,19 @@ export default {
         return;
       }
       debugger;
-      var index = window.ZSBC.CQBCList.findIndex((t) => t.value == this.bcbz);
-      if (index > -1) {
-        window.ZSBC.CQBCList[index] = this.curBCBZ;
-        this.$layer.alert("保存完成");
+      if (window.isUseDB) {
+        var model = {
+        }
+        var response = updateCqBcbz(model)
+        if (response.code == 200)
+          this.$layer.alert("保存完成");
+      }
+      else {
+        var index = window.ZSBC.CQBCList.findIndex((t) => t.value == this.bcbz);
+        if (index > -1) {
+          window.ZSBC.CQBCList[index] = this.curBCBZ;
+          this.$layer.alert("保存完成");
+        }
       }
     },
     /***
@@ -433,9 +429,10 @@ export default {
     color: #02a7f0;
     font-weight: 400;
 } */
-.el-input >>> .el-input__inner {
+.el-input>>>.el-input__inner {
   text-align: right !important;
 }
+
 /* .el -input>input, .el-select-dropdown, .el-textarea>textarea
 {
     color: #fff !important;

File diff suppressed because it is too large
+ 391 - 182
src/views/ConstructionApplication3D/Demolition/DemolitionList.vue


+ 9 - 2
src/views/ConstructionApplication3D/Demolition/Property.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="ZTGlobal">
-        <el-table :data="tableData" style="width: 100%">
+        <el-table :data="datas" style="width: 100%">
             <el-table-column prop="name" label="字段名" width="180">
             </el-table-column>
             <el-table-column prop="value" label="字段值" width="180">
@@ -13,8 +13,15 @@
 export default {
     name: "Property",
     props: ["tableData"],
+    data() {
+        return {
+            datas: {}
+        }
+    },
+    created() {
+        this.datas = JSON.parse(JSON.stringify(this.tableData))
 
-
+    }
 
 }
 

+ 90 - 92
src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue

@@ -5,50 +5,28 @@
       <el-col :span="6">青苗补偿标准:</el-col>
       <el-col :span="18">
         <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ()">
-          <el-option
-            v-for="item in bcbzList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
+          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-col>
     </el-row>
 
     <el-row>
       <el-col :span="6">农作物补偿:</el-col>
-      <el-col :span="16"
-        ><el-input
-          style="width: 100%"
-          type="number"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.NZW"
-        ></el-input>
+      <el-col :span="16"><el-input style="width: 100%" type="number" placeholder="请输入"
+          v-model="curBCBZ.nzw"></el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">经济作物:</el-col>
       <el-col :span="16">
-        <el-input
-          style="width: 100%"
-          placeholder="请输入"
-          type="number"
-          v-model="curBCBZ.BCBZ.JJZW"
-        ></el-input
-      ></el-col>
+        <el-input style="width: 100%" placeholder="请输入" type="number" v-model="curBCBZ.jjzw"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">树木补偿:</el-col>
       <el-col :span="16">
-        <el-input
-          style="width: 100%"
-          placeholder="请输入"
-          type="number"
-          v-model="curBCBZ.BCBZ.SM"
-        ></el-input
-      ></el-col>
+        <el-input style="width: 100%" placeholder="请输入" type="number" v-model="curBCBZ.sm"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row justify="center" type="flex">
@@ -56,12 +34,7 @@
       <el-button type="primary" @click="saveAs()">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
     </el-row>
-    <el-dialog
-      title="标准名称设置"
-      :modal="false"
-      :visible.sync="dialogFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
@@ -69,14 +42,15 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
+import {
+  getQmbcbzList, updateQmbcbz, addQmbcbz
+} from "@/api/zt/ztApi.js";
 export default {
   props: ["qmValue"],
   name: "QMSetInfo",
@@ -95,23 +69,21 @@ export default {
       /**
        * 补偿标准绑定值
        */
-      bcbz: "",
+      bcbz: null,
       // curLabel: '',
       /**
        * 补偿标准列表
        */
-      bcbzList: JSON.parse(JSON.stringify(window.ZSBC.QMBCList)),
+      bcbzList: [],
       /**
        * 当前标准
        */
       curBCBZ: {
-        label: "",
-        value: "",
-        BCBZ: {
-          NZW: 0,
-          JJZW: 0,
-          SM: 0,
-        },
+        name: "",
+        id: null,
+        nzw: 0,
+        jjzw: 0,
+        sm: 0
       },
     };
   },
@@ -121,16 +93,34 @@ export default {
   methods: {
     initForm() {
       debugger;
-      if (this.qmValue && this.qmValue != "") {
-        this.bcbz = this.qmValue;
-        var item = this.bcbzList.find((t) => t.value == this.bcbz);
-        this.curBCBZ = item;
+      this.getInitData()
+    },
+    getInitData() {
+      var that = this;
+      that.bcbz = that.qmValue;
+      if (window.isUseDB) {
+        getQmbcbzList().then((response) => {
+          if (response) {
+            that.bcbzList = response.rows
+            if (that.qmValue != undefined || that.qmValue != "") {
+              that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+            }
+          }
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+      else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
+        if (that.qmValue != undefined || this.qmValue != "") {
+          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+        }
       }
     },
     selectZDBZ() {
       debugger;
       if (this.bcbz && this.bcbz != "") {
-        this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
+        this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
       }
       // this.changeZDBZ();
     },
@@ -149,25 +139,7 @@ export default {
      * 重置
      */
     reset() {
-      // var val = this.bcbz
-      this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
-      var item = this.bcbzList.find((t) => t.value == this.bcbz);
-      debugger;
-      this.curBCBZ = {
-        label: item.label,
-        value: item.value,
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          NZW: item.BCBZ.NZW,
-          JJZW: item.BCBZ.JJZW,
-          SM: item.BCBZ.SM,
-        },
-      };
-
-      //     var item = this.bcbzList.find(t => t.value == this.bcbz)
-      // this.bcbz = val;
+      this.getInitData()
     },
     /**
      * 保存修改
@@ -178,20 +150,36 @@ export default {
         return;
       }
       debugger;
-      var index = window.ZSBC.QMBCList.findIndex((t) => t.value == this.bcbz);
-      if (index > -1) {
-        window.ZSBC.QMBCList[index] = this.curBCBZ;
-        this.$layer.alert("保存完成");
+      var model = {
+        "id": this.curBCBZ.id,
+        "jjzw": this.curBCBZ.jjzw,
+        "name": this.curBCBZ.name,
+        "nzw": this.curBCBZ.nzw,
+        "sm": this.curBCBZ.sm,
+      }
+      if (window.isUseDB) {//数据库
+
+        updateQmbcbz(model).then((response) => {
+          if (response.code == 200) {
+            this.$layer.alert("保存完成");
+          }
+        }).catch((err) => {
+          console.log(err.console)
+        })
+      }
+      else {
+
+        var index = window.ZSBC.QMBCList.findIndex((t) => t.value == this.bcbz);
+        if (index > -1) {
+          window.ZSBC.QMBCList[index] = this.curBCBZ;
+          this.$layer.alert("保存完成");
+        }
       }
     },
     /***
      * 另存为
      */
     saveAs() {
-      // if (this.bcbz == "") {
-      //     this.$layer.alert("请选择补偿标准");
-      //     return
-      // }
       this.dialogFormVisible = true;
     },
     submitForm(formName) {
@@ -214,22 +202,31 @@ export default {
       debugger;
       var val = (window.ZSBC.QMBCList.length + 1).toString();
       var newBCBZ = {
-        label: this.ruleForm.name,
-        value: val,
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          NZW: this.curBCBZ.BCBZ.NZW,
-          JJZW: this.curBCBZ.BCBZ.JJZW,
-          SM: this.curBCBZ.BCBZ.SM,
-        },
+        "id": val,
+        "jjzw": this.curBCBZ.jjzw,
+        "name": this.ruleForm.name,
+        "nzw": this.curBCBZ.nzw,
+        "sm": this.curBCBZ.sm,
       };
-      window.ZSBC.QMBCList.push(newBCBZ);
-      this.bcbzList = window.ZSBC.QMBCList;
-      this.bcbz = val;
+      if (window.isUseDB) {
+        newBCBZ.id = null
+        addQmbcbz(newBCBZ).then((response) => {
+          if (response && response.code == 200) {
+            this.$layer.alert("保存完成");
+          }
+        }).catch((err) => {
+
+          console.log(err)
+        })
+      }
+      else {
+        window.ZSBC.QMBCList.push(newBCBZ);
+        this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList))
+        this.bcbz = val;
+        this.curBCBZ = this.bcbzList.find(t => t.id == this.bcbz);
+      }
     },
-  },
+  }
 };
 </script>
 <style lang="scss">
@@ -247,7 +244,8 @@ export default {
   color: #02a7f0;
   font-weight: 400;
 }
-.el-input >>> .el-input__inner {
+
+.el-input>>>.el-input__inner {
   text-align: right !important;
 }
 

+ 48 - 140
src/views/ConstructionApplication3D/Demolition/QMShowInfo.vue

@@ -5,48 +5,27 @@
       <el-col :span="6">青苗补偿标准:</el-col>
       <el-col :span="18">
         <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ()">
-          <el-option
-            v-for="item in bcbzList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
+          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-col>
     </el-row>
 
     <el-row>
       <el-col :span="6">农作物补偿:</el-col>
-      <el-col :span="16"
-        ><el-input
-          style="width: 100%"
-          placeholder="请输入"
-          readonly
-          v-model="curBCBZ.BCBZ.NZW"
-        ></el-input>
+      <el-col :span="16"><el-input style="width: 100%" placeholder="请输入" readonly v-model="curBCBZ.nzw"></el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">经济作物:</el-col>
       <el-col :span="16">
-        <el-input
-          style="width: 100%"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.JJZW"
-        ></el-input
-      ></el-col>
+        <el-input style="width: 100%" placeholder="请输入" v-model="curBCBZ.jjzw"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">树木补偿:</el-col>
       <el-col :span="16">
-        <el-input
-          style="width: 100%; text-align: right"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.SM"
-        ></el-input
-      ></el-col>
+        <el-input style="width: 100%; text-align: right" placeholder="请输入" v-model="curBCBZ.sm"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <!-- <el-row justify="center" type="flex">
@@ -54,12 +33,7 @@
       <el-button type="primary" @click="saveAs()">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
     </el-row> -->
-    <el-dialog
-      title="标准名称设置"
-      modal="false"
-      :visible.sync="dialogFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="标准名称设置" modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
@@ -67,14 +41,16 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
+import {
+  getQmbcbzList
+} from "@/api/zt/ztApi.js";
+import { triangleGrid } from "@turf/turf";
 export default {
   props: ["qmValue"],
   name: "QMSetInfo",
@@ -98,18 +74,18 @@ export default {
       /**
        * 补偿标准列表
        */
-      bcbzList: JSON.parse(JSON.stringify(window.ZSBC.QMBCList)),
+      bcbzList: [],
       /**
        * 当前标准
        */
       curBCBZ: {
-        label: "",
-        value: "",
-        BCBZ: {
-          NZW: 0,
-          JJZW: 0,
-          SM: 0,
-        },
+        name: "",
+        id: "",
+
+        nzw: 0,
+        jjzw: 0,
+        sm: 0,
+
       },
     };
   },
@@ -119,113 +95,44 @@ export default {
   methods: {
     initForm() {
       debugger;
-      if (this.qmValue && this.qmValue != "") {
-        this.bcbz = this.qmValue;
-        var item = this.bcbzList.find((t) => t.value == this.bcbz);
-        this.curBCBZ = item;
+      this.getInitData();
+    },
+    getInitData() {
+      var that = this;
+      that.bcbz = that.qmValue;
+      if (window.isUseDB) {
+        getQmbcbzList().then((response) => {
+          if (response) {
+            that.bcbzList = response.rows
+            if (that.qmValue != undefined || that.qmValue != "") {
+              that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+            }
+          }
+        }).catch((err)=>{
+          console.log(err)
+        })
       }
+      else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
+        if (that.qmValue != undefined || this.qmValue != "") {
+          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+        }
+      }
+
     },
     selectZDBZ() {
       debugger;
-      if (this.bcbz && this.bcbz != "") {
-        this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
+      var that = this;
+      if (that.bcbz && that.bcbz != "") {
+        that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
       }
-      // this.changeZDBZ();
-    },
-    /**
-     * 选择标准改变
-     */
-    changeZDBZ() {
-      // this.curBCBZ.BCBZ.TDBCF =
-      //   this.curBCBZ.BCBZ.TDCZ * this.curBCBZ.BCBZ.TDBCBS;
-      // this.curBCBZ.BCBZ.AZBCF =
-      //   this.curBCBZ.BCBZ.TDCZ * this.curBCBZ.BCBZ.AZBCBS;
-      // this.curBCBZ.BCBZ.BCHJ =
-      //   this.curBCBZ.BCBZ.TDBCF + this.curBCBZ.BCBZ.AZBCF;
     },
+
     /**
      * 重置
      */
     reset() {
-      // var val = this.bcbz
-      this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.QMBCList));
-      var item = this.bcbzList.find((t) => t.value == this.bcbz);
-      debugger;
-      this.curBCBZ = {
-        label: item.label,
-        value: item.value,
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          NZW: item.BCBZ.NZW,
-          JJZW: item.BCBZ.JJZW,
-          SM: item.BCBZ.SM,
-        },
-      };
-
-      //     var item = this.bcbzList.find(t => t.value == this.bcbz)
-      // this.bcbz = val;
-    },
-    /**
-     * 保存修改
-     */
-    save() {
-      if (this.bcbz == "") {
-        this.$layer.alert("请选择补偿标准");
-        return;
-      }
-      debugger;
-      var index = window.ZSBC.QMBCList.findIndex((t) => t.value == this.bcbz);
-      if (index > -1) {
-        window.ZSBC.QMBCList[index] = this.curBCBZ;
-        this.$layer.alert("保存完成");
-      }
-    },
-    /***
-     * 另存为
-     */
-    saveAs() {
-      // if (this.bcbz == "") {
-      //     this.$layer.alert("请选择补偿标准");
-      //     return
-      // }
-      this.dialogFormVisible = true;
-    },
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          // alert('submit!');
-          this.dialogFormVisible = false;
-          this.saveData();
-          // this.$layer.alert("保存完成");
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    /**
-     * 另存数据
-     */
-    saveData() {
-      debugger;
-      var val = (window.ZSBC.QMBCList.length + 1).toString();
-      var newBCBZ = {
-        label: this.ruleForm.name,
-        value: val,
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          NZW: this.curBCBZ.BCBZ.NZW,
-          JJZW: this.curBCBZ.BCBZ.JJZW,
-          SM: this.curBCBZ.BCBZ.SM,
-        },
-      };
-      window.ZSBC.QMBCList.push(newBCBZ);
-      this.bcbzList = window.ZSBC.QMBCList;
-      this.bcbz = val;
+      this.getInitData();
     },
   },
 };
@@ -257,7 +164,8 @@ export default {
 .el-input__inner {
   text-align: end;
 }
-.el-input >>> .el-input__inner {
+
+.el-input>>>.el-input__inner {
   text-align: right !important;
 }
 </style>

+ 142 - 203
src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue

@@ -4,18 +4,8 @@
     <el-row>
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
-        <el-select
-          v-model="bcbz"
-          style="width: 90%"
-          @change="selectZDBZ"
-          placeholder="请选择"
-        >
-          <el-option
-            v-for="item in bcbzList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
+        <el-select v-model="bcbz" style="width: 90%" @change="selectZDBZ" placeholder="请选择">
+          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-col>
     </el-row>
@@ -24,93 +14,47 @@
     </el-row>
     <el-row>
       <el-col :span="6">土地年产值:</el-col>
-      <el-col :span="16"
-        ><el-input
-          style="width: 100%"
-          type="number"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.TDCZ"
-          @change="changeZDBZ"
-        ></el-input>
+      <el-col :span="16"><el-input style="width: 100%" type="number" placeholder="请输入" v-model="curBCBZ.tdcz"
+          @change="changeZDBZ"></el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">土地补偿费</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua"
-        >统一年产值 X 综合补偿倍数</el-col
-      >
+      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数:</el-col>
-      <el-col :span="16"
-        ><el-input
-          style="width: 100%"
-          type="number"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.TDBCBS"
-          @change="changeZDBZ"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input style="width: 100%" type="number" placeholder="请输入" v-model="curBCBZ.tdbcbs"
+          @change="changeZDBZ"></el-input></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">土地补偿费:</el-col>
       <el-col :span="16">
-        <el-input
-          placeholder="自动计算"
-          readonly
-          type="number"
-          v-model="curBCBZ.BCBZ.TDBCF"
-        ></el-input
-      ></el-col>
+        <el-input placeholder="自动计算" readonly type="number" v-model="curBCBZ.tdbcf"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">安置补偿费</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua"
-        >统一年产值 X 综合补偿倍数</el-col
-      >
+      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数</el-col>
-      <el-col :span="16"
-        ><el-input
-          type="number"
-          style="width: 100%"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.AZBCBS"
-          @change="changeZDBZ"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input type="number" style="width: 100%" placeholder="请输入" v-model="curBCBZ.azbcbs"
+          @change="changeZDBZ"></el-input></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">安置补偿费:</el-col>
-      <el-col :span="16"
-        ><el-input
-          v-model="curBCBZ.BCBZ.AZBCF"
-          readonly
-          type="number"
-          placeholder="自动计算"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input v-model="curBCBZ.azbcf" readonly type="number" placeholder="自动计算"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">补偿费及安置补助费合计</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua"
-        >统一年产值 X 综合补偿倍数</el-col
-      >
+      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">征地补偿合计:</el-col>
-      <el-col :span="16"
-        ><el-input
-          v-model="curBCBZ.BCBZ.BCHJ"
-          readonly
-          type="number"
-          placeholder="自动计算"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input v-model="curBCBZ.bchj" readonly type="number" placeholder="自动计算"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row justify="center" type="flex">
@@ -118,27 +62,24 @@
       <el-button type="primary" @click="saveAs()">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
     </el-row>
-    <el-dialog
-      title="标准名称设置"
-      :modal="false"
-      :visible.sync="dialogFormVisible"
-      modal-append-to-body
-    >
+    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
-          <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
+          <el-input v-model="ruleForm.name"></el-input>
+          <!-- autocomplete="off" -->
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
+import {
+  getZdBcbzList, updateZdBcbz, addZdBcbz
+} from "@/api/zt/ztApi.js";
 export default {
   props: ["zdValue"],
   name: "ZDShowInfo",
@@ -162,41 +103,41 @@ export default {
       /**
        * 补偿标准列表
        */
-      bcbzList: JSON.parse(JSON.stringify(window.ZSBC.ZDBCList)),
+      bcbzList: [],
       /**
        * 当前标准
        */
       curBCBZ: {
-        label: "",
-        value: "",
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          TDCZ: 0,
-          /**
-           * 土地补偿倍数
-           */
+        name: "",
+        id: "",
 
-          TDBCBS: 0,
-          /**
-           * 土地补偿费
-           */
-          TDBCF: 0,
-          /**
-           * 安置补偿倍数
-           */
+        /**
+         * 土地统一年产值
+         */
+        tdcz: 0,
+        /**
+         * 土地补偿倍数
+         */
+
+        tdbcbs: 0,
+        /**
+         * 土地补偿费
+         */
+        tdbcf: 0,
+        /**
+         * 安置补偿倍数
+         */
+
+        azbcbs: 0,
+        /**
+         * 安置补偿费
+         */
+        azbcf: 0,
+        /**
+         * 补偿合计
+         */
+        bchj: 0,
 
-          AZBCBS: 0,
-          /**
-           * 安置补偿费
-           */
-          AZBCF: 0,
-          /**
-           * 补偿合计
-           */
-          BCHJ: 0,
-        },
       },
     };
   },
@@ -206,73 +147,53 @@ export default {
   methods: {
     initForm() {
       debugger;
-      if (this.zdValue && this.zdValue != "") {
-        this.bcbz = this.zdValue;
-        var item = this.bcbzList.find((t) => t.value == this.bcbz);
-        this.curBCBZ = item;
-      }
+      this.getInitData();
+
     },
     selectZDBZ() {
       debugger;
       if (this.bcbz && this.bcbz != "") {
-        this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
+        this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
       }
       this.changeZDBZ();
     },
+    getInitData() {
+      var that = this;
+      that.bcbz = that.zdValue;
+      if (window.isUseDB) {//数据库
+        getZdBcbzList().then((response) => {
+          that.bcbzList = response.rows;
+          if (that.bcbz != undefined && that.bcbz != "") {
+            that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
+          }
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+      else {
+        that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList))
+        if (that.bcbz != undefined && that.bcbz != "") {
+          that.curBCBZ = that.bcbzList.find(t => t.id == that.bcbz);
+        }
+      }
+
+    },
     /**
      * 选择标准改变
      */
     changeZDBZ() {
-      this.curBCBZ.BCBZ.TDBCF =
-        this.curBCBZ.BCBZ.TDCZ * this.curBCBZ.BCBZ.TDBCBS;
-      this.curBCBZ.BCBZ.AZBCF =
-        this.curBCBZ.BCBZ.TDCZ * this.curBCBZ.BCBZ.AZBCBS;
-      this.curBCBZ.BCBZ.BCHJ =
-        this.curBCBZ.BCBZ.TDBCF + this.curBCBZ.BCBZ.AZBCF;
+      this.curBCBZ.tdbcf =
+        this.curBCBZ.tdcz * this.curBCBZ.tdbcbs;
+      this.curBCBZ.azbcf =
+        this.curBCBZ.tdcz * this.curBCBZ.azbcbs;
+      this.curBCBZ.bchj =
+        this.curBCBZ.tdbcf + this.curBCBZ.azbcf;
     },
     /**
      * 重置
      */
     reset() {
-      // var val = this.bcbz
-      this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
-      var item = this.bcbzList.find((t) => t.value == this.bcbz);
-      debugger;
-      this.curBCBZ = {
-        label: item.label,
-        value: item.value,
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          TDCZ: item.BCBZ.TDCZ,
-          /**
-           * 土地补偿倍数
-           */
-
-          TDBCBS: item.BCBZ.TDBCBS,
-          /**
-           * 土地补偿费
-           */
-          TDBCF: item.BCBZ.TDBCF,
-          /**
-           * 安置补偿倍数
-           */
-
-          AZBCBS: item.BCBZ.AZBCBS,
-          /**
-           * 安置补偿费
-           */
-          AZBCF: item.BCBZ.AZBCF,
-          /**
-           * 补偿合计
-           */
-          BCHJ: item.BCBZ.BCHJ,
-        },
-      };
-
-      //     var item = this.bcbzList.find(t => t.value == this.bcbz)
-      // this.bcbz = val;
+      this.getInitData();
     },
     /**
      * 保存修改
@@ -283,20 +204,40 @@ export default {
         return;
       }
       debugger;
-      var index = window.ZSBC.ZDBCList.findIndex((t) => t.value == this.bcbz);
-      if (index > -1) {
-        window.ZSBC.ZDBCList[index] = this.curBCBZ;
-        this.$layer.alert("保存完成");
+      if (window.isUseDB) {
+        var Model =
+        {
+          "azbcbs": this.curBCBZ.azbcbs,
+          "azbcf": this.curBCBZ.azbcf,
+          "bchj": this.curBCBZ.bchj,
+          "id": this.curBCBZ.id,
+          "name": this.curBCBZ.name,
+          "tbcz": this.curBCBZ.tbcz,
+          "tdbcbs": this.curBCBZ.tdbcbs,
+          "tdbcf": this.curBCBZ.tdbcf,
+        };
+        updateZdBcbz(Model).then((response) => {
+
+          if (response && response.code == 200) {
+            this.$layer.alert("保存完成");
+          }
+        }).catch((err) => {
+          console.log(err)
+        });
+      }
+      else {
+        var index = window.ZSBC.ZDBCList.findIndex((t) => t.value == this.bcbz);
+        if (index > -1) {
+          window.ZSBC.ZDBCList[index] = this.curBCBZ;
+          this.$layer.alert("保存完成");
+        }
       }
     },
     /***
      * 另存为
      */
     saveAs() {
-      // if (this.bcbz == "") {
-      //     this.$layer.alert("请选择补偿标准");
-      //     return
-      // }
+
       this.dialogFormVisible = true;
     },
     submitForm(formName) {
@@ -317,42 +258,37 @@ export default {
      */
     saveData() {
       debugger;
-      var val = (window.ZSBC.ZDBCList.length + 1).toString();
-      var newBCBZ = {
-        label: this.ruleForm.name,
-        value: val,
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          TDCZ: this.curBCBZ.BCBZ.TDCZ,
-          /**
-           * 土地补偿倍数
-           */
-
-          TDBCBS: this.curBCBZ.BCBZ.TDBCBS,
-          /**
-           * 土地补偿费
-           */
-          TDBCF: this.curBCBZ.BCBZ.TDBCF,
-          /**
-           * 安置补偿倍数
-           */
+      var val = (window.ZSBC.ZDBCList.length + 1)
+      var newBCBZ =
+      {
+        "azbcbs": this.curBCBZ.azbcbs,
+        "azbcf": this.curBCBZ.azbcf,
+        "bchj": this.curBCBZ.bchj,
+        "id": val,
+        "name": this.ruleForm.name,
+        "tbcz": this.curBCBZ.tbcz,
+        "tdbcbs": this.curBCBZ.tdbcbs,
+        "tdbcf": this.curBCBZ.tdbcf,
 
-          AZBCBS: this.curBCBZ.BCBZ.AZBCBS,
-          /**
-           * 安置补偿费
-           */
-          AZBCF: this.curBCBZ.BCBZ.AZBCF,
-          /**
-           * 补偿合计
-           */
-          BCHJ: this.curBCBZ.BCBZ.BCHJ,
-        },
       };
-      window.ZSBC.ZDBCList.push(newBCBZ);
-      this.bcbzList = window.ZSBC.ZDBCList;
-      this.bcbz = val;
+      if (window.isUseDB) {
+        Model.id = null
+        addZdBcbz(newBCBZ).then((response) => {
+          if (response && response.code == 200) {
+            this.$layer.alert("保存完成");
+          }
+        }).catch((err) => {
+          console.log(err)
+        });
+      }
+      else {
+        window.ZSBC.ZDBCList.push(newBCBZ);
+        this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.ZDBCList));
+        this.bcbz = val;
+        this.curBCBZ = this.bcbzList.find(t => t.id == this.bcbz);
+        this.$layer.alert("保存完成");
+      }
+
     },
   },
 };
@@ -364,13 +300,16 @@ export default {
 .el-row {
   margin-bottom: 0.5rem;
 }
+
 .subtitle {
   color: #02a7f0;
   font-weight: 400;
 }
-.el-input >>> .el-input__inner {
+
+.el-input>>>.el-input__inner {
   text-align: right !important;
 }
+
 /* .el -input>input, .el-select-dropdown, .el-textarea>textarea
 {
     color: #fff !important;

+ 69 - 129
src/views/ConstructionApplication3D/Demolition/ZDShowInfo.vue

@@ -3,19 +3,8 @@
     <el-row>
       <el-col :span="6">征地补偿标准:</el-col>
       <el-col :span="18">
-        <el-select
-          size="mini"
-          v-model="bcbz"
-          style="width: 90%"
-          @change="selectZDBZ"
-          placeholder="请选择"
-        >
-          <el-option
-            v-for="item in bcbzList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          ></el-option>
+        <el-select size="mini" v-model="bcbz" style="width: 90%" @change="selectZDBZ" placeholder="请选择">
+          <el-option v-for="item in bcbzList" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </el-col>
     </el-row>
@@ -24,105 +13,57 @@
     </el-row>
     <el-row style="display: flex; align-items: center">
       <el-col :span="6">土地年产值:</el-col>
-      <el-col :span="16"
-        ><el-input
-          controls-position="right"
-          size="mini"
-          style="width: 100%"
-          type="number"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.TDCZ"
-          @change="changeZDBZ"
-        ></el-input>
+      <el-col :span="16"><el-input controls-position="right" size="mini" style="width: 100%" type="number"
+          placeholder="请输入" v-model="curBCBZ.tdcz" @change="changeZDBZ"></el-input>
       </el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">土地补偿费</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua"
-        >统一年产值 X 综合补偿倍数</el-col
-      >
+      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数:</el-col>
-      <el-col :span="16"
-        ><el-input
-          size="mini"
-          style="width: 100%"
-          type="number"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.TDBCBS"
-          @change="changeZDBZ"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input size="mini" style="width: 100%" type="number" placeholder="请输入"
+          v-model="curBCBZ.tdbcbs" @change="changeZDBZ"></el-input></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">土地补偿费:</el-col>
       <el-col :span="16">
-        <el-input
-          size="mini"
-          placeholder="自动计算"
-          readonly
-          type="number"
-          v-model="curBCBZ.BCBZ.TDBCF"
-        ></el-input
-      ></el-col>
+        <el-input size="mini" placeholder="自动计算" readonly type="number" v-model="curBCBZ.tdbcf"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">安置补偿费</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua"
-        >统一年产值 X 综合补偿倍数</el-col
-      >
+      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">综合补偿倍数</el-col>
-      <el-col :span="16"
-        ><el-input
-          size="mini"
-          type="number"
-          style="width: 100%"
-          placeholder="请输入"
-          v-model="curBCBZ.BCBZ.AZBCBS"
-          @change="changeZDBZ"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input size="mini" type="number" style="width: 100%" placeholder="请输入"
+          v-model="curBCBZ.azbcbs" @change="changeZDBZ"></el-input></el-col>
     </el-row>
     <el-row>
       <el-col :span="6">安置补偿费:</el-col>
-      <el-col :span="16"
-        ><el-input
-          size="mini"
-          v-model="curBCBZ.BCBZ.AZBCF"
-          readonly
-          type="number"
-          placeholder="自动计算"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input size="mini" v-model="curBCBZ.azbcf" readonly type="number"
+          placeholder="自动计算"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
     <el-row class="subtitle">
       <el-col :span="12">补偿费及安置补助费合计</el-col>
-      <el-col :span="12" style="font-size: small; color: aqua"
-        >统一年产值 X 综合补偿倍数</el-col
-      >
+      <el-col :span="12" style="font-size: small; color: aqua">统一年产值 X 综合补偿倍数</el-col>
     </el-row>
     <el-row>
       <el-col :span="6">征地补偿合计:</el-col>
-      <el-col :span="16"
-        ><el-input
-          size="mini"
-          v-model="curBCBZ.BCBZ.BCHJ"
-          readonly
-          type="number"
-          placeholder="自动计算"
-        ></el-input
-      ></el-col>
+      <el-col :span="16"><el-input size="mini" v-model="curBCBZ.bchj" readonly type="number"
+          placeholder="自动计算"></el-input></el-col>
       <el-col :span="2">元/亩</el-col>
     </el-row>
   </div>
 </template>
 <script>
+import {
+  getZdBcbzList
+} from "@/api/zt/ztApi.js";
 export default {
   props: ["zdValue"],
   name: "ZDShowInfo",
@@ -140,36 +81,35 @@ export default {
        * 当前标准
        */
       curBCBZ: {
-        label: "征地标准01",
-        value: "1",
-        BCBZ: {
-          /**
-           * 土地统一年产值
-           */
-          TDCZ: 1000,
-          /**
-           * 土地补偿倍数
-           */
+        name: "征地标准01",
+        id: "1",
 
-          TDBCBS: 10,
-          /**
-           * 土地补偿费
-           */
-          TDBCF: 10000,
-          /**
-           * 安置补偿倍数
-           */
+        /**
+         * 土地统一年产值
+         */
+        tdcz: 1000,
+        /**
+         * 土地补偿倍数
+         */
 
-          AZBCBS: 10,
-          /**
-           * 安置补偿费
-           */
-          AZBCF: 10000,
-          /**
-           * 补偿合计
-           */
-          BCHJ: 20000,
-        },
+        tdbcbs: 10,
+        /**
+         * 土地补偿费
+         */
+        tdbcf: 10000,
+        /**
+         * 安置补偿倍数
+         */
+
+        azbcbs: 10,
+        /**
+         * 安置补偿费
+         */
+        azbcf: 10000,
+        /**
+         * 补偿合计
+         */
+        bchj: 20000,
       },
     };
   },
@@ -177,30 +117,28 @@ export default {
     this.initForm();
   },
 
-  computed() {
-    FYJS();
-    {
-    }
-  },
   methods: {
     initForm() {
-      // debugger
-      this.bcbzList = window.ZSBC.ZDBCList;
-      this.bcbz = this.zdValue;
-      this.curBCBZ = this.bcbzList.find((t) => t.value == this.bcbz);
-    },
-    /**
-     * 选择标准改变
-     */
-    changeZDBZ() {
-      debugger;
-      this.curBCBZ.BCBZ.TDBCF =
-        this.curBCBZ.BCBZ.TDCZ * this.curBCBZ.BCBZ.TDBCBS;
-      this.curBCBZ.BCBZ.AZBCF =
-        this.curBCBZ.BCBZ.TDCZ * this.curBCBZ.BCBZ.AZBCBS;
-      this.curBCBZ.BCBZ.BCHJ =
-        this.curBCBZ.BCBZ.TDBCF + this.curBCBZ.BCBZ.AZBCF;
-    },
+      debugger
+      var that = this
+      that.bcbz = that.zdValue;
+      if (window.isUseDB) {//数据库
+        getZdBcbzList().then((response) => {
+          that.bcbzList = response.rows;
+          if (that.bcbz != undefined && that.bcbz != "") {
+            that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+          }
+        }).catch((err) => {
+          console.log(err)
+        })
+      }
+      else {
+        this.bcbzList = window.ZSBC.ZDBCList;
+        if (that.bcbz != undefined && this.bcbz != "") {
+          that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
+        }
+      }
+    }
   },
 };
 </script>
@@ -211,15 +149,17 @@ export default {
 .el-row {
   margin-bottom: 0.5rem;
 }
+
 .subtitle {
   color: #02a7f0;
   font-weight: 400;
 }
+
 /* .el-input > input {
   text-align: end;
 } */
 
-.el-input >>> .el-input__inner {
+.el-input>>>.el-input__inner {
   text-align: right !important;
 }
 </style>

File diff suppressed because it is too large
+ 0 - 0
src/views/ConstructionApplication3D/Demolition/zdAnalyse.js


+ 50 - 73
src/views/ConstructionApplication3D/MXDBinfo/MXDBinfo.vue

@@ -43,6 +43,7 @@ import {
 } from "@turf/turf";
 import { v4 as uuidv4 } from "uuid";
 import { isFunction, flatMap, values } from "lodash-es";
+import CheckParkAnalyse from "@/views/ConstructionApplication3D/projectManagement/CheckParkAnalyse.js";
 import ZBFXAnalysisinfo from "@/views/ConstructionApplication3D/ZBFXAnalysisinfo/ZBFXAnalysisinfo.vue";
 export default {
   data() {
@@ -106,12 +107,14 @@ export default {
     },
     // 获取指标
     async getnorm(Minfo) {
+      debugger;
       //组装指标对象
       let tableDataList = [];
-      debugger;
       for (let index = 0; index < this.LandPlanningList.length; index++) {
         const LandPlanning = this.LandPlanningList[index];
-        let KG_Data = {};
+        let KG_Data = {},
+          TJFA_Data = {},
+          FA_Data = {};
         KG_Data.DKBM = LandPlanning.data.find((c) => c.label == "DKBM")
           ? LandPlanning.data.find((c) => c.label == "DKBM").value
           : "";
@@ -121,6 +124,7 @@ export default {
         KG_Data.JZMJ = LandPlanning.data.find((c) => c.label == "JZMJ")
           ? LandPlanning.data.find((c) => c.label == "JZMJ").value
           : "";
+        // KG_Data.JZMJ = "";
         KG_Data.JDMJ = LandPlanning.data.find((c) => c.label == "JDMJ")
           ? LandPlanning.data.find((c) => c.label == "JDMJ").value
           : "";
@@ -147,12 +151,12 @@ export default {
           : "";
         KG_Data.JRJZMJD = "";
         KG_Data.JRJZMJX = "";
-        let FA_Data = {};
+
         if (Minfo.dataurl && Minfo.datasourcename) {
           //获取项目范围数据数据
           let queryByGeometryParameters = {
             getFeatureMode: "SQL",
-            datasetNames: [Minfo.datasourcename + ":" + "项目范围"],
+            datasetNames: [Minfo.datasourcename + ":项目范围"],
             queryParameter: {
               attributeFilter: "DKBM = '" + KG_Data.DKBM + "'",
             },
@@ -165,7 +169,6 @@ export default {
 
           //项目用地总面积
           let xmzmj = 0;
-          debugger;
           if (e && e.totalCount > 0) {
             e.features.forEach((feature) => {
               let DataPs = feature.geometry.points.map((item) => [
@@ -177,71 +180,12 @@ export default {
                   DataPs.push(DataPs[0]);
                 }
                 let polygonPs = polygon([DataPs]);
-                let areaPs = area(polygonPs) * window.earthRadius;
+                let areaPs = area(polygonPs);
                 xmzmj += areaPs;
               }
             });
           }
           FA_Data.YDMJ = xmzmj;
-          // //获取单栋楼体数据 (模型中Model数据)
-          // let queryByGeometryParameters1 = {
-          //   getFeatureMode: "SQL",
-          //   datasetNames: [Minfo.datasourcename + ":" + Minfo.datasetname],
-          //   queryParameter: {
-          //     attributeFilter: "1=1",
-          //   },
-          //   hasGeometry: "true",
-          // };
-          // let e1 = await mapQuery(
-          //   Minfo.dataurl + "/featureResults.json?returnContent=true",
-          //   queryByGeometryParameters1
-          // );
-          // //楼体信息
-          // let ltDatas = [];
-          // if (e1 && e1.totalCount > 0) {
-          //   e1.features.forEach((feature) => {
-          //     let Data = {
-          //       data: [],
-          //       geometry: feature.geometry,
-          //     };
-          //     feature.fieldNames.forEach((fieldName, i) => {
-          //       let Field = e1.datasetInfos
-          //         ? e1.datasetInfos[0].fieldInfos.find(
-          //             (c) =>
-          //               c.name &&
-          //               c.name.toUpperCase() == fieldName.toUpperCase() &&
-          //               c.name.toUpperCase().indexOf("SM") == -1
-          //           )
-          //         : null;
-          //       if (Field) {
-          //         Data.data.push({
-          //           label: fieldName,
-          //           labelCN: Field ? Field.caption : fieldName,
-          //           value: feature.fieldValues[i],
-          //         });
-          //       }
-          //     });
-          //     ltDatas.push(Data);
-          //   });
-          // }
-          // //建筑总面积
-          // let jzzmj = 0;
-          // let maxJZGD = 0;
-          // ltDatas.forEach((ltData) => {
-          //   jzzmj += Number(
-          //     ltData.data.find((c) => c.label == "BUILDAREA")
-          //       ? ltData.data.find((c) => c.label == "BUILDAREA").value
-          //       : 0
-          //   );
-          //   let jzgd = ltData.data.find((c) => c.label == "HEIGHT")
-          //     ? ltData.data.find((c) => c.label == "HEIGHT").value
-          //     : 0;
-          //   if (Number(jzgd) > maxJZGD) {
-          //     maxJZGD = Number(jzgd);
-          //   }
-          // });
-          // FA_Data.JZMJ = Number(jzzmj);
-          // FA_Data.JZGD = Number(maxJZGD);
 
           //基底面积查建筑轮廓数据
           FA_Data.JDMJ = 0;
@@ -269,7 +213,6 @@ export default {
           let dxjzzmj = 0;
           //最大建筑高度
           let maxJZGD = 0;
-          debugger;
           if (e2 && e2.totalCount > 0) {
             e2.features.forEach((feature) => {
               let BUILDAREAIndex = feature.fieldNames.findIndex(
@@ -308,6 +251,7 @@ export default {
                   maxJZGD = Number(jzgd);
                 }
               }
+
               let DataPs = feature.geometry.points.map((item) => [
                 item.x,
                 item.y,
@@ -317,7 +261,7 @@ export default {
                   DataPs.push(DataPs[0]);
                 }
                 let polygonPs = polygon([DataPs]);
-                let areaPs = area(polygonPs) * window.earthRadius;
+                let areaPs = area(polygonPs);
                 jzjdzmj += areaPs;
               }
             });
@@ -327,13 +271,42 @@ export default {
           FA_Data.JDMJ = jzjdzmj;
           //计容建筑面积 为地上建筑总面积
           FA_Data.JRJZMJ = dsjzzmj;
-          // 容积率
-          FA_Data.RJL = (FA_Data.JRJZMJ / FA_Data.YDMJ).toFixed(2);
+          // 容积率 20240814改为使用建筑面积计算容积率
+          // FA_Data.RJL = (FA_Data.JRJZMJ / FA_Data.YDMJ).toFixed(2);
+          FA_Data.RJL = (FA_Data.JZMJ / FA_Data.YDMJ).toFixed(2);
 
           //建筑密度
           FA_Data.JZMD = (Number(FA_Data.JDMJ / FA_Data.YDMJ) * 100).toFixed(2);
         }
-        tableDataList.push({ Minfo, KG_Data, FA_Data });
+        tableDataList.push({ Minfo, KG_Data, FA_Data, TJFA_Data });
+      }
+      var result = await CheckParkAnalyse.buidAreaAndParksComputer(
+        Minfo,
+        false
+      );
+      if (result != null) {
+        for (var i = 0; i < tableDataList.length; i++) {
+          var item = tableDataList[i];
+
+          var land = result.buildings.find(
+            (t) => t.landNo == item.KG_Data.DKBM
+          );
+          if (land == null) continue;
+          tableDataList[i].FA_Data.JZMJ = land.mj;
+          tableDataList[i].FA_Data.JRJZMJ = land.jrmj;
+          debugger;
+          //20240814改为使用建筑面积计算容积率
+          // tableDataList[i].FA_Data.RJL = (land.jrmj / item.FA_Data.YDMJ).toFixed(2);
+          tableDataList[i].FA_Data.RJL = (
+            (land.mj - land.dxjzmj) /
+            item.FA_Data.YDMJ
+          ).toFixed(2);
+          //开发商提交的方案文档指标
+          debugger;
+          tableDataList[i].TJFA_Data.JZMJ = land.famj;
+          tableDataList[i].TJFA_Data.JRJZMJ = land.fajrmj;
+          tableDataList[i].infoData = land;
+        }
       }
       return tableDataList;
     },
@@ -344,14 +317,18 @@ export default {
      * @param Minfo
      */
     openZBFXInfo(tableDataList) {
+      debugger;
       let that = this;
+      let wpx = 650;
+      let hpx = 430;
       let w = document.body.offsetWidth;
       let h = document.body.offsetHeight;
       //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
       //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
-      let left = w - 450 + 450 / 2;
-      let top = 430 / 2 + 60;
+      let left = w - wpx + wpx / 2;
+      let top = hpx / 2 + 60;
       let layerid = this.$layer.iframe({
+        id: "ZBFXJGiframe",
         content: {
           content: ZBFXAnalysisinfo, //传递的组件对象
           parent: this, //当前的vue对象
@@ -360,7 +337,7 @@ export default {
           }, //props
         },
         offset: [left, top], //left top
-        area: ["450px", "430px"], //宽 高
+        area: [wpx + "px", hpx + "px"], //宽 高
         title: "指标分析",
         maxmin: false,
         shade: false, //是否显示遮罩

+ 191 - 126
src/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue

@@ -38,9 +38,13 @@
               @current-change="handleCurrentChange"
               style="width: 100%"
             >
-              <el-table-column prop="gyName" label="光源名称"></el-table-column>
-            </el-table> </el-col
-        ></el-row>
+              <el-table-column
+                prop="lightname"
+                label="光源名称"
+              ></el-table-column>
+            </el-table>
+          </el-col>
+        </el-row>
       </el-col>
       <el-col :span="14">
         光源参数:
@@ -55,14 +59,14 @@
               <el-form-item label="光源名称">
                 <el-input
                   size="mini"
-                  v-model="dgyform.gyName"
+                  v-model="dgyform.lightname"
                   placeholder="请输入光源名称"
                 ></el-input>
               </el-form-item>
               <el-form-item label="光源类型">
                 <el-select
                   size="mini"
-                  v-model="dgyform.gyType"
+                  v-model="dgyform.lighttype"
                   placeholder="请选择光源类型"
                 >
                   <el-option label="点光源" value="点光源"></el-option>
@@ -73,7 +77,7 @@
               <el-form-item label="光源颜色">
                 <el-color-picker
                   size="mini"
-                  v-model="dgyform.gyColor"
+                  v-model="dgyform.color"
                 ></el-color-picker>
                 <el-button size="mini" @click="addPoint"
                   >添加光源位置</el-button
@@ -82,33 +86,39 @@
               <!-- <el-form-item label="X坐标(度)">
                 <el-input-number
                   size="mini"
-                  v-model="dgyform.cartesian.x"
+                  v-model="dgyform.location.x"
                 ></el-input-number>
               </el-form-item>
               <el-form-item label="Y坐标(度)">
                 <el-input-number
                   size="mini"
-                  v-model="dgyform.cartesian.y"
+                  v-model="dgyform.location.y"
                 ></el-input-number>
               </el-form-item>-->
               <!-- <el-form-item label="光源高度">
                 <el-input-number
                   size="mini"
-                  v-model="dgyform.cartesian.z"
+                  v-model="dgyform.location.z"
                 ></el-input-number>
               </el-form-item> -->
-              <el-form-item label="扩散距离" v-if="dgyform.gyType != '直射光'">
+              <el-form-item
+                label="扩散距离"
+                v-if="dgyform.lighttype != '直射光'"
+              >
                 <el-input-number
                   size="mini"
-                  v-model="dgyform.gyDistance"
+                  v-model="dgyform.cutoffdistance"
                   :min="0"
                   :max="10000"
                 ></el-input-number>
               </el-form-item>
-              <el-form-item label="衰减因子" v-if="dgyform.gyType != '直射光'">
+              <el-form-item
+                label="衰减因子"
+                v-if="dgyform.lighttype != '直射光'"
+              >
                 <el-input-number
                   size="mini"
-                  v-model="dgyform.gyDecay"
+                  v-model="dgyform.decay"
                   :min="0"
                   :max="10000"
                 ></el-input-number>
@@ -116,7 +126,7 @@
               <el-form-item label="光源强度">
                 <el-input-number
                   size="mini"
-                  v-model="dgyform.gyIntensity"
+                  v-model="dgyform.intensity"
                   :min="0"
                   :max="10000"
                 ></el-input-number>
@@ -138,6 +148,12 @@
 <script>
 import { v4 as uuidv4 } from "uuid";
 import Nightscape from "@/components/Combinations/NightscapeAnalysis/index.js";
+import {
+  listZtLightList,
+  addZtLightList,
+  updateZtLightList,
+  delZtLightList,
+} from "@/api/zt/ztApi.js";
 let entityPointLightPairs = new Map(),
   entitySpotLightPairs = new Map(),
   entityDirectionalLightPairs = new Map(),
@@ -151,34 +167,23 @@ export default {
   data() {
     return {
       tooltip: createTooltip(document.body),
-      // GeoJsonLayerList: [],
-      // liudongGntities: [],
       sharedState: store.state,
       isNightscaoe: false,
       gyTableData: [],
       dgyform: {
         id: "",
-        gyName: "",
-        gyType: "点光源",
-        gyColor: "#409EFF",
-        gyDistance: 300,
-        gyDecay: 5,
-        gyIntensity: 5,
-        // cartesian: {
+        lightname: "",
+        lighttype: "点光源",
+        color: "#409EFF",
+        cutoffdistance: 300,
+        decay: 5,
+        intensity: 5,
+        // location: {
         //   x: 0,
         //   y: 0,
         //   z: 0,
         // },
       },
-      // pointLightSourceDrawHandler: null,
-      // spotOrDirectionalLightSourceDrawHandler: null,
-      // spotOrDirectionalLightSourceCountHandler: null,
-      // spotOrDirectionalLightSourceAdding: false,
-      // spotOrDirectionalLightPositions: [],
-      // entityPointLightPairs: new Map(), // Entity和点光源对象的键值对
-      // entitySpotLightPairs: new Map(), // Entity和聚光灯对象的键值对
-      // entityDirectionalLightPairs: new Map(), // Entity和平行光对象的键值对
-      tycindex: 0,
     };
   },
   props: {
@@ -222,82 +227,131 @@ export default {
       this.resetForm();
     },
 
-    init() {
+    async init() {
       this.hyp = new Cesium.HypsometricSetting();
       this.startNight(false);
+      debugger;
+      await this.getModelLightData();
+    },
+    //获取模型灯光数据
+    async getModelLightData() {
+      let rData = await listZtLightList({
+        isModelAssociated: true,
+        modelId: this.info.id,
+      });
+      if (rData.code == 200) {
+        rData.rows.forEach((element) => {
+          element.location = JSON.parse(element.location);
+        });
+        this.gyTableData = rData.rows;
+        if (this.isNightscaoe) {
+          this.addModelLight();
+        }
+      }
     },
 
     //夜景开关
     startNight(isNight) {
       if (isNight) {
         Nightscape.openNightSwitch();
-        this.gyTableData.forEach((element) => {
-          this.addLightSource(element);
-        });
+        this.addModelLight();
       } else {
         Nightscape.closNightSwitch();
       }
     },
+    // 添加模型下的光源
+    addModelLight() {
+      this.clearLightSource();
+      this.gyTableData.forEach((element) => {
+        this.addLightSource(element);
+      });
+    },
 
-    onSubmit() {
+    async onSubmit() {
       //更新
       if (this.dgyform.id) {
-        let gydata = this.gyTableData.find((c) => c.id == this.dgyform.id);
-        let data = JSON.parse(JSON.stringify(this.dgyform));
-        gydata.gyName = data.gyName;
-        gydata.gyColor = data.gyColor;
-        gydata.gyDistance = data.gyDistance;
-        gydata.gyDecay = data.gyDecay;
-        gydata.gyIntensity = data.gyIntensity;
-        gydata.cartesian = data.cartesian;
-        gydata.LightSource = this.dgyform.LightSource;
+        // let gydata = this.gyTableData.find((c) => c.id == this.dgyform.id);
+        // let data = JSON.parse(JSON.stringify(this.dgyform));
+        // gydata.lightname = data.lightname;
+        // gydata.color = data.color;
+        // gydata.cutoffdistance = data.cutoffdistance;
+        // gydata.decay = data.decay;
+        // gydata.intensity = data.intensity;
+        // gydata.location = data.location;
+        // gydata.LightSource = this.dgyform.LightSource;
+        this.dgyform.location = JSON.stringify(this.dgyform.location);
+        var rownum = await updateZtLightList(this.dgyform);
+        this.resetForm();
+        if (rownum.code == 200) {
+          this.$message({
+            message: "修改成功",
+            type: "success",
+          });
+          //更新列表及光源
+          this.getModelLightData();
+        }
       }
       //添加
       else {
+        debugger;
         this.dgyform.id = uuidv4();
-        let data = JSON.parse(JSON.stringify(this.dgyform));
-        data.LightSource = this.dgyform.LightSource;
-        this.gyTableData.push(this.dgyform);
+        // let data = JSON.parse(JSON.stringify(this.dgyform));
+        // data.LightSource = this.dgyform.LightSource;
+        // this.gyTableData.push(this.dgyform);
+        this.dgyform.location = JSON.stringify(this.dgyform.location);
+        this.dgyform.isModelAssociated = true;
+        this.dgyform.modelId = this.info.id;
+        var rownum = await addZtLightList(this.dgyform);
+        this.resetForm();
+        if (rownum.code == 200) {
+          this.$message({
+            message: "添加成功",
+            type: "success",
+          });
+          //更新列表及光源
+          this.getModelLightData();
+        }
       }
 
-      this.clearLightSource(false);
+      // this.clearLightSource(false);
     },
     //清空from
     resetForm() {
       this.dgyform = {
         id: "",
-        gyName: "",
-        gyType: "点光源",
-        gyColor: "#409EFF",
-        gyDistance: 300,
-        gyDecay: 5,
-        gyIntensity: 5,
-        cartesian: {},
+        lightname: "",
+        lighttype: "点光源",
+        color: "#409EFF",
+        cutoffdistance: 300,
+        decay: 5,
+        intensity: 5,
+        location: {},
         LightSource: null,
       };
     },
     //删除添加的光源
-    dgyremove() {
+    async dgyremove() {
       let that = this;
-      this.gyTableData = this.gyTableData.filter(function (item) {
-        if (that.currentRow == item) {
-          if (item.LightSource) scene.removeLightSource(item.LightSource);
-          return false;
-        } else {
-          return true;
-        }
-      });
+      await delZtLightList(that.currentRow.id);
+      scene.removeLightSource(that.currentRow.LightSource);
+      that.resetForm();
+      //更新列表及光源
+      that.getModelLightData();
     },
     //点光源表选中
     handleCurrentChange(row) {
       this.currentRow = row;
+
       this.clearLightSource();
-      let data = JSON.parse(JSON.stringify(row));
-      this.dgyform = data;
-      this.dgyform.LightSource = row.LightSource;
+
+      if (row) {
+        let data = JSON.parse(JSON.stringify(row));
+        this.dgyform = data;
+        this.dgyform.LightSource = row.LightSource;
+      }
     },
     addPoint() {
-      switch (this.dgyform.gyType) {
+      switch (this.dgyform.lighttype) {
         case "点光源":
           if (pointLightSourceDrawHandler) {
             pointLightSourceDrawHandler.clear();
@@ -355,20 +409,16 @@ export default {
       );
       pointLightSourceDrawHandler.drawEvt.addEventListener((result) => {
         let xyz = result.object.position;
-        let cartesian = this.cartesianToWgs84(xyz.x, xyz.y, xyz.z);
-        this.dgyform.cartesian = cartesian;
+        let location = this.cartesianToWgs84(xyz.x, xyz.y, xyz.z);
+        this.dgyform.location = location;
         let option = {
-          color: Cesium.Color.fromCssColorString(this.dgyform.gyColor),
-          cutoffDistance: Number(this.dgyform.gyDistance),
-          decay: Number(this.dgyform.gyDecay),
-          intensity: Number(this.dgyform.gyIntensity),
+          color: Cesium.Color.fromCssColorString(this.dgyform.color),
+          cutoffDistance: Number(this.dgyform.cutoffdistance),
+          decay: Number(this.dgyform.decay),
+          intensity: Number(this.dgyform.intensity),
         };
         let pointLight = new Cesium.PointLight(
-          new Cesium.Cartesian3.fromDegrees(
-            cartesian.x,
-            cartesian.y,
-            cartesian.z
-          ),
+          new Cesium.Cartesian3.fromDegrees(location.x, location.y, location.z),
           option
         );
         scene.addLightSource(pointLight);
@@ -378,7 +428,7 @@ export default {
         this.dgyform.LightSource = pointLight;
         let entityAsKey = viewer.entities.add({
           id: "point-light-" + new Date().getTime(),
-          position: cartesian,
+          position: location,
           billboard: {
             image: "@/../static/images/lightSource/pointLight.png",
             scaleByDistance: new Cesium.NearFarScalar(10, 1.0, 1000, 0.1),
@@ -427,13 +477,28 @@ export default {
           if (positions.length !== 2) {
             return;
           }
-          this.dgyform.cartesian = positions;
-          if (that.dgyform.gyType === "聚光灯") {
+          let locations = [];
+          locations.push(
+            this.cartesianToWgs84(
+              positions[0].x,
+              positions[0].y,
+              positions[0].z
+            )
+          );
+          locations.push(
+            this.cartesianToWgs84(
+              positions[1].x,
+              positions[1].y,
+              positions[1].z
+            )
+          );
+          this.dgyform.location = locations;
+          if (that.dgyform.lighttype === "聚光灯") {
             let spotLightOptions = {
-              color: Cesium.Color.fromCssColorString(this.dgyform.gyColor),
-              distance: Number(this.dgyform.gyDistance),
-              decay: Number(this.dgyform.gyDecay),
-              intensity: Number(this.dgyform.gyIntensity),
+              color: Cesium.Color.fromCssColorString(this.dgyform.color),
+              distance: Number(this.dgyform.cutoffdistance),
+              decay: Number(this.dgyform.decay),
+              intensity: Number(this.dgyform.intensity),
               angle: Cesium.Math.toRadians(Number(30)),
             };
             let spotLight = new Cesium.SpotLight(
@@ -456,11 +521,11 @@ export default {
               },
             });
             entitySpotLightPairs.set(entityAsKey, spotLight);
-          } else if (that.dgyform.gyType === "直射光") {
+          } else if (that.dgyform.lighttype === "直射光") {
             let directionalLightOptions = {
               targetPosition: positions[1],
-              color: Cesium.Color.fromCssColorString(this.dgyform.gyColor),
-              intensity: Number(this.dgyform.gyIntensity),
+              color: Cesium.Color.fromCssColorString(this.dgyform.color),
+              intensity: Number(this.dgyform.intensity),
             };
             let directionalLight = new Cesium.DirectionalLight(
               positions[0],
@@ -508,19 +573,19 @@ export default {
     },
 
     addLightSource(gyData) {
-      switch (gyData.gyType) {
+      switch (gyData.lighttype) {
         case "点光源":
           let option = {
-            color: Cesium.Color.fromCssColorString(gyData.gyColor),
-            cutoffDistance: Number(gyData.gyDistance),
-            decay: Number(gyData.gyDecay),
-            intensity: Number(gyData.gyIntensity),
+            color: Cesium.Color.fromCssColorString(gyData.color),
+            cutoffDistance: Number(gyData.cutoffdistance),
+            decay: Number(gyData.decay),
+            intensity: Number(gyData.intensity),
           };
           let pointLight = new Cesium.PointLight(
             new Cesium.Cartesian3.fromDegrees(
-              gyData.cartesian.x,
-              gyData.cartesian.y,
-              gyData.cartesian.z
+              gyData.location.x,
+              gyData.location.y,
+              gyData.location.z
             ),
             option
           );
@@ -529,22 +594,22 @@ export default {
           break;
         case "聚光灯":
           let spotLightOptions = {
-            color: Cesium.Color.fromCssColorString(gyData.gyColor),
-            distance: Number(gyData.gyDistance),
-            decay: Number(gyData.gyDecay),
-            intensity: Number(gyData.gyIntensity),
+            color: Cesium.Color.fromCssColorString(gyData.color),
+            distance: Number(gyData.cutoffdistance),
+            decay: Number(gyData.decay),
+            intensity: Number(gyData.intensity),
             angle: Cesium.Math.toRadians(Number(30)),
           };
           let spotLight = new Cesium.SpotLight(
             new Cesium.Cartesian3.fromDegrees(
-              gyData.cartesian[0].x,
-              gyData.cartesian[0].y,
-              gyData.cartesian[0].z
+              gyData.location[0].x,
+              gyData.location[0].y,
+              gyData.location[0].z
             ),
             new Cesium.Cartesian3.fromDegrees(
-              gyData.cartesian[1].x,
-              gyData.cartesian[1].y,
-              gyData.cartesian[1].z
+              gyData.location[1].x,
+              gyData.location[1].y,
+              gyData.location[1].z
             ),
             spotLightOptions
           );
@@ -554,18 +619,18 @@ export default {
         case "直射光":
           let directionalLightOptions = {
             targetPosition: new Cesium.Cartesian3.fromDegrees(
-              gyData.cartesian[1].x,
-              gyData.cartesian[1].y,
-              gyData.cartesian[1].z
+              gyData.location[1].x,
+              gyData.location[1].y,
+              gyData.location[1].z
             ),
-            color: Cesium.Color.fromCssColorString(gyData.gyColor),
-            intensity: Number(gyData.gyIntensity),
+            color: Cesium.Color.fromCssColorString(gyData.color),
+            intensity: Number(gyData.intensity),
           };
           let directionalLight = new Cesium.DirectionalLight(
             new Cesium.Cartesian3.fromDegrees(
-              gyData.cartesian[0].x,
-              gyData.cartesian[0].y,
-              gyData.cartesian[0].z
+              gyData.location[0].x,
+              gyData.location[0].y,
+              gyData.location[0].z
             ),
             directionalLightOptions
           );
@@ -616,30 +681,30 @@ export default {
     },
   },
   watch: {
-    "dgyform.gyColor": function (val, oldVal) {
-      if (this.dgyform.LightSource) {
+    "dgyform.color": function (val, oldVal) {
+      if (this.dgyform && this.dgyform.LightSource) {
         let color = Cesium.Color.fromCssColorString(val);
         this.dgyform.LightSource.color = color;
       }
     },
-    "dgyform.gyDistance": function (val, oldVal) {
-      if (this.dgyform.LightSource) {
+    "dgyform.cutoffdistance": function (val, oldVal) {
+      if (this.dgyform && this.dgyform.LightSource) {
         this.dgyform.LightSource.cutoffDistance = Number(val);
       }
     },
-    "dgyform.gyDecay": function (val, oldVal) {
-      if (this.dgyform.LightSource) {
+    "dgyform.decay": function (val, oldVal) {
+      if (this.dgyform && this.dgyform.LightSource) {
         this.dgyform.LightSource.decay = Number(val);
       }
     },
-    "dgyform.gyIntensity": function (val, oldVal) {
-      if (this.dgyform.LightSource) {
+    "dgyform.intensity": function (val, oldVal) {
+      if (this.dgyform && this.dgyform.LightSource) {
         this.dgyform.LightSource.intensity = Number(val);
       }
     },
   },
   beforeDestroy() {
-    this.clearLightSource(false);
+    this.clearLightSource();
     this.startNight(false);
   },
 };

+ 8 - 14
src/views/ConstructionApplication3D/RSAnalysis/RSAnalysis.vue

@@ -4,12 +4,9 @@
     <el-row :gutter="5" style="border: 1px solid #06c4f3;padding: 0.5rem;color: #ffffff;">
       定点分析:
       <el-row :gutter="5">
-        <el-col :span="10">
-          观察者高度(米):</el-col>
+        观察者高度(米):
         <el-input-number size="small" label="观察者高度:" min="0" max="50" :step="0.5" precision="1"
           v-model="personH"></el-input-number>
-      </el-row>
-      <el-row :gutter="5">
         <el-col :span="8"><el-button size="mini" type="default" @click="addGCD">添加观察点</el-button>
         </el-col>
         <el-col :span="8"><el-button size="mini" type="default" @click="addTagget">添加目标点</el-button>
@@ -57,13 +54,11 @@
         </el-col>
       </el-row>
       <el-row :gutter="2">
-        <el-col :span="10">
-          飞行高度(米):</el-col>
+        飞行高度(米):
         <el-input-number size="small" label="飞行高度:" min="0" max="2000" v-model="flyH"></el-input-number>
       </el-row>
       <el-row :gutter="2">
-        <el-col :span="10">
-          飞行速度(km/h):</el-col>
+        飞行速度(km/h):
         <el-input-number size="small" label="飞行速度:" min="0" max="120" v-model="flySpeed"></el-input-number>
       </el-row>
     </el-row>
@@ -88,12 +83,11 @@ import {
 let handlerPoint = null; //绘制线
 var sightline;
 var flyManager;
-var points = [];
 export default {
   data() {
     return {
       tooltip: createTooltip(document.body),
-
+      points: [],
       addViewFlag: false, //当前点击状态是否是 添加观察点
       addTargetFlag: false, //当前点击状态是否是 添加目标点,
 
@@ -252,7 +246,7 @@ export default {
           // that.points.push(entity)
           // viewer.entities.add(entity);
           that.gcPoint = cartographic;
-          points.push(labelentity);
+          that.points.push(labelentity);
           viewer.entities.add(labelentity);
         } else if (that.addTargetFlag) {
           //添加目标点
@@ -295,7 +289,7 @@ export default {
               ), //达到一定高度隐藏
             },
           });
-          points.push(labelentity);
+          that.points.push(labelentity);
           viewer.entities.add(labelentity);
           that.addTargetFlag = false;
           that.targetPoint = cartographic;
@@ -337,7 +331,7 @@ export default {
               ), //达到一定高度隐藏
             },
           });
-          points.push(labelentity);
+          that.points.push(labelentity);
           viewer.entities.add(labelentity);
           that.addCircleFlag = false;
           that.circlPoint = cartographic;
@@ -423,7 +417,7 @@ export default {
      */
     clearScope() {
       viewer.entities.removeAll();
-      points = [];
+      this.points = [];
       sightline.removeAllTargetPoint();
       if (handlerPoint) {
         handlerPoint.clear();

+ 40 - 19
src/views/ConstructionApplication3D/ZBFXAnalysisinfo/ZBFXAnalysisinfo.vue

@@ -55,7 +55,7 @@
                       <el-input
                         v-model="row.rghszb"
                         size="small"
-                        @blur="handleSave(row)"
+                        @blur="handleSave(row, DKZBData.TableData)"
                       ></el-input>
                     </template>
                   </el-table-column>
@@ -84,6 +84,11 @@
 <script>
 import detailedInfo from "./detailedInfo.vue";
 import { v4 as uuidv4 } from "uuid";
+import {
+  getZtProjectModelZb,
+  addZtProjectModelZb,
+  updateZtProjectModelZb,
+} from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
@@ -120,11 +125,13 @@ export default {
     this.init();
   },
   methods: {
-    init() {
+    async init() {
       let that = this;
       that.MXDKZBDataList = [];
       debugger;
-      this.info.tableDataList.forEach((element) => {
+      for (let index = 0; index < this.info.tableDataList.length; index++) {
+        const element = this.info.tableDataList[index];
+        // this.info.tableDataList.forEach((element) => {
         let DKZBDataList = [];
         for (let Datai = 0; Datai < element.length; Datai++) {
           const Data = element[Datai];
@@ -134,9 +141,10 @@ export default {
             DKBM: Data.KG_Data.DKBM,
           };
           //人工核算指标
-          let rgzb =
-            window.project_model_zb.find((c) => c.dkbm == DKZBData.DKBM) || {};
-          let rgzbid = rgzb.id ? rgzb.id : uuidv4();
+
+          let rgzbData = (await getZtProjectModelZb(Data.Minfo.id)).data || {};
+          let rgzbid = rgzbData.id ? rgzbData.id : Data.Minfo.id;
+          let rgzb = rgzbData.zbcs ? JSON.parse(rgzbData.zbcs) : {};
           let TableData = [];
           let YDMJrow = {};
           YDMJrow.zbmc = "用地总面积";
@@ -341,28 +349,41 @@ export default {
             JZXGDrow.jl = null;
           }
 
-          if (!rgzb.id) {
-            rgzb.id = rgzbid;
-            rgzb.dkbm = DKZBData.DKBM;
+          if (!rgzbData.id) {
+            rgzbData.id = rgzbid;
+            rgzbData.zbcs = JSON.stringify(rgzb);
             //这里替换为后台添加表,现在纯前台,自动更新更新
-            window.project_model_zb.push(rgzb);
-          } else {
-            //这里添加后台修改表,现在纯前台,自动更新更新
+            // window.project_model_zb.push(rgzb);
+
+            await addZtProjectModelZb(rgzbData);
           }
+          // else {
+          //   //这里添加后台修改表,现在纯前台,自动更新更新
+          // }
           TableData.push(JZXGDrow);
           DKZBData.TableData = TableData;
           DKZBDataList.push(DKZBData);
         }
         that.MXDKZBDataList.push(DKZBDataList);
-      });
+        // });
+      }
     },
-    handleSave(row) {
+    async handleSave(row, TableData) {
       debugger;
-      let rgzb = window.project_model_zb.find((c) => c.id == row.rgzbid);
-      if (rgzb) {
-        rgzb[row.rgzbName] = row.rghszb;
-        this.init();
-      }
+      let rgzb = {};
+      TableData.forEach((data) => {
+        rgzb[data.rgzbName] = data.rghszb;
+      });
+      await updateZtProjectModelZb({
+        id: row.rgzbid,
+        zbcs: JSON.stringify(rgzb),
+      });
+      this.init();
+      // let rgzb = window.project_model_zb.find((c) => c.id == row.id);
+      // if (rgzb) {
+      //   rgzb[row.rgzbName] = row.rghszb;
+      //   this.init();
+      // }
     },
     /**
      * 弹窗显示详情

File diff suppressed because it is too large
+ 843 - 244
src/views/ConstructionApplication3D/billboard/addBiillboardModel.vue


+ 52 - 3
src/views/ConstructionApplication3D/billboard/addBillboardPoject.vue

@@ -40,11 +40,47 @@
               >
             </el-col>
           </el-form-item> -->
+          <el-form-item label="模型地址" size="mini" prop="url">
+            <el-col :span="20">
+              <el-input
+                size="mini"
+                v-model="form.url"
+                placeholder="如涉及模型,请填写"
+              ></el-input>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="模型数据地址" size="mini" prop="dataurl">
+            <el-col :span="20">
+              <el-input
+                size="mini"
+                v-model="form.dataurl"
+                placeholder="如涉及模型,请填写"
+              ></el-input>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="模型数据源" size="mini" prop="datasourcename">
+            <el-col :span="20">
+              <el-input
+                size="mini"
+                v-model="form.datasourcename"
+                placeholder="如涉及模型,请填写"
+              ></el-input>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="模型数据集" size="mini" prop="datasetname">
+            <el-col :span="20">
+              <el-input
+                size="mini"
+                v-model="form.datasetname"
+                placeholder="如涉及模型,请填写"
+              ></el-input>
+            </el-col>
+          </el-form-item>
           <el-form-item label="简介" size="mini" prop="description">
             <el-col :span="20">
               <el-input
                 type="textarea"
-                :autosize="{ minRows: 4, maxRows: 6 }"
+                :autosize="{ minRows: 2, maxRows: 6 }"
                 size="mini"
                 v-model="form.description"
               ></el-input>
@@ -71,6 +107,7 @@ import {
   mercator2lonLat,
   undergroundMode,
 } from "@/utils/MapHelper/MapHelper.js";
+import { addZtBillboardInfoList } from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
@@ -83,6 +120,10 @@ export default {
         design: "",
         description: "",
         ProjectScope: null,
+        url: "",
+        dataurl: "",
+        datasourcename: "",
+        datasetname: "",
       },
       rules: {
         projectname: [
@@ -137,10 +178,18 @@ export default {
   methods: {
     submitForm(formName) {
       let that = this;
-      this.$refs[formName].validate((valid) => {
+      this.$refs[formName].validate(async (valid) => {
         if (valid) {
           that.form.id = uuidv4();
-          window.billboardInfoList.push(that.form);
+          // window.billboardInfoList.push(that.form);
+          let result = await addZtBillboardInfoList(that.form);
+          if (result.code) {
+            that.$message({
+              message: "添加成功",
+              type: "success",
+            });
+            that.$layer.close(that.layerid);
+          }
           // that.lyoption.cancel();
           that.$layer.close(that.layerid);
         } else {

+ 26 - 19
src/views/ConstructionApplication3D/billboard/billboardCheckList.vue

@@ -84,6 +84,7 @@
 </template>
 <script>
 import billboardChekInfo from "@/views/ConstructionApplication3D/billboard/billboardChekInfo.vue";
+import { listBillboardModelList } from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
@@ -128,27 +129,33 @@ export default {
     /**
      * 计算个数
      */
-    init() {
+    async init() {
+      debugger;
       let that = this;
       if (that.info) {
-        that.tableData = window.billboardModelList.filter(
-          (c) => c.billboardInfoId == that.info.id
-        );
+        let BillboardModels = await listBillboardModelList({
+          billboardInfoId: that.info.id,
+        });
 
-        that.totalNo = window.billboardModelList.filter(
-          (c) => c.billboardInfoId == that.info.id
-        ).length;
-        that.noCheckedNo = window.billboardModelList.filter(
-          (c) =>
-            c.billboardInfoId == that.info.id &&
-            (c.ReviewStatus == "" || c.ReviewStatus == "未审查")
-        ).length;
-        that.passNo = window.billboardModelList.filter(
-          (c) => c.billboardInfoId == that.info.id && c.ReviewStatus == "已通过"
-        ).length;
-        that.noPassedNo = window.billboardModelList.filter(
-          (c) => c.billboardInfoId == that.info.id && c.ReviewStatus == "未通过"
-        ).length;
+        if (BillboardModels.code == 200) {
+          let billboardModelList = BillboardModels.rows;
+          that.tableData = billboardModelList;
+
+          that.totalNo = BillboardModels.total;
+          that.noCheckedNo = billboardModelList.filter(
+            (c) =>
+              c.billboardInfoId == that.info.id &&
+              (c.ReviewStatus == "" || c.ReviewStatus == "未审查")
+          ).length;
+          that.passNo = billboardModelList.filter(
+            (c) =>
+              c.billboardInfoId == that.info.id && c.ReviewStatus == "已通过"
+          ).length;
+          that.noPassedNo = billboardModelList.filter(
+            (c) =>
+              c.billboardInfoId == that.info.id && c.ReviewStatus == "未通过"
+          ).length;
+        }
       }
     },
     /**
@@ -174,7 +181,7 @@ export default {
         content: {
           content: billboardChekInfo, //传递的组件对象
           parent: this, //当前的vue对象
-          data: { info: row }, //props
+          data: { info: JSON.parse(JSON.stringify(row)), pinfo: this.info }, //props
         },
         offset: [left.toString(), top.toString()], //left top  左上角(left=430px/2;top=(800px+header高)/2)
         area: [width.toString() + "px", height.toString() + "px"],

+ 196 - 102
src/views/ConstructionApplication3D/billboard/billboardChekInfo.vue

@@ -13,15 +13,15 @@
 
       <el-table-column fixed="right" label="结果" width="100">
         <template slot-scope="scope">
+          <!-- :disabled="shenchazhaugntai('符合', scope.row)" -->
           <el-radio
-            :disabled="shenchazhaugntai('符合', scope.row)"
             v-model="scope.row.ruleResult"
             label="true"
             @change="chg(scope.$index, scope.row)"
             >符合</el-radio
           >
+          <!-- :disabled="shenchazhaugntai('不符合', scope.row)" -->
           <el-radio
-            :disabled="shenchazhaugntai('不符合', scope.row)"
             v-model="scope.row.ruleResult"
             label="false"
             @change="chg(scope.$index, scope.row)"
@@ -33,10 +33,12 @@
 
     <el-row>
       <el-input
-        v-model="ReviewComments"
         type="textarea"
+        :autosize="{ minRows: 2, maxRows: 4 }"
         placeholder="请输入审查意见"
-      ></el-input>
+        v-model="ReviewComments"
+      >
+      </el-input>
     </el-row>
     <el-row>
       <el-button size="mini" type="primary" @click="setReview(true)"
@@ -64,12 +66,15 @@ import {
   lineToPolygon,
 } from "@turf/turf";
 import { v4 as uuidv4 } from "uuid";
+import { updateBillboardModelList } from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
       layerDatas: [],
       tableData: [],
       ReviewComments: "",
+      messageNum: 0,
+      layerDataList: [],
     };
   },
   props: {
@@ -79,6 +84,12 @@ export default {
         return {};
       },
     },
+    pinfo: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
     layerid: {
       type: String,
       default: "",
@@ -97,6 +108,28 @@ export default {
     },
   },
   created() {
+    let that = this;
+    if (that.info.template) {
+      that.info.template = JSON.parse(that.info.template);
+    } else {
+      that.info.template = {};
+    }
+
+    if (that.info.templateBottom) {
+      that.info.templateBottom = JSON.parse(that.info.templateBottom);
+    } else {
+      that.info.templateBottom = {};
+    }
+    if (that.info.templateCentre) {
+      that.info.templateCentre = JSON.parse(that.info.templateCentre);
+    } else {
+      that.info.templateCentre = {};
+    }
+    if (that.info.templateTop) {
+      that.info.templateTop = JSON.parse(that.info.templateTop);
+    } else {
+      that.info.templateTop = {};
+    }
     this.init();
   },
   mounted() {},
@@ -108,8 +141,8 @@ export default {
       if (Cartesian3) {
         Elevation = cartesian3ToWGS84(Cartesian3).alt;
       }
-      let Z = Number(that.info.z) - Elevation;
-      let ltData = await this.getloutiData(that.info);
+      // let Z = Number(that.info.z) - Elevation;
+
       //过滤规则
       let billboardReviewList = flatten(window.window.billboardReviewList);
       //获取当前广告牌类型的规则
@@ -140,6 +173,8 @@ export default {
                 //zL 厚度, yL宽/高,xL长
                 switch (ReviewItem.code) {
                   case "001234": //筑高度不超过24米的多层建筑墙面和高层建筑裙楼的主体墙面
+                    var ltData = await this.getloutiData();
+                    debugger;
                     if (ltData.length > 0) {
                       //多层高
                       var MHEIGHT = ltData[0].data.find(
@@ -156,8 +191,12 @@ export default {
 
                     break;
                   case "0010101": //户外广告上沿不得突出墙面(包括女儿墙)的外轮廓线
+                    var ltData = await this.getloutiData();
                     //广告上沿高度
-                    var ggsygd = Z + that.info.yL / 2;
+                    var ggsygd =
+                      that.info.templateTop.z -
+                      Elevation +
+                      that.info.templateTop.yL / 2;
                     //楼高
                     if (ltData.length > 0) {
                       //多层高
@@ -176,6 +215,7 @@ export default {
                   case "0010104": //广告设施宽度应与墙面相协调,周围不应超出墙面外轮廓线,垂直方向突出墙面距离不宜大于0.5米
                     debugger;
                     var points = [];
+                    var ltData = await this.getloutiData();
                     if (ltData.length > 0) {
                       ltData[0].geometry.points.forEach((point) => {
                         points.push([point.x, point.y]);
@@ -187,7 +227,8 @@ export default {
                           units: "kilometers",
                         }) * 1000
                       ).toFixed(4);
-                      var jl = Number(distance - 0.6) + that.info.zL / 2;
+                      var jl =
+                        Number(distance - 0.6) + that.info.templateTop.zL / 2;
                       if (jl > 0.5) {
                         ruleResult = "false";
                       } else {
@@ -198,7 +239,10 @@ export default {
                     break;
                   case "0010105": //户外广告下端距地面净高不得低于3米,且不得防碍行人安全;
                     //广告下沿高度
-                    var ggxygd = Z - Elevation - that.info.yL / 2;
+                    var ggxygd =
+                      that.info.templateTop.z -
+                      Elevation -
+                      that.info.templateTop.yL / 2;
                     if (ggxygd > 3) {
                       ruleResult = "true";
                     } else {
@@ -206,7 +250,7 @@ export default {
                     }
                     break;
                   case "001020102": //宽度应以建筑开间为单元,且广告高度不得大于3米
-                    var gggd = that.info.xL;
+                    var gggd = that.info.templateTop.xL;
                     if (gggd > 3) {
                       ruleResult = "false";
                     } else {
@@ -214,6 +258,7 @@ export default {
                     }
                     break;
                   case "00102020102": //一层建筑层高≤4.5m并且广告高度≤1.5m 或者一层建筑层高>4.5m并且广告高度小于等于2m
+                    var ltData = await this.getloutiData();
                     if (ltData.length > 0) {
                       //层高
                       var FLOORH = ltData[0].data.find(
@@ -222,40 +267,19 @@ export default {
 
                       if (FLOORH && FLOORH.value) {
                         if (Number(FLOORH.value) <= 4.5) {
-                          if (that.info.yL <= 1.5) {
+                          if (that.info.templateTop.yL <= 1.5) {
                             ruleResult = "true";
                           } else {
                             ruleResult = "false";
                           }
                         } else if (Number(FLOORH.value) > 4.5) {
-                          if (that.info.yL <= 2) {
+                          if (that.info.templateTop.yL <= 2) {
                             ruleResult = "true";
                           } else {
                             ruleResult = "false";
                           }
                         }
                       }
-                      // //广告上沿高度
-                      // var ggsygd1 = Number(Z) + Number(that.info.yL) / 2;
-                      // if (FLOORH && FLOORH.value) {
-                      //   if (Number(FLOORH.value) > ggsygd1) {
-                      //     if (Number(FLOORH.value) <= 4.5) {
-                      //       if (that.info.yL <= 1.5) {
-                      //         ruleResult = "true";
-                      //       } else {
-                      //         ruleResult = "false";
-                      //       }
-                      //     } else if (Number(FLOORH.value) > 4.5) {
-                      //       if (that.info.yL <= 2) {
-                      //         ruleResult = "true";
-                      //       } else {
-                      //         ruleResult = "false";
-                      //       }
-                      //     }
-                      //   } else {
-                      //     ruleResult = "false";
-                      //   }
-                      // }
                     }
 
                     break;
@@ -264,6 +288,7 @@ export default {
                   case "00102020104": //户外广告外表面距离墙面不得超过0.3米(霓虹灯户外广告则外表面距离墙面不得超过0.5米)
                     debugger;
                     var points1 = [];
+                    var ltData = await this.getloutiData();
                     if (ltData.length > 0) {
                       ltData[0].geometry.points.forEach((point) => {
                         points1.push([point.x, point.y]);
@@ -276,8 +301,9 @@ export default {
                         }) * 1000
                       ).toFixed(4);
 
-                      var jl1 = Number(distance1 - 0.8) + that.info.zL / 2;
-                      if (jl1 > 0.3) {
+                      var jl1 =
+                        Number(distance1 - 0.8) + that.info.templateTop.zL / 2;
+                      if (jl1 < 0.3) {
                         ruleResult = "false";
                       } else {
                         ruleResult = "true";
@@ -286,7 +312,10 @@ export default {
 
                     break;
                   case "00102020201": //出挑部分的底部距离地面小于3米
-                    var ggxygd = Z - Elevation - that.info.yL / 2;
+                    var ggxygd =
+                      that.info.templateTop.z -
+                      Elevation -
+                      that.info.templateTop.yL / 2;
                     if (ggxygd > 3) {
                       ruleResult = "true";
                     } else {
@@ -294,7 +323,7 @@ export default {
                     }
                     break;
                   case "00102020204": //广告高度不得大于3米
-                    if (that.info.yL <= 3) {
+                    if (that.info.templateTop.yL <= 3) {
                       ruleResult = "true";
                     } else {
                       ruleResult = "false";
@@ -302,9 +331,9 @@ export default {
                     break;
                   case "0020103": //出租车候车牌、公交指示牌牌面单边长度不得大于3.5米,高度不超过1.5米,厚度不得大于0.3米
                     if (
-                      that.info.xL <= 3.5 &&
-                      that.info.yL <= 1.5 &&
-                      that.info.zL <= 0.3
+                      that.info.templateTop.xL <= 3.5 &&
+                      that.info.templateTop.yL <= 1.5 &&
+                      that.info.templateTop.zL <= 0.3
                     ) {
                       ruleResult = "true";
                     } else {
@@ -313,7 +342,8 @@ export default {
 
                     break;
                   case "0020104": //单块广告牌(含牌面、边框、底座)的面积不得大于5.5平方米
-                    var area = that.info.xL * that.info.yL;
+                    var area =
+                      that.info.templateTop.xL * that.info.templateTop.yL;
                     if (area <= 5.5) {
                       ruleResult = "true";
                     } else {
@@ -321,11 +351,15 @@ export default {
                     }
 
                     break;
+                  case "003020301": //广告牌面下缘距离地面高度大于等于0.5米
                   case "003020101": //广告牌面下缘距离地面高度大于等于0.5米
                   case "003020201": //广告牌面下缘距离地面高度大于等于0.5米
                   case "0030101": //广告牌面下缘距离地面高度大于等于0.5米
                     //广告下沿高度
-                    var ggxygd = Z - Elevation - that.info.yL / 2;
+                    var ggxygd =
+                      that.info.templateTop.z -
+                      Elevation -
+                      that.info.templateTop.yL / 2;
                     if (ggxygd >= 0.5) {
                       ruleResult = "true";
                     } else {
@@ -334,7 +368,10 @@ export default {
                     break;
                   case "0030102": //广告总体高度(含广告牌面和支撑结构)不得超过4米
                     //广告上沿高度
-                    var ggxygd = Z - Elevation + that.info.yL / 2;
+                    var ggxygd =
+                      that.info.templateTop.z -
+                      Elevation -
+                      that.info.templateTop.yL / 2;
                     if (ggxygd <= 4) {
                       ruleResult = "true";
                     } else {
@@ -342,7 +379,8 @@ export default {
                     }
                     break;
                   case "0030103": //广告牌单面面积不应大于2平方米
-                    var area = that.info.xL * that.info.yL;
+                    var area =
+                      that.info.templateTop.xL * that.info.templateTop.yL;
                     if (area <= 2) {
                       ruleResult = "true";
                     } else {
@@ -350,14 +388,18 @@ export default {
                     }
                     break;
                   case "0030104": //任意一边长度不应大于2米
-                    if (that.info.xL <= 2 && that.info.yL <= 2) {
+                    if (
+                      that.info.templateTop.xL <= 2 &&
+                      that.info.templateTop.yL <= 2 &&
+                      that.info.templateTop.zL <= 2
+                    ) {
                       ruleResult = "true";
                     } else {
                       ruleResult = "false";
                     }
                     break;
                   case "0030105": //厚度不应大于0.3米
-                    if (that.info.zL <= 0.3) {
+                    if (that.info.templateTop.zL <= 0.3) {
                       ruleResult = "true";
                     } else {
                       ruleResult = "false";
@@ -365,23 +407,36 @@ export default {
                     break;
                   case "003020205": //底座型户外广告设施的总高度不得大于2.4米
                     //广告上沿高度
-                    var ggxygd = Z - Elevation + that.info.yL / 2;
+                    var ggxygd =
+                      that.info.templateTop.z -
+                      Elevation -
+                      that.info.templateTop.yL / 2;
                     if (ggxygd <= 2.4) {
                       ruleResult = "true";
                     } else {
                       ruleResult = "false";
                     }
                     break;
+                  case "003020206": //底座占地面积不得大于1平方米
+                    var area =
+                      that.info.templateBottom.xL * that.info.templateBottom.zL;
+                    if (area <= 1) {
+                      ruleResult = "true";
+                    } else {
+                      ruleResult = "true";
+                    }
+                    break;
                   case "003030103": //广告长度不得大于1.5米
                   case "003020207": //长度不得大于1.5米
-                    if (that.info.xL <= 1.5) {
+                    if (that.info.templateTop.xL <= 1.5) {
                       ruleResult = "true";
                     } else {
                       ruleResult = "false";
                     }
                     break;
                   case "003020208": //牌面(单面)面积不得大于2.5平方米
-                    var area = that.info.xL * that.info.yL;
+                    var area =
+                      that.info.templateTop.xL * that.info.templateTop.yL;
                     if (area <= 2.5) {
                       ruleResult = "true";
                     } else {
@@ -389,15 +444,27 @@ export default {
                     }
                     break;
                   case "003020209": //厚度不得大于0.5米
-                    if (that.info.zL <= 0.5) {
+                    if (that.info.templateTop.zL <= 0.5) {
+                      ruleResult = "true";
+                    } else {
+                      ruleResult = "false";
+                    }
+                    break;
+                  case "003020212": //牌面与水平面夹角不得小于75°
+                    if (that.info.rotateX <= 75) {
                       ruleResult = "true";
                     } else {
                       ruleResult = "false";
                     }
+
                     break;
+
                   case "003030102": //广告总高度不得大于3米,且不得低于1.2米
                     //广告上沿高度
-                    var ggxygd = Z - Elevation + that.info.yL / 2;
+                    var ggxygd =
+                      that.info.templateTop.z -
+                      Elevation +
+                      that.info.templateTop.yL / 2;
                     if (ggxygd >= 1.2 && ggxygd <= 3) {
                       ruleResult = "true";
                     } else {
@@ -622,9 +689,10 @@ export default {
     /**
      * 审核状态提交
      */
-    setReview(isPass) {
+    async setReview(isPass) {
       let that = this;
-      let item = window.billboardModelList.find((c) => c.id == this.info.id);
+      // let item = window.billboardModelList.find((c) => c.id == this.info.id);
+      let item = that.info;
       item.ReviewComments = this.ReviewComments;
       if (isPass) {
         let sd = that.tableData.find(
@@ -641,62 +709,88 @@ export default {
       } else {
         item.ReviewStatus = "未通过";
       }
-      this.$message({
-        message: "审查完成",
-        type: "success",
+
+      let result = await updateBillboardModelList({
+        id: item.id,
+        ReviewComments: item.ReviewComments,
+        ReviewStatus: item.ReviewStatus,
       });
-      // this.lyoption.cancel();
-      this.$layer.close(this.layerid);
+      debugger;
+      if (result.code == 200) {
+        // this.lyoption.cancel();
+        this.$layer.close(this.layerid);
+        that.$message({
+          message: "审查完成",
+          type: "success",
+        });
+      }
     },
     /**
      * 获取楼体数据
      */
-    async getloutiData(info) {
-      let layerDataList = [];
-      //获取模型信息
-      let queryBySQLParameters = {
-        getFeatureMode: "BUFFER",
-        datasetNames: [
-          window.billboardModelLT.datasourcename +
-            ":" +
-            window.billboardModelLT.datasetname,
-        ],
-        geometry: {
-          parts: [1],
-          points: [{ y: info.y, x: info.x }],
-          type: "POINT",
-        },
-        bufferDistance: 0.000005,
-        hasGeometry: true,
-      };
-      let e = await mapQuery(
-        window.billboardModelLT.dataurl +
-          "/featureResults.json?returnContent=true",
-        queryBySQLParameters
-      );
-      if (e && e.totalCount > 0) {
-        e.features.forEach((feature) => {
-          let layerData = { data: [], geometry: feature.geometry };
-          feature.fieldNames.forEach((fieldName, i) => {
-            let Field = e.datasetInfos
-              ? e.datasetInfos[0].fieldInfos.find(
-                  (c) =>
-                    c.name && c.name.toUpperCase() == fieldName.toUpperCase()
-                )
-              : null;
-            if (Field) {
-              layerData.data.push({
-                label: fieldName,
-                labelCN: Field ? Field.caption : fieldName,
-                value: feature.fieldValues[i],
-              });
-            }
-          });
-          layerDataList.push(layerData);
-        });
+    async getloutiData() {
+      this.messageNum = this.messageNum + 1;
+      let info = this.pinfo;
+      debugger;
+      if (this.layerDataList.length > 0) {
+        return this.layerDataList;
       }
+      debugger;
+      if (info.dataurl && info.datasourcename && info.datasetname) {
+        if (this.messageNum > 1) {
+          return this.layerDataList;
+        }
+        debugger;
+        //获取模型信息
+        let queryBySQLParameters = {
+          getFeatureMode: "BUFFER",
+          datasetNames: [info.datasourcename + ":" + info.datasetname],
+          geometry: {
+            parts: [1],
+            points: [{ y: info.y, x: info.x }],
+            type: "POINT",
+          },
+          bufferDistance: 0.000005,
+          hasGeometry: true,
+        };
+        let e = await mapQuery(
+          info.dataurl + "/featureResults.json?returnContent=true",
+          queryBySQLParameters
+        );
+        debugger;
+        if (e && e.totalCount > 0) {
+          e.features.forEach((feature) => {
+            let layerData = { data: [], geometry: feature.geometry };
+            feature.fieldNames.forEach((fieldName, i) => {
+              let Field = e.datasetInfos
+                ? e.datasetInfos[0].fieldInfos.find(
+                    (c) =>
+                      c.name && c.name.toUpperCase() == fieldName.toUpperCase()
+                  )
+                : null;
+              if (Field) {
+                layerData.data.push({
+                  label: fieldName,
+                  labelCN: Field ? Field.caption : fieldName,
+                  value: feature.fieldValues[i],
+                });
+              }
+            });
+            this.layerDataList.push(layerData);
+          });
+        }
 
-      return layerDataList;
+        return this.layerDataList;
+      } else {
+        if (this.messageNum == 1) {
+          this.$message.error(
+            "存在报建模型检测项,但未发现添加报建模型相关参数"
+          );
+          return this.layerDataList;
+        } else {
+          return this.layerDataList;
+        }
+      }
     },
     /**
      * 审查状态禁止选中

+ 540 - 104
src/views/ConstructionApplication3D/billboard/billboardDesign.vue

@@ -11,7 +11,11 @@
           v-model="input3"
           class="input-with-select"
         >
-          <el-button slot="append" icon="el-icon-search"></el-button>
+          <el-button
+            slot="append"
+            icon="el-icon-search"
+            @click="getZtBillboardInfoList()"
+          ></el-button>
         </el-input>
       </el-col>
       <el-col :span="6">
@@ -78,14 +82,13 @@
     </el-row>
     <el-row>
       <el-pagination
+        :hide-on-single-page="true"
         style="color: white"
         @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
-        :current-page="currentPage4"
-        :page-sizes="10"
-        :page-size="100"
-        layout="total, prev,pager,next,jumper"
-        :total="total"
+        :page-size="queryParams.pageSize"
+        layout="prev, pager, next"
+        :total="queryParams.total"
       >
       </el-pagination>
     </el-row>
@@ -106,38 +109,67 @@ import {
   undergroundMode,
 } from "@/utils/MapHelper/MapHelper.js";
 import lodash from "lodash-es";
+import { v4 as uuidv4 } from "uuid";
+import {
+  listZtBillboardInfoList,
+  listBillboardModelList,
+  delZtBillboardInfoList,
+} from "@/api/zt/ztApi.js";
 let entityList = [];
 export default {
   data() {
     return {
+      input3: "",
       thislayers: [],
-      projects: window.billboardInfoList,
-      currentPage4: 1,
-      total: 20,
+      // projects: window.billboardInfoList,
+      projects: [],
       deltailLayerId: null,
       checklLayerId: null,
       addlLayerId: null,
       // entityList: [],
       //点查entities事件
       getEntitiesHandler: null,
+      selectBillardId: "",
+      queryParams: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+      },
     };
   },
   computed: {},
   mounted() {
     this.initEntitiesHandler();
     // this.init();
-    let that = this;
-    var promisse11w = scene.open(window.billboardModelLT.url);
-    Cesium.when(promisse11w, function (layers) {
-      layers.forEach((element) => {
-        that.thislayers.push(element.name);
-      });
-    });
-    this.yp();
+    this.getZtBillboardInfoList();
   },
   methods: {
-    handleCurrentChange() {},
-    handleSizeChange() {},
+    //页大小触发
+    handleSizeChange(val) {
+      this.queryParams.pageSize = val;
+      this.queryParams.pageNum = 1;
+      this.getZtBillboardInfoList();
+    },
+    //跳转页触发
+    handleCurrentChange(val) {
+      this.queryParams.pageNum = val;
+      this.getZtBillboardInfoList();
+    },
+
+    /**
+     * 获取广告项目信息
+     */
+    async getZtBillboardInfoList() {
+      debugger;
+      let BenchmarkLandPrices = await listZtBillboardInfoList({
+        projectname: this.input3,
+        ...this.queryParams,
+      });
+      this.queryParams.total = BenchmarkLandPrices.total;
+      this.projects = BenchmarkLandPrices.rows;
+      // this.BenchmarkLandPriceList = window.BenchmarkLandPriceList;
+    },
+
     // 新增项目
     addProjectInfo() {
       if (this.addlLayerId != null) this.$layer.close(this.addlLayerId);
@@ -153,25 +185,35 @@ export default {
         maxmin: false,
         shade: false, //是否显示遮罩
         shadeClose: false, //点击遮罩是否关闭
-        cancel: () => {
+        cancel: async () => {
           //关闭事件
           // alert("关闭iframe");
-          this.projects = window.billboardInfoList;
+          // this.projects = window.billboardInfoList;
+          await this.getZtBillboardInfoList();
         },
       });
     },
     /*
      *定位
      */
-    locationModel(item) {
+    async locationModel(item) {
+      debugger;
+      this.intoModel(item);
       this.removeAllentities();
       //渲染范围
       // this.DrawProjectScope(item);
       //渲染单个广告牌
-      window.billboardModelList.forEach((billboardModel) => {
-        if (billboardModel.billboardInfoId == item.id) {
-          this.DrawBillboard(billboardModel);
-        }
+      // window.billboardModelList.forEach((billboardModel) => {
+      //   if (billboardModel.billboardInfoId == item.id) {
+      //     this.DrawBillboard(billboardModel);
+      //   }
+      // });
+
+      let data = await listBillboardModelList({
+        billboardInfoId: item.id,
+      });
+      data.rows.forEach((element) => {
+        this.DrawBillboard(element);
       });
 
       window.viewer.flyTo(entityList);
@@ -182,26 +224,24 @@ export default {
      * @param Mitem 模型实体
      */
     locationSingleModel(Mitem) {
-      let entitie = viewer.entities.getById("billboard_" + Mitem.id);
+      let entitie = viewer.entities.getById("top_billboard_" + Mitem.id);
       if (entitie) {
         viewer.flyTo(entitie);
       } else {
         //渲染单个广告牌
-        window.billboardModelList.forEach((billboardModel) => {
-          if (billboardModel.id == Mitem.id) {
-            this.DrawBillboard(billboardModel);
-            let entitie = viewer.entities.getById("billboard_" + Mitem.id);
-            viewer.flyTo(entitie);
-          }
-        });
+        // if (billboardModel.id == Mitem.id) {
+        this.DrawBillboard(Mitem);
+        let entitie = viewer.entities.getById("top_billboard_" + Mitem.id);
+        viewer.flyTo(entitie);
+        // }
       }
     },
     /**
      *查看详情
      */
 
-    billboarddetial(item) {
-      this.locationModel(item);
+    async billboarddetial(item) {
+      await this.locationModel(item);
       this.$layer.iframe({
         id: "billboarddetail",
         content: {
@@ -226,8 +266,8 @@ export default {
      *
      */
 
-    checkModel(item) {
-      this.locationModel(item);
+    async checkModel(item) {
+      await this.locationModel(item);
       if (this.checklLayerId != null) this.$layer.close(this.checklLayerId);
       var width = 400;
       var top = 250;
@@ -256,6 +296,7 @@ export default {
      *删除广告牌
      */
     deleteBillard(model) {
+      debugger;
       var that = this;
       //  that.$layer.confirm("确定要删除当前广告吗?", {
       //     btn: ['确定', '取消']     //按钮
@@ -275,13 +316,23 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       })
-        .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
+        .then(async () => {
+          debugger;
+          let result = await delZtBillboardInfoList(model.id);
+          debugger;
+          if (result.code == 200) {
+            that.getZtBillboardInfoList();
+            viewer.entities.removeAll();
+            // that.lyoption.cancel();
+            that.$layer.close(that.layerid);
+            that.$message({
+              message: "删除成功",
+              type: "success",
+            });
+          }
         })
         .catch(() => {
+          debugger;
           this.$message({
             type: "info",
             message: "已取消删除",
@@ -292,6 +343,7 @@ export default {
      * 导入模型(添加广告牌模型)
      */
     importModel(project) {
+      this.intoModel(project);
       // this.locationModel(project);
       if (this.addlLayerId != null) this.$layer.close(this.addlLayerId);
       var width = 600;
@@ -343,69 +395,336 @@ export default {
      * 绘制广告牌
      */
     DrawBillboard(billboardModel) {
-      if (billboardModel.isAddModel) {
-        this.removeBillboard(billboardModel);
-        var modelurl = "../../../../static/ModelData/billboard/box.gltf";
-        let newposition = Cesium.Cartesian3.fromDegrees(
-          billboardModel.x,
-          billboardModel.y,
-          billboardModel.z
+      if (billboardModel.template) {
+        billboardModel.template = JSON.parse(billboardModel.template);
+      } else {
+        billboardModel.template = {};
+      }
+
+      if (billboardModel.templateBottom) {
+        billboardModel.templateBottom = JSON.parse(
+          billboardModel.templateBottom
         );
-        var orientation = Cesium.Transforms.headingPitchRollQuaternion(
-          newposition,
-          new Cesium.HeadingPitchRoll(
-            Cesium.Math.toRadians(billboardModel.rotateX),
-            Cesium.Math.toRadians(billboardModel.rotateY),
-            Cesium.Math.toRadians(billboardModel.rotateZ)
-          )
+      } else {
+        billboardModel.templateBottom = {};
+      }
+      if (billboardModel.templateCentre) {
+        billboardModel.templateCentre = JSON.parse(
+          billboardModel.templateCentre
         );
-        var entity = viewer.entities.add({
-          id: "billboard_" + billboardModel.id,
-          name: "gltf",
-          show: true,
-          position: newposition,
-
-          /**
-           * 长方体
-           */
-          box: {
-            dimensions: new Cesium.Cartesian3(
-              billboardModel.xL,
-              billboardModel.zL,
-              billboardModel.yL
-            ),
-            show: true,
-            material: Cesium.Color.LIGHTGREEN,
-            // outline: true,
-            // outlineColor: Cesium.Color.SPRINGGREEN,
-            // outlineWidth: 1,
-          },
-          /**
-           * 模型
-           */
-          // model: {
-          //   uri: modelurl,
-          //   scale: billboardModel.xL,
-          // },
-          /**
-           * 广告牌
-           */
-          // billboard: {
-          //     image: imageurl,
-          //     width: billboardModel.xL,
-          //     height: billboardModel.zL,
-          //     rotation: 0,
-          // },
-          orientation: orientation,
-        });
-        entityList.push(entity);
+      } else {
+        billboardModel.templateCentre = {};
+      }
+      if (billboardModel.templateTop) {
+        billboardModel.templateTop = JSON.parse(billboardModel.templateTop);
+      } else {
+        billboardModel.templateTop = {};
+      }
+
+      debugger;
+      var newposition = Cesium.Cartesian3.fromDegrees(
+        billboardModel.x,
+        billboardModel.y,
+        billboardModel.z
+      );
+      var orientation = Cesium.Transforms.headingPitchRollQuaternion(
+        newposition,
+        new Cesium.HeadingPitchRoll(
+          Cesium.Math.toRadians(billboardModel.rotateZ),
+          Cesium.Math.toRadians(billboardModel.rotateY),
+          Cesium.Math.toRadians(billboardModel.rotateX)
+        )
+      );
+
+      if (billboardModel.template) {
+        var imageurl = "../../../../static/ModelData/billboard/1.jpg";
+        var modelurl = "../../../../static/ModelData/billboard/box.gltf";
+        switch (billboardModel.template.ModelType) {
+          //矩形广告
+          case "rectangleBillboard":
+            //计算当前实体的xyz
+            var p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateTop.x,
+              billboardModel.templateTop.y,
+              billboardModel.templateTop.z
+            );
+            var topentity = viewer.entities.add({
+              id: "top_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: p,
+              /**
+               * 长方体
+               */
+              box: {
+                dimensions: new Cesium.Cartesian3(
+                  billboardModel.templateTop.xL,
+                  billboardModel.templateTop.zL,
+                  billboardModel.templateTop.yL
+                ),
+                show: true,
+                material: Cesium.Color.LIGHTGREEN,
+              },
+              orientation: orientation,
+            });
+            entityList.push(topentity);
+
+            break;
+          // 立杆型广告
+          case "postsBillboard":
+            var c_p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateCentre.x,
+              billboardModel.templateCentre.y,
+              billboardModel.templateCentre.z
+            );
+            var Centreentity = viewer.entities.add({
+              id: "Centre_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: c_p,
+              /**
+               * 圆柱
+               */
+              cylinder: {
+                length: billboardModel.templateCentre.yL, //圆柱体长度
+                topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
+                bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
+                material: Cesium.Color.LIGHTGREEN,
+                shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
+              },
+              orientation: Cesium.Transforms.headingPitchRollQuaternion(
+                newposition,
+                new Cesium.HeadingPitchRoll(
+                  Cesium.Math.toRadians(billboardModel.rotateZ),
+                  Cesium.Math.toRadians(0),
+                  Cesium.Math.toRadians(0)
+                )
+              ),
+            });
+            entityList.push(Centreentity);
+
+            //计算当前实体的xyz
+
+            var t_p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateTop.x,
+              billboardModel.templateTop.y,
+              billboardModel.templateTop.z
+            );
+            var topentity = viewer.entities.add({
+              id: "top_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: t_p,
+              /**
+               * 矩形
+               */
+              box: {
+                dimensions: new Cesium.Cartesian3(
+                  billboardModel.templateTop.xL,
+                  billboardModel.templateTop.zL,
+                  billboardModel.templateTop.yL
+                ),
+                material: Cesium.Color.LIGHTGREEN,
+                // outline: false,
+                // outlineColor: Cesium.Color.SPRINGGREEN,
+                // outlineWidth: 1,
+              },
+              orientation: orientation,
+            });
+            entityList.push(topentity);
+
+            break;
+          //底座型立杆广告
+          case "ColumnWithaseBillboard":
+            var b_p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateBottom.x,
+              billboardModel.templateBottom.y,
+              billboardModel.templateBottom.z
+            );
+            var bottomentity = viewer.entities.add({
+              id: "bottom_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: b_p,
+              /**
+               * 矩形
+               */
+              box: {
+                dimensions: new Cesium.Cartesian3(
+                  billboardModel.templateBottom.xL,
+                  billboardModel.templateBottom.zL,
+                  billboardModel.templateBottom.yL
+                ),
+                material: Cesium.Color.LIGHTGREEN,
+                // outline: false,
+                // outlineColor: Cesium.Color.SPRINGGREEN,
+                // outlineWidth: 1,
+              },
+              orientation: Cesium.Transforms.headingPitchRollQuaternion(
+                newposition,
+                new Cesium.HeadingPitchRoll(
+                  Cesium.Math.toRadians(billboardModel.rotateZ),
+                  Cesium.Math.toRadians(0),
+                  Cesium.Math.toRadians(0)
+                )
+              ),
+            });
+            entityList.push(bottomentity);
+
+            var c_p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateCentre.x,
+              billboardModel.templateCentre.y,
+              billboardModel.templateCentre.z
+            );
+            var Centreentity = viewer.entities.add({
+              id: "Centre_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: c_p,
+              /**
+               * 圆柱
+               */
+              cylinder: {
+                length: billboardModel.templateCentre.yL, //圆柱体长度
+                topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
+                bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
+                material: Cesium.Color.LIGHTGREEN,
+                shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
+              },
+              orientation: Cesium.Transforms.headingPitchRollQuaternion(
+                newposition,
+                new Cesium.HeadingPitchRoll(
+                  Cesium.Math.toRadians(billboardModel.rotateZ),
+                  Cesium.Math.toRadians(0),
+                  Cesium.Math.toRadians(0)
+                )
+              ),
+            });
+            entityList.push(Centreentity);
+
+            var t_p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateTop.x,
+              billboardModel.templateTop.y,
+              billboardModel.templateTop.z
+            );
+
+            var topentity = viewer.entities.add({
+              id: "top_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: t_p,
+              /**
+               * 矩形
+               */
+              box: {
+                dimensions: new Cesium.Cartesian3(
+                  billboardModel.templateTop.xL,
+                  billboardModel.templateTop.zL,
+                  billboardModel.templateTop.yL
+                ),
+                material: Cesium.Color.LIGHTGREEN,
+                // outline: false,
+                // outlineColor: Cesium.Color.SPRINGGREEN,
+                // outlineWidth: 1,
+              },
+              orientation: orientation,
+            });
+            entityList.push(topentity);
+
+            break;
+          //实物型广告(模型型)
+          case "ModelBillboard":
+            var p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateTop.x,
+              billboardModel.templateTop.y,
+              billboardModel.templateTop.z
+            );
+            var url = billboardModel.template.templateTopUrl || modelurl;
+            var entity = viewer.entities.add({
+              id: "top_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: p,
+              /**
+               * 模型
+               */
+              model: {
+                uri: url,
+                scale: billboardModel.templateTop.scaleL,
+              },
+              orientation: orientation,
+            });
+            entityList.push(entity);
+            break;
+          //图片型广告
+          case "imgBillboard":
+            var p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateTop.x,
+              billboardModel.templateTop.y,
+              billboardModel.templateTop.z
+            );
+            var url = billboardModel.template.templateTopUrl || imageurl;
+            var entity = viewer.entities.add({
+              id: "top_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: p,
+              /**
+               * 广告牌
+               */
+              billboard: {
+                image: url,
+                width: billboardModel.templateTop.xL,
+                height: billboardModel.templateTop.yL,
+                rotation: billboardModel.rotateX,
+                sizeInMeters: true,
+              },
+              orientation: orientation,
+            });
+            entityList.push(entity);
+            break;
+          default:
+            //计算当前实体的xyz
+            var p = Cesium.Cartesian3.fromDegrees(
+              billboardModel.templateTop.x,
+              billboardModel.templateTop.y,
+              billboardModel.templateTop.z
+            );
+            var topentity = viewer.entities.add({
+              id: "top_billboard_" + billboardModel.id,
+              name: "gltf",
+              show: true,
+              position: p,
+              /**
+               * 长方体
+               */
+              box: {
+                dimensions: new Cesium.Cartesian3(
+                  billboardModel.templateTop.xL,
+                  billboardModel.templateTop.zL,
+                  billboardModel.templateTop.yL
+                ),
+                show: true,
+                material: Cesium.Color.LIGHTGREEN,
+              },
+              orientation: orientation,
+            });
+            entityList.push(topentity);
+            break;
+        }
+
+        var h = 0;
+        if (billboardModel.templateTop.yL) {
+          h = billboardModel.templateTop.yL / 2;
+        }
+
         const point = viewer.entities.add({
           id: "pointBillboard_" + billboardModel.id,
           //点
           position: Cesium.Cartesian3.fromDegrees(
-            billboardModel.x,
-            billboardModel.y,
-            billboardModel.z + billboardModel.yL / 2
+            billboardModel.templateTop.x,
+            billboardModel.templateTop.y,
+            billboardModel.templateTop.z + h
           ),
           label: {
             text: billboardModel.billboardName, //描述内容
@@ -430,6 +749,94 @@ export default {
           },
         });
       }
+
+      // if (billboardModel.isAddModel) {
+      //   this.removeBillboard(billboardModel);
+      //   var modelurl = "../../../../static/ModelData/billboard/box.gltf";
+      //   let newposition = Cesium.Cartesian3.fromDegrees(
+      //     billboardModel.x,
+      //     billboardModel.y,
+      //     billboardModel.z
+      //   );
+      //   var orientation = Cesium.Transforms.headingPitchRollQuaternion(
+      //     newposition,
+      //     new Cesium.HeadingPitchRoll(
+      //       Cesium.Math.toRadians(billboardModel.rotateX),
+      //       Cesium.Math.toRadians(billboardModel.rotateY),
+      //       Cesium.Math.toRadians(billboardModel.rotateZ)
+      //     )
+      //   );
+      //   var entity = viewer.entities.add({
+      //     id: "billboard_" + billboardModel.id,
+      //     name: "gltf",
+      //     show: true,
+      //     position: newposition,
+
+      //     /**
+      //      * 长方体
+      //      */
+      //     box: {
+      //       dimensions: new Cesium.Cartesian3(
+      //         billboardModel.xL,
+      //         billboardModel.zL,
+      //         billboardModel.yL
+      //       ),
+      //       show: true,
+      //       material: Cesium.Color.LIGHTGREEN,
+      //       // outline: true,
+      //       // outlineColor: Cesium.Color.SPRINGGREEN,
+      //       // outlineWidth: 1,
+      //     },
+      //     /**
+      //      * 模型
+      //      */
+      //     // model: {
+      //     //   uri: modelurl,
+      //     //   scale: billboardModel.xL,
+      //     // },
+      //     /**
+      //      * 广告牌
+      //      */
+      //     // billboard: {
+      //     //     image: imageurl,
+      //     //     width: billboardModel.xL,
+      //     //     height: billboardModel.zL,
+      //     //     rotation: 0,
+      //     // },
+      //     orientation: orientation,
+      //   });
+      //   entityList.push(entity);
+      //   const point = viewer.entities.add({
+      //     id: "pointBillboard_" + billboardModel.id,
+      //     //点
+      //     position: Cesium.Cartesian3.fromDegrees(
+      //       billboardModel.x,
+      //       billboardModel.y,
+      //       billboardModel.z + billboardModel.yL / 2
+      //     ),
+      //     label: {
+      //       text: billboardModel.billboardName, //描述内容
+      //       font: "20px Sans-Serif", //字体大小 类型
+      //       fillColor: Cesium.Color.RED, //颜色
+      //       outlineColor: Cesium.Color.GOLD,
+      //       style: Cesium.LabelStyle.CENTER_LABEL,
+      //       // 垂直位置
+      //       verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+      //       // 中心位置
+      //       pixelOffset: new Cesium.Cartesian2(0, -10),
+      //       //设置背景颜色透明
+      //       backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
+      //       //打开背景  打开背景 (不会被线段覆盖)
+      //       showBackground: true,
+      //       // heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
+      //       distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
+      //         0.0,
+      //         300.0
+      //       ),
+      //       heightReference: Cesium.HeightReference.NONE,
+      //     },
+      //   });
+      // }
     },
 
     initEntitiesHandler() {
@@ -439,9 +846,10 @@ export default {
       );
       this.getEntitiesHandler.setInputAction(function (click) {
         var pick = viewer.scene.pick(click.position);
+        debugger;
         //广告牌信息弹窗
-        if (pick && pick.id.id && pick.id.id.indexOf("billboard") !== -1) {
-          let id = pick.id.id.split("billboard_")[1];
+        if (pick && pick.id.id && pick.id.id.indexOf("_") !== -1) {
+          let id = pick.id.id.split("_")[2];
           let info = window.billboardModelList.find((c) => c.id == id);
           that.openOBJInfo("广告牌信息详情", info);
         }
@@ -503,12 +911,35 @@ export default {
       viewer.entities.removeAll();
       entityList = [];
     },
+
+    /**
+     * 加载报建模型
+     * @param info
+     */
+    intoModel(info) {
+      if (info.url && this.selectBillardId != info.id) {
+        this.selectBillardId = info.id;
+        try {
+          var promisse11w = scene.open(info.url);
+          Cesium.when(promisse11w, function (layers) {
+            layers.forEach((element) => {
+              that.thislayers.push(element.name);
+            });
+          });
+          this.yp(info);
+        } catch (error) {
+          console.log(error);
+        }
+      }
+    },
+
     /**
      * 压平
      * @param Minfos 模型信息
      */
-    async yp() {
-      const Minfo = window.billboardModelLT;
+    async yp(info) {
+      this.qxyp();
+      const Minfo = info;
 
       //获取模型信息
       let queryBySQLParameters = {
@@ -546,6 +977,11 @@ export default {
     },
   },
   beforeDestroy() {
+    if (this.getEntitiesHandler) {
+      this.getEntitiesHandler.removeInputAction(
+        Cesium.ScreenSpaceEventType.LEFT_CLICK
+      );
+    }
     this.qxyp();
     this.removeAllentities();
     debugger;

+ 11 - 4
src/views/ConstructionApplication3D/billboard/billboarddetail.vue

@@ -34,6 +34,7 @@
   </div>
 </template>
 <script>
+import { listBillboardModelList } from "@/api/zt/ztApi.js";
 export default {
   data() {
     return {
@@ -68,11 +69,17 @@ export default {
     this.init();
   },
   methods: {
-    init() {
+    async init() {
       let that = this;
-      this.billboardModelList = window.billboardModelList.filter(
-        (c) => c.billboardInfoId == that.info.projectInfo.id
-      );
+
+      let data = await listBillboardModelList({
+        billboardInfoId: that.info.projectInfo.id,
+      });
+      debugger;
+      this.billboardModelList = data.rows;
+      // this.billboardModelList = window.billboardModelList.filter(
+      //   (c) => c.billboardInfoId == that.info.projectInfo.id
+      // );
     },
   },
 };

+ 171 - 28
src/views/ConstructionApplication3D/billboard/billboarddetailInfo.vue

@@ -5,32 +5,172 @@
   >
     <el-row :gutter="10">
       <el-col :span="24">
-        <el-descriptions column="1">
-          <el-descriptions-item label="模型名称">{{
-            info.billboardName
-          }}</el-descriptions-item>
-          <el-descriptions-item label="模型类型">{{
-            info.billboardType
-          }}</el-descriptions-item>
-          <el-descriptions-item label="X坐标(度)">{{
-            info.x
-          }}</el-descriptions-item>
-          <el-descriptions-item label="Y坐标(度)">{{
-            info.y
-          }}</el-descriptions-item>
-          <el-descriptions-item label="Z坐标(度)">{{
-            info.z
-          }}</el-descriptions-item>
-          <el-descriptions-item label="长(米)">{{
-            info.xL
-          }}</el-descriptions-item>
-          <el-descriptions-item label="宽/高(米)">{{
-            info.yL
-          }}</el-descriptions-item>
-          <el-descriptions-item label="厚度(米)">{{
-            info.zL
-          }}</el-descriptions-item>
-        </el-descriptions>
+        <el-row>
+          <el-col :span="7"><span>模型名称:</span></el-col>
+          <el-col :span="17"> {{ info.billboardName }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7"><span>模型类型:</span></el-col>
+          <el-col :span="17"> {{ info.billboardType }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7"><span>X坐标(度):</span></el-col>
+          <el-col :span="17"> {{ info.x }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7"><span>Y坐标(度):</span></el-col>
+          <el-col :span="17"> {{ info.y }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7"><span>Z坐标(度):</span></el-col>
+          <el-col :span="17"> {{ info.z }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7"><span>附属信息:</span></el-col>
+          <el-col :span="17"> {{ info.remarks }}</el-col>
+        </el-row>
+        <!--顶部模型-->
+        <div v-if="JSON.stringify(info.templateTop) != '{}'">
+          <el-divider v-if="JSON.stringify(info.templateCentre) != '{}'"
+            >顶部模型参数</el-divider
+          >
+          <el-divider v-else>模型参数</el-divider>
+          <!--如果模型是广告牌类型-->
+          <div
+            v-if="info.template && info.template.templateTopType == 'billboard'"
+          >
+            <el-row>
+              <el-col :span="7"> <span>长(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateTop.xL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"> <span>高(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateTop.yL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"
+                ><span style="color: aqua">厚度(米):</span></el-col
+              >
+              <el-col :span="17">
+                {{ info.templateTop.zL }}
+              </el-col>
+            </el-row>
+          </div>
+          <!--如果模型是模型类型-->
+          <div v-if="info.template && info.template.templateTopType == 'model'">
+            <el-row>
+              <el-col :span="7"> <span>缩放比例:</span></el-col>
+              <el-col :span="17">
+                {{ info.templateTop.scaleL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7">
+                <span style="color: aqua">长(米):</span></el-col
+              >
+              <el-col :span="17">
+                {{ info.templateTop.xL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7">
+                <span style="color: aqua">高(米):</span></el-col
+              >
+              <el-col :span="17">
+                {{ info.templateTop.yL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"
+                ><span style="color: aqua">厚度(米):</span></el-col
+              >
+              <el-col :span="17">
+                {{ info.templateTop.zL }}
+              </el-col>
+            </el-row>
+          </div>
+          <!--如果模型是box类型-->
+          <div v-if="info.template && info.template.templateTopType == 'box'">
+            <!--box-->
+            <el-row>
+              <el-col :span="7"> <span>长(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateTop.xL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"> <span>宽/高(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateTop.yL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"><span>厚度(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateTop.zL }}
+              </el-col>
+            </el-row>
+            <!--box-->
+          </div>
+        </div>
+        <!--中部模型-->
+        <div v-if="JSON.stringify(info.templateCentre) != '{}'">
+          <el-divider>中部模型参数</el-divider>
+          <!--如果模型是圆柱类型-->
+          <div
+            v-if="
+              info.template && info.template.templateCentreType == 'cylinder'
+            "
+          >
+            <!--cylinder-->
+            <el-row>
+              <el-col :span="7"> <span>高(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateCentre.yL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"> <span>半径(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateCentre.rL }}
+              </el-col>
+            </el-row>
+            <!--cylinder-->
+          </div>
+        </div>
+        <!--底部模型-->
+        <div v-if="JSON.stringify(info.templateBottom) != '{}'">
+          <el-divider>底部模型参数</el-divider>
+          <!--如果模型是box类型-->
+          <div
+            v-if="info.template && info.template.templateBottomType == 'box'"
+          >
+            <!--box-->
+            <el-row>
+              <el-col :span="7"> <span>长(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateBottom.xL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"> <span>宽/高(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateBottom.yL }}
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="7"><span>厚度(米):</span></el-col>
+              <el-col :span="17">
+                {{ info.templateBottom.zL }}
+              </el-col>
+            </el-row>
+            <!--box-->
+          </div>
+        </div>
       </el-col>
     </el-row>
   </div>
@@ -67,8 +207,11 @@ export default {
   },
   computed: {},
   mounted() {
-    let sd = this.info;
-    debugger;
+    this.$nextTick(function () {
+      let sd = this.info;
+      debugger;
+    });
+
     // this.init();
   },
   methods: {},

File diff suppressed because it is too large
+ 0 - 0
src/views/ConstructionApplication3D/projectManagement/CheckParkAnalyse.js


+ 79 - 18
src/views/ConstructionApplication3D/projectManagement/projectManagement.vue

@@ -347,6 +347,17 @@
                 </el-row>
               </el-collapse-item>
             </el-collapse>
+
+            <el-pagination
+              :hide-on-single-page="true"
+              style="color: white"
+              @size-change="wshhandleSizeChange"
+              @current-change="wshhandleCurrentChange"
+              :page-size="wshqueryParams.pageSize"
+              layout="prev, pager, next"
+              :total="wshqueryParams.total"
+            >
+            </el-pagination>
           </el-tab-pane>
           <el-tab-pane label="已上会项目" name="已上会项目">
             <el-collapse accordion>
@@ -638,6 +649,16 @@
                 </div>
               </el-collapse-item>
             </el-collapse>
+            <el-pagination
+              :hide-on-single-page="true"
+              style="color: white"
+              @size-change="yshhandleSizeChange"
+              @current-change="yshhandleCurrentChange"
+              :page-size="yshqueryParams.pageSize"
+              layout="prev, pager, next"
+              :total="yshqueryParams.total"
+            >
+            </el-pagination>
           </el-tab-pane>
         </el-tabs>
       </el-col>
@@ -723,6 +744,16 @@ export default {
       modelsload: [],
       loading: false,
       constructionmodel: [],
+      yshqueryParams: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+      },
+      wshqueryParams: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+      },
     };
   },
   props: {
@@ -757,9 +788,38 @@ export default {
   },
   methods: {
     async init() {
-      this.wsh = await this.getshProjectinformations("0");
-      this.ysh = await this.getshProjectinformations("1");
+      await this.wshinit();
+      await this.yshinit();
+    },
+    async wshinit() {
+      this.wsh = await this.getshProjectinformations("0", this.wshqueryParams);
+    },
+    async yshinit() {
+      this.ysh = await this.getshProjectinformations("1", this.yshqueryParams);
+    },
+    //页大小触发
+    wshhandleSizeChange(val) {
+      this.wshqueryParams.pageSize = val;
+      this.wshqueryParams.pageNum = 1;
+      this.wshinit();
+    },
+    //跳转页触发
+    wshhandleCurrentChange(val) {
+      this.wshqueryParams.pageNum = val;
+      this.wshinit();
+    },
+    //页大小触发
+    yshhandleSizeChange(val) {
+      this.yshqueryParams.pageSize = val;
+      this.yshqueryParams.pageNum = 1;
+      this.yshinit();
     },
+    //跳转页触发
+    yshhandleCurrentChange(val) {
+      this.yshqueryParams.pageNum = val;
+      this.yshinit();
+    },
+
     /**
      * 查询过滤
      */
@@ -777,16 +837,18 @@ export default {
      * //获取项目进度
      * @param meetingprogress
      */
-    async getshProjectinformations(meetingprogress) {
-      // let Projectinformations = await listProjectinformation({
-      //   meetingprogress: meetingprogress,
-      //   projectname: this.input3,
-      // });
-      // return Projectinformations.rows;
-      let Projectinformations = window.projectinformation.filter(
-        (c) => c.meetingprogress == meetingprogress
-      );
-      return Projectinformations;
+    async getshProjectinformations(meetingprogress, queryParams) {
+      let Projectinformations = await listProjectinformation({
+        meetingprogress: meetingprogress,
+        projectname: this.input3,
+        ...queryParams,
+      });
+      queryParams.total = Projectinformations.total;
+      return Projectinformations.rows;
+      // let Projectinformations = window.projectinformation.filter(
+      //   (c) => c.meetingprogress == meetingprogress
+      // );
+      // return Projectinformations;
     },
     //获取项目模型信息
     getConstructionModel(Projectinfo) {
@@ -930,7 +992,7 @@ export default {
           //关闭事件
           debugger;
           // this.wsh = await this.getshProjectinformations("0");
-          this.getProjectInfos();
+          this.wshinit();
         },
       });
     },
@@ -955,7 +1017,7 @@ export default {
           //关闭事件
           debugger;
           // this.wsh = await this.getshProjectinformations("0");
-          this.getProjectInfos();
+          this.wshinit();
         },
       });
     },
@@ -1439,7 +1501,7 @@ export default {
         return;
       }
       this.loading = true;
-      let modeinfos = this.getConstructionModel(info.id);
+      let modeinfos = this.getConstructionModel(info);
       let checkedModeinfos = [];
       modeinfos.forEach((modeinfo) => {
         if (modeinfo.checked) {
@@ -2964,9 +3026,8 @@ export default {
     /**
      * //打开指标分析信息弹窗
      * @param tableDataList 控规指标和项目指标
-     * @param Minfo
      */
-    openZBFXInfo(tableDataList, Minfo) {
+    openZBFXInfo(tableDataList) {
       // if (this.ZBFXInfolayerid) {
       //   this.$layer.close(this.ZBFXInfolayerid);
       // }
@@ -2985,7 +3046,7 @@ export default {
           content: ZBFXAnalysisinfo, //传递的组件对象
           parent: this, //当前的vue对象
           data: {
-            info: { tableDataList, Minfo },
+            info: { tableDataList },
           }, //props
         },
         offset: [left, top], //left top

+ 3 - 0
src/views/ConstructionApplication3D/zt.scss

@@ -332,4 +332,7 @@
   color: #ffffff;
   background: rgba(4, 28, 50, 0.6);
 }
+.el-date-editor .el-range-input{
+  background-color: rgba(4, 28, 50, 0.5) ;
+}
 }

+ 40 - 12
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -185,6 +185,7 @@ export default {
     },
     goLayer(geom, lid) {
       if (tdsy.layer) tdsy.layer.show = false;
+      // tdsy.removelayer();
       let layer = viewer.imageryLayers.addImageryProvider(
         new Cesium.SuperMapImageryProvider({
           url: this.layersData.url,
@@ -194,18 +195,25 @@ export default {
       tdsy.layersObj[lid] = layer;
       this.loadGeoJSON(geom, lid);
     },
-    loadGeoJSON(geojson, id) {
+    loadGeoJSON(geojson, id, yanse, isfly = true) {
       let polygon = Cesium.GeoJsonDataSource.load(geojson, {
         clampToGround: true,
-        stroke: Cesium.Color.RED.withAlpha(0),
-        fill: Cesium.Color.WHITE.withAlpha(0),
+        stroke: yanse
+          ? Cesium.Color.fromCssColorString(yanse)
+          : Cesium.Color.RED.withAlpha(0),
+        fill: yanse
+          ? Cesium.Color.fromCssColorString(yanse).withAlpha(0.3)
+          : Cesium.Color.WHITE.withAlpha(0),
+        strokeWidth: isfly ? 5 : 2,
+        zIndex: isfly ? 10 : 5,
       });
       polygon.then(function (dataSource) {
         viewer.dataSources.add(dataSource);
         layerSources[id] = dataSource;
-        viewer.flyTo(dataSource, {
-          offset: new Cesium.HeadingPitchRange(0, -45),
-        });
+        if (isfly)
+          viewer.flyTo(dataSource, {
+            offset: new Cesium.HeadingPitchRange(0, -45),
+          });
       });
     },
     multiPolygonToPolygons(multiPolygon) {
@@ -361,7 +369,17 @@ export default {
       } else {
         if (this.cockpit_vector.mapType) {
           this.setLayerStatus(item);
-        } else this.addpolygon(item);
+        } else {
+          // this.addpolygon(item);
+          this.tempdataLayerId = "h_" + item.index;
+          if (layerSources["h_" + item.index]) {
+            viewer.flyTo(layerSources["h_" + item.index], {
+              offset: new Cesium.HeadingPitchRange(0, -45),
+            });
+          } else {
+            this.loadGeoJSON(item.geom, "h_" + item.index, "#ff0000");
+          }
+        }
       }
       store.setVectordataid(item.dataid);
       let arr = [];
@@ -579,7 +597,13 @@ export default {
     active_dableData(newVal, oldVal) {
       if (this.cockpit_vector.mapType)
         this.draw_vector_server(this.cockpit_vector.mapType);
-      else this.draw_vector_tdgy_gy_jd(newVal);
+      // else this.draw_vector_tdgy_gy_jd(newVal);
+      else {
+        newVal.forEach((res, index) => {
+          res.index = index;
+          if (res.geom) this.loadGeoJSON(res.geom, index, "#55A1E3", false);
+        });
+      }
     },
     tempdataLayerId(newVal, oldVal) {
       if (oldVal && tdsy.layersObj[oldVal]) {
@@ -587,6 +611,10 @@ export default {
       } else if (tdsy.layersObj[newVal]) {
         // tdsy.layersObj[newVal].show = true;
       }
+      if (oldVal && layerSources[oldVal]) {
+        viewer.dataSources.remove(layerSources[oldVal]);
+        layerSources[oldVal] = null;
+      }
       console.log(newVal, oldVal, "----");
     },
     computed_vectorData(newVal, oldVal) {
@@ -693,9 +721,9 @@ div::-webkit-scrollbar {
     line-height: 23px;
     padding: 0 5px;
     border-radius: 4px;
-    top: -1.9rem !important;
-    position: relative;
-    right: -24rem;
+    top: 10px !important;
+    position: absolute;
+    right: 10px;
   }
 
   .PangetitleVector {
@@ -707,7 +735,7 @@ div::-webkit-scrollbar {
     line-height: 35px;
     font-size: 14px;
     padding-left: 15px;
-    display: flex;
+    // display: flex;
     position: relative;
     overflow: hidden;
   }

+ 11 - 0
src/views/cockpit/js/tdsy.js

@@ -53,6 +53,8 @@ export const remove = (isreset) => {
         viewer.dataSources.remove(gy_jd_entity);
         gy_jd_entity = null
     }
+    viewer.entities.removeAll();
+    viewer.dataSources.removeAll();
     if (layer && isreset) {
         viewer.imageryLayers.remove(layer);
         layer = null
@@ -77,6 +79,15 @@ export const remove = (isreset) => {
     //     })
     // }
 
+}
+export const removelayer = () => {
+    console.log("---aa", viewer.imageryLayers)
+    if (layer) {
+        console.log("----", layer)
+        viewer.imageryLayers.remove(layer);
+        layer = null
+    }
+
 }
 
 export const hidden = (flag) => {

+ 13 - 48
src/views/complianceAnalysis/components/lsjl.vue

@@ -48,7 +48,7 @@
         <!-- <div>{{ dindex + 1 }}. 项目名称:{{ item.xmmc }}</div> -->
         <div class="index">{{ dindex + 1 }}</div>
         <div class="nameTitle">{{ item.xmmc }}</div>
-        <div>建设单位:{{ item.jsdw }}</div>
+        <div v-if="type != 'gdbh'">建设单位:{{ item.jsdw }}</div>
         <div class="item_bottom">
           <el-tag type="warning" v-if="item.rwzt == 0">创建</el-tag>
           <el-tag v-if="item.rwzt == 1">执行中</el-tag>
@@ -87,6 +87,7 @@ import { GetPage, Delect } from "@/api/ghss/hgxfx.js";
 import { Message, MessageBox } from "element-ui";
 import { rest } from "lodash";
 import { GetXzResList, DelXzRes } from "../../../api/ghss/ghxz.js";
+import { SelectGdbhList } from "../../../api/ghss/gdbh.js";
 let dataSources;
 export default {
   props: {
@@ -242,54 +243,18 @@ export default {
           this.datalist = [...this.datalist, ...res.data.items];
         });
       } else if (this.$props.type == "gdbh") {
-        console.log("我是耕地保护");
-        setTimeout(() => {
-          this.$emit("updateParent", "loading", false);
-        }, 100);
         //耕保历史记录
-        let tempData = [
-          {
-            bsm: "012bf914cf6344528e75a500a25965a8",
-            xmmc: "15耕地保护项目_20240828094815",
-            xmlx: null,
-            rwzt: 99,
-            jsdw: "建设单位",
-            fxbg: null,
-            geom: null,
-            dks: [],
-            landCount: 0,
-            xzyz: [],
-            createAt: "2024-08-28 10:05:23",
-          },
-          {
-            bsm: "10eb1b95ca0b44c6998fd7770d769b64",
-            xmmc: "小谷——耕地保护项目_20240828093845",
-            xmlx: null,
-            rwzt: 1,
-            jsdw: "建设单位",
-            fxbg: null,
-            geom: null,
-            dks: [],
-            landCount: 0,
-            xzyz: [],
-            createAt: "2024-08-28 09:42:39",
-          },
-          {
-            bsm: "8f84735ec1414d8b9962d8013220ca86",
-            xmmc: "小谷——耕地保护项目_20240828093845",
-            xmlx: null,
-            rwzt: 1,
-            jsdw: "建设单位",
-            fxbg: null,
-            geom: null,
-            dks: [],
-            landCount: 0,
-            xzyz: [],
-            createAt: "2024-08-28 09:39:54",
-          },
-        ];
-        this.listdisabled = tempData.length < 10;
-        this.datalist = [...this.datalist, ...tempData];
+        SelectGdbhList().then((res) => {
+          setTimeout(() => {
+            this.$emit("updateParent", "loading", false);
+          }, 100);
+
+          if (res.code == 200) {
+            console.log("我是耕地保护");
+            this.listdisabled = res.rows.length < 10;
+            this.datalist = [...this.datalist, ...res.rows];
+          }
+        });
       }
     },
     zoomItem(item) {

+ 173 - 0
src/views/farmlandProtection/components/fxjg.vue

@@ -36,16 +36,111 @@
       </div>
       <el-button size="mini" @click="zdyModel">图表切换</el-button>
     </div>
+    <div>
+      <pie
+        class="echart"
+        unit="平方千米"
+        @echartClick="(name) => echartClick(name, item.value)"
+        :ref="`echartRef`"
+      ></pie>
+    </div>
+
+    <div class="site-title">
+      <div class="siteCon">
+        <div class="site_Icon"></div>
+        <span>套合结果</span>
+      </div>
+    </div>
+    <div class="Integration">
+      <!-- <div></div> -->
+      <div class="Integration_list">
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压耕地图斑数</span>
+            <span color="#2d8cf0">{{ 203 }}个</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压耕地面积(㎡)</span>
+            <span color="#2d8cf0">{{ 20314.52 }}</span>
+          </div>
+        </div>
+      </div>
+      <div class="Integration_list">
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压永久基本农田图斑数</span>
+            <span color="#2d8cf0">{{ 203 }}个</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压永久基本农田面积(㎡)</span>
+            <span color="#2d8cf0">{{ 20314.52 }}</span>
+          </div>
+        </div>
+      </div>
+      <div class="Integration_list">
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压耕地图斑数</span>
+            <span color="#2d8cf0">{{ 203 }}个</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压耕地面积(㎡)</span>
+            <span color="#2d8cf0">{{ 20314.52 }}</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压耕地面积(㎡)</span>
+            <span color="#2d8cf0">{{ 20314.52 }}</span>
+          </div>
+        </div>
+      </div>
+      <div class="Integration_list">
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压生态保护红线图斑数</span>
+            <span color="#2d8cf0">{{ 203 }}个</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压公益林面积(㎡)</span>
+            <span color="#2d8cf0">{{ 20314.52 }}</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压自然保护地图斑数</span>
+            <span color="#2d8cf0">{{ 20314.52 }}个</span>
+          </div>
+        </div>
+        <div class="listCol">
+          <div class="listText">
+            <span style="color: #fff">占压自然保护地面积(㎡)</span>
+            <span color="#2d8cf0">{{ 20314.52 }}</span>
+          </div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
+import pie from "@/components/echartsTemplate/pieNew.vue";
 export default {
   props: {
     fxjgObj: {
       type: Object,
     },
   },
+
+  components: { pie },
   data() {
     return {
       imgs: {
@@ -54,6 +149,35 @@ export default {
       },
     };
   },
+  methods: {
+    GetSumList() {
+      let data = [
+        { name: "中央资金", value: "13.45" },
+        { name: "省级资金", value: "5" },
+        { name: "市级资金", value: "18.67" },
+      ];
+      // this.setEchart({ data, type: '"horizontal"', total: 37.12 }, 2);
+      this.$refs[`echartRef`].setOptions({ data, type: '"horizontal"' }, 2);
+    },
+    echartClick(name, { iseyes }) {
+      console.log(name, ":name");
+      // this.reset();
+
+      // this.tableData.forEach((res) => {
+      //   const keys = Object.keys(res);
+      //   for (const key of keys) {
+      //     let value = res[key];
+      //     if (value == name) {
+      //       this.addPolygon(res.空间信息.split(";")[1], "all", "#ff0000", true);
+      //     }
+      //   }
+
+      // })
+    },
+  },
+  mounted() {
+    this.GetSumList();
+  },
 };
 </script>
 
@@ -64,12 +188,21 @@ export default {
   overflow-x: hidden;
   padding-right: 10px;
   line-height: 40px;
+  .echart {
+    // width: 19rem;
+    // height: 350px;
+    width: 387px !important;
+    height: 200px !important;
+  }
+
   .downloadDiv {
     position: relative;
+
     .xmmc {
       width: calc(100% - 60px);
       display: inline-block;
     }
+
     .export {
       width: 95px;
       height: 28px;
@@ -81,35 +214,42 @@ export default {
       right: 2px;
       bottom: 6px;
     }
+
     .text {
       color: #cddeeb;
     }
   }
+
   .divrow {
     height: 50px;
     background-color: #0f7bc875;
     display: flex;
     justify-content: space-between;
     margin-bottom: 8px;
+
     .divCol {
       // background-color: #cddeeb5a;
       width: 49%;
       display: flex;
       align-items: center;
       white-space: nowrap;
+
       .divImg {
         width: 25%;
         height: 40px;
+
         img {
           height: 2.5rem;
           width: 2.5rem;
         }
       }
+
       .divText {
         width: 75%;
         // padding-left: 0.5rem;
         display: flex;
         flex-direction: column;
+
         span {
           height: 20px;
           // background: rgba(255, 0, 0, 0.258);
@@ -119,5 +259,38 @@ export default {
       }
     }
   }
+
+  .Integration {
+    max-height: 32vh;
+    overflow: hidden;
+    overflow-y: auto;
+    .Integration_list {
+      // height: 50px;
+      background-color: #0f7bc875;
+      display: flex;
+      justify-content: space-between;
+      // margin-bottom: 8px;
+      margin-top: 8px;
+      flex-wrap: wrap;
+      padding: 10px;
+      .listCol {
+        width: 49%;
+        display: flex;
+        align-items: center;
+        white-space: nowrap;
+        margin-bottom: 5px;
+        .listText {
+          width: 100%;
+          display: flex;
+          flex-direction: column;
+          span {
+            height: 20px;
+            height: 20px;
+            line-height: 20px;
+          }
+        }
+      }
+    }
+  }
 }
 </style>

+ 31 - 50
src/views/farmlandProtection/components/fzjcyp.vue

@@ -32,10 +32,7 @@
           <el-table-column width="50">
             <template slot-scope="scope">
               <!-- <span>编辑</span> -->
-              <el-button
-                size="mini"
-                type="text"
-                @click="handleEdit(scope.row)"
+              <el-button size="mini" type="text" @click="handleEdit(scope.row)"
                 >编辑</el-button
               >
             </template>
@@ -47,7 +44,7 @@
       <span class="clearBtn" @click="reset">取消</span>
       <span class="sureBtn" @click="submitData">确定</span>
     </div>
-    <zdyModelPop :tableData="anaModels" ref="zdyPop"></zdyModelPop>
+    <zdyModelPop :tableData="templateYZ" :editData="editData" ref="zdyPop"></zdyModelPop>
   </div>
 </template>
 
@@ -56,7 +53,7 @@ import range from "@/components/mapview/range.vue"; //绘制范围
 import zdyModelPop from "./zdyModelPop.vue"; //自定义模型面板
 import moment from "moment";
 import { Message } from "element-ui";
-import { GetMxList } from "../../../api/ghss/gdbh.js";
+import { GetMxList ,AddGdbh} from "../../../api/ghss/gdbh.js";
 export default {
   components: {
     range,
@@ -81,24 +78,9 @@ export default {
       },
       //分析模型列表
       anaModels: [
-        {
-          id: 1,
-          name: "耕地监测分析模型",
-        },
-        {
-          id: 2,
-          name: "基本农田保护模型",
-        },
-        {
-          id: 3,
-          name: "生态保护分析模型",
-        },
-        {
-          id: 4,
-          name: "矿产监测分析模型",
-        },
       ],
       templateYZ: [], //用地性质模版因子
+      editData:{},//编辑的对象
     };
   },
   methods: {
@@ -130,8 +112,6 @@ export default {
         },
       ];
       this.templateYZ.forEach((item) => {
-        // let JSONItem = JSON.parse(item.conditionInfo);
-        // item.conditionInfo = JSONItem;
         item.children = [];
       });
       this.anaModels = this.templateYZ;
@@ -155,21 +135,21 @@ export default {
     //自定义模型按钮
     zdyModel() {
       this.$refs.zdyPop.dialogVisible = true;
+      this.editData={}
+      this.$refs.zdyPop.reset()
+      this.$refs.zdyPop.yzTableData = [];
     },
     handleEdit(item) {
+      this.editData = item
       this.$refs.zdyPop.dialogVisible = true;
-      this.$refs.zdyPop.yzTableData = item.gdbhMxYz;
+      this.templateYZ = item.gdbhMxYzRet;
+      this.templateYZ.forEach((item) => {
+        item.children = [];
+      });
+      this.$refs.zdyPop.yzTableData = this.templateYZ;
       this.$refs.zdyPop.fxmxmc = item.bsmmc;
-      // console.log(item, "暂时使用");
-      // item.gdbhMxYz.forEach((item) => {
-      //   // let JSONItem = JSON.parse(item.conditionInfo);
-      //   // item.conditionInfo = JSONItem;
-      //   item.children = [];
-      // });
-      // this.anaModels = item.gdbhMxYz;
-      // this.$refs.zdyPop.yzTableData = item.gdbhMxYz;
-      // // this.zdyModel();
-      
+
+      // this.zdyModel();
     },
     reset() {
       this.ruleForm = {
@@ -190,8 +170,9 @@ export default {
             return;
           }
           let obj = {
-            xzmj: Number(this.ruleForm.xzmj),
+            xzfw: this.$refs.range.fileDataID,
             xmmc: this.ruleForm.xmmc,
+            mxlist:this.anaModels
           };
 
           const loading = this.$loading({
@@ -205,20 +186,20 @@ export default {
             this.activeTabs = "lsju";
             this.$emit("updateParent", "activeTabs", "lsju");
           }, 1000);
-          //   AddFzxz(obj)
-          //     .then((res) => {
-          //       loading.close();
-          //       this.activeTabs = "lsju";
-          //       this.$emit("updateParent", "activeTabs", "lsju");
-          //       this.$message({
-          //         message: res.message,
-          //         type: res.success ? "success" : "warning",
-          //       });
-          //       this.reset();
-          //     }).catch((error) => {
-          //       loading.close();
-          //       Message.error(error)
-          //     });
+          AddGdbh(obj)
+              .then((res) => {
+                loading.close();
+                this.activeTabs = "lsju";
+                this.$emit("updateParent", "activeTabs", "lsju");
+                this.$message({
+                  message: res.message,
+                  type: res.success ? "success" : "warning",
+                });
+                this.reset();
+              }).catch((error) => {
+                loading.close();
+                Message.error(error)
+              });
         } else {
           loading.close();
           console.log("error submit!!");

+ 32 - 31
src/views/farmlandProtection/components/zdyModelPop.vue

@@ -51,6 +51,7 @@
         <el-col :span="11">
           <div class="yztitle">已选数据</div>
           <el-table
+            ref="multipleTable"
             :data="dialogData"
             border
             class="right-table scroll-style"
@@ -60,7 +61,7 @@
           >
             <el-table-column type="selection" width="55" align="center">
             </el-table-column>
-            <el-table-column prop="bsmmc" label="数据名称"> </el-table-column>
+            <el-table-column prop="name" label="数据名称"> </el-table-column>
           </el-table>
         </el-col>
       </el-row>
@@ -80,6 +81,10 @@ export default {
     tableData: {
       type: Array,
     },
+    editData: {
+      //editData用来存储编辑的数据,用bsm判断是否为编辑,全部存储是为了防止以后新增需求
+      type: Object,
+    },
   },
 
   data() {
@@ -112,10 +117,14 @@ export default {
       return data.name.indexOf(value) !== -1;
     },
     reset() {
-      this.dialogData = []; //清空已选数据表单
+      console.log(898888);
+      this.$parent.templateYZ = [];
       this.filterText = ""; //还原分析数据搜索框
       this.fxmxmc = ""; //清空分析模型名称输入框
-      this.getTreeList(); //重新获取分析数据
+      this.yzTableData = [];
+      this.GetFactorList(); //重新获取分析数据
+      this.dialogData = []; //清空已选数据表单
+      console.log(this.dialogData, "到货时间肯定会撒");
     },
     testInput(val) {
       val = Number(val);
@@ -156,11 +165,9 @@ export default {
     setTable(selectdata) {
       let tableList = [];
       selectdata.forEach((item) => {
-        console.log(item, "itemitemitem---");
-        // let JSONItem = JSON.parse(item.conditionInfo);
         tableList.push({
           id: item.id,
-          bsmmc: item.name,
+          name: item.name,
           bsm: item.bsm,
           // conditionInfo: JSONItem,
         });
@@ -236,31 +243,21 @@ export default {
       let saveData = {
         bsm: new Date().getTime(),
         bsmmc: this.fxmxmc,
-        gdbhMxYz: this.dialogData,
+        gdbhMxYzRet: this.dialogData,
       };
-      console.log(saveData, ":this.dialogData");
-      this.$parent.anaModels.push(saveData);
-      this.dialogVisible = false;
-      // var sign = true;
-      // let saveData = [];
-      // this.dialogData.forEach((item) => {
-      //   item.type && item.value == "" && (sign = false);
-      //   issave &&
-      //     saveData.push({
-      //       ...item,
-      //       conditionInfo: JSON.stringify(item.conditionInfo),
-      //     });
-      // });
-      // if (sign) {
-      //   if (issave) {
-      //     this.save(saveData);
-      //   } else {
-      //     this.$parent.tableData = this.dialogData;
-      //     this.dialogVisible = false;
-      //   }
-      // } else {
-      //   this.$message.warning("请将信息补充完整!");
-      // }
+      if (this.editData.bsm) {
+        //判断是否为编辑状态
+        this.$parent.anaModels.forEach((item) => {
+          if (item.bsm == this.editData.bsm) {
+            this.$parent.anaModels[item] = saveData; //替换数据
+          }
+        });
+        this.dialogVisible = false;
+      } else {
+        this.$parent.anaModels.push(saveData);
+        this.dialogVisible = false;
+      }
+      this.$refs.multipleTable.clearSelection();//清空勾选
     },
     setData(data) {
       data.filter((item) => {
@@ -282,11 +279,15 @@ export default {
         : (this.options[1].disabled = false);
     },
     resetDialogData() {
-      if (this.tableData.length == []) {
+      if (!this.tableData.length) {
         // 重置时,树的数据恢复
         this.dialogData = [];
         this.options = JSON.parse(JSON.stringify(this.optionsTemp));
         this.selectdialogData = [];
+      } else {
+        // 选择模板时,生成新的树
+        this.dialogData = JSON.parse(JSON.stringify(this.tableData));
+        this.options = JSON.parse(JSON.stringify(this.optionsTemp));
       }
       this.dialogData.forEach((item) => {
         this.resetTree(this.options, item);

+ 260 - 186
static/Config/config.js

@@ -1852,33 +1852,10 @@ window.billboardInfoList = [
     checkDate: "2024-01-02 12:00:00",
     design: "设计单位",
     description: "简介",
-    ProjectScope: [
-      {
-        y: 18.310536251265084,
-        x: 109.51608731794252,
-        z: 0,
-      },
-      {
-        y: 18.310514067217994,
-        x: 109.51645265807166,
-        z: 0,
-      },
-      {
-        y: 18.3100083435041,
-        x: 109.51627043657908,
-        z: 0,
-      },
-      {
-        y: 18.310088390434938,
-        x: 109.51599128427965,
-        z: 0,
-      },
-      {
-        y: 18.310536251265084,
-        x: 109.51608731794252,
-        z: 0,
-      },
-    ],
+    url: "http://192.168.60.2:8090/iserver/services/3D-fangan/rest/realspace",
+    dataurl: "http://192.168.60.2:8090/iserver/services/data-fangan/rest/data",
+    datasourcename: "DongAnZhuoYueCheng",
+    datasetname: "建筑轮廓",
   },
   {
     id: "2",
@@ -1887,33 +1864,10 @@ window.billboardInfoList = [
     checkDate: "2024-01-02 12:00:00",
     design: "设计单位",
     description: "简介",
-    ProjectScope: [
-      {
-        y: 18.302796723071562,
-        x: 109.51481646486832,
-        z: 0,
-      },
-      {
-        y: 18.30298326641422,
-        x: 109.51473593501409,
-        z: 0,
-      },
-      {
-        y: 18.303127770256676,
-        x: 109.51533133860829,
-        z: 0,
-      },
-      {
-        y: 18.302989860934847,
-        x: 109.51534315841657,
-        z: 0,
-      },
-      {
-        y: 18.302796723071562,
-        x: 109.51481646486832,
-        z: 0,
-      },
-    ],
+    url: "http://192.168.60.2:8090/iserver/services/3D-fangan/rest/realspace",
+    dataurl: "http://192.168.60.2:8090/iserver/services/data-fangan/rest/data",
+    datasourcename: "DongAnZhuoYueCheng",
+    datasetname: "建筑轮廓",
   },
 ];
 //广告模型信息
@@ -1934,7 +1888,6 @@ window.billboardModelList = [
     rotateZ: 0,
     ReviewStatus: "",
     ReviewComments: "",
-    isAddModel: true,
   },
   {
     id: "3",
@@ -1952,7 +1905,6 @@ window.billboardModelList = [
     rotateZ: 0,
     ReviewStatus: "",
     ReviewComments: "",
-    isAddModel: true,
   },
 ];
 //广告模型审查规则
@@ -1960,14 +1912,14 @@ window.billboardReviewList = [
   {
     id: "wew1",
     code: "001",
-    billboardType: "设置在建(构)筑物上的户外广告",
+    billboardType: "(报建)设置在建(构)筑物上的户外广告",
     children: [
       {
         id: "wew232",
         code: "00101",
         billboardType: "平行建筑主体户外广告",
         isAddModel: true,
-        ModelType: "box",
+        ModelType: "rectangleBillboard",
         ReviewItems: [
           {
             id: "4553",
@@ -2028,7 +1980,7 @@ window.billboardReviewList = [
             code: "0010201",
             billboardType: "底层以上没有出挑结构的建筑",
             isAddModel: true,
-            ModelType: "box",
+            ModelType: "rectangleBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2068,6 +2020,8 @@ window.billboardReviewList = [
                 id: "we44fsxcxd3w232",
                 code: "001020201",
                 billboardType: "附设于建筑一层门楣的广告",
+                isAddModel: true,
+                ModelType: "rectangleBillboard",
                 ReviewItems: [
                   {
                     id: "4553",
@@ -2109,6 +2063,8 @@ window.billboardReviewList = [
                 id: "wed3w232",
                 code: "001020202",
                 billboardType: "设于建筑出挑部分的墙面上",
+                isAddModel: true,
+                ModelType: "rectangleBillboard",
                 ReviewItems: [
                   {
                     id: "4553",
@@ -2160,7 +2116,7 @@ window.billboardReviewList = [
         code: "00103",
         billboardType: "围墙上设置的户外广告",
         isAddModel: true,
-        ModelType: "box",
+        ModelType: "rectangleBillboard",
         ReviewItems: [
           {
             id: "4534553",
@@ -2228,7 +2184,7 @@ window.billboardReviewList = [
         code: "00201",
         billboardType: "公交候车亭广告",
         isAddModel: true,
-        ModelType: "box",
+        ModelType: "rectangleBillboard",
         ReviewItems: [
           {
             id: "4553",
@@ -2295,8 +2251,7 @@ window.billboardReviewList = [
             code: "0020201",
             billboardType: "公共自行车亭广告",
             isAddModel: true,
-            ModelType: "box",
-
+            ModelType: "rectangleBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2364,6 +2319,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0020202",
             billboardType: "路名牌",
+            isAddModel: true,
+            ModelType: "rectangleBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2385,6 +2342,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0020203",
             billboardType: "路灯广告",
+            isAddModel: true,
+            ModelType: "rectangleBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2405,6 +2364,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0020204",
             billboardType: "城市家具广告",
+            isAddModel: true,
+            ModelType: "rectangleBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2426,6 +2387,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0020205",
             billboardType: "人行地下通道广告",
+            isAddModel: true,
+            ModelType: "rectangleBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2456,6 +2419,8 @@ window.billboardReviewList = [
         id: "wew232",
         code: "00301",
         billboardType: "立杆型户外广告",
+        isAddModel: true,
+        ModelType: "postsBillboard",
         ReviewItems: [
           {
             id: "4553",
@@ -2538,6 +2503,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0030201",
             billboardType: "普通底座型户外广告",
+            isAddModel: true,
+            ModelType: "ColumnWithaseBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2558,6 +2525,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0030202",
             billboardType: "设置在城市道路人行道上及商业步行街上",
+            isAddModel: true,
+            ModelType: "ColumnWithaseBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2595,7 +2564,7 @@ window.billboardReviewList = [
               {
                 id: "453ldfj53",
                 code: "003020206",
-                ReviewMethod: "动审查",
+                ReviewMethod: "动审查",
                 ReviewContent: "底座占地面积不得大于1平方米",
               },
               {
@@ -2632,7 +2601,7 @@ window.billboardReviewList = [
               {
                 id: "453ld78fj53",
                 code: "003020212",
-                ReviewMethod: "动审查",
+                ReviewMethod: "动审查",
                 ReviewContent: "牌面与水平面夹角不得小于75°",
               },
               {
@@ -2655,6 +2624,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0030203",
             billboardType: "设置在广场(空地)",
+            isAddModel: true,
+            ModelType: "ColumnWithaseBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2688,6 +2659,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0030301",
             billboardType: "普通实物LOGO广告",
+            isAddModel: true,
+            ModelType: "ModelBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2725,6 +2698,8 @@ window.billboardReviewList = [
                 id: "wew232",
                 code: "003030201",
                 billboardType: "沿商业步行街",
+                isAddModel: true,
+                ModelType: "ModelBillboard",
                 ReviewItems: [
                   {
                     id: "4553",
@@ -2769,6 +2744,8 @@ window.billboardReviewList = [
                 id: "wew232",
                 code: "003030202",
                 billboardType: "沿主要商业街人行道",
+                isAddModel: true,
+                ModelType: "ModelBillboard",
                 ReviewItems: [
                   {
                     id: "4553",
@@ -2813,6 +2790,8 @@ window.billboardReviewList = [
                 id: "wew232",
                 code: "003030203",
                 billboardType: "沿其他城市道路人行道",
+                isAddModel: true,
+                ModelType: "ModelBillboard",
                 ReviewItems: [
                   {
                     id: "4553",
@@ -2859,6 +2838,8 @@ window.billboardReviewList = [
             id: "wew232",
             code: "0030303",
             billboardType: "设置在人行道",
+            isAddModel: true,
+            ModelType: "ModelBillboard",
             ReviewItems: [
               {
                 id: "4553",
@@ -2907,6 +2888,8 @@ window.billboardReviewList = [
         id: "wew232",
         code: "00401",
         billboardType: "车辆广告",
+        isAddModel: false,
+        ModelType: "",
         ReviewItems: [
           {
             id: "4553",
@@ -2921,6 +2904,8 @@ window.billboardReviewList = [
         id: "wew232",
         code: "00402",
         billboardType: "船舶广告",
+        isAddModel: false,
+        ModelType: "",
         ReviewItems: [
           {
             id: "4553",
@@ -2935,6 +2920,8 @@ window.billboardReviewList = [
         id: "wew232",
         code: "00403",
         billboardType: "空中移动广告",
+        isAddModel: false,
+        ModelType: "",
         ReviewItems: [
           {
             id: "4553",
@@ -2951,6 +2938,8 @@ window.billboardReviewList = [
     id: "wew232",
     code: "005",
     billboardType: "其他类型户外广告",
+    isAddModel: false,
+    ModelType: "",
     ReviewItems: [
       {
         id: "4553",
@@ -2961,12 +2950,93 @@ window.billboardReviewList = [
     ],
   },
 ];
-window.billboardModelLT = {
-  url: "http://192.168.60.2:8090/iserver/services/3D-fangan/rest/realspace",
-  dataurl: "http://192.168.60.2:8090/iserver/services/data-fangan/rest/data",
-  datasourcename: "DongAnZhuoYueCheng",
-  datasetname: "建筑轮廓",
-};
+
+//广告模型规则
+window.billboardModelRuleList = [
+  {
+    id: "wew1",
+    code: "imgBillboard",
+    billboardType: "图片型广告",
+    template: [
+      {
+        //模板名称
+        templateName: "名称1",
+        //缩略图
+        thumbnailUrl: "../../../../static/ModelData/billboard/1.jpg",
+        //模板地址
+        templateTopUrl: "../../../../static/ModelData/billboard/1.jpg",
+        templateTopType: "billboard",
+      },
+    ],
+  },
+  {
+    id: "wesdfsaw1",
+    code: "ModelBillboard",
+    billboardType: "模型型广告",
+    template: [
+      {
+        //模板名称
+        templateName: "名称1",
+        //缩略图
+        thumbnailUrl: "../../../../static/ModelData/billboard/1.jpg",
+        //模板地址
+        templateTopUrl: "../../../../static/ModelData/billboard/box.gltf",
+        templateTopType: "model",
+      },
+    ],
+  },
+  {
+    id: "wewasd",
+    code: "rectangleBillboard",
+    billboardType: "矩形广告牌",
+    template: [
+      {
+        //模板名称
+        templateName: "矩形广告牌名称1",
+        //缩略图
+        thumbnailUrl: "../../../../static/ModelData/billboard/1.jpg",
+        //模板顶部类型
+        templateTopType: "box",
+      },
+    ],
+  },
+  {
+    id: "wewasd",
+    code: "postsBillboard",
+    billboardType: "立柱广告牌",
+    template: [
+      {
+        //模板名称
+        templateName: "立柱广告名称1",
+        //缩略图
+        thumbnailUrl: "../../../../static/ModelData/billboard/1.jpg",
+        //模板顶部类型
+        templateTopType: "box",
+        //模板中部类型
+        templateCentreType: "cylinder",
+      },
+    ],
+  },
+  {
+    id: "wewsdfasd",
+    code: "ColumnWithaseBillboard",
+    billboardType: "带底座的立柱广告牌",
+    template: [
+      {
+        //模板名称
+        templateName: "带底座的立柱广告名称1",
+        //缩略图
+        thumbnailUrl: "../../../../static/ModelData/billboard/3.jpg",
+        //模板顶部类型
+        templateTopType: "box",
+        //模板中部类型
+        templateCentreType: "cylinder",
+        //模板底类型
+        templateBottomType: "box",
+      },
+    ],
+  },
+];
 
 /**
  * 征收补偿预估标准
@@ -2984,147 +3054,146 @@ window.ZSBC = {
   /**征地补偿标准 */
   ZDBCList: [
     {
-      label: "征地标准2013",
-      value: "1",
-      BCBZ: {
-        /**
-         * 土地统一年产值
-         */
-        TDCZ: 5600,
-        /**
-         * 土地补偿倍数
-         */
-        TDBCBS: 10,
-        /**
-         * 土地补偿费
-         */
-        TDBCF: 56000,
-        /**
-         * 安置补偿倍数
-         */
+      name: "征地标准2013",
+      id: "1",
 
-        AZBCBS: 16,
-        /**
-         * 安置补偿费
-         */
-        AZBCF: 89600,
-        /**
-         * 补偿合计
-         */
-        BCHJ: 145600,
-      },
+      /**
+       * 土地统一年产值
+       */
+      tdcz: 5600,
+      /**
+       * 土地补偿倍数
+       */
+      tdbcbs: 10,
+      /**
+       * 土地补偿费
+       */
+      tdbcf: 56000,
+      /**
+       * 安置补偿倍数
+       */
+
+      azbcbs: 16,
+      /**
+       * 安置补偿费
+       */
+      azbcf: 89600,
+      /**
+       * 补偿合计
+       */
+      bchj: 145600,
     },
   ],
   /**拆迁补偿标准 */
   CQBCList: [
     {
-      label: "拆迁补偿标准2013",
-      value: "1",
-      BCBZ: [
+      name: "拆迁补偿标准2013",
+      id: "1",
+      bcbz: [
         {
-          ID: 1,
-          JG: "框架结构",
-          GRADE: 1,
-          BZ: 1350,
-          DES: "层高:3.5m,惨板:钢筋砼8cm厚,楼地面:铺地板砖,基础:钢筋砼基础,梁柱:钢筋砼梁柱,墙体:红砖内外墙,水电:普通水电及卫生设备,墙面:内墙一般涂料,外墙有装饰面,窗:铝合金玻璃窗,门:普通镶板门",
+          id: 1,
+          jg: "框架结构",
+          grade: 1,
+          bz: 1350,
+          des: "层高:3.5m,惨板:钢筋砼8cm厚,楼地面:铺地板砖,基础:钢筋砼基础,梁柱:钢筋砼梁柱,墙体:红砖内外墙,水电:普通水电及卫生设备,墙面:内墙一般涂料,外墙有装饰面,窗:铝合金玻璃窗,门:普通镶板门",
         },
         {
-          ID: 2,
-          JG: "框架结构",
-          GRADE: 2,
-          BZ: 1250,
-          DES: "层高:3m,楼板:钢筋砼8cm厚,地面:水泥砂浆批面,梁柱:钢筋砼梁柱,基础:钢筋砼基础,墙体:红砖内外墙,墙面:一般涂料,门窗:木门窗,水电:普通水电及卫生洁具",
+          id: 2,
+          jg: "框架结构",
+          grade: 2,
+          bz: 1250,
+          des: "层高:3m,楼板:钢筋砼8cm厚,地面:水泥砂浆批面,梁柱:钢筋砼梁柱,基础:钢筋砼基础,墙体:红砖内外墙,墙面:一般涂料,门窗:木门窗,水电:普通水电及卫生洁具",
         },
         {
-          ID: 3,
-          JG: "混合结构",
-          GRADE: 1,
-          BZ: 1100,
-          DES: "层高:3.5m,楼板:钢筋砼8cm厚,楼地面:铺地板砖,墙体:红砖内外墙,基础:地梁,片石基础,墙面:内墙一般涂料、外墙有装饰贴面,水电:普通水电及卫生洁具,窗:铝合金玻璃窗门:普通木门",
+          id: 3,
+          jg: "混合结构",
+          grade: 1,
+          bz: 1100,
+          des: "层高:3.5m,楼板:钢筋砼8cm厚,楼地面:铺地板砖,墙体:红砖内外墙,基础:地梁,片石基础,墙面:内墙一般涂料、外墙有装饰贴面,水电:普通水电及卫生洁具,窗:铝合金玻璃窗门:普通木门",
         },
         {
-          ID: 4,
-          JG: "混合结构",
-          GRADE: 2,
-          BZ: 1050,
-          DES: "层高:3m,楼板:钢筋砼8cm厚,楼地面:水泥砂浆批面,墙体:红砖内外墙,基础:地梁片石基础,墙面:一般涂料,门窗:木门窗,水电:普通水电及卫生洁具",
+          id: 4,
+          jg: "混合结构",
+          grade: 2,
+          bz: 1050,
+          des: "层高:3m,楼板:钢筋砼8cm厚,楼地面:水泥砂浆批面,墙体:红砖内外墙,基础:地梁片石基础,墙面:一般涂料,门窗:木门窗,水电:普通水电及卫生洁具",
         },
         {
-          ID: 5,
-          JG: "砖木结构",
-          GRADE: 1,
-          BZ: 850,
-          DES: "檐高:2.8m以上,墙体:红砖内外墙,地面:水泥砂浆批面、基础片石基础,屋面:土瓦屋面,梁料:木梁木,门窗:本门窗,墙面:石灰刷白,其他:普通水电设备",
+          id: 5,
+          jg: "砖木结构",
+          grade: 1,
+          bz: 850,
+          des: "檐高:2.8m以上,墙体:红砖内外墙,地面:水泥砂浆批面、基础片石基础,屋面:土瓦屋面,梁料:木梁木,门窗:本门窗,墙面:石灰刷白,其他:普通水电设备",
         },
         {
-          ID: 6,
-          JG: "砖木结构",
-          GRADE: 2,
-          BZ: 750,
-          DES: "檐高2.2m-2.8m,墙体:红砖内外墙,地面:水泥砂浆批面,墙面:石灰刷白,基础:片石基础,屋面:土瓦屋面,梁桁:木料木桁,门窗:木门窗",
+          id: 6,
+          jg: "砖木结构",
+          grade: 2,
+          bz: 750,
+          des: "檐高2.2m-2.8m,墙体:红砖内外墙,地面:水泥砂浆批面,墙面:石灰刷白,基础:片石基础,屋面:土瓦屋面,梁桁:木料木桁,门窗:木门窗",
         },
         {
-          ID: 7,
-          JG: "简易结构",
-          GRADE: 1,
-          BZ: 350,
-          DES: "层高:2.2m-3m,墙体:红砖墙,屋顶:铁皮顶或石棉瓦顶",
+          id: 7,
+          jg: "简易结构",
+          grade: 1,
+          bz: 350,
+          des: "层高:2.2m-3m,墙体:红砖墙,屋顶:铁皮顶或石棉瓦顶",
         },
         {
-          ID: 8,
-          JG: "简易结构",
-          GRADE: 2,
-          BZ: 300,
-          DES: "层高:2.2m-3m,墙体:红砖墙,屋顶:油毡顶",
+          id: 8,
+          jg: "简易结构",
+          grade: 2,
+          bz: 300,
+          des: "层高:2.2m-3m,墙体:红砖墙,屋顶:油毡顶",
         },
         {
-          ID: 9,
-          JG: "简易结构",
-          GRADE: 3,
-          BZ: 280,
-          DES: "层高:2.2m-3m,墙体:空心砖,屋顶:铁皮顶或石棉瓦顶",
+          id: 9,
+          jg: "简易结构",
+          grade: 3,
+          bz: 280,
+          des: "层高:2.2m-3m,墙体:空心砖,屋顶:铁皮顶或石棉瓦顶",
         },
         {
-          ID: 10,
-          JG: "简易结构",
-          GRADE: 4,
-          BZ: 200,
+          id: 10,
+          jg: "简易结构",
+          grade: 4,
+          bz: 200,
           DES: "层高:2.2m-3m,墙体:空心砖,屋顶:油毡顶",
         },
         {
-          ID: 11,
-          JG: "简易结构",
-          GRADE: 5,
-          BZ: 80,
-          DES: "层高:2.2m-3m,墙体:木板、铁皮、竹编等材料墙,屋顶油毡顶",
+          id: 11,
+          jg: "简易结构",
+          grade: 5,
+          bz: 80,
+          des: "层高:2.2m-3m,墙体:木板、铁皮、竹编等材料墙,屋顶油毡顶",
         },
         {
-          ID: 12,
-          JG: "凉棚",
-          GRADE: 1,
-          BZ: 120,
-          DES: "铁皮顶或石棉瓦顶、铁柱、铁架",
+          id: 12,
+          jg: "凉棚",
+          grade: 1,
+          bz: 120,
+          des: "铁皮顶或石棉瓦顶、铁柱、铁架",
         },
         {
-          ID: 13,
-          JG: "凉棚",
-          GRADE: 2,
-          BZ: 70,
-          DES: "铁皮顶或石棉瓦顶、木柱、木架",
+          id: 13,
+          jg: "凉棚",
+          grade: 2,
+          bz: 70,
+          des: "铁皮顶或石棉瓦顶、木柱、木架",
         },
         {
-          ID: 14,
-          JG: "凉棚",
-          GRADE: 3,
-          BZ: 20,
-          DES: "油毡顶、竹片顶、木板顶、木柱、木架",
+          id: 14,
+          jg: "凉棚",
+          grade: 3,
+          bz: 20,
+          des: "油毡顶、竹片顶、木板顶、木柱、木架",
         },
         {
-          ID: 15,
-          JG: "凉棚",
-          GRADE: 4,
-          BZ: 10,
-          DES: "茅草、编叶、柳叶等",
+          id: 15,
+          jg: "凉棚",
+          grade: 4,
+          bz: 10,
+          des: "茅草、编叶、柳叶等",
         },
       ],
     },
@@ -3132,16 +3201,15 @@ window.ZSBC = {
   /**青苗补偿标准 */
   QMBCList: [
     {
-      label: "青苗补偿标准2013",
-      value: "1",
-      BCBZ: {
-        //农作物
-        NZW: 49400,
-        //经济作物
-        JJZW: 49400,
-        //树木
-        SM: 49400,
-      },
+      name: "青苗补偿标准2013",
+      id: "1",
+
+      //农作物
+      nzw: 49400,
+      //经济作物
+      jjzw: 49400,
+      //树木
+      sm: 49400,
     },
   ],
   /**
@@ -3274,6 +3342,10 @@ window.ZSBC = {
       address: { field: "ADDRESS", cnName: "房屋地址" },
     },
   },
+  /**
+   * 历史分析结果列表
+   */
+  projectList: [],
 };
 
 /**
@@ -3680,3 +3752,5 @@ window.QXLayerNames = [
   "DiXing@BaoPo0621N",
 ];
 window.Layeralpha = 0;
+
+window.isUseDB = false;

BIN
static/ModelData/billboard/1.jpg


BIN
static/ModelData/billboard/2.jpg


BIN
static/ModelData/billboard/3.jpg


BIN
static/ModelData/billboard/4.jpg


BIN
static/ModelData/billboard/5.jpg


Some files were not shown because too many files changed in this diff