@kq_npm/client3d_webgl_vue 4.5.55 → 4.5.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adddata/index.js +189 -21
- package/airspacegridoccupancyquery/index.js +1977 -0
- package/airspacegridoccupancyquery/style/airspacegridoccupancyquery.css +1 -0
- package/airspacegridoccupancyquery/style/index.js +3 -0
- package/airspaceprofileanalysis/index.js +1870 -0
- package/airspaceprofileanalysis/style/airspaceprofileanalysis.css +1 -0
- package/airspaceprofileanalysis/style/index.js +3 -0
- package/aspectanalysis/index.js +25 -7
- package/baseterraingallery/index.js +16 -4
- package/boxclip/index.js +58 -16
- package/buildpointmodel/index.js +3207 -230
- package/buildpointmodel/style/buildpointmodel.css +1 -1
- package/buildpolygonmodel/index.js +205 -81
- package/buildpolylinemodel/index.js +346 -70
- package/clientPrint/index.js +32440 -2337
- package/comparemap/index.js +132 -60
- package/compass/index.js +16 -6
- package/excavatefillanalysis/index.js +51 -7
- package/fixedzoomin/index.js +24 -7
- package/fixedzoomout/index.js +25 -7
- package/flight/index.js +113 -26
- package/floodanalysis/index.js +79 -14
- package/geologicalbodyanalysis/index.js +41 -5
- package/gpuspatialquery/index.js +127 -19
- package/gridoccupancyquery/index.js +627 -0
- package/gridoccupancyquery/style/gridoccupancyquery.css +1 -0
- package/gridoccupancyquery/style/index.js +3 -0
- package/hawkeye/index.js +20 -2
- package/headertemp/index.js +7 -2
- package/heatmap3d/index.js +282 -158
- package/index.js +32440 -2337
- package/isolineanalysis/index.js +113 -38
- package/light/index.js +80 -22
- package/limitheightanalysis/index.js +30 -10
- package/lowaltitudefeature/index.js +5027 -0
- package/lowaltitudefeature/style/index.js +3 -0
- package/lowaltitudefeature/style/lowaltitudefeature.css +1 -0
- package/measure/index.js +60 -19
- package/modelFlat/index.js +48 -8
- package/modeledit/index.js +38 -4
- package/modelexcavate/index.js +48 -7
- package/modelfilter/index.js +51 -8
- package/modelmaterialedit/index.js +127 -25
- package/modelprofileanalysis/index.js +51 -14
- package/modelselect/index.js +34 -3
- package/modelstyleedit/index.js +39 -3
- package/modeltransform/index.js +79 -14
- package/package.json +1 -1
- package/particleeffect/index.js +83 -17
- package/planeclip/index.js +66 -17
- package/pointcloudrender/index.js +134 -15
- package/radarscananalysis/index.js +35 -3
- package/resetview/index.js +14 -6
- package/roller/index.js +55 -18
- package/scaneffect/index.js +98 -29
- package/sceneadvancedtoimage/index.js +32 -6
- package/sceneapp/index.js +32440 -2337
- package/sceneset/index.js +141 -71
- package/scenetohdimage/index.js +23 -3
- package/sceneview/index.js +32440 -2337
- package/sceneview/style/sceneview.css +1 -1
- package/screenshot/index.js +44 -11
- package/shadowanalysis/index.js +79 -19
- package/sightlineanalysis/index.js +66 -15
- package/skylineanalysis/index.js +20 -4
- package/slopeanalysis/index.js +75 -16
- package/slopeaspectanalysis/index.js +128 -26
- package/statusbar/index.js +80 -67
- package/style.css +1 -1
- package/terrainoperation/index.js +39 -7
- package/terrainprofileanalysis/index.js +43 -5
- package/toolbarapp/index.js +32440 -2337
- package/toolboxapp/index.js +32440 -2337
- package/typhoontrac/index.js +134 -16
- package/underground/index.js +8 -2
- package/videofusion/index.js +164 -79
- package/videoproject/index.js +77 -23
- package/viewshedanalysis/index.js +61 -14
- package/weathereffect/index.js +73 -18
- package/webgl.es.js +866 -16
- package/windyslicing/index.js +258 -54
- package/wireframesketch/index.js +25 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
.kq3d-build-point-model{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq3d-build-point-model .kq3d-build-point-model-box{width:350px}.kq3d-build-point-model .scroll-container{overflow-y:auto;overflow-x:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.kq3d-build-point-model .kq3d-build-point-model-tip{color:var(--kq-text-color-regular);font-size:var(--kq-font-size-base)}.kq3d-build-point-model .kq3d-build-point-model-tip p{margin-top:0;margin-bottom:16px}.kq3d-build-point-model .spanTile{font-size:12px;color:var(--kq-text-color-regular);padding-right:4px}.kq3d-build-point-model .kq-select{width:100%}.kq3d-build-point-model .kq-collapse{border:unset}.kq3d-build-point-model .kq-collapse .kq-collapse-item{margin-bottom:8px}.kq3d-build-point-model .kq-collapse .kq-collapse-item:last-child{margin-bottom:0}.kq3d-build-point-model .kq-collapse .kq-collapse-item__header{border:unset;height:38px;background-color:var(--kq-fill-color-light);font-weight:700;padding:0 16px;font-size:16px}.kq3d-build-point-model .kq-collapse .kq-collapse-item__arrow{margin:0 0 0 auto}.kq3d-build-point-model .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content{padding-bottom:unset;border:unset;padding-top:8px}.kq3d-build-point-model .kq-form-item{margin-bottom:8px}.kq3d-build-point-model .kq-form-item__content{text-align:end;display:block}.kq3d-build-point-model .kq-row{display:block}.kq3d-build-point-model .kq-slider{width:95%;padding-left:7px}.kq3d-build-point-model .kq-slider .kq-slider__button{width:14px;height:14px}.kq3d-build-point-model .kq-input-number.is-controls-right{width:65px}.kq3d-build-point-model .kq-input-number.is-controls-right .kq-input-number__decrease,.kq3d-build-point-model .kq-input-number.is-controls-right .kq-input-number__increase{width:20px}.kq3d-build-point-model .kq-col-8 .kq-input-number .kq-input__wrapper,.kq3d-build-point-model .kq-input-number.is-controls-right .kq-input__wrapper{padding-left:0;padding-right:20px}.kq3d-build-point-model .kq-scrollbar__bar.is-horizontal{bottom:-1px}.kq3d-build-point-model .build-model-btn-add{padding:0 8px;height:28px}.kq3d-build-point-model .kq-color-picker,.kq3d-build-point-model .kq-color-picker .kq-color-picker__mask,.kq3d-build-point-model .kq-color-picker .kq-color-picker__trigger{width:100%}.kq3d-build-point-model .kq3d-build-point-model-legend{width:198px;height:24px}.kq3d-build-point-model .kq-radio__input{display:inline;vertical-align:top}.kq3d-build-point-model .kq3d-build-point-model-btn,.kq3d-build-point-model .kq3d-build-point-model-footer{text-align:right;padding:8px 0}.kq3d-build-point-model .scrollbar-flex-content{display:-webkit-box;display:-ms-flexbox;display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.kq3d-build-point-model .image-item{position:relative;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 2px 5px;width:25px;height:25px;overflow:hidden;cursor:pointer;border:0 solid var(--kq-text-color-regular);border-color:transparent}.kq3d-build-point-model .image-item .deleteBtn{position:absolute;width:100%;height:100%;left:0;top:0;text-align:center;line-height:25px;background-color:rgba(from var(--kq-text-color-regular) r g b/.8);color:var(--kq-color-danger)}.kq3d-build-point-model .image-item.selected,.kq3d-build-point-model .image-item:hover{border:2px solid var(--kq-color-primary)}.kq3d-build-point-model .image-item img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.kq-add-model{z-index:999;border-radius:var(--kq-border-radius-base);padding:6px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color);width:350px}.kq-upload--text{width:100%}.thumbnail-upload-wrapper{padding:0 8px}.thumbnail-upload-wrapper .kq-upload--text{height:130px}.avatar-uploader-trigger{width:100%;height:130px;border:2px dashed var(--kq-text-color-secondary);border-radius:8px;cursor:pointer;overflow:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;background:var(--kq-bg-color)}.avatar-uploader-trigger:hover{border-color:var(--kq-color-primary);background:var(--kq-bg-color)}.avatar-preview{position:relative;width:100%;height:100%}.avatar{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.avatar-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--kq-bg-color);font-size:14px;opacity:0;background-color:rgba(0,0,0,.3);-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.avatar-preview:hover .avatar-overlay{opacity:1}.overlay-text{font-size:12px;margin-top:4px}.avatar-uploader-empty{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.avatar-uploader-empty,.upload-icon{color:var(--kq-text-color-placeholder)}.upload-icon{margin-bottom:8px}.upload-text{font-size:14px;margin-bottom:4px}.upload-hint{font-size:12px}.thumbnail-label,.upload-hint{color:var(--kq-text-color-placeholder)}.thumbnail-label{font-size:14px}.model-upload-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.upload-model-btn{width:100%}.upload-tip{font-size:12px;margin-top:8px}.model-file-info,.upload-tip{color:var(--kq-text-color-regular)}.model-file-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 8px;border-radius:6px;border:1px solid var(--kq-text-color-regular);height:41px}.file-details{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:8px}.file-name{font-size:14px;font-weight:500;margin-bottom:4px}.file-name,.file-size{color:var(--kq-text-color-regular)}.file-size{font-size:12px}
|
|
1
|
+
.kq3d-build-point-model{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kq3d-build-point-model .kq3d-build-point-model-box{width:350px}.kq3d-build-point-model .scroll-container{overflow-y:auto;overflow-x:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.kq3d-build-point-model .kq3d-build-point-model-tip{color:var(--kq-text-color-regular);font-size:var(--kq-font-size-base)}.kq3d-build-point-model .kq3d-build-point-model-tip p{margin-top:0;margin-bottom:16px}.kq3d-build-point-model .addGroup{display:inline-block;padding:0 4px 0 0;cursor:pointer;color:var(--kq-text-color-regular);opacity:.8}.kq3d-build-point-model .render-list-container{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.kq3d-build-point-model .render-list-container .render-item{margin-bottom:8px}.kq3d-build-point-model .render-list-container .render-item .render-item-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:31px;color:var(--kq-text-color-regular)}.kq3d-build-point-model .render-list-container .render-item .render-item-row .render-item-row-icon{color:var(--kq-bg-color);background-color:var(--kq-color-success);padding:2px 8px;border-radius:25px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:16px;line-height:16px}.kq3d-build-point-model .render-list-container .render-item .render-item-btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.kq3d-build-point-model .render-list-container .render-item .render-item-btn .kq-icon{cursor:pointer}.kq3d-build-point-model .render-list-container .render-item .isSetting{color:var(--kq-color-primary)}.kq3d-build-point-model .render-list-container .render-item .isDelete{color:var(--kq-color-danger)}.kq3d-build-point-model .render-list-container .kq-row{display:-webkit-box;display:-ms-flexbox;display:flex}.kq3d-build-point-model .isActive{color:var(--kq-button-hover-text-color);border-color:var(--kq-button-hover-border-color);background-color:var(--kq-button-hover-bg-color)}.kq3d-build-point-model .colClass{text-align:center;line-height:13px}.kq3d-build-point-model .spanTile{font-size:12px;color:var(--kq-text-color-regular);padding-right:4px}.kq3d-build-point-model .kq-select{width:100%}.kq3d-build-point-model .kq-collapse{border:unset}.kq3d-build-point-model .kq-collapse .kq-collapse-item{margin-bottom:8px}.kq3d-build-point-model .kq-collapse .kq-collapse-item:last-child{margin-bottom:0}.kq3d-build-point-model .kq-collapse .kq-collapse-item__header{border:unset;height:38px;background-color:var(--kq-fill-color-light);font-weight:700;padding:0 16px;font-size:16px}.kq3d-build-point-model .kq-collapse .kq-collapse-item__arrow{margin:0 0 0 auto}.kq3d-build-point-model .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content{padding-bottom:unset;border:unset;padding-top:8px}.kq3d-build-point-model .kq-form-item{margin-bottom:8px}.kq3d-build-point-model .kq-form-item__content{text-align:end;display:block}.kq3d-build-point-model .kq-row{display:block}.kq3d-build-point-model .kq-slider{width:95%;padding-left:7px}.kq3d-build-point-model .kq-slider .kq-slider__button{width:14px;height:14px}.kq3d-build-point-model .kq-input-number.is-controls-right{width:65px}.kq3d-build-point-model .kq-input-number.is-controls-right .kq-input-number__decrease,.kq3d-build-point-model .kq-input-number.is-controls-right .kq-input-number__increase{width:20px}.kq3d-build-point-model .kq-col-8 .kq-input-number .kq-input__wrapper,.kq3d-build-point-model .kq-input-number.is-controls-right .kq-input__wrapper{padding-left:0;padding-right:20px}.kq3d-build-point-model .kq-scrollbar__bar.is-horizontal{bottom:-1px}.kq3d-build-point-model .build-model-btn-add{padding:0 8px;height:28px}.kq3d-build-point-model .kq-color-picker,.kq3d-build-point-model .kq-color-picker .kq-color-picker__mask,.kq3d-build-point-model .kq-color-picker .kq-color-picker__trigger{width:100%}.kq3d-build-point-model .kq3d-build-point-model-legend{width:198px;height:24px}.kq3d-build-point-model .kq-radio__input{display:inline;vertical-align:top}.kq3d-build-point-model .kq3d-build-point-model-btn,.kq3d-build-point-model .kq3d-build-point-model-footer{text-align:right;padding:8px 0}.kq3d-build-point-model .scrollbar-flex-content{display:-webkit-box;display:-ms-flexbox;display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.kq3d-build-point-model .image-item{position:relative;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 2px 5px;width:25px;height:25px;overflow:hidden;cursor:pointer;border:0 solid var(--kq-text-color-regular);border-color:transparent}.kq3d-build-point-model .image-item .deleteBtn{position:absolute;width:100%;height:100%;left:0;top:0;text-align:center;line-height:25px;background-color:rgba(from var(--kq-text-color-regular) r g b/.8);color:var(--kq-color-danger)}.kq3d-build-point-model .image-item.selected,.kq3d-build-point-model .image-item:hover{border:2px solid var(--kq-color-primary)}.kq3d-build-point-model .image-item img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.option-content{gap:6px;width:100%}.option-content,.option-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.option-icon{width:16px;height:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.kq-add-model{z-index:999;border-radius:var(--kq-border-radius-base);padding:6px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color);width:350px}.kq-upload--text{width:100%}.thumbnail-upload-wrapper{padding:0 8px}.thumbnail-upload-wrapper .kq-upload--text{height:130px}.avatar-uploader-trigger{width:100%;height:130px;border:2px dashed var(--kq-text-color-secondary);border-radius:8px;cursor:pointer;overflow:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;background:var(--kq-bg-color)}.avatar-uploader-trigger:hover{border-color:var(--kq-color-primary);background:var(--kq-bg-color)}.avatar-preview{position:relative;width:100%;height:100%}.avatar{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.avatar-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--kq-bg-color);font-size:14px;opacity:0;background-color:rgba(0,0,0,.3);-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.avatar-preview:hover .avatar-overlay{opacity:1}.overlay-text{font-size:12px;margin-top:4px}.avatar-uploader-empty{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.avatar-uploader-empty,.upload-icon{color:var(--kq-text-color-placeholder)}.upload-icon{margin-bottom:8px}.upload-text{font-size:14px;margin-bottom:4px}.upload-hint{font-size:12px}.thumbnail-label,.upload-hint{color:var(--kq-text-color-placeholder)}.thumbnail-label{font-size:14px}.model-upload-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.upload-model-btn{width:100%}.upload-tip{font-size:12px;margin-top:8px}.model-file-info,.upload-tip{color:var(--kq-text-color-regular)}.model-file-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 8px;border-radius:6px;border:1px solid var(--kq-text-color-regular);height:41px}.file-details{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:8px}.file-name{font-size:14px;font-weight:500;margin-bottom:4px}.file-name,.file-size{color:var(--kq-text-color-regular)}.file-size{font-size:12px}
|
|
@@ -37,7 +37,7 @@ var _BuildPolygonModelViewModel = _interopRequireDefault(__webpack_require__(947
|
|
|
37
37
|
var _util = __webpack_require__(42975);
|
|
38
38
|
var _useGlobalConfig = __webpack_require__(22686);
|
|
39
39
|
var _constImage = __webpack_require__(4822);
|
|
40
|
-
var _filterConditionSelect = _interopRequireDefault(__webpack_require__(
|
|
40
|
+
var _filterConditionSelect = _interopRequireDefault(__webpack_require__(31802));
|
|
41
41
|
const _hoisted_1 = {
|
|
42
42
|
class: "kq3d-build-polygon-model-box"
|
|
43
43
|
};
|
|
@@ -126,10 +126,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
126
126
|
lang,
|
|
127
127
|
locale
|
|
128
128
|
} = (0, _useGlobalConfig.useLocale)();
|
|
129
|
-
const emit = __emit;
|
|
129
|
+
const emit = __emit; // 自定义事件:生成完成
|
|
130
130
|
// 获取组件传参
|
|
131
131
|
const props = __props;
|
|
132
|
-
const mode = (0, _vue.computed)(() => props?.settingParams?.mode ?? "add");
|
|
132
|
+
const mode = (0, _vue.computed)(() => props?.settingParams?.mode ?? "add"); // 当前模式:add 新增 / edit 编辑
|
|
133
133
|
let formItem = (0, _vue.reactive)({
|
|
134
134
|
collapseValue: props?.settingParams?.collapseValue ?? "general",
|
|
135
135
|
// 默认展开属性设置
|
|
@@ -252,8 +252,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
252
252
|
// 生成组件默认header
|
|
253
253
|
let headerTemp = (0, _vue.ref)();
|
|
254
254
|
let headerTempRef = (0, _vue.ref)();
|
|
255
|
-
let viewModel = null;
|
|
256
|
-
let modelingTypes = (0, _vue.ref)(null);
|
|
255
|
+
let viewModel = null; // 面模型构建视图模型实例
|
|
256
|
+
let modelingTypes = (0, _vue.ref)(null); // 当前模型类型
|
|
257
257
|
// 纹理图片
|
|
258
258
|
let materials = (0, _vue.ref)([{
|
|
259
259
|
name: "无",
|
|
@@ -271,7 +271,9 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
271
271
|
type: "roof",
|
|
272
272
|
img: _constImage.BUILD_MODE_ROOF2
|
|
273
273
|
}]);
|
|
274
|
-
const floorTopTypes = (0, _vue.ref)([
|
|
274
|
+
const floorTopTypes = (0, _vue.ref)([
|
|
275
|
+
// 楼顶类型选项
|
|
276
|
+
{
|
|
275
277
|
name: locale.value.webgl.flatRoof,
|
|
276
278
|
value: "flatRoof"
|
|
277
279
|
}, {
|
|
@@ -295,7 +297,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
295
297
|
name: "重复次数",
|
|
296
298
|
value: "repeatCount"
|
|
297
299
|
}]);
|
|
298
|
-
let propertyFieldsDef = (0, _vue.ref)([]);
|
|
300
|
+
let propertyFieldsDef = (0, _vue.ref)([]); // 属性字段定义列表
|
|
299
301
|
// 材质部位
|
|
300
302
|
let materialParts = (0, _vue.computed)(() => props?.materialParts || [{
|
|
301
303
|
name: "立面",
|
|
@@ -324,6 +326,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
324
326
|
img: _constImage.BUILD_MODE_ROOF2
|
|
325
327
|
}]
|
|
326
328
|
}]);
|
|
329
|
+
|
|
330
|
+
// 组件挂载后初始化位置、监听模式/header 变化及视图模型
|
|
327
331
|
(0, _vue.onMounted)(() => {
|
|
328
332
|
(0, _util.updatePosition)(boxRef.value, props);
|
|
329
333
|
(0, _vue.watch)(() => props.position, (newVal, oldVal) => {
|
|
@@ -331,6 +335,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
331
335
|
});
|
|
332
336
|
(0, _vue.watch)(mode, newMode => {
|
|
333
337
|
formItem.collapseValue = "general";
|
|
338
|
+
// 新增模式重置模型类型
|
|
334
339
|
if (newMode == "add") modelingTypes.value = null;
|
|
335
340
|
}, {
|
|
336
341
|
immediate: true
|
|
@@ -357,14 +362,19 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
357
362
|
headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, "webgl.buildPolygonModel");
|
|
358
363
|
}
|
|
359
364
|
};
|
|
360
|
-
|
|
365
|
+
/**
|
|
366
|
+
* @description 参数切换时同步至视图模型,并对材质部位、贴图等参数联动处理
|
|
367
|
+
* @param {String} key 参数名
|
|
368
|
+
*/
|
|
361
369
|
function paramsChanged(key) {
|
|
362
370
|
if (!viewModel) return;
|
|
371
|
+
// 启用坐标高度时关闭贴地
|
|
363
372
|
if (key == "perPositionHeight") {
|
|
364
373
|
if (formItem.perPositionHeight) formItem.clampToGround = false;
|
|
365
374
|
} else if (key == "clampToGround") {
|
|
366
375
|
// if (formItem.clampToGround) formItem.perPositionHeight = false;
|
|
367
376
|
} else if (key == "materialPart") {
|
|
377
|
+
// 切换材质部位时同步对应贴图尺寸/重复参数
|
|
368
378
|
materials.value = materialParts.value[formItem.materialPart]?.children || [];
|
|
369
379
|
formItem.imageHeight = formItem.materialPart == 0 ? formItem.floorImageHeight : formItem.roofImageHeight;
|
|
370
380
|
formItem.imageWidth = formItem.materialPart == 0 ? formItem.floorImageWidth : formItem.roofImageWidth;
|
|
@@ -402,11 +412,13 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
402
412
|
}
|
|
403
413
|
/**
|
|
404
414
|
* @description 初始化事件
|
|
415
|
+
* @param {Object|String} data 模型 id 或 geojson 数据
|
|
405
416
|
*/
|
|
406
417
|
function setData(data) {
|
|
407
418
|
if (data) {
|
|
408
419
|
if (!viewModel) return;
|
|
409
420
|
clear();
|
|
421
|
+
// 字符串视为模型 id,进入编辑模式
|
|
410
422
|
if (typeof data === "string") {
|
|
411
423
|
viewModel.getPolygonModel(data, item => {
|
|
412
424
|
const {
|
|
@@ -461,6 +473,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
461
473
|
});
|
|
462
474
|
});
|
|
463
475
|
} else {
|
|
476
|
+
// 对象视为 geojson 数据,进入新增模式
|
|
464
477
|
viewModel._layerData = data;
|
|
465
478
|
let propertyFields = viewModel.extractPropertyFields(data);
|
|
466
479
|
if (propertyFields && propertyFields.length > 0) {
|
|
@@ -471,15 +484,23 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
471
484
|
console.log("重新传入数据");
|
|
472
485
|
}
|
|
473
486
|
}
|
|
474
|
-
|
|
487
|
+
/**
|
|
488
|
+
* @description 生成
|
|
489
|
+
* @param {String} type 模型类型(monomer / multi)
|
|
490
|
+
*/
|
|
475
491
|
function generated(type) {
|
|
476
492
|
viewModel?.generated(type, data => {
|
|
477
493
|
emit("generatedEnd", data);
|
|
478
494
|
});
|
|
479
495
|
}
|
|
496
|
+
// 清空选中模型集合
|
|
480
497
|
function clear() {
|
|
481
498
|
viewModel?.clear();
|
|
482
499
|
}
|
|
500
|
+
/**
|
|
501
|
+
* @description 处理过滤条件变更
|
|
502
|
+
* @param {String} condition 过滤条件
|
|
503
|
+
*/
|
|
483
504
|
const handleFilterChange = condition => {
|
|
484
505
|
formItem.selectModelId = condition;
|
|
485
506
|
};
|
|
@@ -487,9 +508,14 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
487
508
|
(0, _vue.onBeforeUnmount)(() => {
|
|
488
509
|
clear();
|
|
489
510
|
});
|
|
511
|
+
// 导出已生成的模型 JSON
|
|
490
512
|
function exportModels() {
|
|
491
513
|
return viewModel.exportModels();
|
|
492
514
|
}
|
|
515
|
+
/**
|
|
516
|
+
* @description 导入模型 JSON 并加载
|
|
517
|
+
* @param {Array} jsons 模型 JSON 数组
|
|
518
|
+
*/
|
|
493
519
|
function importModels(jsons) {
|
|
494
520
|
return viewModel.importModels(jsons);
|
|
495
521
|
}
|
|
@@ -1654,12 +1680,12 @@ var _default = exports.A = {
|
|
|
1654
1680
|
lang,
|
|
1655
1681
|
locale
|
|
1656
1682
|
} = (0, _useGlobalConfig.useLocale)();
|
|
1657
|
-
const selectRef = (0, _vue.ref)(null);
|
|
1683
|
+
const selectRef = (0, _vue.ref)(null); // 选择器组件引用
|
|
1658
1684
|
const props = __props;
|
|
1659
|
-
const selectedCondition = (0, _vue.ref)("");
|
|
1660
|
-
const filterConditions = (0, _vue.ref)([...props.initialConditions]);
|
|
1661
|
-
const selectKey = (0, _vue.ref)(0);
|
|
1662
|
-
const emit = __emit;
|
|
1685
|
+
const selectedCondition = (0, _vue.ref)(""); // 当前选中条件
|
|
1686
|
+
const filterConditions = (0, _vue.ref)([...props.initialConditions]); // 可选条件列表
|
|
1687
|
+
const selectKey = (0, _vue.ref)(0); // 选择器刷新 key
|
|
1688
|
+
const emit = __emit; // 自定义事件:条件变更、选项删除
|
|
1663
1689
|
|
|
1664
1690
|
// 监听初始条件变化
|
|
1665
1691
|
(0, _vue.watch)(() => props.initialConditions, async newVal => {
|
|
@@ -1671,24 +1697,37 @@ var _default = exports.A = {
|
|
|
1671
1697
|
immediate: true
|
|
1672
1698
|
});
|
|
1673
1699
|
|
|
1674
|
-
|
|
1700
|
+
/**
|
|
1701
|
+
* @description 处理选中/新增逻辑
|
|
1702
|
+
* @param {String} value 选中或新增的条件
|
|
1703
|
+
*/
|
|
1675
1704
|
const handleConditionChange = async value => {
|
|
1676
1705
|
if (!value) return;
|
|
1677
1706
|
const isExist = filterConditions.value.includes(value);
|
|
1707
|
+
// 不存在则加入条件列表
|
|
1678
1708
|
if (!isExist) {
|
|
1679
1709
|
filterConditions.value.push(value);
|
|
1680
1710
|
await (0, _vue.nextTick)();
|
|
1681
1711
|
}
|
|
1682
1712
|
emit("condition-change", value);
|
|
1683
1713
|
};
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* @description 处理新建条件
|
|
1717
|
+
* @param {String} item 新建条件值
|
|
1718
|
+
*/
|
|
1684
1719
|
const handleCreateCondition = async item => {
|
|
1685
1720
|
if (!item) return;
|
|
1686
1721
|
await handleConditionChange(item);
|
|
1687
1722
|
selectedCondition.value = item;
|
|
1688
1723
|
};
|
|
1689
|
-
|
|
1724
|
+
/**
|
|
1725
|
+
* @description 删除选项
|
|
1726
|
+
* @param {String} condition 待删除条件
|
|
1727
|
+
*/
|
|
1690
1728
|
const handleDeleteOption = async condition => {
|
|
1691
1729
|
filterConditions.value = filterConditions.value.filter(item => item !== condition);
|
|
1730
|
+
// 删除的为当前选中项时清空选中并通知父组件
|
|
1692
1731
|
if (selectedCondition.value === condition) {
|
|
1693
1732
|
selectedCondition.value = "";
|
|
1694
1733
|
emit("condition-change", "");
|
|
@@ -1698,7 +1737,10 @@ var _default = exports.A = {
|
|
|
1698
1737
|
emit("option-delete", condition);
|
|
1699
1738
|
};
|
|
1700
1739
|
|
|
1701
|
-
|
|
1740
|
+
/**
|
|
1741
|
+
* @description 实时输入监听
|
|
1742
|
+
* @param {String} val 输入值
|
|
1743
|
+
*/
|
|
1702
1744
|
const handleInput = val => {};
|
|
1703
1745
|
|
|
1704
1746
|
// 清空选中
|
|
@@ -1708,11 +1750,17 @@ var _default = exports.A = {
|
|
|
1708
1750
|
|
|
1709
1751
|
// 供父组件调用
|
|
1710
1752
|
__expose({
|
|
1753
|
+
// 刷新选择器
|
|
1711
1754
|
refreshConditions: () => {
|
|
1712
1755
|
selectKey.value++;
|
|
1713
1756
|
},
|
|
1714
1757
|
clearSelection,
|
|
1758
|
+
// 获取条件列表
|
|
1715
1759
|
getConditions: () => [...filterConditions.value],
|
|
1760
|
+
/**
|
|
1761
|
+
* @description 添加条件
|
|
1762
|
+
* @param {String} condition 待添加条件
|
|
1763
|
+
*/
|
|
1716
1764
|
addCondition: condition => {
|
|
1717
1765
|
if (condition && !filterConditions.value.includes(condition)) {
|
|
1718
1766
|
filterConditions.value.push(condition);
|
|
@@ -1788,35 +1836,7 @@ module.exports = require("@element-plus/icons-vue");
|
|
|
1788
1836
|
|
|
1789
1837
|
/***/ }),
|
|
1790
1838
|
|
|
1791
|
-
/***/
|
|
1792
|
-
/***/ (function(module) {
|
|
1793
|
-
|
|
1794
|
-
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
1795
|
-
|
|
1796
|
-
/***/ }),
|
|
1797
|
-
|
|
1798
|
-
/***/ 42975:
|
|
1799
|
-
/***/ (function(module) {
|
|
1800
|
-
|
|
1801
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__42975__;
|
|
1802
|
-
|
|
1803
|
-
/***/ }),
|
|
1804
|
-
|
|
1805
|
-
/***/ 50154:
|
|
1806
|
-
/***/ (function(module) {
|
|
1807
|
-
|
|
1808
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__50154__;
|
|
1809
|
-
|
|
1810
|
-
/***/ }),
|
|
1811
|
-
|
|
1812
|
-
/***/ 56363:
|
|
1813
|
-
/***/ (function(module) {
|
|
1814
|
-
|
|
1815
|
-
module.exports = require("element-plus/dist/index.full.js");
|
|
1816
|
-
|
|
1817
|
-
/***/ }),
|
|
1818
|
-
|
|
1819
|
-
/***/ 58983:
|
|
1839
|
+
/***/ 31802:
|
|
1820
1840
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1821
1841
|
|
|
1822
1842
|
// ESM COMPAT FLAG
|
|
@@ -1835,9 +1855,9 @@ var filterConditionSelectvue_type_script_setup_true_lang_js = __webpack_require_
|
|
|
1835
1855
|
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
|
1836
1856
|
var injectStylesIntoStyleTag = __webpack_require__(85072);
|
|
1837
1857
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
|
|
1838
|
-
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolygonmodel/filterConditionSelect.vue?vue&type=style&index=0&id=
|
|
1839
|
-
var
|
|
1840
|
-
;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolygonmodel/filterConditionSelect.vue?vue&type=style&index=0&id=
|
|
1858
|
+
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolygonmodel/filterConditionSelect.vue?vue&type=style&index=0&id=2a3a2adc&scoped=true&lang=css
|
|
1859
|
+
var filterConditionSelectvue_type_style_index_0_id_2a3a2adc_scoped_true_lang_css = __webpack_require__(91856);
|
|
1860
|
+
;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/buildpolygonmodel/filterConditionSelect.vue?vue&type=style&index=0&id=2a3a2adc&scoped=true&lang=css
|
|
1841
1861
|
|
|
1842
1862
|
|
|
1843
1863
|
|
|
@@ -1846,12 +1866,12 @@ var options = {};
|
|
|
1846
1866
|
options.insert = "head";
|
|
1847
1867
|
options.singleton = false;
|
|
1848
1868
|
|
|
1849
|
-
var update = injectStylesIntoStyleTag_default()(
|
|
1869
|
+
var update = injectStylesIntoStyleTag_default()(filterConditionSelectvue_type_style_index_0_id_2a3a2adc_scoped_true_lang_css/* default */.A, options);
|
|
1850
1870
|
|
|
1851
1871
|
|
|
1852
1872
|
|
|
1853
|
-
/* harmony default export */ var
|
|
1854
|
-
;// ./src/webgl/buildpolygonmodel/filterConditionSelect.vue?vue&type=style&index=0&id=
|
|
1873
|
+
/* harmony default export */ var buildpolygonmodel_filterConditionSelectvue_type_style_index_0_id_2a3a2adc_scoped_true_lang_css = (filterConditionSelectvue_type_style_index_0_id_2a3a2adc_scoped_true_lang_css/* default */.A.locals || {});
|
|
1874
|
+
;// ./src/webgl/buildpolygonmodel/filterConditionSelect.vue?vue&type=style&index=0&id=2a3a2adc&scoped=true&lang=css
|
|
1855
1875
|
|
|
1856
1876
|
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
|
|
1857
1877
|
var exportHelper = __webpack_require__(66262);
|
|
@@ -1862,12 +1882,40 @@ var exportHelper = __webpack_require__(66262);
|
|
|
1862
1882
|
;
|
|
1863
1883
|
|
|
1864
1884
|
|
|
1865
|
-
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(filterConditionSelectvue_type_script_setup_true_lang_js/* default */.A, [['__scopeId',"data-v-
|
|
1885
|
+
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(filterConditionSelectvue_type_script_setup_true_lang_js/* default */.A, [['__scopeId',"data-v-2a3a2adc"]])
|
|
1866
1886
|
|
|
1867
1887
|
/* harmony default export */ var filterConditionSelect = (__exports__);
|
|
1868
1888
|
|
|
1869
1889
|
/***/ }),
|
|
1870
1890
|
|
|
1891
|
+
/***/ 33751:
|
|
1892
|
+
/***/ (function(module) {
|
|
1893
|
+
|
|
1894
|
+
module.exports = require("@babel/runtime/helpers/interopRequireDefault");
|
|
1895
|
+
|
|
1896
|
+
/***/ }),
|
|
1897
|
+
|
|
1898
|
+
/***/ 42975:
|
|
1899
|
+
/***/ (function(module) {
|
|
1900
|
+
|
|
1901
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__42975__;
|
|
1902
|
+
|
|
1903
|
+
/***/ }),
|
|
1904
|
+
|
|
1905
|
+
/***/ 50154:
|
|
1906
|
+
/***/ (function(module) {
|
|
1907
|
+
|
|
1908
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__50154__;
|
|
1909
|
+
|
|
1910
|
+
/***/ }),
|
|
1911
|
+
|
|
1912
|
+
/***/ 56363:
|
|
1913
|
+
/***/ (function(module) {
|
|
1914
|
+
|
|
1915
|
+
module.exports = require("element-plus/dist/index.full.js");
|
|
1916
|
+
|
|
1917
|
+
/***/ }),
|
|
1918
|
+
|
|
1871
1919
|
/***/ 61706:
|
|
1872
1920
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1873
1921
|
|
|
@@ -1952,22 +2000,6 @@ _indexFull.ElMessage.install = (Vue, opts) => {
|
|
|
1952
2000
|
var _default = exports["default"] = _indexFull.ElMessage;
|
|
1953
2001
|
_KqGIS.kq_npm_client_common_vue.KqMessage = _indexFull.ElMessage;
|
|
1954
2002
|
|
|
1955
|
-
/***/ }),
|
|
1956
|
-
|
|
1957
|
-
/***/ 75151:
|
|
1958
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1959
|
-
|
|
1960
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76314);
|
|
1961
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
1962
|
-
// Imports
|
|
1963
|
-
|
|
1964
|
-
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
1965
|
-
// Module
|
|
1966
|
-
___CSS_LOADER_EXPORT___.push([module.id, "\n.simple-filter-select[data-v-2b2977c6] {\r\n width: 100%;\n}\n.option-content[data-v-2b2977c6] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 4px;\n}\n.option-text[data-v-2b2977c6] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.icon-class[data-v-2b2977c6] {\r\n font-size: 14px;\r\n padding: 4px;\n}\n.icon-class[data-v-2b2977c6]:hover {\r\n color: var(--kq-color-danger);\n}\n[data-v-2b2977c6] .kq-option:hover .delete-btn {\r\n opacity: 1;\n}\n[data-v-2b2977c6] .custom-select-popper {\r\n --kq-select-dropdown-item-padding: 4px 8px;\n}\n[data-v-2b2977c6] .kq-option {\r\n padding: 0 !important;\n}\r\n", ""]);
|
|
1967
|
-
// Exports
|
|
1968
|
-
/* harmony default export */ __webpack_exports__.A = (___CSS_LOADER_EXPORT___);
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
2003
|
/***/ }),
|
|
1972
2004
|
|
|
1973
2005
|
/***/ 76314:
|
|
@@ -2315,6 +2347,22 @@ module.exports = function (list, options) {
|
|
|
2315
2347
|
};
|
|
2316
2348
|
};
|
|
2317
2349
|
|
|
2350
|
+
/***/ }),
|
|
2351
|
+
|
|
2352
|
+
/***/ 91856:
|
|
2353
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2354
|
+
|
|
2355
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76314);
|
|
2356
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
2357
|
+
// Imports
|
|
2358
|
+
|
|
2359
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
2360
|
+
// Module
|
|
2361
|
+
___CSS_LOADER_EXPORT___.push([module.id, "\n.simple-filter-select[data-v-2a3a2adc] {\r\n width: 100%;\n}\n.option-content[data-v-2a3a2adc] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 4px;\n}\n.option-text[data-v-2a3a2adc] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.icon-class[data-v-2a3a2adc] {\r\n font-size: 14px;\r\n padding: 4px;\n}\n.icon-class[data-v-2a3a2adc]:hover {\r\n color: var(--kq-color-danger);\n}\n[data-v-2a3a2adc] .kq-option:hover .delete-btn {\r\n opacity: 1;\n}\n[data-v-2a3a2adc] .custom-select-popper {\r\n --kq-select-dropdown-item-padding: 4px 8px;\n}\n[data-v-2a3a2adc] .kq-option {\r\n padding: 0 !important;\n}\r\n", ""]);
|
|
2362
|
+
// Exports
|
|
2363
|
+
/* harmony default export */ __webpack_exports__.A = (___CSS_LOADER_EXPORT___);
|
|
2364
|
+
|
|
2365
|
+
|
|
2318
2366
|
/***/ }),
|
|
2319
2367
|
|
|
2320
2368
|
/***/ 94700:
|
|
@@ -2331,15 +2379,30 @@ var _message = _interopRequireDefault(__webpack_require__(71323));
|
|
|
2331
2379
|
var _util = __webpack_require__(42975);
|
|
2332
2380
|
var _xeUtils = __webpack_require__(65235);
|
|
2333
2381
|
class BuildPolygonModelViewModel {
|
|
2382
|
+
// 生成的面模型集合
|
|
2383
|
+
/**
|
|
2384
|
+
* @description 构造函数
|
|
2385
|
+
* @param {Object} scenceView 三维场景视图
|
|
2386
|
+
* @param {Object} formItem 表单配置项
|
|
2387
|
+
*/
|
|
2334
2388
|
constructor(scenceView, formItem) {
|
|
2335
2389
|
this._options = {};
|
|
2390
|
+
// 表单配置项
|
|
2336
2391
|
this._scenceView = null;
|
|
2392
|
+
// 三维场景视图
|
|
2337
2393
|
this._layerData = null;
|
|
2394
|
+
// 输入的 geojson 数据
|
|
2338
2395
|
this._polygonModel = null;
|
|
2396
|
+
// 当前编辑的面模型
|
|
2339
2397
|
this._polygonModels = [];
|
|
2340
2398
|
this._scenceView = scenceView;
|
|
2341
2399
|
this._options = formItem;
|
|
2342
2400
|
}
|
|
2401
|
+
/**
|
|
2402
|
+
* @description 通过 key 获取已存在的面模型并执行回调
|
|
2403
|
+
* @param {String} key 模型 id
|
|
2404
|
+
* @param {Function} cb 回调函数
|
|
2405
|
+
*/
|
|
2343
2406
|
getPolygonModel(key, cb) {
|
|
2344
2407
|
// 获取模型
|
|
2345
2408
|
let array = this?._scenceView?._viewer?.scene?.primitives?._primitives ?? [];
|
|
@@ -2354,7 +2417,13 @@ class BuildPolygonModelViewModel {
|
|
|
2354
2417
|
cb(this._polygonModel);
|
|
2355
2418
|
}
|
|
2356
2419
|
}
|
|
2420
|
+
/**
|
|
2421
|
+
* @description 参数改变时同步至当前编辑模型
|
|
2422
|
+
* @param {String} key 参数名
|
|
2423
|
+
* @param {Object} editMode 编辑模式(add:新增,其他:编辑)
|
|
2424
|
+
*/
|
|
2357
2425
|
paramsChanged(key, editMode) {
|
|
2426
|
+
// 新增模式不处理参数变更
|
|
2358
2427
|
if (editMode.value === "add") return;
|
|
2359
2428
|
if (!this._polygonModel) {
|
|
2360
2429
|
(0, _message.default)({
|
|
@@ -2363,6 +2432,7 @@ class BuildPolygonModelViewModel {
|
|
|
2363
2432
|
});
|
|
2364
2433
|
return;
|
|
2365
2434
|
}
|
|
2435
|
+
// 高度、偏移类参数:批量同步至模型
|
|
2366
2436
|
if (["extrudedHeight", "baseHeight", "offsetX", "offsetY"].includes(key)) {
|
|
2367
2437
|
this._polygonModel["height"] = this._options["extrudedHeight"];
|
|
2368
2438
|
this._polygonModel["extrudedHeight"] = this._options["baseHeight"];
|
|
@@ -2375,36 +2445,45 @@ class BuildPolygonModelViewModel {
|
|
|
2375
2445
|
// 楼顶材质保持保持一致
|
|
2376
2446
|
this._polygonModel["roofImage"] = this._polygonModel["parapetWallImage"] = this._options["roofImage"];
|
|
2377
2447
|
} else if (["imageWidth"].includes(key)) {
|
|
2448
|
+
// 图像宽度:根据材质部位同步至楼底或楼顶
|
|
2378
2449
|
if (this._options["materialPart"] == 0) {
|
|
2379
2450
|
this._polygonModel["floorImageWidth"] = this._options[key];
|
|
2380
2451
|
} else {
|
|
2381
2452
|
this._polygonModel["roofImageWidth"] = this._options[key];
|
|
2382
2453
|
}
|
|
2383
2454
|
} else if (["imageHeight"].includes(key)) {
|
|
2455
|
+
// 图像高度:根据材质部位同步至楼底或楼顶
|
|
2384
2456
|
if (this._options["materialPart"] == 0) {
|
|
2385
2457
|
this._polygonModel["floorImageHeight"] = this._options[key];
|
|
2386
2458
|
} else {
|
|
2387
2459
|
this._polygonModel["roofImageHeight"] = this._options[key];
|
|
2388
2460
|
}
|
|
2389
2461
|
} else if (["imageRepeatWidth"].includes(key)) {
|
|
2462
|
+
// 横向重复次数:根据材质部位同步至楼底或楼顶
|
|
2390
2463
|
if (this._options["materialPart"] == 0) {
|
|
2391
2464
|
this._polygonModel["floorImageRepeatX"] = this._options[key];
|
|
2392
2465
|
} else {
|
|
2393
2466
|
this._polygonModel["roofImageRepeatX"] = this._options[key];
|
|
2394
2467
|
}
|
|
2395
2468
|
} else if (["imageRepeatHeight"].includes(key)) {
|
|
2469
|
+
// 纵向重复次数:根据材质部位同步至楼底或楼顶
|
|
2396
2470
|
if (this._options["materialPart"] == 0) {
|
|
2397
2471
|
this._polygonModel["floorImageRepeatY"] = this._options[key];
|
|
2398
2472
|
} else {
|
|
2399
2473
|
this._polygonModel["roofImageRepeatY"] = this._options[key];
|
|
2400
2474
|
}
|
|
2401
2475
|
} else if (["repetitionType"].includes(key)) {
|
|
2476
|
+
// 重复模式:actualSize 为按尺寸贴图
|
|
2402
2477
|
this._polygonModel["repeatBySize"] = this._options[key] == "actualSize" ? true : false;
|
|
2403
2478
|
} else {
|
|
2404
2479
|
this._polygonModel[key] = this._options[key];
|
|
2405
2480
|
}
|
|
2406
2481
|
}
|
|
2407
|
-
|
|
2482
|
+
/**
|
|
2483
|
+
* @description 优化后的生成模型方法(备份版本)
|
|
2484
|
+
* @param {String} type 模型类型
|
|
2485
|
+
* @param {Function} cb 生成完成回调
|
|
2486
|
+
*/
|
|
2408
2487
|
generated_bak(type, cb) {
|
|
2409
2488
|
// 清空现有模型
|
|
2410
2489
|
this._polygonModels = [];
|
|
@@ -2504,7 +2583,11 @@ class BuildPolygonModelViewModel {
|
|
|
2504
2583
|
});
|
|
2505
2584
|
}
|
|
2506
2585
|
}
|
|
2507
|
-
|
|
2586
|
+
/**
|
|
2587
|
+
* @description 优化后的生成模型方法2(当前使用版本)
|
|
2588
|
+
* @param {String} type 模型类型(如 multi 表示多层)
|
|
2589
|
+
* @param {Function} cb 生成完成回调
|
|
2590
|
+
*/
|
|
2508
2591
|
generated(type, cb) {
|
|
2509
2592
|
// 清空现有模型
|
|
2510
2593
|
let that = this;
|
|
@@ -2660,7 +2743,14 @@ class BuildPolygonModelViewModel {
|
|
|
2660
2743
|
});
|
|
2661
2744
|
}
|
|
2662
2745
|
}
|
|
2663
|
-
|
|
2746
|
+
/**
|
|
2747
|
+
* @description 获取字符串类型属性值(处理空字符串)
|
|
2748
|
+
* @param {Object} properties 要素属性
|
|
2749
|
+
* @param {String} fieldKey 字段映射键
|
|
2750
|
+
* @param {String} propKey 属性键
|
|
2751
|
+
* @param {String} defaultValue 默认值
|
|
2752
|
+
* @returns {String} 属性值
|
|
2753
|
+
*/
|
|
2664
2754
|
getStringValue(properties, fieldKey, propKey, defaultValue = '') {
|
|
2665
2755
|
const fieldName = this._options[fieldKey];
|
|
2666
2756
|
// 字段映射优先
|
|
@@ -2679,7 +2769,14 @@ class BuildPolygonModelViewModel {
|
|
|
2679
2769
|
}
|
|
2680
2770
|
return defaultValue;
|
|
2681
2771
|
}
|
|
2682
|
-
|
|
2772
|
+
/**
|
|
2773
|
+
* @description 获取数字类型属性值(处理 0、小数等)
|
|
2774
|
+
* @param {Object} properties 要素属性
|
|
2775
|
+
* @param {String} fieldKey 字段映射键
|
|
2776
|
+
* @param {String} propKey 属性键
|
|
2777
|
+
* @param {Number} defaultValue 默认值
|
|
2778
|
+
* @returns {Number} 属性值
|
|
2779
|
+
*/
|
|
2683
2780
|
getNumberValue(properties, fieldKey, propKey, defaultValue = 0) {
|
|
2684
2781
|
const fieldName = this._options[fieldKey];
|
|
2685
2782
|
// 字段映射优先
|
|
@@ -2699,7 +2796,11 @@ class BuildPolygonModelViewModel {
|
|
|
2699
2796
|
}
|
|
2700
2797
|
return defaultValue;
|
|
2701
2798
|
}
|
|
2702
|
-
|
|
2799
|
+
/**
|
|
2800
|
+
* @description 提取所有属性字段(排除OID、KID、ID等字段)
|
|
2801
|
+
* @param {Object} geojsonData geojson 数据
|
|
2802
|
+
* @returns {Array} 属性字段数组
|
|
2803
|
+
*/
|
|
2703
2804
|
extractPropertyFields(geojsonData) {
|
|
2704
2805
|
const excludedFields = ['oid', 'kid', 'id', 'fid', 'objectid', 'smid', 'sid'];
|
|
2705
2806
|
const propertyFields = new Set();
|
|
@@ -2715,7 +2816,11 @@ class BuildPolygonModelViewModel {
|
|
|
2715
2816
|
});
|
|
2716
2817
|
return Array.from(propertyFields);
|
|
2717
2818
|
}
|
|
2718
|
-
|
|
2819
|
+
/**
|
|
2820
|
+
* @description 处理GeoJSON数据(复用之前的逻辑)
|
|
2821
|
+
* @param {Object} geojson geojson 数据
|
|
2822
|
+
* @returns {Array} 要素数组
|
|
2823
|
+
*/
|
|
2719
2824
|
_processGeoJSON(geojson) {
|
|
2720
2825
|
let features = [];
|
|
2721
2826
|
if (geojson.type === "FeatureCollection") {
|
|
@@ -2731,7 +2836,11 @@ class BuildPolygonModelViewModel {
|
|
|
2731
2836
|
}
|
|
2732
2837
|
return features;
|
|
2733
2838
|
}
|
|
2734
|
-
|
|
2839
|
+
/**
|
|
2840
|
+
* @description 提取面坐标方法 - 修复处理多边形坐标的逻辑
|
|
2841
|
+
* @param {Object} geometry 几何对象
|
|
2842
|
+
* @returns {Array} 坐标点数组
|
|
2843
|
+
*/
|
|
2735
2844
|
_extractPolygonPositions(geometry) {
|
|
2736
2845
|
const positions = [];
|
|
2737
2846
|
if (!geometry || !geometry.coordinates) return positions;
|
|
@@ -2780,7 +2889,11 @@ class BuildPolygonModelViewModel {
|
|
|
2780
2889
|
return positions;
|
|
2781
2890
|
}
|
|
2782
2891
|
|
|
2783
|
-
|
|
2892
|
+
/**
|
|
2893
|
+
* @description 提取所有属性字段(排除OID、KID、ID等字段)
|
|
2894
|
+
* @param {Object} geojsonData geojson 数据
|
|
2895
|
+
* @returns {Array} 属性字段数组
|
|
2896
|
+
*/
|
|
2784
2897
|
extractPropertyFields(geojsonData) {
|
|
2785
2898
|
const excludedFields = ['oid', 'kid', 'id', 'fid', 'objectid', 'smid', 'sid'];
|
|
2786
2899
|
const propertyFields = new Set();
|
|
@@ -2797,7 +2910,11 @@ class BuildPolygonModelViewModel {
|
|
|
2797
2910
|
return Array.from(propertyFields);
|
|
2798
2911
|
}
|
|
2799
2912
|
|
|
2800
|
-
|
|
2913
|
+
/**
|
|
2914
|
+
* @description 数据过滤 - 修复运算符解析逻辑
|
|
2915
|
+
* @param {Object} data geojson 数据
|
|
2916
|
+
* @returns {Object} 过滤后的 geojson 数据
|
|
2917
|
+
*/
|
|
2801
2918
|
_filterData(data) {
|
|
2802
2919
|
const filterStr = this._options.selectModelId;
|
|
2803
2920
|
if (!filterStr || !data || !data.features) {
|
|
@@ -2832,6 +2949,8 @@ class BuildPolygonModelViewModel {
|
|
|
2832
2949
|
}
|
|
2833
2950
|
const propValue = feature.properties[fieldName];
|
|
2834
2951
|
let shouldInclude = false;
|
|
2952
|
+
|
|
2953
|
+
// 根据运算符判断是否保留该要素
|
|
2835
2954
|
switch (operator) {
|
|
2836
2955
|
case ">":
|
|
2837
2956
|
shouldInclude = propValue > numValue;
|
|
@@ -2870,9 +2989,14 @@ class BuildPolygonModelViewModel {
|
|
|
2870
2989
|
destroy() {
|
|
2871
2990
|
this.clear();
|
|
2872
2991
|
}
|
|
2992
|
+
// 导出已生成的模型 JSON
|
|
2873
2993
|
exportModels() {
|
|
2874
2994
|
return this._polygonModels;
|
|
2875
2995
|
}
|
|
2996
|
+
/**
|
|
2997
|
+
* @description 导入模型 JSON 并加载到场景
|
|
2998
|
+
* @param {Array} jsons 模型 JSON 数组
|
|
2999
|
+
*/
|
|
2876
3000
|
importModels(jsons) {
|
|
2877
3001
|
let that = this;
|
|
2878
3002
|
jsons.forEach(jsonData => {
|
|
@@ -2894,11 +3018,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2894
3018
|
value: true
|
|
2895
3019
|
}));
|
|
2896
3020
|
exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
|
|
2897
|
-
|
|
3021
|
+
const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
|
|
2898
3022
|
__webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
|
|
2899
|
-
|
|
3023
|
+
const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
|
|
2900
3024
|
__webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
|
|
2901
|
-
|
|
3025
|
+
const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
|
|
2902
3026
|
__webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
|
|
2903
3027
|
|
|
2904
3028
|
/***/ })
|