centaline-data-driven 1.6.16 → 1.6.18

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.
Files changed (28) hide show
  1. package/build/centaline/centaline.path.js +1 -0
  2. package/package.json +1 -1
  3. package/release-log.md +21 -0
  4. package/src/Form.vue +2 -2
  5. package/src/SearchList.vue +3 -1
  6. package/src/centaline/css/common.css +14 -0
  7. package/src/centaline/dynamicAppContainer/src/dynamicAppContainer.vue +1 -2
  8. package/src/centaline/dynamicFile/src/dynamicFile.vue +14 -7
  9. package/src/centaline/dynamicForm/src/dynamicForm.vue +47 -2
  10. package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +33 -28
  11. package/src/centaline/dynamicLocation/index.js +11 -0
  12. package/src/centaline/dynamicLocation/src/dynamicLocation.vue +72 -0
  13. package/src/centaline/dynamicMapBaidu/src/dynamicMapBaidu.vue +64 -8
  14. package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +12 -9
  15. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +0 -1
  16. package/src/centaline/loader/src/ctl/Base.js +6 -2
  17. package/src/centaline/loader/src/ctl/File.js +10 -11
  18. package/src/centaline/loader/src/ctl/Location.js +31 -0
  19. package/src/centaline/loader/src/ctl/SearchScreen.js +3 -2
  20. package/src/centaline/loader/src/ctl/lib/Enum.js +5 -0
  21. package/src/centaline/loader/src/ctl/lib/LibFunction.js +9 -2
  22. package/src/centaline/loader/src/ctl.js +1 -0
  23. package/src/centaline/mixins/dynamicElement.js +2 -2
  24. package/src/centaline/templateControls/src/dynamicTableCurrency.vue +3 -1
  25. package/src/centaline/validate/index.js +4 -2
  26. package/src/main.js +12 -7
  27. package/wwwroot/static/centaline/centaline-data-driven.js +2458 -2113
  28. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
@@ -67,6 +67,7 @@ const paths = {
67
67
  "dynamicImage": "./src/centaline/dynamicImage/index.js", //图片
68
68
  "dynamicAppContainer": "./src/centaline/dynamicAppContainer/index.js", //
69
69
  "dynamicSteps": "./src/centaline/dynamicSteps/index.js", //步骤控件
70
+ "dynamicLocation": "./src/centaline/dynamicLocation/index.js", //经纬度获取控件
70
71
  },
