centaline-data-driven 1.6.9 → 1.6.11

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.
@@ -66,7 +66,7 @@ const paths = {
66
66
  "dynamicLH": "./src/centaline/dynamicLH/index.js", //html 标签
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
70
  },
71
71
  "plugs": {
72
72
  "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.9",
3
+ "version": "1.6.11",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,25 @@
1
+ # v1.6.11
2
+ 2024-07-01
3
+
4
+ 优化
5
+
6
+ 步骤控件
7
+
8
+ 表单列表locked没有锁定处理
9
+
10
+ # v1.6.10
11
+ 2024-06-25
12
+
13
+ 优化
14
+
15
+ 数字区间组件新增负值最小值判断
16
+
17
+ 数字区间组件清空时inputOld值设为空
18
+
19
+ 数字中间隐藏显示组件行高不同导致表单换行
20
+
21
+ 表单列表添加工具栏按钮
22
+
1
23
  # v1.6.9
2
24
  2024-06-12
3
25
 
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="'/sunteammanage/suncommissionarrivalimport/getLayoutOfNew'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
4
+ <ct-form :api="'/workflowmange/workFlow/getLayoutOfApproval'" :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
-
15
+ "processName":"深圳中原CCES开票审批流程","curActivityName":"总监审批","procInstID":"15857","sn":"15857_100","actionType":2
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -22,6 +22,7 @@
22
22
  :headers="headers"
23
23
  :multiple="false"
24
24
  :show-file-list="false"
25
+ :before-upload="handleAvatarBeforeUpload"
25
26
  :on-success="handleAvatarSuccess"
26
27
  :on-error="handleAvatarError">
27
28
  <el-button size="mini" type="primary">{{model.label}}</el-button>
@@ -108,6 +109,7 @@
108
109
  rowindex:Number,
109
110
  flagAppMode: Boolean,
110
111
  actionRouters: Array,
112
+ parentModel: Object,
111
113
  },
112
114
  mixins: [dynamicElement],
113
115
  data: function () {
@@ -163,6 +165,19 @@
163
165
  }
164
166
  },
