@newview/permission-service 1.2.20 → 1.2.22

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/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 版本 1.2.21
2
+
3
+ 1、地图定点功能修改优化
4
+
1
5
  ### 版本 1.2.18
2
6
 
3
7
  1、增加地图定点功能
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import { BaseInstance } from "@newview/base-vue";
8
- import { defineComponent, ref, reactive, onMounted, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createTextVNode, nextTick, toDisplayString, createElementBlock, Fragment, renderList, withDirectives, vShow, pushScopeId, popScopeId, onUnmounted, createCommentVNode } from "vue";
8
+ import { defineComponent, ref, reactive, onMounted, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createTextVNode, nextTick, toDisplayString, createElementBlock, Fragment, renderList, withDirectives, vShow, pushScopeId, popScopeId, onUnmounted, createCommentVNode, withModifiers } from "vue";
9
9
  import { PlatformApi, PlatformGroupApi, ModuleApi, RoleApi, RoleModuleApi, InstitutionRoleApi, InstitutionTypeApi, InstitutioninforApi, InstitutionPlatformApi, InstitutionTreeApi, EnterpriseApi, LoginLogApi, UserinforApi, InstitutionUserApi, UserRoleApi, OAuthApi, UserSignApi, InstitutionLinePointApi, InstitutionPointApi } from "@newview/permission-api";
10
10
  import { QueryWrapper, BaseApi } from "@newview/infrastructure";
11
11
  import { Icon, Tag, Checkbox, Divider, CheckboxGroup, Space } from "view-ui-plus";
@@ -1419,8 +1419,8 @@ const _hoisted_3$9 = { style: { "width": "100%", "height": "100%" } };
1419
1419
  const _hoisted_4$9 = { style: { "width": "560px", "height": "100%", "float": "left" } };
1420
1420
  const _hoisted_5$7 = { style: { "height": "calc(100% - 0px)" } };
1421
1421
  const _hoisted_6$7 = { style: { "width": "calc(100% - 570px)", "height": "100%", "margin-left": "10px", "display": "inline-block" } };
1422
- const _hoisted_7$4 = { style: { "height": "calc(100% - 0px)" } };
1423
- const _hoisted_8$4 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "点击选择要放置的位置!", -1));
1422
+ const _hoisted_7$5 = { style: { "height": "calc(100% - 0px)" } };
1423
+ const _hoisted_8$5 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "点击选择要放置的位置!", -1));
1424
1424
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
1425
1425
  const _component_SelectPlatform = resolveComponent("SelectPlatform");
1426
1426
  const _component_Radio = resolveComponent("Radio");
@@ -1614,13 +1614,13 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
1614
1614
  createTextVNode("目标平台 - [" + toDisplayString(_ctx.targetPlatform.PlatformName) + "] - 模块菜单", 1)
1615
1615
  ]),
1616
1616
  default: withCtx(() => [
1617
- createElementVNode("div", _hoisted_7$4, [
1617
+ createElementVNode("div", _hoisted_7$5, [
1618
1618
  createVNode(_component_NvGrid, {
1619
1619
  ref: "targetModuleGrid",
1620
1620
  option: _ctx.targetModuleGridOption
1621
1621
  }, {
1622
1622
  default: withCtx(() => [
1623
- _hoisted_8$4
1623
+ _hoisted_8$5
1624
1624
  ]),
1625
1625
  _: 1
1626
1626
  }, 8, ["option"])
@@ -5339,9 +5339,9 @@ const _hoisted_4$6 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ create
5339
5339
  ], -1));
5340
5340
  const _hoisted_5$5 = { style: { "height": "600px", "overflow-y": "auto" } };
5341
5341
  const _hoisted_6$5 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "勾选绑定用户角色!", -1));
5342
- const _hoisted_7$3 = { style: { "height": "650px", "overflow-y": "auto" } };
5343
- const _hoisted_8$3 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "勾选需要引入的用户!", -1));
5344
- const _hoisted_9$2 = { style: { "height": "650px", "overflow-y": "auto" } };
5342
+ const _hoisted_7$4 = { style: { "height": "650px", "overflow-y": "auto" } };
5343
+ const _hoisted_8$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "勾选需要引入的用户!", -1));
5344
+ const _hoisted_9$3 = { style: { "height": "650px", "overflow-y": "auto" } };
5345
5345
  const _hoisted_10$2 = { style: { "display": "none" } };