71
72
  "plugs": {
72
73
  "api": "./src/centaline/api/index.js", //调用API插件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.6.16",
3
+ "version": "1.6.18",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,24 @@
1
+ # v1.6.18
2
+ 2024-08-16
3
+
4
+ 优化
5
+
6
+ 经纬度获取控件优化验证
7
+
8
+ 表单列表锁定样式调整为不显示按钮
9
+
10
+ # v1.6.17
11
+ 2024-08-14
12
+ 新增
13
+
14
+ 经纬度获取控件
15
+
16
+ 优化
17
+
18
+ 查询条件支持onChanged事件
19
+
20
+ 附件浏览支持之定义路由跳转
21
+
1
22
  # v1.6.16
2
23
  2024-07-15
3
24
 
package/src/Form.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
4
- <ct-form :api="'/saleconfigurationmanagement/personnelcommissionallocationmethod/getLayoutOfNew'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
4
+ <ct-form :api="'/salematter/UrgentResponsiblePerson/getUrgentLayoutOfBrowse'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
7
7
  </template>
@@ -12,7 +12,7 @@
12
12
  data() {
13
13
  return {
14
14
  apiParam:{
15
- "actionType":2
15
+ nurpId: "1fa72659-fa66-4dd0-8f4d-b15c011a4676", alloctNoticeType: "转组别", actionType: 1
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -32,8 +32,10 @@
32
32
  <!-- CCES -->
33
33
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
34
34
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist> -->
35
- <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist>
35
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist> -->
36
36
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customermanage/ProjectCustomerList/getLayoutOfSearch'" :searchDataApi="'/customermanage/ProjectCustomerList/getList'"></ct-searchlist> -->
37
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/workwxmanage/WorkWXApplicationList/getLayoutOfSearch'" :searchDataApi="'/workwxmanage/WorkWXApplicationList/getList'"></ct-searchlist> -->
38
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/UrgentResponsiblePersonList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/UrgentResponsiblePersonList/getList'"></ct-searchlist>
37
39
  <!-- CCES -->
38
40
 
39
41
  <!-- <ct-searchlist :apiParam="para"
@@ -155,6 +155,20 @@ html {
155
155
  .ct-iti .el-input__inner,.ct-text .el-input__inner,.ct-so .ct-input_inner{
156
156
  border: 1px solid var(--bagGray);
157
157
  }
158
+ .ct-location .el-location-input{
159
+ border: 1px solid var(--bagGray);
160
+ line-height: 24px;
161
+ padding-left: 5px;
162
+ color: var(--centalineBlue);
163
+ border-radius: 6px !important;
164
+ font-size: inherit;
165
+ }
166
+ .ct-location .el-location-input:hover{
167
+ border-color: var(--centalineBlue);
168
+ }
169
+ .ct-location .el-location-input:focus{
170
+ outline:0;
171
+ }
158
172
  .ct-dialog_wrapper {
159
173
  /*position: absolute;*/
160
174
  position: fixed;
@@ -54,8 +54,7 @@ export default {
54
54
  }
55
55
  });
56
56
  },
57
- load(data) {
58
- console.log('data',data);
57
+ load(data) {
59
58
  this.data = data;
60
59
  this.model = data;
61
60
  this.model.self = this;
@@ -175,14 +175,12 @@
175
175
  <span class="Public-classification" style="color: #fff;border-radius: 0px 0px 4px 4px;text-align: left;line-height: 26px;display: inline-flex;overflow: hidden;" v-if="(model.lock) || model.paramName">
176
176
  <!--锁定-->
177
177
  <span v-if="model.lock" class="el-dropdown-link">
178
- <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{ model.mediaLabe.mediaLabelName
179
- }}</span>
178
+ <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{ model.mediaLabe.mediaLabelName}}</span>
180
179
  </span>
181
180
  <!--复杂分类-->
182
181
  <span v-else-if="model.isComplexClassify" class="el-dropdown-link"
183
182
  @click.stop="classifyFormClickHandle(model.mediaLabe)">
184
- <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{ model.mediaLabe.mediaLabelName
185
- }}</span>
183
+ <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{ model.mediaLabe.mediaLabelName}}</span>
186
184
  <i class="el-icon-arrow-down el-icon--right"></i>
187
185
  </span>
188
186
  <!--简单分类-->
@@ -191,8 +189,7 @@
191
189
 
192
190
 
193
191
  <span class="el-dropdown-link" @click.stop="classifyClickHandle">
194
- <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{ model.mediaLabe.mediaLabelName
195
- }}</span>
192
+ <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{ model.mediaLabe.mediaLabelName}}</span>
196
193
  <i class="el-icon-arrow-down el-icon--right" style="color: #fff;"></i>
197
194
  </span>
198
195
  <el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
@@ -387,7 +384,17 @@ export default {
387
384
  var index = MediaAlbum[0].medias.findIndex(
388
385
  (v) => (v === file.source)
389
386
  );
390
- self.$common.viewerfile((this.model.label || "预览媒体"), MediaAlbum, 0, index, self.model.mediaViewPageType);
387
+
388
+ if(self.model.moreActionRouter){
389
+ let submitData = {};
390
+ submitData = self.model.form.self.getFileData(self.model.moreActionRouter);
391
+ submitData.index=index;
392
+ submitData = self.model.moreActionRouter.getActionPara(submitData).para;
393
+ self.$emit('tableButtonClick',self.model.moreActionRouter,submitData);
394
+ }
395
+ else{
396
+ self.$common.viewerfile((this.model.label || "预览媒体"), MediaAlbum, 0, index, self.model.mediaViewPageType);
397
+ }
391
398
  },
