centaline-data-driven-v3 0.0.74 → 0.0.76

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.74",
3
+ "version": "0.0.76",
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",
@@ -12,7 +12,7 @@
12
12
  </template>
13
13
  </van-nav-bar>
14
14
  <div ref="refForm" :style="{ overflow: 'auto', height: model.formHeight + 'px' }">
15
- <van-sticky :container="refForm" v-if="model.tip">
15
+ <van-sticky :container="refForm" v-if="model.tip" offset-top="46">
16
16
  <div class="ct-form-tip-app">
17
17
  <span v-html="model.tip"></span>
18
18
  </div>
@@ -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
  //滚动条跳转到第一个验证不通过的组件位置
@@ -31,6 +31,7 @@ const show = ref(false)
31
31
  const actions = ref([])
32
32
  function Loaded(model) {
33
33
  data.value = model;
34
+ actions.value=[];
34
35
  props.vmodel.title = (model && model.title) ? model.title : props.vmodel.title;
35
36
  if (model && model.buttons) {
36
37
  buttons.value = model.buttons.filter((v) => {
@@ -58,6 +59,7 @@ function onClickRight() {
58
59
  data.value.$vue.clickHandler(buttons.value[0])
59
60
  }
60
61
  else if(buttons.value.length>1){
62
+ Loaded(data.value)
61
63
  show.value=true;
62
64
  }
63
65
  }
@@ -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) => {
@@ -208,13 +210,13 @@ function setminWidth() {
208
210
  let maxLength = -1;
209
211
  let text;
210
212
  for (let item of model.value.options) {
211
- if (item.name) {
212
- if (item.name.length > maxLength) {
213
- maxLength = item.name.length;
214
- text = item.name;
215
- }
213
+ if (item.name) {
214
+ if (item.name.length > maxLength) {
215
+ maxLength = item.name.length;
216
+ text = item.name;
216
217
  }
217
- }
218
+ }
219
+ }
218
220
 
219
221
  let span = document.createElement('span');
220
222
  span.innerText = text;
@@ -222,9 +224,14 @@ function setminWidth() {
222
224
  span.style.width = 'auto';
223
225
  span.style.fontSize = '17px';
224
226
  document.body.appendChild(span);
225
- if ((span.getBoundingClientRect().width + 40) > refselect.value.popperSize) {
226
- refselect.value.popperSize = span.getBoundingClientRect().width + 40;
227
+
228
+ if ((span.getBoundingClientRect().width + 40) <= refselect.value.selectRef.offsetWidth) {
229
+ refselect.value.popperSize = refselect.value.selectRef.offsetWidth;
230
+ }
231
+ else{
232
+ refselect.value.popperSize = span.getBoundingClientRect().width + 40;
227
233
  }
234
+
228
235
  document.body.removeChild(span);
229
236
  }
230
237
  //弹出选择列表
@@ -37,12 +37,11 @@ const props = defineProps({
37
37
  vmodel: Object
38
38
  })
39
39
  const model = initData(props, Location)
40
- console.log(model.value);
41
40
  function popupLocationHandler() {
42
41
  emit('popupLocation', model.value, model.value.moreActionRouter, (data) => {
43
42
  if(data){
44
- model.value.value=data.lng;
45
- model.value.value1=data.lat;
43
+ model.value.code1=data.lng;
44
+ model.value.code2=data.lat;
46
45
  }
47
46
  });
48
47
  }
@@ -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="data.ak" :v="data.v" :type="data.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 data = ref({
49
+ ak : 'twUFDRiSaRpMp9V4ALun9w52QSiYUGE9',
50
+ v : '3.0',
51
+ type : 'API',
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()
@@ -1061,7 +1061,7 @@ function popupLocationHandler(field, router, callBack,model,props) {
1061
1061
  title: router.pageTitle || router.controlLabel,
1062
1062
  pane: common.getParentPane(),
1063
1063
  content: [{
1064
- component: "ct-mapBaidu",
1064
+ component: "ct-mapbaidu",
1065
1065
  width: router.pageWidth + "px",
1066
1066
  height: router.pageHeight + "px",
1067
1067
  documentHeight: props.documentHeight,
@@ -1074,10 +1074,10 @@ function popupLocationHandler(field, router, callBack,model,props) {
1074
1074
  if (callBack) {
1075
1075
  callBack(ev);
1076
1076
  }
1077
- common.closeDialog(dialogOption.dialog);
1077
+ common.closeDialog(dialogOption);
1078
1078
  },
1079
- onCloseDialog(ev) {
1080
- common.closeDialog(dialogOption.dialog);
1079
+ onCloseDialog(ev) {
1080
+ common.closeDialog(dialogOption);
1081
1081
  }
1082
1082
  }
1083
1083
  }]
@@ -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_f5be9890-db08-463b-b6c3-0874f422fac9",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_f5be9890-db08-463b-b6c3-0874f422fac9",Platform:"WEB"}',
68
+ authObject: '{EmpID:"Token_43406e81-3337-4d1f-8917-edc5bfec9c9f",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_43406e81-3337-4d1f-8917-edc5bfec9c9f",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: {
@@ -2,7 +2,7 @@
2
2
  <div id="app-search" style="width:100%;height:100%;position: fixed;">
3
3
  <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
4
4
  :searchDataApi="'/propertyPublishList/getListOfSearchModel'"
5
- :searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
5
+ :searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
6
6
  <ct-dialoglist ref="dialogList"></ct-dialoglist>
7
7
 
8
8
  </div>