5346
5346
  const _hoisted_11$2 = { style: { "height": "400px", "overflow-y": "auto" } };
5347
5347
  const _hoisted_12$1 = ["src"];
@@ -5558,13 +5558,13 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
5558
5558
  }, 8, ["loading", "onClick"])
5559
5559
  ]),
5560
5560
  default: withCtx(() => [
5561
- createElementVNode("div", _hoisted_7$3, [
5561
+ createElementVNode("div", _hoisted_7$4, [
5562
5562
  createVNode(_component_NvGrid, {
5563
5563
  ref: "otherUserGrid",
5564
5564
  option: _ctx.otherUserGridOption
5565
5565
  }, {
5566
5566
  default: withCtx(() => [
5567
- _hoisted_8$3
5567
+ _hoisted_8$4
5568
5568
  ]),
5569
5569
  _: 1
5570
5570
  }, 8, ["option"])
@@ -5594,7 +5594,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
5594
5594
  })
5595
5595
  ]),
5596
5596
  default: withCtx(() => [
5597
- createElementVNode("div", _hoisted_9$2, [
5597
+ createElementVNode("div", _hoisted_9$3, [
5598
5598
  createVNode(_component_LoginLog, { ref: "loginLogRef" }, null, 512)
5599
5599
  ])
5600
5600
  ]),
@@ -11918,9 +11918,9 @@ const _hoisted_4$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ create
11918
11918
  ], -1));
11919
11919
  const _hoisted_5$3 = { style: { "height": "600px", "overflow-y": "auto" } };
11920
11920
  const _hoisted_6$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "勾选绑定用户角色!", -1));
11921
- const _hoisted_7$2 = { style: { "height": "650px", "overflow-y": "auto" } };
11922
- const _hoisted_8$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "勾选需要引入的用户!", -1));
11923
- const _hoisted_9$1 = { style: { "height": "650px", "overflow-y": "auto" } };
11921
+ const _hoisted_7$3 = { style: { "height": "650px", "overflow-y": "auto" } };
11922
+ const _hoisted_8$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "勾选需要引入的用户!", -1));
11923
+ const _hoisted_9$2 = { style: { "height": "650px", "overflow-y": "auto" } };
11924
11924
  const _hoisted_10$1 = { style: { "display": "none" } };
11925
11925
  const _hoisted_11$1 = { style: { "height": "400px", "overflow-y": "auto" } };
11926
11926
  const _hoisted_12 = ["src"];
@@ -12170,13 +12170,13 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
12170
12170
  }, 8, ["loading", "onClick"])
12171
12171
  ]),
12172
12172
  default: withCtx(() => [
12173
- createElementVNode("div", _hoisted_7$2, [
12173
+ createElementVNode("div", _hoisted_7$3, [
12174
12174
  createVNode(_component_NvGrid, {
12175
12175
  ref: "otherUserGrid",
12176
12176
  option: _ctx.otherUserGridOption
12177
12177
  }, {
12178
12178
  default: withCtx(() => [
12179
- _hoisted_8$2
12179
+ _hoisted_8$3
12180
12180
  ]),
12181
12181
  _: 1
12182
12182
  }, 8, ["option"])
@@ -12206,7 +12206,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
12206
12206
  })
12207
12207
  ]),
12208
12208
  default: withCtx(() => [
12209
- createElementVNode("div", _hoisted_9$1, [
12209
+ createElementVNode("div", _hoisted_9$2, [
12210
12210
  createVNode(_component_LoginLog, { ref: "loginLogRef" }, null, 512)
12211
12211
  ])
12212
12212
  ]),
@@ -13197,8 +13197,8 @@ const _hoisted_3$2 = { style: { "width": "100%", "height": "100%" } };
13197
13197
  const _hoisted_4$2 = { style: { "width": "560px", "height": "100%", "float": "left" } };
13198
13198
  const _hoisted_5$2 = { style: { "height": "calc(100% - 0px)" } };
13199
13199
  const _hoisted_6$2 = { style: { "width": "calc(100% - 570px)", "height": "100%", "margin-left": "10px", "display": "inline-block" } };
13200
- const _hoisted_7$1 = { style: { "height": "calc(100% - 0px)" } };
13201
- const _hoisted_8$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "点击选择要放置的位置!", -1));
13200
+ const _hoisted_7$2 = { style: { "height": "calc(100% - 0px)" } };
13201
+ const _hoisted_8$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "primary-color gird-tip" }, "点击选择要放置的位置!", -1));
13202
13202
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
13203
13203
  const _component_Option = resolveComponent("Option");