392
399
  handleEdit(file) {
393
400
  var self = this;
@@ -18,6 +18,7 @@
18
18
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
19
19
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
20
20
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
21
+ @popupLocation="popupLocationHandler"
21
22
  @tableButtonClick="clickHandler"></component>
22
23
  </el-col>
23
24
  </template>
@@ -28,6 +29,7 @@
28
29
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
29
30
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
30
31
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
32
+ @popupLocation="popupLocationHandler"
31
33
  @tableButtonClick="clickHandler"></component>
32
34
  </el-col>
33
35
  </template>
@@ -48,6 +50,7 @@
48
50
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
49
51
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
50
52
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
53
+ @popupLocation="popupLocationHandler"
51
54
  @tableButtonClick="clickHandler"></component>
52
55
  </el-col>
53
56
  </template>
@@ -57,7 +60,8 @@
57
60
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
58
61
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
59
62
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
60
- @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
63
+ @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
64
+ @popupLocation="popupLocationHandler"
61
65
  @tableButtonClick="clickHandler"></component>
62
66
  </el-col>
63
67
  </template>
@@ -82,7 +86,8 @@
82
86
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
83
87
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
84
88
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
85
- @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
89
+ @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
90
+ @popupLocation="popupLocationHandler"
86
91
  @tableButtonClick="clickHandler"></component>
87
92
  </el-col>
88
93
  </template>
@@ -93,6 +98,7 @@
93
98
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
94
99
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
95
100
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
101
+ @popupLocation="popupLocationHandler"
96
102
  @tableButtonClick="clickHandler"></component>
97
103
  </el-col>
98
104
  </template>
@@ -112,6 +118,7 @@
112
118
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
113
119
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
114
120
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
121
+ @popupLocation="popupLocationHandler"
115
122
  @tableButtonClick="clickHandler"></component>
116
123
  </el-col>
117
124
  </template>
@@ -122,6 +129,7 @@
122
129
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
123
130
  @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
124
131
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
132
+ @popupLocation="popupLocationHandler"
125
133
  @tableButtonClick="clickHandler"></component>
126
134
  </el-col>
127
135
  </template>
@@ -1269,6 +1277,43 @@
1269
1277
  };
1270
1278
  this.$common.openDialog(dialogOption);
1271
1279
  },