165
167
  methods: {
168
+ handleAvatarBeforeUpload(file) {
169
+ if(this.parentModel && this.parentModel.is && this.parentModel.is=="ct-form-list-table" && this.parentModel.$self){
170
+ let submitData = this.parentModel.$self.getFileData(this.vmodel);
171
+ for (var key in submitData) {
172
+ if (typeof submitData[key] === "object") {
173
+ this.uploadData[key] = JSON.stringify(submitData[key]);
174
+ }
175
+ else {
176
+ this.uploadData[key] = submitData[key];
177
+ }
178
+ }
179
+ }
180
+ },
166
181
  handleAvatarSuccess(res) {
167
182
  let self = this;
168
183
  this.$api.postThenHandler({ data: res}).then(function () {
@@ -3,12 +3,21 @@
3
3
  <div v-if="model.title" class="list-title">
4
4
  <h5>{{model.title}}</h5>
5
5
  </div>
6
- <div v-else-if="model.create || (model.selectRouter && model.selectRouter.id)" class="list-title"></div>
6
+ <div v-else-if="model.create || (model.selectRouter && model.selectRouter.id) || model.toolButtonsShow.length>0" class="list-title"></div>
7
7
  <div class="list-button">
8
- <component v-if="model.selectRouter!==null" :is="model.selectRouter.is" :vmodel="model.selectRouter" @click="popupSearchListHandle" ></component>
9
- <el-button v-if="model.create" :disabled="model.disabled" type="success" class="max-btn-add" style="width: auto;" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
10
- {{model.createText}}
11
- </el-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>
12
21
  </div>
13
22
 
14
23
  <div id="listTable">
@@ -377,6 +386,20 @@
377
386
 
378
387
  this.$emit('tableButtonClick', button, submitData);
379
388
  },
389
+ toolButtonsClick(field) {
390
+ this.$emit('tableButtonClick', field, null);
391
+ },
392
+ toolButtonsChangeHandler(field) {
393
+ this.$emit('change', field);
394
+ },
395
+ importComplete(res, button) {
396
+ this.$emit('importComplete', res, button);
397
+ },
398
+ getFileData(field) {
399
+ var submitData = {};
400
+ submitData = this.parentModel.self.getFileData(field);
401
+ return submitData;
402
+ },
380
403
  popupSearchListHandle(field) {
381
404
  if(field.isSearchPageWithList){
382
405
  var self = this;
@@ -531,4 +554,16 @@
531
554
  .el-table .cell {
532
555
  text-overflow: clip;
533
556
  }
557
+
558
+ .list-button ul {
559
+ list-style: none;
560
+ margin: 0;
561
+ padding: 0;
562
+ width: auto;
563
+ }
564
+ .list-button ul li {
565
+ margin-right: 5px;
566
+ float: left;
567
+ }
568
+
534
569
  </style>
@@ -94,7 +94,12 @@
94
94
  if (this.model.max1 !== "" && parseFloat(this.model.value1) > parseFloat(this.model.max1)) {
95
95
  this.model.value1 = this.inputOld1;
96
96
  }
97
-
97
+ if (this.model.min !== "" && parseFloat(this.model.value) < parseFloat(this.model.min)) {
98
+ this.model.value = this.inputOld;
99
+ }
100
+ if (this.model.min1 !== "" && parseFloat(this.model.value1) < parseFloat(this.model.min1)) {
101
+ this.model.value1 = this.inputOld1;
102
+ }
98
103
  this.inputHandler(this.model.value);
99
104
  this.changeHandler(this.model.value);//todo input事件里要不要加这个事件
100
105
  },
@@ -128,6 +133,8 @@
128
133
  },
129
134
  clearClickHandle: function (event,id) {
130
135
  this.model.reset();
136
+ this.inputOld='';
137
+ this.inputOld1='';
131
138
  this.isShowClear(id);
132
139
  },
133
140
  mouseOverHandle: function (id) {
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="field-top">
3
- <div v-if="model !== null" class="ct-text ct-flex-div" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']">
2
+ <div class="field-top el-text-eye">
3
+ <div v-if="model !== null" class="ct-text ct-flex-div el-text-lineHeight" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']">
4
4
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div" :class="[model.labelClass]">
5
5
  <span>{{model.label}}</span>
6
6
  </div>
@@ -63,6 +63,15 @@
63
63
  .eyelabel {
64
64
  min-width:80px;
65
65
  }
66
+ .el-text-lineHeight{
67
+ line-height: 26px;
68
+ display: inline-flex;
69
+ }
70
+ .el-text-eye{
71
+ display: inline-flex;
72
+ flex-direction: column;
73
+ align-items: center;
74
+ }
66
75
  .el-icon-eye:before {
67
76
  background: url("../../../assets/icon-eye.png") no-repeat;
68
77
  content: '';
@@ -71,5 +80,6 @@
71
80
  height: 16px;
72
81
  font-size: 16px;
73
82
  background-size: 16px;
83
+ margin-bottom: -3px;
74
84
  }
75
85
  </style>
@@ -0,0 +1,11 @@
1
+ import dynamicSteps from './src/dynamicSteps'
2
+
3
+ dynamicSteps.install = function (Vue, options) {
4
+ Vue.component(dynamicSteps.name, dynamicSteps);
5
+ }
6
+
7
+ if (typeof window !== 'undefined' && window.Vue) {
8
+ window.Vue.use(dynamicSteps);
9
+ }
10
+
11
+ export default dynamicSteps;
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div class="field-top">
3
+ <div v-if="model !== null" class="ccai ct-Steps">
4
+ <div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']" style="display: inline-block;">
5
+ <div v-if="model.showLabel && model.label" :class="[model.labelClass]" style="text-align: left;padding-bottom: 5px;color: #303133;">
6
+ <h5>{{model.label}}</h5>
7
+ </div>
8
+ <div>
9
+ <el-steps :space="model.code2.space" :direction="model.code2.direction" :active="model.code2.active" :simple="model.code2.simple"
10
+ :process-status="model.code2.processStatus" :finish-status="model.code2.finishStatus" :align-center="model.code2.alignCenter">
11
+ <el-step v-for="(step, index) in model.code1" :key="index" :title="step.title" :icon="step.icon">
12
+ <div slot="description" v-html="step.description">
13
+ </div>
14
+ </el-step>
15
+ </el-steps>
16
+ </div>
17
+ </div>
18
+ <transition name="el-fade-in">
19
+ <span v-show="!valid" class="errorMessage">
20
+ {{validMessage}}
21
+ </span>
22
+ </transition>
23
+ </div>
24
+ </div>
25
+ </template>
26
+ <script>
27
+ import dynamicElement from '../../mixins/dynamicElement';
28
+ export default {
29
+ name: 'ct-Steps',
30
+ mixins: [dynamicElement],
31
+ props: {
32
+ vmodel: Object,
33
+ api: String
34
+ },
35
+ data() {
36
+ return {
37
+ };
38
+ },
39
+ mounted() {
40
+ var self = this;
41
+ this.$nextTick(function () {
42
+ if (self.vmodel) {
43
+ self.load(self.vmodel);
44
+ }
45
+ else if (typeof self.source !== 'undefined') {
46
+ self.loaderObj.Steps(self.source, (data) => {
47
+ self.load(data);
48
+ });
49
+ }
50
+ });
51
+ },
52
+ methods: {
53
+ load(data) {
54
+ this.model = data;
55
+ },
56
+ }
57
+ }
58
+ </script>
59
+ <style>
60
+ .ct-Steps {
61
+ width: 100%;
62
+ }
63
+ </style>
@@ -90,7 +90,7 @@ const FormList = function (source, master) {
90
90
  source.disabled = v;
91
91
  },
92
92
  get tableDisabled() {
93
- return source.disabled || false;
93
+ return source.disabled || master.locked || false;
94
94
  },
95
95
  getFormObj() {
96
96
  let rtnFormArr = [];
@@ -148,6 +148,40 @@ const FormList = function (source, master) {
148
148
  return rtn._buttonsShow;
149
149
  }
150
150
  },
151
+ _toolButtons: null,
152
+ get toolButtons() {
153
+ if (rtn._toolButtons !== null) {
154
+ return rtn._toolButtons;
155
+ }
156
+ else {
157
+ rtn._toolButtons = [];
158
+ if (source.toolButtons) {
159
+ source.toolButtons.forEach((v) => {
160
+ var button = Router(v);
161
+ button.is = "ct-btn";
162
+ rtn._toolButtons.push(button);
163
+ });
164
+ }
165
+ return rtn._toolButtons;
166
+ }
167
+ },
168
+ _toolButtonsShow: null,
169
+ get toolButtonsShow() {
170
+ if (rtn._toolButtonsShow !== null) {
171
+ return rtn._toolButtonsShow;
172
+ }
173
+ else {
174
+ rtn._toolButtonsShow = [];
175
+ if (rtn.toolButtons) {
176
+ rtn.toolButtons.forEach((v) => {
177
+ if(v.show){
178
+ rtn._toolButtonsShow.push(v);
179
+ }
180
+ });
181
+ }
182
+ return rtn._toolButtonsShow;
183
+ }
184
+ },
151
185
  _rows:null,
152
186
  get rows() {
153
187
  if (this._rows) {
@@ -0,0 +1,56 @@
1
+ import base from '../../index';
2
+ import Base from './Base';
3
+
4
+ const Steps = function (source) {
5
+ var init = function (data) {
6
+ var rtn = {
7
+ modelSteps:{
8
+ space:'',
9
+ direction:'horizontal',
10
+ active:0,
11
+ processStatus:'process',
12
+ finishStatus:'finish',
13
+ alignCenter:false,
14
+ simple:false,
15
+ },
16
+ listModelStep:[],
17
+ get code1() {
18
+ if (data.code1){
19
+ if(Object.prototype.toString.call(data.code1) === "[object String]"){
20
+ rtn.listModelStep = JSON.parse(data.code1);
21
+ }
22
+ else{
23
+ rtn.listModelStep = data.code1;
24
+ }
25
+ }
26
+ return rtn.listModelStep;
27
+ },
28
+ get code2() {
29
+ let tmpV=null;
30
+ if (data.code2){
31
+ if(Object.prototype.toString.call(data.code2) === "[object String]"){
32
+ tmpV = JSON.parse(data.code2);
33
+ }
34
+ else{
35
+ tmpV = data.code2;
36
+ }
37
+ }
38
+ if(tmpV){
39
+ if(tmpV.space)rtn.modelSteps.space=tmpV.space;
40
+ if(tmpV.direction)rtn.modelSteps.direction=tmpV.direction;
41
+ rtn.modelSteps.active=Number(tmpV.active);
42
+ if(tmpV.processStatus)rtn.modelSteps.processStatus=tmpV.processStatus;
43
+ if(tmpV.finishStatus)rtn.modelSteps.finishStatus=tmpV.finishStatus;
44
+ if(tmpV.alignCenter)rtn.modelSteps.alignCenter=tmpV.alignCenter;
45
+ if(tmpV.simple)rtn.modelSteps.simple=tmpV.simple;
46
+ }
47
+ return rtn.modelSteps;
48
+ },
49
+ };
50
+ rtn = base.copy(Base(data), rtn);
51
+ return rtn;
52
+ }
53
+
54
+ return init(source);
55
+ }
56
+ export default Steps;
@@ -281,6 +281,11 @@ const Enum = {
281
281
  /// </summary>
282
282
  Location: 56,
283
283
 
284
+ /// <summary>
285
+ /// 步骤控件
286
+ /// </summary>
287
+ Steps: 57,
288
+
284
289
  },
285
290
 
286
291
  //返回状态码
@@ -39,6 +39,7 @@ import Container from '../Container';
39
39
  import Contact from '../Contact';
40
40
  import LH from '../LH';
41
41
  import Image from '../Image';
42
+ import Steps from '../Steps';
42
43
 
43
44
  const LibFunction = {
44
45
  install(Vue) {},
@@ -389,6 +390,10 @@ const LibFunction = {
389
390
  item = DragSort(field);
390
391
  item.is = 'ct-dragSort';
391
392
  break;
393
+ case Enum.ControlType.Steps: //步骤控件
394
+ item = Steps(field);
395
+ item.is = 'ct-Steps';
396
+ break;
392
397
  default:
393
398
  item = L(field);
394
399
  item.is = 'ct-labelText';
@@ -429,6 +434,7 @@ const LibFunction = {
429
434
  return field.singleLine === true || field.controlType === Enum.ControlType.GroupSplitLine || field.controlType === Enum.ControlType.Repeat
430
435
  || field.controlType === Enum.ControlType.List || field.controlType === Enum.ControlType.File
431
436
  || field.controlType === Enum.ControlType.SliceUpload || field.controlType === Enum.ControlType.PhoneDial
437
+ || field.controlType === Enum.ControlType.Steps
432
438
  || field.controlType === Enum.ControlType.SearchPage;
433
439
  },
434
440
  showLabel: showLabel
@@ -47,6 +47,7 @@ const loader = {
47
47
  LH: require("./ctl/LH.js").default,
48
48
  Image: require("./ctl/Image.js").default,
49
49
  AppContainer: require("./ctl/AppContainer.js").default,
50
+ Steps: require("./ctl/Steps.js").default,
50
51
  };
51
52
 
52
53
  export default loader;
package/src/main.js CHANGED
@@ -19,11 +19,11 @@ Vue.use(centaline, {
19
19
  // baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
20
20
  // baseUrl: "http://10.88.22.13:6060/onecard-api/",
21
21
  // baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
22
- // baseUrl: "http://10.25.10.63:9999/service-api/",
22
+ baseUrl: "http://10.25.10.63:9999/service-api/",
23
23
  // baseUrl: "http://10.25.10.69:8080/",
24
24
  // baseUrl: "https://ccesutest.centaline.com.cn/service-api/v1/form/router",
25
25
  // baseUrl: "http://10.88.22.69:8080/api/",
26
- baseUrl: "http://10.88.22.46:9999/service-api/",
26
+ // baseUrl: "http://10.88.22.46:9999/service-api/",
27
27
  // baseUrl: "http://10.88.22.42:9999/service-api/",
28
28
  // baseUrl: "http://10.1.245.111:31574/service-api/",
29
29
  // baseUrl: "https://tjcptest.centaline.com.cn/",
@@ -61,11 +61,11 @@ Vue.use(centaline, {
61
61
  // authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksKAjEMQO_StYEkTZp2dq3TbjzE0JERxpX4AUW8u4qHcPd4m_ee7nKb3eDYxio1EJRKHoTFf8gzIKqOJbdajKfUssYRBZhTAWnWICbzoJR8xhhLLTLFLRIjE-g2G4hlhawtga9BLKKNWNht3HI_uYGMlFkl8cat_foT5BN-xe2ynHfL4x9zx-v6yRKbCR4QYp87SEeFzr1D2Hfbk4ZwQHOvNwAAAP__.WXDbBaPltpYZXolspry93UzYBfcZrKEmjpvrgrVTWFM"}',
62
62
 
63
63
  // originalRequestURL: 'http://10.88.22.67:8080',
64
- EstateInfo: '{"estateId":"2209201708108B8F50AB530A49EAA858","estateName":"U%E7%89%88%E6%B5%8B%E8%AF%95%E6%A5%BC%E7%9B%98%E7%82%B9%E4%BD%8D","estDeptPath":"009.001.001"}',
64
+ EstateInfo: '{"estateId":"20191111150458268D9815816AA4E11A","estateName":"%E5%BD%AD%E4%BF%8A%E6%9D%B0%E6%B5%8B%E8%AF%95%E6%A5%BC%E7%9B%98","estDeptPath":"009.001.001"}',
65
65
  estateId: '',
66
66
 
67
- authObject: '{"currentEstate":{"estateId":"2209201708108B8F50AB530A49EAA858","estateName":"U%E7%89%88%E6%B5%8B%E8%AF%95%E6%A5%BC%E7%9B%98%E7%82%B9%E4%BD%8D","estDeptPath":"009.001.001"},"platform":1,"osVersion":"","clientVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"Typw5","time":1716775934315,"sign":"a3cb02a3fc6178350dbe5680579ef127","systemSource":"CCESU","empNo":"csgl2","empId":"202110201430497BB5FE89123A054CCA"}',
68
- AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjgwOGVlMmZjLTA2ZDMtNDVmYy05NjJkLWY0ODM5MDQyYzk4ZiJ9.55wMFYRikPhYq-qfQmyliambjFkMtVX4b5wuO2zuCbPMhsDBcinq3Jg58dH4agJLKwim3UUd0-XfEpaEaTORLw',
67
+ authObject: '{"currentEstate":{"estateId":"20230816143513168CD66AB41E271F67","estateName":"%E4%B8%AD%E5%BB%BA%E5%A4%A7%E5%85%AC%E9%A6%86","estDeptPath":"001.007.001"},"platform":1,"osVersion":"","clientVersion":"","machineCode":"93064b1c23ff74f05770bc9041dce8a0","token":"","random":"9dBswG","time":1719557794814,"sign":"074cc558ae88321e4d2a5757a636af46","systemSource":"CCESU","empNo":"ceshics0","empId":"201804231035296D8646770E1ECD32CD"}',
68
+ AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImNjMTE2YjNmLWU4ZGEtNDE5Mi1hOTE3LTA3MWMxNzgxOGUzNSJ9.tx8-RFl9Z2Dpq7VjSuxD8zEdo3Zwy1Xub-zzCvWnLVpSIREUM_ahwc-O5eRrOENux-l4SiZCaxo7YS_hyZ6hKg',
69
69
  };
70
70
  },
71
71
  // 请求完成事件,可判断是否登录过期执行响应操作