13204
13204
  const _component_Select = resolveComponent("Select");
@@ -13427,13 +13427,13 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
13427
13427
  createTextVNode("目标平台 - [" + toDisplayString(_ctx.targetPlatform.PlatformName) + "] - 模块菜单", 1)
13428
13428
  ]),
13429
13429
  default: withCtx(() => [
13430
- createElementVNode("div", _hoisted_7$1, [
13430
+ createElementVNode("div", _hoisted_7$2, [
13431
13431
  createVNode(_component_NvGrid, {
13432
13432
  ref: "targetModuleGrid",
13433
13433
  option: _ctx.targetModuleGridOption
13434
13434
  }, {
13435
13435
  default: withCtx(() => [
13436
- _hoisted_8$1
13436
+ _hoisted_8$2
13437
13437
  ]),
13438
13438
  _: 1
13439
13439
  }, 8, ["option"])
@@ -26053,7 +26053,7 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26053
26053
  __publicField(this, "institutionPointApi", new InstitutionPointApi());
26054
26054
  // 全局属性
26055
26055
  __publicField(this, "selectedPlatform");
26056
- //#region 系统平台
26056
+ //#region 地图操作
26057
26057
  // 私有属性 | private
26058
26058
  // 响应属性 | ref、reactive、computed、watch
26059
26059
  __publicField(this, "userBoxWidth", ref("calc(100% - 300px)"));
@@ -26069,13 +26069,6 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26069
26069
  minZoom: 4.5,
26070
26070
  center: [35.3308118573182, 109.53369140625001]
26071
26071
  }));
26072
- /**
26073
- * 改变机构宽度
26074
- */
26075
- __publicField(this, "doChangeUserBoxWidth", (isExpand) => {
26076
- this.userBoxWidth.value = isExpand ? "calc(100% - 300px)" : "calc(100% - 45px)";
26077
- });
26078
- // 响应式方法 | xxx = () => {}
26079
26072
  __publicField(this, "NvMap1", ref());
26080
26073
  __publicField(this, "shanxiGeoObj", null);
26081
26074
  __publicField(this, "polyline", null);
@@ -26084,12 +26077,18 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26084
26077
  // 绘制类型 line线 mark点
26085
26078
  __publicField(this, "pointMapData", []);
26086
26079
  // 存储地图点数据
26087
- __publicField(this, "pointData", []);
26080
+ __publicField(this, "pointData", ref([]));
26088
26081
  // 存储接口点数据
26089
26082
  __publicField(this, "lineMapData", []);
26090
26083
  // 存储地图线数据
26091
26084
  __publicField(this, "lineData", []);
26092
- // 存储接口线数据
26085
+ /**
26086
+ * 改变机构宽度
26087
+ */
26088
+ __publicField(this, "doChangeUserBoxWidth", (isExpand) => {
26089
+ this.userBoxWidth.value = isExpand ? "calc(100% - 300px)" : "calc(100% - 45px)";
26090
+ });
26091
+ // 响应式方法 | xxx = () => {}
26093
26092
  __publicField(this, "mapOnLoad", () => {
26094
26093
  this.shanxiGeoObj = this.NvMap1.value.addGeoJSON(shanxi, { color: "#9EFFFF", weight: 1, fillOpacity: 0 });
26095
26094
  this.polyline = this.NvMap1.value.addPolyline([], { color: "#D8A451", weight: 5 });
@@ -26123,6 +26122,8 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26123
26122
  const res = this.utilities.parseApiResult(await this.institutionPointApi.saves(params));
26124
26123
  if (res > 0) {
26125
26124
  this.message.success("保存成功");
26125
+ this.doRefreshInsTree();
26126
+ this.loadMapInfo();
26126
26127
  } else {
26127
26128
  this.message.error("保存失败");
26128
26129
  }
@@ -26144,11 +26145,11 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26144
26145
  const res = this.utilities.parseApiResult(await this.institutionLinePointApi.saves(params));
26145
26146
  if (res > 0) {
26146
26147
  this.message.success("保存成功");
26148
+ this.doRefreshInsTree();
26147
26149
  } else {
26148
26150
  this.message.error("保存失败");
26149
26151
  }
26150
26152
  }
26151
- this.doRefreshInsTree();
26152
26153
  });
26153
26154
  /** 添加点线 */
26154
26155
  __publicField(this, "addMapData", async (type2) => {
@@ -26158,15 +26159,17 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26158
26159
  return;
26159
26160
  }
26160
26161
  });
26161
- /**删除数据 */
26162
- __publicField(this, "removeData", async () => {
26162
+ /**删除线数据 */
26163
+ __publicField(this, "removeLine", async () => {
26163
26164
  this.modal.confirm({
26164
26165
  title: "提示",
26165
26166
  content: "确定要删除数据吗?",
26166
26167
  onOk: async () => {
26167
26168
  if (this.lineData.length > 0) {
26168
- const ids = this.lineData.map((e) => e.Id).join(",");
26169
- const res = this.utilities.parseApiResult(await this.institutionLinePointApi.deleteByIds(ids));
26169
+ const res = this.utilities.parseApiResult(await this.institutionLinePointApi.DeleteByFilter(QueryWrapper.create().allEq({
26170
+ PlatformId: this.selectedPlatform.Id,
26171
+ InsTreeId: this.selectedInsTree.Id
26172
+ })));
26170
26173
  if (res > 0) {
26171
26174
  this.message.success("删除成功");
26172
26175
  this.lineMapData.forEach((e) => {
@@ -26176,23 +26179,42 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26176
26179
  this.message.error("删除失败");
26177
26180
  }
26178
26181
  }
26179
- if (this.pointData.length > 0) {
26180
- const ids = this.pointData.map((e) => e.Id).join(",");
26181
- const res2 = this.utilities.parseApiResult(await this.institutionPointApi.deleteByIds(ids));
26182
- if (res2 > 0) {
26183
- this.message.success("删除成功");
26184
- this.pointMapData.forEach((e) => {
26185
- e.remove();
26186
- });
26187
- } else {
26188
- this.message.error("删除失败");
26189
- }
26190
- }
26191
26182
  this.clearMapData();
26192
26183
  this.doRefreshInsTree();
26193
26184
  }
26194
26185
  });
26195
26186
  });
26187
+ /** 定位到某点 */
26188
+ __publicField(this, "pointSelect", (item) => {
26189
+ this.NvMap1.value.setCenter([item.Latitude, item.Longitude]);
26190
+ });
26191
+ /** 删除点 */
26192
+ __publicField(this, "removePoint", async (item, delectAll) => {
26193
+ let res2;
26194
+ if (delectAll) {
26195
+ const ids = this.pointData.value.map((e) => {
26196
+ return e.Id;
26197
+ }).join(",");
26198
+ res2 = this.utilities.parseApiResult(await this.institutionPointApi.deleteByIds(ids));
26199
+ } else {
26200
+ res2 = this.utilities.parseApiResult(await this.institutionPointApi.delete(item.Id));
26201
+ }
26202
+ if (res2 > 0) {
26203
+ this.message.success("删除成功");
26204
+ this.doRefreshInsTree();
26205
+ this.loadMapInfo();
26206
+ } else {
26207
+ this.message.error("删除失败");
26208
+ }
26209
+ });
26210
+ //#endregion 地图操作 END
26211
+ //#region 组织机构树
26212
+ // 私有属性 | private
26213
+ __publicField(this, "selectedInsTree");
26214
+ // 响应属性 | ref、reactive、computed
26215
+ __publicField(this, "institutionTree", ref([]));
26216
+ __publicField(this, "loadingInstitutionTree", ref(false));
26217
+ // 私有方法 | private 方法名() {}
26196
26218
  /**
26197
26219
  * 系统平台列表
26198
26220
  */
@@ -26211,13 +26233,6 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26211
26233
  this.doChangePlatform(this.platData.value[0]);
26212
26234
  });
26213
26235
  });
26214
- //#endregion 系统平台 END
26215
- //#region 组织机构树
26216
- // 私有属性 | private
26217
- __publicField(this, "selectedInsTree");
26218
- // 响应属性 | ref、reactive、computed
26219
- __publicField(this, "institutionTree", ref([]));
26220
- __publicField(this, "loadingInstitutionTree", ref(false));
26221
26236
  // 响应式方法 | xxx = () => {}
26222
26237
  /**
26223
26238
  * 平台切换
@@ -26286,6 +26301,7 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26286
26301
  */
26287
26302
  __publicField(this, "doChangeInsTree", (datas) => {
26288
26303
  if (datas.length > 0) {
26304
+ this.isAddType = "";
26289
26305
  this.selectedInsTree = datas[0];
26290
26306
  this.loadMapInfo();
26291
26307
  }
@@ -26297,6 +26313,26 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26297
26313
  this.loadInsTree();
26298
26314
  });
26299
26315
  //#endregion 组织机构树 END
26316
+ //#region 右侧点list
26317
+ // 私有属性 | private
26318
+ // 响应属性 | ref、reactive、computed、watch
26319
+ __publicField(this, "pointDataRef", ref());
26320
+ __publicField(this, "pointOption", reactive({
26321
+ keyField: "Id",
26322
+ titleField: "name"
26323
+ }));
26324
+ // 私有方法 | private 方法名() {}
26325
+ // private async loadPintData() {
26326
+ // this.groupData.value!.loadData(async (option) => {
26327
+ // let res = this.utilities.parseApiResult(await this.institutionPointApi.getEntities())
26328
+ // res.list = res.list.map((item) => {
26329
+ // return { ...item, Id: item.indexCode }
26330
+ // })
26331
+ // option.success(res.list)
26332
+ // })
26333
+ // }
26334
+ // 响应式方法 | xxx = () => {}
26335
+ //#endregion 右侧点list END
26300
26336
  //#region 导入数据
26301
26337
  // 私有属性 | private
26302
26338
  // 响应属性 | ref、reactive、computed、watch
@@ -26332,12 +26368,14 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26332
26368
  this.isImporting.value = false;
26333
26369
  this.refExcelImport.value.messageInfo(`【导入完成】`);
26334
26370
  this.message.success("导入完成");
26371
+ this.loadInsTree();
26335
26372
  this.loadMapInfo();
26336
26373
  });