1280
+ popupLocationHandler(field, router, callBack) {
1281
+ var self = this;
1282
+ var submitData = self.getFileData(router);
1283
+ var tempFormData = self.model.getFormObj();
1284
+ submitData.lng=field.code1;
1285
+ submitData.lat=field.code2;
1286
+ submitData = router.getActionPara(submitData).para;
1287
+
1288
+ var dialogOption = {
1289
+ title: router.pageTitle || router.label,
1290
+ pane: self.$common.getParentPane(self),
1291
+ content: [{
1292
+ component: "ct-mapBaidu",
1293
+ attrs: {
1294
+ field: router,
1295
+ apiParam: submitData,
1296
+ width: router.dialogWidth + "px",
1297
+ height: router.dialogHeight + "px",
1298
+ documentHeight: self.documentHeight,
1299
+ documentWidth: self.documentWidth,
1300
+ openType : 'Location'
1301
+ },
1302
+ on: {
1303
+ submit(ev) {
1304
+ if (callBack) {
1305
+ callBack(ev);
1306
+ }
1307
+ self.$common.closeDialog(dialogOption.dialog);
1308
+ },
1309
+ closeDialog(ev) {
1310
+ self.$common.closeDialog(dialogOption.dialog);
1311
+ }
1312
+ }
1313
+ }]
1314
+ };
1315
+ this.$common.openDialog(dialogOption);
1316
+ },
1272
1317
  validExcute() {
1273
1318
  var self = this;
1274
1319
  var rtnBool = true;
@@ -1,23 +1,26 @@
1
1
  <template>
2
- <div class="ct-form-list" v-focus="foucus" :class="{'tableDisabled':model.tableDisabled}">
2
+ <div class="ct-form-list" v-focus="foucus">
3
+ <!-- :class="{'tableDisabled':model.tableDisabled}" -->
3
4
  <div v-if="model.title" class="list-title">
4
5
  <h5>{{model.title}}</h5>
5
6
  </div>
6
7
  <div v-else-if="model.create || (model.selectRouter && model.selectRouter.id) || model.toolButtonsShow.length>0" class="list-title"></div>
7
8
  <div class="list-button">
8
- <ul>
9
- <li v-for="(v,i) in model.toolButtonsShow" >
10
- <component :is="v.is" :vmodel="v" :parentModel="model" @click="toolButtonsClick" @importComplete="importComplete" @change="toolButtonsChangeHandler(v,$event)"></component>
11
- </li>
12
- <li v-if="model.selectRouter!==null">
13
- <component :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
14
- </li>
15
- <li v-if="model.create" >
16
- <el-button :disabled="model.disabled" type="success" class="max-btn-add" style="width: auto;" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
17
- {{model.createText}}
18
- </el-button>
19
- </li>
20
- </ul>
9
+ <template v-if="!model.tableDisabled">
10
+ <ul>
11
+ <li v-for="(v,i) in model.toolButtonsShow" >
12
+ <component :is="v.is" :vmodel="v" :parentModel="model" @click="toolButtonsClick" @importComplete="importComplete" @change="toolButtonsChangeHandler(v,$event)"></component>
13
+ </li>
14
+ <li v-if="model.selectRouter!==null">
15
+ <component :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
16
+ </li>
17
+ <li v-if="model.create" >
18
+ <el-button :disabled="model.disabled" type="success" class="max-btn-add" style="width: auto;" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
19
+ {{model.createText}}
20
+ </el-button>
21
+ </li>
22
+ </ul>
23
+ </template>
21
24
  </div>
22
25
 
23
26
  <div id="listTable">
@@ -54,20 +57,22 @@
54
57
  <!--操作列-->
55
58
  <el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || (model.buttons.length > 0 && model.buttonsShow.length > 0)" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
56
59
  <template slot-scope="scope">
57
- <span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
58
- {{scope.row.isSet?'保存':"修改"}}
59
- </span>
60
- <span v-if="scope.row.delete && !scope.row.isSet" class="el-tag el-tag--danger el-tag--mini" style="cursor: pointer;" @click="deleteRow(scope.$index, scope.row.$sourceIndex)">
61
- 删除
62
- </span>
63
- <span v-else-if="scope.row.isSet" class="el-tag el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,false)">
64
- 取消
65
- </span>
66
- <span v-for="(v,i) in model.buttons"
67
- v-if="!scope.row.isSet && v.show && ( !v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1 )"
68
- class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="buttonClick(scope.row, v)">
69
- {{v.label}}
70
- </span>
60
+ <template v-if="!model.tableDisabled">
61
+ <span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
62
+ {{scope.row.isSet?'保存':"修改"}}
63
+ </span>
64
+ <span v-if="scope.row.delete && !scope.row.isSet" class="el-tag el-tag--danger el-tag--mini" style="cursor: pointer;" @click="deleteRow(scope.$index, scope.row.$sourceIndex)">
65
+ 删除
66
+ </span>
67
+ <span v-else-if="scope.row.isSet" class="el-tag el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,false)">
68
+ 取消
69
+ </span>
70
+ <span v-for="(v,i) in model.buttons"
71
+ v-if="!scope.row.isSet && v.show && ( !v.rightField || !scope.row[v.rightField] || scope.row[v.rightField].value == 1 )"
72
+ class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="buttonClick(scope.row, v)">
73
+ {{v.label}}
74
+ </span>
75
+ </template>
71
76
  </template>
72
77
  </el-table-column>
73
78
  </el-table>
@@ -0,0 +1,11 @@
1
+ import dynamicLocation from './src/dynamicLocation';
2
+
3
+ dynamicLocation.install = function (Vue) {
4
+ Vue.component(dynamicLocation.name, dynamicLocation);
5
+ }
6
+
7
+ if (typeof window !== 'undefined' && window.Vue) {
8
+ window.Vue.use(dynamicLocation);
9
+ }
10
+
11
+ export default dynamicLocation;
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <div class="field-top">
3
+ <div v-if="model !== null" class="ct-location" style="width:100%;display:flex">
4
+ <div class="el-input el-input--mini el-input-group el-input-group--prepend el-input--suffix showLabel lableinput text-justify">
5
+ <div v-if="model.showLabel && model.label" class="el-input-group__prepend">
6
+ <div slot="prepend" class="label-ellipsis" :class="[model.labelClass]" :title="model.label">
7
+ {{model.label}}
8
+ </div>
9
+ </div>
10
+ <div style="display:inline-flex;padding-left:0px;" v-bind="model.attrs" :class="model.locked ? 'ct-is-disabled' : ''">
11
+ <input style="text-align:left;width:100%" class="el-location-input hoverColor" :placeholder="model.attrs.placeholder1"
12
+ v-model="model.value" @change="changeModel($event)"/>
13
+ <input style="text-align:left;width:100%;margin-left:5px;" class="el-location-input hoverColor" :placeholder="model.attrs.placeholder2"
14
+ v-model="model.value1" @change="changeModel($event);"/>
15
+ </div>
16
+ <div v-if="model.moreActionRouter" style="display: inline-block;margin-left: 5px;">
17
+ <img v-if="model.moreActionRouter.imgUrl" class="ct-tablecurrencyImg ct-tablecurrencyItem"
18
+ :src="model.moreActionRouter.imgUrl" :title="model.moreActionRouter.label" @click="popupLocationHandler($event)"/>
19
+ <el-button v-else size="mini" type="primary" class="h26" @click="popupLocationHandler($event)">
20
+ {{model.moreActionRouter.label}}
21
+ </el-button>
22
+ </div>
23
+ </div>
24
+ <transition name="el-fade-in">
25
+ <span v-show="!valid" class="errorMessage">
26
+ {{validMessage}}
27
+ </span>
28
+ </transition>
29
+ </div>
30
+ </div>
31
+ </template>
32
+ <script>
33
+ import dynamicElement from '../../mixins/dynamicElement';
34
+ export default {
35
+ name: 'ct-Location',
36
+ mixins: [dynamicElement],
37
+ props: {
38
+ vmodel: Object
39
+ },
40
+ data() {
41
+ return {
42
+ }
43
+ },
44
+ created() {
45
+ if (typeof this.vmodel === 'undefined') {
46
+ this.model = this.loaderObj.Location(this.source);
47
+ }
48
+ else {
49
+ this.model = this.vmodel;
50
+ }
51
+ this.model.self=this;
52
+ },
53
+ methods: {
54
+ popupLocationHandler: function (e) {
55
+ var self = this;
56
+ self.showDrop=false;
57
+ self.$emit('popupLocation', self.model, self.model.moreActionRouter, (data) => {
58
+ if(data){
59
+ self.model.value=data.lng;
60
+ self.model.value1=data.lat;
61
+ }
62
+ });
63
+ },
64
+ changeModel(event) {
65
+ this.changeHandler(event);
66
+ }
67
+ }
68
+ }
69
+ </script>
70
+ <style scoped>
71
+
72
+ </style>
@@ -1,7 +1,21 @@
1
1
  <template>
2
2
  <div>
3
- <baidu-map :center="center" :zoom="zoom" @ready="handler" :style="{height:mapHeight + 'px'}">
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 :center="center" :zoom="zoom"
12
+ :scroll-wheel-zoom="scroll_wheel_zoom" :double-click-zoom="double_click_zoom"
13
+ @ready="handler" @dragend="dragendHandler" @tilesloaded="tilesloadedHandler"
14
+ :style="{height:mapHeight + 'px'}">
4
15
  <bm-navigation v-if="flagShowZoom" anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
16
+ <bm-marker :position="markerPosition" :dragging="markerDragging" :animation="markerAnimation" @dragend="markerDragendHandler">
17
+ <bm-label :content="markerLabel" :offset="{width: -35, height: 30}"/>
18
+ </bm-marker>
5
19
  </baidu-map>
6
20
  </div>
7
21
  </template>
@@ -24,13 +38,24 @@
24
38
  type: Number,
25
39
  default: -1
26
40
  },
