centaline-data-driven-v3 0.0.73 → 0.0.75

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven-v3",
3
- "version": "0.0.73",
3
+ "version": "0.0.75",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -16,9 +16,10 @@
16
16
  "moment": "^2.30.1",
17
17
  "photo-sphere-viewer": "^4.8.1",
18
18
  "sortablejs": "^1.15.6",
19
- "vant": "^4.8.0",
19
+ "vant": "^4.8.0",
20
20
  "vite-plugin-css-injected-by-js": "^3.3.0",
21
21
  "vue": "^3.3.4",
22
+ "vue-baidu-map-3x": "^1.0.40",
22
23
  "vue-cropper": "^1.1.1",
23
24
  "vue-router": "^4.2.5",
24
25
  "vue-ueditor-wrap": "^3.0.8",
@@ -1044,4 +1044,21 @@ body {
1044
1044
  background-color: #ed745f;
1045
1045
  }
1046
1046
 
1047
+ .ct-location .el-location-input{
1048
+ border: 1px solid var(--bagGray);
1049
+ line-height: 24px;
1050
+ padding-left: 5px;
1051
+ color: var(--centalineBlue);
1052
+ border-radius: 6px !important;
1053
+ font-size: inherit;
1054
+ }
1055
+ .ct-location .el-location-input:hover{
1056
+ border-color: var(--centalineBlue);
1057
+ }
1058
+ .ct-location .el-location-input:focus{
1059
+ outline:0;
1060
+ }
1061
+ .h26{
1062
+ height: 26px;
1063
+ }
1047
1064
  /*elementPlus样式重置结束*/