26337
26374
  this.props = props;
26338
26375
  this.ctx = ctx;
26339
26376
  this.initData();
26340
26377
  }
26378
+ // 存储接口线数据
26341
26379
  // 私有方法 | private 方法名() {}
26342
26380
  initData() {
26343
26381
  onMounted(() => {
@@ -26346,6 +26384,20 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26346
26384
  onUnmounted(() => {
26347
26385
  });
26348
26386
  }
26387
+ /** 清除地图临时数据 */
26388
+ clearMapData() {
26389
+ console.log("清除地图临时数据", this.polyline);
26390
+ if (!this.utilities.isNull(this.polyline) && this.polyline.getLatLngs().length > 0) {
26391
+ this.polyline.remove();
26392
+ this.polyline = null;
26393
+ }
26394
+ if (this.markers.length > 0) {
26395
+ this.markers.forEach((e) => {
26396
+ e.remove();
26397
+ });
26398
+ this.markers = [];
26399
+ }
26400
+ }
26349
26401
  /** 加载点 */
26350
26402
  async loadPoint() {
26351
26403
  if (this.pointMapData.length > 0) {
@@ -26354,7 +26406,7 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26354
26406
  });
26355
26407
  }
26356
26408
  const res = this.utilities.parseApiResult(await this.institutionPointApi.getEntities(QueryWrapper.create().eq("platformId", this.selectedPlatform.Id).eq("insTreeId", this.selectedInsTree.Id)));
26357
- this.pointData = res;
26409
+ this.pointData.value = res;
26358
26410
  if (res.length > 0) {
26359
26411
  res.forEach((e) => {
26360
26412
  const marker = this.NvMap1.value.addMarker({ lat: e.Latitude, lng: e.Longitude }, { offset: [-35, -11] });
@@ -26369,33 +26421,34 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26369
26421
  e.remove();
26370
26422
  });
26371
26423
  }
26372
- await this.institutionLinePointApi.getCount(QueryWrapper.create().eq("platformId", this.selectedPlatform.Id));
26373
- let res = this.utilities.parseApiResult(await this.institutionLinePointApi.getEntities(QueryWrapper.create().allEq({
26374
- PlatformId: this.selectedPlatform.Id,
26375
- InsTreeId: this.selectedInsTree.Id
26376
- })));
26377
- this.lineData = res;
26378
- if (res.length > 0) {
26379
- res = res.map((e) => {
26380
- return [e.Latitude, e.Longitude];
26381
- });
26382
- let polyline = this.NvMap1.value.addPolyline(res, { color: "#D8A451", weight: 5 });
26383
- this.lineMapData.push(polyline);
26384
- }
26385
- }
26386
- /** 清除地图临时数据 */
26387
- clearMapData() {
26388
- console.log("清除地图临时数据", this.polyline, this.polyline.getLatLngs());
26389
- if (this.polyline.getLatLngs().length > 0) {
26390
- this.polyline.remove();
26391
- }
26392
- if (this.markers.length > 0) {
26393
- this.markers.forEach((e) => {
26394
- e.remove();
26395
- });
26424
+ if (this.selectedInsTree.PId > 0) {
26425
+ let res = this.utilities.parseApiResult(await this.institutionLinePointApi.getEntities(QueryWrapper.create().allEq({
26426
+ PlatformId: this.selectedPlatform.Id,
26427
+ InsTreeId: this.selectedInsTree.PId
26428
+ })));
26429
+ this.lineData = res;
26430
+ if (res.length > 0) {
26431
+ res = res.map((e) => {
26432
+ return [e.Latitude, e.Longitude];
26433
+ });
26434
+ let polyline = this.NvMap1.value.addPolyline(res, { color: "#80c342", weight: 5 });
26435
+ this.lineMapData.push(polyline);
26436
+ }
26437
+ } else {
26438
+ let res = this.utilities.parseApiResult(await this.institutionLinePointApi.getEntities(QueryWrapper.create().allEq({
26439
+ PlatformId: this.selectedPlatform.Id,
26440
+ InsTreeId: this.selectedInsTree.Id
26441
+ })));
26442
+ this.lineData = res;
26443
+ if (res.length > 0) {
26444
+ res = res.map((e) => {
26445
+ return [e.Latitude, e.Longitude];
26446
+ });
26447
+ let polyline = this.NvMap1.value.addPolyline(res, { color: "#D8A451", weight: 5 });
26448
+ this.lineMapData.push(polyline);
26449
+ }
26396
26450
  }
26397
26451
  }
26398
- // 私有方法 | private 方法名() {}
26399
26452
  /**
26400
26453
  * 加载机构树
26401
26454
  */
@@ -26440,15 +26493,15 @@ let ProjectUserinforInstance$1 = class ProjectUserinforInstance extends BaseInst
26440
26493
  await this.loadLine();
26441
26494
  if (this.lineData.length > 0) {
26442
26495
  this.NvMap1.value.setCenter([this.lineData[0].Latitude, this.lineData[0].Longitude]);
26443
- } else if (this.pointData.length > 0) {
26444
- this.NvMap1.value.setCenter([this.pointData[0].Latitude, this.pointData[0].Longitude]);
26496
+ } else if (this.pointData.value.length > 0) {
26497
+ this.NvMap1.value.setCenter([this.pointData.value[0].Latitude, this.pointData.value[0].Longitude]);
26445
26498
  } else {
26446
26499
  this.NvMap1.value.setCenter([35.3308118573182, 109.53369140625001]);
26447
26500
  }
26448
26501
  }