41
+ openType: {
42
+ String,
43
+ default: 'Browse',
44
+ },
27
45
  },
28
46
  data() {
29
47
  return {
30
- center: {lng: 0, lat: 0},// 定位位置
48
+ center: {lng: 0, lat: 0},// 定位位置
31
49
  zoom: 3,// 地图放大等级
32
50
  flagShowZoom:false,//是否显示缩放控件
33
51
  mapHeight:100,
52
+ scroll_wheel_zoom:false,
53
+ double_click_zoom:false,
54
+ markerDragging:false,
55
+ markerPosition: {lng: 0, lat: 0},// 定位位置
56
+ markerLabel:"",
57
+ markerAnimation:'',
58
+ rtnPoint:null,
34
59
  };
35
60
  },
36
61
  methods: {
@@ -50,6 +75,13 @@
50
75
  this.mapHeight=document.documentElement.clientHeight - this.topHeight;
51
76
  }
52
77
 
78
+ if(this.openType=='Location'){
79
+ this.flagShowZoom=true;
80
+ this.markerDragging=true;
81
+ this.mapHeight=this.mapHeight-28;
82
+ this.markerAnimation='BMAP_ANIMATION_BOUNCE';
83
+ }
84
+
53
85
  if(this.apiParam){
54
86
  if(this.apiParam.zoom){
55
87
  this.zoom=Number(this.apiParam.zoom);
@@ -57,13 +89,25 @@
57
89
  if(this.apiParam.flagShowZoom && this.apiParam.flagShowZoom=='1'){
58
90
  this.flagShowZoom=true;
59
91
  }
60
- if(this.apiParam.address && this.apiParam.city){
61
- var myGeo = new BMap.Geocoder();
92
+ if(this.apiParam.address){
93
+ this.markerLabel=this.apiParam.address;
94
+ }
95
+
96
+ if(this.apiParam.lng && this.apiParam.lat){
97
+ setTimeout(() => {
98
+ //偏移处理
99
+ self.center.lng = self.apiParam.lng;
100
+ self.center.lat = self.apiParam.lat;
101
+ self.markerPosition.lng = self.apiParam.lng;
102
+ self.markerPosition.lat = self.apiParam.lat;
103
+ },500)
104
+ }
105
+ else if(this.apiParam.address && this.apiParam.city){
106
+ let myGeo = new BMap.Geocoder();
62
107
  myGeo.getPoint(this.apiParam.address, function(point){
63
108
  if(point){
64
109
  self.center=point;
65
- map.addOverlay(new BMap.Marker(point, {title:self.apiParam.address}));
66
- map.addOverlay(new BMap.Label(self.apiParam.address, {position: point,offset: new BMap.Size(-25, 5)}));
110
+ self.markerPosition=point;
67
111
  }
68
112
  else{
69
113
  alert('您选择的地址没有解析到结果!');
@@ -74,8 +118,20 @@
74
118
  this.center=this.apiParam.city;
75
119
  }
76
120
  }
77
-
78
- }
121
+ },
122
+ dragendHandler(event){
123
+ },
124
+ tilesloadedHandler(event){
125
+ },
126
+ markerDragendHandler(event){
127
+ this.rtnPoint=event.point;
128
+ },
129
+ submitHandler(){
130
+ this.$emit('submit',this.rtnPoint || this.markerPosition);
131
+ },
132
+ closeHandler(){
133
+ this.$emit('closeDialog');
134
+ },
79
135
  }
80
136
  }
81
137
  </script>
@@ -723,11 +723,13 @@ import dynamicElement from '../../mixins/dynamicElement';
723
723
  self.loadScreen();
724
724
  self.loadHighScreen();
725
725
  self.setScreenShow();
726
- if (self.model.onload) {
726
+ if(self.model.scripts){
727
727
  self.model.scripts.formData = self.model.formData;
728
728
  self.model.scripts.formData.form = self.model;
729
729
  self.model.scripts.formData.excuteData = self.model.screen;
730
730
  self.model.scripts.formData.fieldsDic = self.model.screenDic;
731
+ }
732
+ if (self.model.onload) {
731
733
  self.$common.excute.call(self.model.scripts, self.model.onload);
732
734
  }
733
735
  self.isLoading = false;
@@ -763,8 +765,9 @@ import dynamicElement from '../../mixins/dynamicElement';
763
765
  // if (typeof this.model.scripts !== 'undefined') {
764
766
  // this.model.scripts.formData.setExcuteListData(this.model.fields);
765
767
  // }
766
- // this.model.scripts.$fd = field.id;
767
- // this.$common.excute.call(this.model.scripts, field.change);
768
+
769
+ this.model.scripts.$fd = field.id;
770
+ this.$common.excute.call(this.model.scripts, field.change);
768
771
  }
769
772
 
770
773
  this.model.isChanged = true;
@@ -772,12 +775,12 @@ import dynamicElement from '../../mixins/dynamicElement';
772
775
  // self.model.requiredHandle(field);
773
776
  //self.model.validMrf(field);
774
777
 
775
- // if (field.onAfterChanged && field.type !== 4) {
776
- // var router = self.model.actionRouters.find((v) => {
777
- // return v.id === field.onAfterChanged;
778
- // });
779
- // self.clickHandler(router);
780
- // }
778
+ if (field.onAfterChanged && field.type !== 4) {
779
+ var router = self.model.actionRouters.find((v) => {
780
+ return v.id === field.onAfterChanged;
781
+ });
782
+ self.clickHandlerfield(router);
783
+ }
781
784
 
782
785
  self.$forceUpdate();
783
786
  },
