centaline-data-driven-v3 0.1.18 → 0.1.19

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.1.18",
3
+ "version": "0.1.19",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <ct-field :vmodel="model">
3
3
  <template #Control>
4
- <van-checkbox v-if="model.controlType == Enum.ControlType.CheckBox" :disabled="model.locked"
5
- v-model="model.value" shape="square" @change="change">{{ model.sufLabel1 }}</van-checkbox>
6
- <van-switch v-if="model.controlType == Enum.ControlType.Switch" :disabled="model.locked"
7
- v-model="model.value" @change="change">{{ model.sufLabel1 }}</van-switch>
4
+ <van-checkbox v-if="model.controlType == Enum.ControlType.CheckBox" :disabled="model.locked"
5
+ v-model="model.value" shape="square" @change="change">{{ model.sufLabel1 }}</van-checkbox>
6
+ <van-switch v-if="model.controlType == Enum.ControlType.Switch" :disabled="model.locked"
7
+ v-model="model.value" @change="change">{{ model.sufLabel1 }}</van-switch>
8
8
  </template>
9
9
  </ct-field>
10
10
  </template>
@@ -19,6 +19,9 @@ const props = defineProps({
19
19
  source: Object,
20
20
  })
21
21
  const model = initData(props, CheckBox)
22
+ if (!model.value.isList && model.value.code1 == '') {
23
+ model.value.code1 = '0';
24
+ }
22
25
  function change() {
23
26
  changeHandler(model.value, emit);
24
27
  if (model.value.autoSearch) emit('search');
@@ -112,7 +112,7 @@ import Button from '../../loader/src/Button';
112
112
  import Enum from '../../utils/Enum'
113
113
  import common from '../../utils/common'
114
114
  import { ElMessage, UploadFile } from 'element-plus'
115
- const emit = defineEmits(['input', 'fieldClick', 'importComplete', 'SearchWhereManage', 'SaveSearchWhere','clichSearchWhere'])
115
+ const emit = defineEmits(['input', 'fieldClick', 'importComplete', 'SearchWhereManage', 'SaveSearchWhere','clickSearchWhere'])
116
116
  const props = defineProps({
117
117
  parameterAction: String,
118
118
  fileData: Object,
@@ -276,7 +276,7 @@ function SaveSearchWhere(field) {
276
276
  }
277
277
  function clickDropdownItem(col) {
278
278
  refsearchwhere.value.handleClose();
279
- emit('clichSearchWhere', col);
279
+ emit('clickSearchWhere', col);
280
280
  }
281
281
  function generateUUID() {
282
282
  return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
@@ -3,8 +3,8 @@
3
3
  <template #Control>
4
4
  <el-checkbox v-if="model.controlType == Enum.ControlType.CheckBox" v-model="model.value"
5
5
  :disabled="model.locked" :tabindex="model.code1" @change="change">{{ model.sufLabel1 }}</el-checkbox>
6
- <el-switch v-if="model.controlType == Enum.ControlType.Switch" v-model="model.value" :tabindex="model.code1" :disabled="model.locked"
7
- @change="change">
6
+ <el-switch v-if="model.controlType == Enum.ControlType.Switch" v-model="model.value" :tabindex="model.code1"
7
+ :disabled="model.locked" @change="change">
8
8
  {{ model.sufLabel1 }}
9
9
  </el-switch>
10
10
  </template>
@@ -21,6 +21,9 @@ const props = defineProps({
21
21
  source: Object,
22
22
  })
23
23
  const model = initData(props, CheckBox)
24
+ if (!model.value.isList && model.value.code1 == '') {
25
+ model.value.code1 = '0';
26
+ }
24
27
  function change() {
25
28
  changeHandler(model.value, emit);
26
29
  if (model.value.autoSearch) emit('search');
@@ -232,7 +232,12 @@ function SearchWhereManage(v) {
232
232
  let field = model.value.actionRouters.find((b) => {
233
233
  return b.key === v.routerKey;
234
234
  });
235
- RouterClickHandler(field, {}, null, model.value, 'form');
235
+ var submitData = {};
236
+ field.getSearchPara().fields.forEach((f) => {
237
+ submitData[common.initialsToLowerCase(f.fieldName1)] = f.searchValue1;
238
+ });
239
+ submitData["sourceFrom"] = "setting";
240
+ RouterClickHandler(field, submitData, null, model.value, 'form');
236
241
  }
237
242
  function saveShortcut() {
238
243
  emit('saveShortcut', model.value);
@@ -104,8 +104,6 @@ function loadFromModel(source, isFormList) {
104
104
  }
105
105
  if (rtn1.controlType === Enum.ControlType.SearchListBox
106
106
  || rtn1.controlType === Enum.ControlType.ComboBox
107
- || rtn1.controlType === Enum.ControlType.MultiSelectWithSearch
108
- || rtn1.controlType === Enum.ControlType.MultiSelectNoSearch
109
107
  ) {
110
108
  if (rtn1["options"].length == 0) {
111
109
  rtn1["options"] = [{ value: '', label: '' }];
@@ -124,6 +122,29 @@ function loadFromModel(source, isFormList) {
124
122
  this.form.$vue.loaded(this.form)
125
123
  }
126
124
  }
125
+ if (rtn1.controlType === Enum.ControlType.MultiSelectWithSearch
126
+ || rtn1.controlType === Enum.ControlType.MultiSelectNoSearch
127
+ ) {
128
+ var value = [];
129
+ var labelValue = [];
130
+ attrValue = attrValue === '' ? [] : [].concat(JSON.parse(attrValue))
131
+ rtn1["options"] = attrValue
132
+ if (attrKey == 'code1') {
133
+ attrValue.forEach((v) => {
134
+ if (v.flagDeleted !== 1) {
135
+ if (v.flagDeleted != undefined && v.flagDeleted == true) {
136
+ }
137
+ else {
138
+ value.push(v.code);
139
+ labelValue.push(v)
140
+ }
141
+ }
142
+ });
143
+ rtn1['value'] = value;
144
+ rtn1['labelValue'] = labelValue;
145
+ }
146
+ if (rtn1.itemKey) rtn1.itemKey = Math.random()
147
+ }
127
148
  if (rtn1.controlType === Enum.ControlType.File
128
149
  || rtn1.controlType === Enum.ControlType.SliceUpload) {
129
150
  if (attrKey.toLowerCase() == 'paramName1'.toLowerCase()) {
@@ -100,8 +100,6 @@ function loadSearchScreenModel(source, prevParam) {
100
100
  }
101
101
  if (rtn1.controlType === Enum.ControlType.SearchListBox
102
102
  || rtn1.controlType === Enum.ControlType.ComboBox
103
- || rtn1.controlType === Enum.ControlType.MultiSelectWithSearch
104
- || rtn1.controlType === Enum.ControlType.MultiSelectNoSearch
105
103
  ) {
106
104
  if (rtn1["options"].length == 0) {
107
105
  rtn1["options"] = [{ value: '', label: '' }];
@@ -115,6 +113,29 @@ function loadSearchScreenModel(source, prevParam) {
115
113
  }
116
114
  if (rtn1.itemKey) rtn1.itemKey = Math.random()
117
115
  }
116
+ if (rtn1.controlType === Enum.ControlType.MultiSelectWithSearch
117
+ || rtn1.controlType === Enum.ControlType.MultiSelectNoSearch
118
+ ) {
119
+ var value = [];
120
+ var labelValue = [];
121
+ attrValue = attrValue === '' ? [] : [].concat(JSON.parse(attrValue))
122
+ rtn1["options"] = attrValue
123
+ if (attrKey == 'code1') {
124
+ attrValue.forEach((v) => {
125
+ if (v.flagDeleted !== 1) {
126
+ if (v.flagDeleted != undefined && v.flagDeleted == true) {
127
+ }
128
+ else {
129
+ value.push(v.code);
130
+ labelValue.push(v)
131
+ }
132
+ }
133
+ });
134
+ rtn1['value'] = value;
135
+ rtn1['labelValue'] = labelValue;
136
+ }
137
+ if (rtn1.itemKey) rtn1.itemKey = Math.random()
138
+ }
118
139
  if (rtn1.is == 'ct-button') {
119
140
  if (common.flagApp() && this.form.$vue.loaded) {
120
141
  this.form.$vue.loaded(this.form)
@@ -431,6 +452,10 @@ function loadSearchScreenModel(source, prevParam) {
431
452
  set title(v) {
432
453
  source.title = v;
433
454
  },
455
+ //页面加载完后 执行的脚本
456
+ get onload() {
457
+ return source.onload;
458
+ },
434
459
  get flagSearch() {
435
460
  if (source.flagSearch === true) {
436
461
  return true
package/src/main.js CHANGED
@@ -21,7 +21,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
21
21
  }
22
22
 
23
23
  app.use(centaline, {
24
- baseUrl: "https://kq-api.centaline.com.cn/onecard-api",
24
+ baseUrl: "http://10.88.22.13:7070/onecard-api/",
25
25
  //baseUrl:"http://10.88.22.13:7070/onecard-api/",
26
26
  //baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
27
27
  //baseUrl: "http://10.88.22.13:6060/onecard-api/",
@@ -65,7 +65,7 @@ app.use(centaline, {
65
65
  //获取请求头
66
66
  getRequestHeaders: function () {
67
67
  return {
68
- authobject: '{token:"1647-1967489899997401088",platform:"WEB"}',
68
+ authobject: '{token:"jiangzf-1968118576749723648",platform:"WEB"}',
69
69
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
70
70
  //authObject: '{token:"jiangzf-1958445358178844672",platform:"WEB"}',
71
71
  //authObject: '{token:"1-90f7df2c-fba7-4ea0-8874-aa7202034f06"}',
@@ -878,7 +878,7 @@ const common = {
878
878
  var arr = str.split("&");
879
879
  for (var i = 0; i < arr.length; i++) {
880
880
  var res = arr[i].split("=");
881
- obj[res[0]] = res[1];
881
+ obj[this.initialsToLowerCase(res[0])] = res[1];
882
882
  }
883
883
  return obj;
884
884
  },
@@ -776,11 +776,12 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
776
776
  model.$vue.init();
777
777
  }
778
778
  else {
779
- model.$vue.updateFields(ev);
779
+ if (model.$vue && model.$vue.updateFields) {
780
+ model.$vue.updateFields(ev);
781
+ }
780
782
  }
781
783
  }
782
784
  common.closeDialog(dialogOption);
783
-
784
785
  },
785
786
  isIframe: model.isIframe,
786
787
  },
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-search" style="width:100%;height:100%;position: fixed;">
3
- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeAttendanceBillList/getLayoutOfSearchForMy'"
4
- :searchDataApi="'/EmployeeAttendanceBillList/getListOfSearchModelForMy'"></ct-searchlist>
3
+ <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeAttendanceBillList/getLayoutOfSearch'"
4
+ :searchDataApi="'/EmployeeAttendanceBillList/getListOfSearchModel'"></ct-searchlist>
5
5
 
6
6
  <!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeMaternityList/getLayoutOfSearch'"
7
7
  :searchDataApi="'/EmployeeMaternityList/getListOfSearchModel'"></ct-searchlist> -->
@@ -15,6 +15,6 @@
15
15
 
16
16
  <script lang="ts" setup>
17
17
  import { ref, nextTick } from 'vue'
18
- const apiParam = {}
18
+ const apiParam = {"rowGUID":"{7AE0A3FB-2D6C-4E51-8B10-71EAFA2D269A}","code":"KD01","name":"中原(中国)物业顾问有限公司","deptID":"{7AE0A3FB-2D6C-4E51-8B10-71EAFA2D269A}","path":"KD01","checkBillLeftHours":"1","rightEdit":"1"}
19
19
 
20
20
  </script>