26449
- //#endregion 业务逻辑 END
26502
+ //#endregion 系统平台 END
26450
26503
  };
26451
- const Sublinepoins_vue_vue_type_style_index_0_scoped_d99e8345_lang = "";
26504
+ const Sublinepoins_vue_vue_type_style_index_0_scoped_6b0359ae_lang = "";
26452
26505
  const _hoisted_1$1 = { class: "instree-search" };
26453
26506
  const _hoisted_2$1 = { class: "instree-list" };
26454
26507
  const _hoisted_3$1 = { class: "nv-flex-1 nv-flex-col map-box" };
@@ -26457,7 +26510,10 @@ const _hoisted_4$1 = {
26457
26510
  style: { "margin-bottom": "10px" }
26458
26511
  };
26459
26512
  const _hoisted_5$1 = { class: "nv-flex-1" };
26460
- const _hoisted_6$1 = { style: { "height": "450px" } };
26513
+ const _hoisted_6$1 = ["onClick"];
26514
+ const _hoisted_7$1 = { style: { "font-size": "16px" } };
26515
+ const _hoisted_8$1 = ["onClick"];
26516
+ const _hoisted_9$1 = { style: { "height": "450px" } };
26461
26517
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
26462
26518
  const _component_Option = resolveComponent("Option");