@@ -2465,7 +2465,6 @@ export default {
2465
2465
  // 判断是否包括样式
2466
2466
  hasClass(el, className) {
2467
2467
  let reg = new RegExp("(^|\\s)" + className + "($|\\s)");
2468
- console.log(reg.test(el.className));
2469
2468
  return reg.test(el.className);
2470
2469
  },
2471
2470
  // 添加样式
@@ -206,7 +206,9 @@ const Base = function (source) {
206
206
  || this.type===Enum.ControlType.MultiLineLabel){
207
207
  }
208
208
  else if(this.isScreen){
209
- if(this.type===Enum.ControlType.DateRange || this.type===Enum.ControlType.DateTimeRange){
209
+ if(this.type===Enum.ControlType.DateRange
210
+ || this.type===Enum.ControlType.DateTimeRange
211
+ || this.type===Enum.ControlType.Location){
210
212
  this.value = this.defaultFormat[0];
211
213
  this.value1 = this.defaultFormat[1];
212
214
  }
@@ -240,7 +242,9 @@ const Base = function (source) {
240
242
  }
241
243
  }
242
244
  else{
243
- if(this.type===Enum.ControlType.DateRange || this.type===Enum.ControlType.DateTimeRange){
245
+ if(this.type===Enum.ControlType.DateRange
246
+ || this.type===Enum.ControlType.DateTimeRange
247
+ || this.type===Enum.ControlType.Location){
244
248
  this.value = '';
245
249
  this.value1 = '';
246
250
  }