@@ -263,7 +263,7 @@ function validExcute() {
263
263
  if (f.model && typeof f.model.validExcute !== 'undefined') {
264
264
  if (!f.model.validExcute()) {
265
265
  if (i === 0) {
266
- showDialog({ title: '提示', message: f.model.displayValidMessage, closeOnClickOverlay: true, confirmButtonText: '确定', className: 'showDialogMessage' });
266
+ showDialog({ title: '提示', message: f.model.displayValidMessage, closeOnClickOverlay: true, confirmButtonText: common.LocalizedString('确定', '確認'), className: 'showDialogMessage' });
267
267
  }
268
268
  i++
269
269
  //滚动条跳转到第一个验证不通过的组件位置
@@ -9,10 +9,12 @@
9
9
  <template v-if="imageList.length > 0">
10
10
  <template v-if="layout">
11
11
  <div style="display: flex;" v-for="(item, index) in imageList" :key="index">
12
- <van-checkbox style="margin: 0 5px;" @change="choose(item, true)" v-model="item.ischeck"
12
+ <van-radio v-if="selectedMode == 1" @click="chooseRadio(item)" style="margin: 0 5px;"
13
+ :checked="item.ischeck" icon-size="14px"></van-radio>
14
+ <van-checkbox v-else style="margin: 0 5px;" @change="choose(item, true)" v-model="item.ischeck"
13
15
  shape="square" icon-size="14px"></van-checkbox>
14
- <ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index" :flagMediaSelect="true"
15
- @rolRouterclick="rolRouterCellClickHandler">
16
+ <ct-layout :vmodel="item" :cellLayout="layout" :key="itemKey" :rowindex="index"
17
+ :flagMediaSelect="true" @rolRouterclick="rolRouterCellClickHandler">
16
18
  </ct-layout>
17
19
  </div>
18
20
  </template>
@@ -39,13 +41,14 @@
39
41
  </template>
40
42
  </template>
41
43
  <template v-else>
42
- <van-empty :description="common.LocalizedString('没有数据','沒有數據')" />
44
+ <van-empty :description="common.LocalizedString('没有数据', '沒有數據')" />
43
45
  </template>
44
46
  </div>
45
47
  <div class="PhotoSelectList-bottom">
46
- <van-checkbox @change="allchoose" v-model="allcheck" shape="square" icon-size="14px">{{common.LocalizedString('全选','全選')}}</van-checkbox>
48
+ <van-checkbox v-if="selectedMode != 1" @change="allchoose" v-model="allcheck" shape="square"
49
+ icon-size="14px">{{ common.LocalizedString('全选', '全選') }}</van-checkbox>
47
50
  <van-button type="primary" class="van-button-app" size="small" style="display: flex;margin-left: 30%;"
48
- @click="handleClick()">{{common.LocalizedString('确定','確認')}}</van-button>
51
+ @click="handleClick()">{{ common.LocalizedString('确定', '確認') }}</van-button>
49
52
  </div>
50
53
  </div>
51
54
  <van-popup v-model:show="showPicker" position="bottom" :safe-area-inset-bottom="true">
@@ -68,7 +71,7 @@ import { ElMessage } from 'element-plus'
68
71
  import common from '../../utils/common'
69
72
  import util from '../../utils/pub-use'
70
73
  import PhotoSelectList from '../../loader/src/PhotoSelectList';
71
- const emit = defineEmits(['handlePhoto','loaded', 'failLoad'])
74
+ const emit = defineEmits(['handlePhoto', 'loaded', 'failLoad'])
72
75
  const props = defineProps({
73
76
  Selected: Array,
74
77
  api: String,
@@ -89,6 +92,7 @@ const itemKey = ref(0)
89
92
  const mediaLabelID = ref('')
90
93
  const mediaLabelName = ref('全部')
91
94
  const options = ref([])
95
+ const selectedMode = ref(2)
92
96
  onMounted(() => {
93
97
  nextTick(function () {
94
98
  showLoadingToast({ message: '', duration: 10000 });
@@ -115,6 +119,9 @@ function load(data) {
115
119
  layout.value = data.source.content.layout;
116
120
  paramName.value = data.source.content.paramName;
117
121
  sourceRows = common.deepClone(data.source.content.mediaList);
122
+ if (data.source.content.selectedMode) {
123
+ selectedMode.value = data.source.content.selectedMode
124
+ }
118
125
  }
119
126
  else {
120
127
  sourceRows = common.deepClone(data.source.content);
@@ -188,6 +195,16 @@ function choose(item, flagCheckbox) {
188
195
  item.ischeck = false;
189
196
  }
190
197
 
198
+ }
199
+ function chooseRadio(item) {
200
+ let chooseItem = common.deepClone(item);
201
+ chooseList.value = [];
202
+ imageList.value.forEach((v) => {
203
+ v.ischeck = false;
204
+ });
205
+ item.ischeck = true;
206
+ chooseList.value.push(chooseItem);
207
+
191
208
  }
192
209
  function allchoose() {
193
210
  chooseList.value = [];
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <ct-field :vmodel="model">
3
3
  <template #Control>
4
- <el-select-v2 ref="refselect" :key="model.itemKey" v-model="model.value" :options="model.options"
4
+ <el-select-v2 ref="refselect" :key="model.itemKey" v-model="model.value" :options="model.options" :loading="loading"
5
5
  :props="model.optionAttrs" v-bind="model.attrs" :disabled="model.locked" clearable @change="change"
6
6
  :placeholder="model.placeholder" @visible-change="visibleChange" @clear="clear"
7
7
  :filterable="model.filterable" :multiple="model.multiple" class="fieldControl" :height="300"
@@ -59,6 +59,7 @@ const model = initData(props, ComboBox)
59
59
  const refselect = ref()
60
60
  const open = ref(false)
61
61
  const isComposing = ref(false);
62
+ const loading = ref(true)
62
63
  model.value.itemKey=Math.random();
63
64
  let cancelTokenSource = null; // 用于存储取消令牌
64
65
 
@@ -84,14 +85,15 @@ function visibleChange(visible) {
84
85
  //获取数据列表
85
86
  function getOptions(key) {
86
87
  if (cancelTokenSource) {
87
- // 取消上一次未完成的请求
88
- cancelTokenSource.cancel('取消上一次请求');
89
- }
88
+ // 取消上一次未完成的请求
89
+ cancelTokenSource.cancel('取消上一次请求');
90
+ }
90
91
 
91
- // 创建新的取消令牌
92
- cancelTokenSource = Axios.CancelToken.source();
92
+ // 创建新的取消令牌
93
+ cancelTokenSource = Axios.CancelToken.source();
93
94
  if (!isComposing.value &&!model.value.moreActionRouter) {
94
95
  model.value.getOptions(props.parameterAction, key,cancelTokenSource, function (data) {
96
+ loading.value=false;
95
97
  if(data){
96
98
  data.forEach((v) => {
97
99
  let item = model.value.globalOptions.find((v1) => {
@@ -16,7 +16,7 @@
16
16
  <el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
17
17
  <component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
18
18
  :parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
19
- @change="changeHandler" @importComplete="importComplete"
19
+ @change="changeHandler" @importComplete="importComplete" @popupLocation="popupLocationHandler"
20
20
  @fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
21
21
  @tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
22
22
  @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
@@ -32,7 +32,7 @@
32
32
  <el-col v-if="col.show !== false" :span="col.colspan" style="padding:5px">
33
33
  <component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
34
34
  :parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
35
- @change="changeHandler" @importComplete="importComplete"
35
+ @change="changeHandler" @importComplete="importComplete" @popupLocation="popupLocationHandler"
36
36
  @fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler"
37
37
  @tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
38
38
  @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
@@ -52,7 +52,7 @@
52
52
  <el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
53
53
  <component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
54
54
  :parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
55
- @change="changeHandler" @fieldClick="fieldClickHandler"
55
+ @change="changeHandler" @fieldClick="fieldClickHandler" @popupLocation="popupLocationHandler"
56
56
  @popupSearchList="popupSearchListHandler" @importComplete="importComplete"
57
57
  @popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
58
58
  @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
@@ -83,7 +83,7 @@
83
83
  <el-col :span="col.colspan" v-if="col.show !== false" style="padding:5px">
84
84
  <component ref="Fields" :is="col.is" :vmodel="col" :key="itemKey"
85
85
  :parameterAction="model.parameterAction" v-bind="col.bindPara" :fileData="getFileData(col)"
86
- @change="changeHandler" @fieldClick="fieldClickHandler"
86
+ @change="changeHandler" @fieldClick="fieldClickHandler" @popupLocation="popupLocationHandler"
87
87
  @popupSearchList="popupSearchListHandler" @importComplete="importComplete"
88
88
  @popupGroupList="popupGroupListHandler" @tableButtonClick="clickHandler"
89
89
  @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
@@ -102,7 +102,7 @@
102
102
  <component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="model.parameterAction"
103
103
  v-bind="col.bindPara" @change="changeHandler" :key="itemKey" :fileData="getFileData(col)"
104
104
  @fieldClick="fieldClickHandler" @popupSearchList="popupSearchListHandler" @importComplete="importComplete"
105
- @tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler"
105
+ @tableButtonClick="clickHandler" @popupGroupList="popupGroupListHandler" @popupLocation="popupLocationHandler"
106
106
  @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged">
107
107
  </component>
108
108
  </el-col>
@@ -353,6 +353,9 @@ function validExcute() {
353
353
  }
354
354
  else if (f.$el.offsetParent.offsetParent.offsetParent.classList[0] === 'ct-dialog_wrapper') {
355
355
  total = f.$el.offsetTop;
356
+ if(f.$el.offsetParent){
357
+ total+=f.$el.offsetParent.offsetTop
358
+ }
356
359
  document.querySelector(".ct-dialog_body").children[0].scrollTop = total;
357
360
  }
358
361
  else if (f.$el.offsetParent.offsetParent.offsetParent.localName === "body") {
@@ -547,7 +550,10 @@ function importComplete(res, field) {
547
550
  }
548
551
  //弹出选择列表
549
552
  function popupSearchListHandler(singleSelectio, field, router, callBack) {
550
- Form.popupSearchListHandler(singleSelectio, field, router, model.value, Fields.value, props, callBack)
553
+ Form.popupSearchListHandler(singleSelectio, field, router, model.value, Fields.value, props, callBack)
554
+ }
555
+ function popupLocationHandler(field, router, callBack) {
556
+ Form.popupLocationHandler(field, router, callBack,model.value,props);
551
557
  }
552
558
  //弹出分组列表
553
559
  function popupGroupListHandler(field, router, callBack) {
@@ -1,20 +1,18 @@
1
1
  <template>
2
2
  <ct-field :vmodel="model">
3
3
  <template #Control>
4
- <div v-if="model !== null" class="ct-location" style="width:100%;display:flex">
5
- <div
6
- class="el-input el-input--mini el-input-group el-input-group--prepend el-input--suffix showLabel lableinput text-justify">
4
+ <div v-if="model !== null" class="ct-location" style="display:flex">
5
+ <div class="el-input el-input--mini el-input-group el-input-group--prepend el-input--suffix showLabel lableinput text-justify">
7
6
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend">
8
7
  <div slot="prepend" class="label-ellipsis" :class="[model.labelClass]" :title="model.label">
9
8
  {{ model.label }}
10
9
  </div>
11
10
  </div>
12
- <div style="display:inline-flex;padding-left:0px;" v-bind="model.attrs"
13
- :class="model.locked ? 'ct-is-disabled' : ''">
11
+ <div style="display:inline-flex;padding-left:0px;" v-bind="model.attrs" :class="model.locked ? 'ct-is-disabled' : ''">
14
12
  <input style="text-align:left;width:100%" class="el-location-input hoverColor"
15
- :placeholder="model.attrs.placeholder1" v-model="model.value" @change="changeModel($event)" />
13
+ :placeholder="model.attrs.placeholder1" v-model="model.code1" @change="changeModel($event)" />
16
14
  <input style="text-align:left;width:100%;margin-left:5px;" class="el-location-input hoverColor"
17
- :placeholder="model.attrs.placeholder2" v-model="model.value1" @change="changeModel($event);" />
15
+ :placeholder="model.attrs.placeholder2" v-model="model.code2" @change="changeModel($event);" />
18
16
  </div>
19
17
  </div>
20
18
  </div>
@@ -22,10 +20,10 @@
22
20
  <template #Sufbutton v-if="model !== null&&model.moreActionRouter">
23
21
  <div v-if="model.moreActionRouter" style="display: inline-block;margin-left: 5px;">
24
22
  <img v-if="model.moreActionRouter.imgUrl" class="ct-tablecurrencyImg ct-tablecurrencyItem"
25
- :src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.label"
23
+ :src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.controlLabel"
26
24
  @click="popupLocationHandler($event)" />
27
25
  <el-button v-else size="mini" type="primary" class="h26" @click="popupLocationHandler($event)">
28
- {{ model.moreActionRouter.label }}
26
+ {{ model.moreActionRouter.controlLabel }}
29
27
  </el-button>
30
28
  </div>
31
29
  </template>
@@ -40,15 +38,15 @@ const props = defineProps({
40
38
  })
41
39
  const model = initData(props, Location)
42
40
  function popupLocationHandler() {
43
- emit('popupLocation', model.value, model.value.moreActionRouter, (data) => {
44
- if(data){
45
- model.value.value=data.lng;
46
- model.value.value1=data.lat;
47
- }
48
- });
41
+ emit('popupLocation', model.value, model.value.moreActionRouter, (data) => {
42
+ if(data){
43
+ model.value.code1=data.lng;
44
+ model.value.code2=data.lat;
45
+ }
46
+ });
49
47
  }
50
48
  function changeModel() {
51
- changeHandler(model.value, emit);
49
+ changeHandler(model.value, emit);
52
50
  }
53
51
  defineExpose({
54
52
  model
@@ -0,0 +1,137 @@
1
+ <template>
2
+ <div class="ct-field">
3
+ <div v-if="openType=='Location'" style="text-align: right;padding-right:10px;">
4
+ <el-button size="mini" type="primary" class="h26" @click="closeHandler($event)">
5
+ 取消
6
+ </el-button>
7
+ <el-button size="mini" type="primary" class="h26" @click="submitHandler($event)">
8
+ 确定
9
+ </el-button>
10
+ </div>
11
+ <baidu-map :ak="ak" :v="v" :type="type" :center="data.center" :zoom="data.zoom"
12
+ :scroll-wheel-zoom="data.scroll_wheel_zoom" :double-click-zoom="data.double_click_zoom"
13
+ @ready="handler" @dragend="dragendHandler" @tilesloaded="tilesloadedHandler"
14
+ :style="{height:data.mapHeight + 'px'}">
15
+ <bm-navigation v-if="data.flagShowZoom" anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
16
+ <bm-marker :position="data.markerPosition" :dragging="data.markerDragging" :animation="data.markerAnimation" @dragend="markerDragendHandler">
17
+ <bm-label :content="data.markerLabel" :offset="{width: -35, height: 30}"/>
18
+ </bm-marker>
19
+ </baidu-map>
20
+ </div>
21
+ </template>
22
+ <script lang="ts" setup>
23
+ import {BaiduMap,BmMarker,BmLabel,BmNavigation} from 'vue-baidu-map-3x'
24
+ import { ref, nextTick, onUpdated,onDeactivated , onMounted } from 'vue'
25
+ import { initData, changeHandler } from '../../utils/mixins';
26
+
27
+ const emit = defineEmits(['popupLocation'])
28
+ const props = defineProps({
29
+ field: Object,
30
+ apiParam: Object,
31
+ documentHeight: {
32
+ String,
33
+ default: 'auto',
34
+ },
35
+ documentWidth: {
36
+ String,
37
+ default: 'auto',
38
+ },
39
+ topHeight: {
40
+ type: Number,
41
+ default: -1
42
+ },
43
+ openType: {
44
+ String,
45
+ default: 'Browse',
46
+ },
47
+ })
48
+ const ak = ref('twUFDRiSaRpMp9V4ALun9w52QSiYUGE9')
49
+ const v = ref('3.0')
50
+ const type = ref('API')
51
+ const data = ref({
52
+ center: {lng: 0, lat: 0},// 定位位置
53
+ zoom: 3,// 地图放大等级
54
+ flagShowZoom:false,//是否显示缩放控件
55
+ mapHeight:100,
56
+ scroll_wheel_zoom:false,
57
+ double_click_zoom:false,
58
+ markerDragging:false,
59
+ markerPosition: {lng: 0, lat: 0},// 定位位置
60
+ markerLabel:"",
61
+ markerAnimation:'',
62
+ rtnPoint:null,
63
+ })
64
+
65
+ function handler({BMap, map}) {
66
+ // 经度
67
+ data.value.center.lng = 116.404
68
+ // 纬度
69
+ data.value.center.lat = 39.915
70
+ // 地图放大等级
71
+ data.value.zoom = 15
72
+
73
+ if(props.field && props.field.pageHeight){
74
+ data.value.mapHeight=props.field.pageHeight;
75
+ }
76
+ else if(data.value.topHeight>-1){
77
+ data.value.mapHeight=document.documentElement.clientHeight - data.value.topHeight;
78
+ }
79
+
80
+ if(props.openType=='Location'){
81
+ data.value.flagShowZoom=true;
82
+ data.value.markerDragging=true;
83
+ data.value.mapHeight=data.value.mapHeight-28;
84
+ data.value.markerAnimation='BMAP_ANIMATION_BOUNCE';
85
+ }
86
+
87
+ if(props.apiParam){
88
+ if(props.apiParam.zoom){
89
+ data.value.zoom=Number(props.apiParam.zoom);
90
+ }
91
+ if(props.apiParam.flagShowZoom && props.apiParam.flagShowZoom=='1'){
92
+ data.value.flagShowZoom=true;
93
+ }
94
+ if(props.apiParam.address){
95
+ data.value.markerLabel=props.apiParam.address;
96
+ }
97
+
98
+ if(props.apiParam.lng && props.apiParam.lat){
99
+ setTimeout(() => {
100
+ //偏移处理
101
+ data.value.center.lng = props.apiParam.lng;
102
+ data.value.center.lat = props.apiParam.lat;
103
+ data.value.markerPosition.lng = props.apiParam.lng;
104
+ data.value.markerPosition.lat = props.apiParam.lat;
105
+ },500)
106
+ }
107
+ else if(props.apiParam.address && props.apiParam.city){
108
+ let myGeo = new BMap.Geocoder();
109
+ myGeo.getPoint(props.apiParam.address, function(point){
110
+ if(point){
111
+ data.value.center=point;
112
+ data.value.markerPosition=point;
113
+ }
114
+ else{
115
+ alert('您选择的地址没有解析到结果!');
116
+ }
117
+ },props.apiParam.city)
118
+ }
119
+ else if(props.apiParam.city){
120
+ data.value.center=props.apiParam.city;
121
+ }
122
+ }
123
+ }
124
+ function dragendHandler(event){
125
+ }
126
+ function tilesloadedHandler(event){
127
+ }
128
+ function markerDragendHandler(event){
129
+ data.value.rtnPoint=event.point;
130
+ }
131
+ function submitHandler(){
132
+ emit('submit',data.value.rtnPoint || data.value.markerPosition);
133
+ }
134
+ function closeHandler(){
135
+ emit('closeDialog');
136
+ }
137
+ </script>
@@ -403,15 +403,30 @@ function load(data) {
403
403
  fiexdHead()
404
404
  //当表格没有占满表格框时,主动请求下一页
405
405
  var next = function (rtn) {
406
- if (rtn) {
407
- nextTick(() => {
408
- searchEnd.value = Date.now();
409
- });
410
- }
411
- else {
412
- searchEnd.value = Date.now();
413
- }
414
- };
406
+ if (rtn) {
407
+ nextTick(() => {
408
+ if(!model.value.isLayout){
409
+ if(refTableParent.value && refTableParent.value.scrollHeight != 0 && refTableParent.value.offsetHeight != 0
410
+ && refTableParent.value.scrollHeight <= refTableParent.value.offsetHeight){
411
+ tableLoading.value = true;
412
+ SearchTable.nextPage(model.value,next);
413
+ }
414
+ else {
415
+ tableLoading.value = false;
416
+ rowColorChange(model.value.selectIndex, true);
417
+ resetScroll();
418
+ calculatingRowHeight();
419
+ getScrollAttr();
420
+ }
421
+ }
422
+ searchEnd.value = Date.now();
423
+ });
424
+ }
425
+ else {
426
+ searchEnd.value = Date.now();
427
+ tableLoading.value = false;
428
+ }
429
+ };
415
430
  next(true);
416
431
  nextTick(() => {
417
432
  loadStats()
@@ -62,6 +62,14 @@ function loadFromModel(source, isFormList) {
62
62
  router[attrKey] = attrValue;
63
63
  }
64
64
  },
65
+ setbuttonRouter(id, attrKey, attrValue) {
66
+ var router = this.form.buttons.find((v1) => {
67
+ return v1.key === id;
68
+ });
69
+ if (router) {
70
+ router[attrKey] = attrValue;
71
+ }
72
+ },
65
73
  //获取Field的属性attrKey的值
66
74
  getValueByFieldName(id, attrKey) {
67
75
  attrKey = common.initialsToLowerCase(attrKey);
@@ -1043,6 +1051,39 @@ function popupSearchListHandler(singleSelectio, field, router, model, Fields, pr
1043
1051
  }
1044
1052
  common.openDialog(dialogOption);
1045
1053
  }
1054
+ function popupLocationHandler(field, router, callBack,model,props) {
1055
+ var submitData = Form.getFileData(router,model);
1056
+ submitData.lng=field.code1;
1057
+ submitData.lat=field.code2;
1058
+ submitData = router.getActionPara(submitData).para;
1059
+
1060
+ var dialogOption = {
1061
+ title: router.pageTitle || router.controlLabel,
1062
+ pane: common.getParentPane(),
1063
+ content: [{
1064
+ component: "ct-mapbaidu",
1065
+ width: router.pageWidth + "px",
1066
+ height: router.pageHeight + "px",
1067
+ documentHeight: props.documentHeight,
1068
+ documentWidth: props.documentWidth,
1069
+ attrs: {
1070
+ field: router,
1071
+ apiParam: submitData,
1072
+ openType : 'Location',
1073
+ onSubmit(ev) {
1074
+ if (callBack) {
1075
+ callBack(ev);
1076
+ }
1077
+ common.closeDialog(dialogOption);
1078
+ },
1079
+ onCloseDialog(ev) {
1080
+ common.closeDialog(dialogOption);
1081
+ }
1082
+ }
1083
+ }]
1084
+ };
1085
+ common.openDialog(dialogOption);
1086
+ }
1046
1087
  //弹出分组搜索列表
1047
1088
  function popupGroupListHandler(field, router, model, Fields, props, callBack) {
1048
1089
  let submitData = {};
@@ -1225,5 +1266,6 @@ const Form = {
1225
1266
  changeHandler,
1226
1267
  getRouterAndSubmitData,
1227
1268
  updateFields,
1269
+ popupLocationHandler,
1228
1270
  };
1229
1271
  export default Form;
@@ -216,9 +216,10 @@ const LibFunction = {
216
216
  item.is = 'ct-customizecolumns'
217
217
  break;
218
218
  case Enum.ControlType.Location:
219
- item = Location(item);
220
- item.is = 'ct-Location';
221
- break;
219
+ moreActionRouter = LibFunction.getRouter(source.actionRouters, field.moreActionRouterKey);
220
+ item = Location(item,moreActionRouter);
221
+ item.is = 'ct-location';
222
+ break;
222
223
  case Enum.ControlType.SearchPage: //搜索列表页面
223
224
  item = {};
224
225
  item.is = 'ct-searchlist';
@@ -1,8 +1,8 @@
1
1
  import base from '../../loader/index';
2
2
  import valid from '../../utils//validate';
3
- const Location = function (source) {
3
+ const Location = function (source,moreActionRouter) {
4
4
  let rtn = {
5
- moreActionRouter: source.moreActionRouter,
5
+ moreActionRouter: moreActionRouter,
6
6
  getFormObj() {
7
7
  var rtnFormObj = {};
8
8
  Object.defineProperty(rtnFormObj, source.fieldName1, {
@@ -753,7 +753,7 @@ function apiData(model, callback) {
753
753
  })
754
754
  .then(function (response) {
755
755
  if (model.$vue && model.$vue.searchStrat && model.$vue.searchEnd) {
756
- model.$vue.searchEnd = Date.now();
756
+ model.$vue.searchEnd = Date.now();
757
757
  }
758
758
  model.isLoading = false;
759
759
  if (response.rtnCode === Enum.ReturnCode.Successful) {
@@ -836,8 +836,6 @@ function apiData(model, callback) {
836
836
  else {
837
837
  callback(false);
838
838
  }
839
-
840
-
841
839
  })
842
840
  .catch((error) => {
843
841
  model.isLoading = false;
package/src/main.js CHANGED
@@ -27,7 +27,7 @@ app.use(centaline, {
27
27
  //baseUrl: "http://10.1.245.111:38028/",
28
28
 
29
29
  flagRouterSelf: true,
30
- flagApp: false,//是否app端
30
+ flagApp: true,//是否app端
31
31
  zindex: 999,
32
32
  showRequestSuccessMessage: true,
33
33
  showRequestErrorMessage: true,
@@ -65,7 +65,7 @@ app.use(centaline, {
65
65
  //authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
66
66
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
67
67
  //authObject: '{token:"1-a7289bb2-9f1e-4a04-9016-1e555bf39188"}',
68
- authObject: '{EmpID:"Token_8ce6c140-f584-45ed-b683-ca52837993aa",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_8ce6c140-f584-45ed-b683-ca52837993aa",Platform:"WEB"}',
68
+ authObject: '{EmpID:"Token_ca06f97c-4158-48ad-bf50-19d052a7edce",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_ca06f97c-4158-48ad-bf50-19d052a7edce",Platform:"IOS"}',
69
69
  };
70
70
  },
71
71
  // 请求完成事件,可判断是否登录过期执行响应操作
@@ -282,7 +282,7 @@ const common = {
282
282
  showDialog({ message: message, allowHtml: true });
283
283
  }
284
284
  else if (type == 'error') {
285
- showDialog({ title: '提示', message: message, closeOnClickOverlay: true, confirmButtonText: '确定', className: 'showDialogMessage' });
285
+ showDialog({ title: '提示', message: message, closeOnClickOverlay: true, confirmButtonText: this.LocalizedString('确定', '確認'), className: 'showDialogMessage' });
286
286
  }
287
287
  else {
288
288
  showToast(message);
@@ -405,7 +405,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
405
405
  title: field.pageTitle,
406
406
  content: [
407
407
  {
408
- component: "ct-mapBaidu",
408
+ component: "ct-mapbaidu",
409
409
  width: field.pageWidth + 'px',
410
410
  height: field.pageHeight + 'px',
411
411
  attrs: {