26463
26519
  const _component_Select = resolveComponent("Select");
@@ -26584,17 +26640,17 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
26584
26640
  onClick: _ctx.importLine
26585
26641
  }, {
26586
26642
  default: withCtx(() => [
26587
- createTextVNode("导入线1")
26643
+ createTextVNode("导入线")
26588
26644
  ]),
26589
26645
  _: 1
26590
26646
  }, 8, ["onClick"]),
26591
26647
  createVNode(_component_Button, {
26592
26648
  type: "error",
26593
26649
  ghost: "",
26594
- onClick: _ctx.removeData
26650
+ onClick: _ctx.removeLine
26595
26651
  }, {
26596
26652
  default: withCtx(() => [
26597
- createTextVNode("清除线/点")
26653
+ createTextVNode("清除线")
26598
26654
  ]),
26599
26655
  _: 1
26600
26656
  }, 8, ["onClick"])
@@ -26610,9 +26666,51 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
26610
26666
  }, null, 8, ["option", "theme", "onOnload", "onClick", "onRightClick"])
26611
26667
  ])
26612
26668
  ]),
26669
+ _ctx.pointData.length > 0 ? (openBlock(), createBlock(_component_NvBox, {
26670
+ key: 0,
26671
+ width: "200px",
26672
+ title: "点列表",
26673
+ showArrow: true
26674
+ }, {
26675
+ footer: withCtx(() => [
26676
+ createVNode(_component_Space, null, {
26677
+ default: withCtx(() => [
26678
+ createVNode(_component_Button, {
26679
+ type: "error",
26680
+ ghost: "",
26681
+ onClick: _cache[3] || (_cache[3] = withModifiers(($event) => _ctx.removePoint(_ctx.item, true), ["stop"]))
26682
+ }, {
26683
+ default: withCtx(() => [
26684
+ createTextVNode("删除全部")
26685
+ ]),
26686
+ _: 1
26687
+ })
26688
+ ]),
26689
+ _: 1
26690
+ })
26691
+ ]),
26692
+ default: withCtx(() => [
26693
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pointData, (item, index2) => {
26694
+ return openBlock(), createElementBlock("div", {
26695
+ class: "nv-flex nv-c-p op-item",
26696
+ style: { "justify-content": "space-between" },
26697
+ key: item.Id,
26698
+ onClick: withModifiers(($event) => _ctx.pointSelect(item), ["stop"])
26699
+ }, [
26700
+ createElementVNode("div", _hoisted_7$1, toDisplayString(`点${index2 + 1}`), 1),
26701
+ createElementVNode("div", {
26702
+ style: { "color": "red" },
26703
+ class: "nv-c-p",
26704
+ onClick: withModifiers(($event) => _ctx.removePoint(item, false), ["stop"])
26705
+ }, "删除", 8, _hoisted_8$1)
26706
+ ], 8, _hoisted_6$1);
26707
+ }), 128))
26708
+ ]),
26709
+ _: 1
26710
+ })) : createCommentVNode("", true),
26613
26711
  createVNode(_component_Modal, {
26614
26712
  modelValue: _ctx.showImport,
26615
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.showImport = $event),
26713
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.showImport = $event),
26616
26714
  transfer: "",
26617
26715
  draggable: "",
26618
26716
  mask: true,
@@ -26623,7 +26721,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
26623
26721
  footer: withCtx(() => [
26624
26722
  createVNode(_component_Button, {
26625
26723
  type: "text",
26626
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.showImport = false)
26724
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.showImport = false)
26627
26725
  }, {
26628
26726
  default: withCtx(() => [
26629
26727
  createTextVNode("关 闭")
@@ -26632,7 +26730,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
26632
26730
  })
26633
26731
  ]),
26634
26732
  default: withCtx(() => [
26635
- createElementVNode("div", _hoisted_6$1, [
26733
+ createElementVNode("div", _hoisted_9$1, [
26636
26734
  _ctx.showImport ? (openBlock(), createBlock(_component_NvExcelImport, {
26637
26735
  key: 0,
26638
26736
  ref: "refExcelImport",
@@ -26650,7 +26748,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
26650
26748
  _: 1
26651
26749
  });
26652
26750
  }
26653
- const sublinepoins = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-d99e8345"]]);
26751
+ const sublinepoins = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-6b0359ae"]]);
26654
26752
  const propDefine = {
26655
26753
  linkParam: {
26656
26754
  // 带入的参数