centaline-data-driven 1.1.16 → 1.1.20
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 +1 -1
- package/src/centaline/api/index.js +1 -3
- package/src/centaline/comfirm/src/comfirm.vue +15 -6
- package/src/centaline/common/index.js +56 -26
- package/src/centaline/css/common.css +16 -3
- package/src/centaline/dialogList/src/dialogList.vue +3 -1
- package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +3 -5
- package/src/centaline/dynamicDtd/src/dynamicDtd.vue +4 -4
- package/src/centaline/dynamicFile/src/dynamicFile.vue +14 -14
- package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -3
- package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +7 -3
- package/src/centaline/dynamicIti/src/dynamicIti.vue +5 -3
- package/src/centaline/dynamicMo/src/dynamicMo.vue +1 -2
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +7 -3
- package/src/centaline/dynamicSo/src/dynamicSo.vue +1 -1
- package/src/centaline/dynamicSos/src/dynamicSos.vue +1 -2
- package/src/centaline/dynamicT/src/dynamicT.vue +4 -4
- package/src/centaline/dynamicTags/src/dynamicTags.vue +1 -1
- package/src/centaline/dynamicTimeSelect/src/dynamicTimeSelect.vue +0 -1
- package/src/centaline/loader/src/ctl/Checkbox.js +46 -46
- package/src/centaline/loader/src/ctl/FormList.js +1 -1
- package/src/centaline/loader/src/ctl/InputNumber.js +2 -1
- package/src/centaline/loader/src/ctl/Iti.js +1 -1
- package/src/centaline/loader/src/ctl/Router.js +1 -1
- package/src/centaline/loader/src/ctl/SearchTable.js +20 -1
- package/src/centaline/loader/src/ctl/So.js +3 -9
- package/src/centaline/loader/src/ctl/Sos.js +3 -3
- package/src/centaline/loader/src/ctl/T.js +1 -1
- package/src/centaline/loader/src/ctl/TimeSelect.js +7 -4
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +16 -9
- package/src/centaline/loader/src/ctl.js +2 -1
- package/src/centaline/selectOption/src/selectOption.vue +9 -1
- package/src/centaline/selectOption/src/selectOptionVertical.vue +1 -1
- package/src/centaline/templateControls/src/dynamicTableCurrency.vue +1 -1
- package/src/main.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div style="margin-top:
|
|
2
|
+
<div class="ct-comfirm-content">
|
|
3
|
+
<div style="margin-top: 15px;margin-bottom: 15px;min-width: 150px;text-align: center;">
|
|
4
4
|
<span>{{text}}</span>
|
|
5
5
|
</div>
|
|
6
6
|
<div style="text-align:center;width:100%">
|
|
7
|
-
<el-button @click="clickHandler($event,true)" type="primary" size="mini">
|
|
8
|
-
<el-button @click="clickHandler($event,false)" size="mini">
|
|
7
|
+
<el-button @click="clickHandler($event,true)" type="primary" size="mini">{{options.confirmButtonText||'确定'}}</el-button>
|
|
8
|
+
<el-button @click="clickHandler($event,false)" size="mini">{{options.cancelButtonText||'取消'}}</el-button>
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
@@ -13,7 +13,14 @@
|
|
|
13
13
|
export default {
|
|
14
14
|
name: 'ct-comfirm',
|
|
15
15
|
props: {
|
|
16
|
-
text: String
|
|
16
|
+
text: String,
|
|
17
|
+
options:{
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => {
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
|
|
17
24
|
},
|
|
18
25
|
data() {
|
|
19
26
|
return {
|
|
@@ -28,8 +35,10 @@
|
|
|
28
35
|
else if (!v){
|
|
29
36
|
this.$emit('cancel');
|
|
30
37
|
}
|
|
31
|
-
this.$common.closeDialog(this);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
</script>
|
|
42
|
+
<style scoped>
|
|
43
|
+
|
|
44
|
+
</style>
|
|
@@ -188,6 +188,7 @@ const common = {
|
|
|
188
188
|
* @desc 打开弹窗
|
|
189
189
|
*/
|
|
190
190
|
openDialog(vmodel) {
|
|
191
|
+
|
|
191
192
|
//this.dialogList.List.push(vmodel);
|
|
192
193
|
this.dialogList.addDialog(vmodel);
|
|
193
194
|
},
|
|
@@ -198,8 +199,9 @@ const common = {
|
|
|
198
199
|
* @desc 关闭指定弹窗
|
|
199
200
|
*/
|
|
200
201
|
closeDialog(vmodel) {
|
|
202
|
+
|
|
201
203
|
if (vmodel) {
|
|
202
|
-
if (vmodel.$options.name === 'ctDialog' || vmodel.$options.name === 'ct-dialog') {
|
|
204
|
+
if (vmodel.name === 'ct-comfirm' || vmodel.$options.name === 'ctDialog' || vmodel.$options.name === 'ct-dialog') {
|
|
203
205
|
//vmodel.dialogTableVisible = false;
|
|
204
206
|
this.dialogList.deleteDialog(vmodel);
|
|
205
207
|
return;
|
|
@@ -213,33 +215,46 @@ const common = {
|
|
|
213
215
|
}
|
|
214
216
|
},
|
|
215
217
|
|
|
218
|
+
/**
|
|
219
|
+
* @method
|
|
220
|
+
* @param {Object} message 提示信息
|
|
221
|
+
* @param {Object} title 提示框标题
|
|
222
|
+
* @param {Object} options 参数 如confirmButtonText,cancelButtonText
|
|
223
|
+
* @desc 确认框
|
|
224
|
+
*/
|
|
216
225
|
confirm(message, title, options) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
226
|
+
let self = this;
|
|
227
|
+
|
|
228
|
+
return new Promise((resolve,reject) => {
|
|
229
|
+
var dialogOption = {
|
|
230
|
+
title: title,
|
|
231
|
+
name:'ct-comfirm',
|
|
232
|
+
vmodel:{},
|
|
233
|
+
content: [{
|
|
234
|
+
component: 'ct-comfirm',
|
|
235
|
+
attrs: {
|
|
236
|
+
options:options,
|
|
237
|
+
text:message,
|
|
238
|
+
width: '400px',
|
|
239
|
+
height: '95px'
|
|
240
|
+
},
|
|
241
|
+
on: {
|
|
242
|
+
access(){
|
|
243
|
+
self.closeDialog(dialogOption);
|
|
244
|
+
resolve();
|
|
245
|
+
},
|
|
246
|
+
cancel()
|
|
247
|
+
{
|
|
248
|
+
self.closeDialog(dialogOption);
|
|
249
|
+
reject()
|
|
250
|
+
},
|
|
251
|
+
|
|
238
252
|
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
253
|
+
}]
|
|
254
|
+
};
|
|
255
|
+
this.openDialog(dialogOption);
|
|
256
|
+
})
|
|
257
|
+
|
|
243
258
|
},
|
|
244
259
|
|
|
245
260
|
/**
|
|
@@ -621,6 +636,7 @@ const common = {
|
|
|
621
636
|
* @desc 字符串转数字(保留num位小数)。
|
|
622
637
|
*/
|
|
623
638
|
numFloat(value, num, oldValue){
|
|
639
|
+
|
|
624
640
|
//value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
|
|
625
641
|
//value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是.
|
|
626
642
|
//value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的.
|
|
@@ -642,6 +658,20 @@ const common = {
|
|
|
642
658
|
return value.toString();
|
|
643
659
|
},
|
|
644
660
|
|
|
661
|
+
/**
|
|
662
|
+
* @method
|
|
663
|
+
* @param {Number} value 需要转换的字符串
|
|
664
|
+
* @param {Number} num 小数点位数
|
|
665
|
+
* @desc 字符串转数字(保留num位小数)。
|
|
666
|
+
*/
|
|
667
|
+
numToFloat(value, num){
|
|
668
|
+
if (value && num && num > 0) {
|
|
669
|
+
value =parseFloat(value).toFixed(num);
|
|
670
|
+
}
|
|
671
|
+
return value.toString();
|
|
672
|
+
},
|
|
673
|
+
|
|
674
|
+
|
|
645
675
|
/**
|
|
646
676
|
* @method
|
|
647
677
|
* @param {String} ext 后缀
|
|
@@ -339,7 +339,6 @@ html {
|
|
|
339
339
|
_display: inline;
|
|
340
340
|
*display: inline;
|
|
341
341
|
zoom: 1;
|
|
342
|
-
width: 24px;
|
|
343
342
|
height: 24px;
|
|
344
343
|
float: left;
|
|
345
344
|
margin-top: 4px;
|
|
@@ -684,7 +683,13 @@ html {
|
|
|
684
683
|
background-color: #d6d6d6;
|
|
685
684
|
border-color: #d6d6d6;
|
|
686
685
|
}
|
|
687
|
-
|
|
686
|
+
.ct-tableToolbar .is-disabled {
|
|
687
|
+
background: #b1b3bc !important;
|
|
688
|
+
}
|
|
689
|
+
.ct-tableToolbar .is-disabled:hover {
|
|
690
|
+
color: #333 !important;
|
|
691
|
+
background: #b1b3bc !important;
|
|
692
|
+
}
|
|
688
693
|
.ct-dialog_app {
|
|
689
694
|
position: relative
|
|
690
695
|
}
|
|
@@ -699,4 +704,12 @@ html {
|
|
|
699
704
|
{cursor: pointer;}
|
|
700
705
|
.ct-position-relative{
|
|
701
706
|
position: relative;
|
|
702
|
-
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.ct-right-0{
|
|
710
|
+
right: 0px !important;
|
|
711
|
+
}
|
|
712
|
+
.ct-right-10{
|
|
713
|
+
right: 10px !important;
|
|
714
|
+
}
|
|
715
|
+
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
methods: {
|
|
37
37
|
addDialog(vmodel) {
|
|
38
|
+
|
|
38
39
|
vmodel.id = (new Date()).getTime();
|
|
39
40
|
this.List.push(vmodel);
|
|
40
41
|
|
|
@@ -46,10 +47,11 @@
|
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
deleteDialog(model) {
|
|
50
|
+
|
|
49
51
|
model.dialogTableVisible = false;
|
|
50
52
|
//改成删除
|
|
51
53
|
let index = this.List.findIndex(v => {
|
|
52
|
-
|
|
54
|
+
return v.id === model.id || v.id === model.vmodel.id;
|
|
53
55
|
});
|
|
54
56
|
this.List.splice(index, 1);
|
|
55
57
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="ct-checkbox-mian cover-list-item" :class="[model.showLabel?'showLabel':'',model.value !== ''?'hasValue':'']">
|
|
9
9
|
<span>
|
|
10
10
|
<el-checkbox-group v-model="model.checkedItemArr" @change="changeHandler1">
|
|
11
|
-
<el-checkbox v-for="item in model.options" :label="item[model.optionAttrs.value]" :key="item[model.optionAttrs.value]">{{item[model.optionAttrs.label]}}</el-checkbox>
|
|
11
|
+
<el-checkbox :disabled="model.lock" v-for="item in model.options" :label="item[model.optionAttrs.value]" :key="item[model.optionAttrs.value]">{{item[model.optionAttrs.label]}}</el-checkbox>
|
|
12
12
|
</el-checkbox-group>
|
|
13
13
|
</span>
|
|
14
14
|
|
|
@@ -46,12 +46,10 @@
|
|
|
46
46
|
self.$emit('loaded');
|
|
47
47
|
}
|
|
48
48
|
else if (typeof self.source !== 'undefined') {
|
|
49
|
-
|
|
50
|
-
self.load(data);
|
|
51
|
-
});
|
|
49
|
+
this.model = self.loaderObj.Checkbox(self.source);
|
|
52
50
|
}
|
|
53
51
|
else if (typeof self.api !== 'undefined') {
|
|
54
|
-
self.loaderObj.
|
|
52
|
+
self.loaderObj.Checkbox(self.api, (data) => {
|
|
55
53
|
self.load(data);
|
|
56
54
|
});
|
|
57
55
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
{{validMessage}}
|
|
32
32
|
</span>
|
|
33
33
|
</transition>
|
|
34
|
-
<ct-quick-input v-if="model.paramName && !model.lock" :pn="model.paramName" :action="api"
|
|
34
|
+
<ct-quick-input v-if="model.paramName && !model.lock" :pn="model.paramName" :action="api" ></ct-quick-input>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
</template>
|
|
@@ -49,7 +49,9 @@
|
|
|
49
49
|
pickerOptions: this.getPickerOptions()
|
|
50
50
|
};
|
|
51
51
|
},
|
|
52
|
+
|
|
52
53
|
mounted() {
|
|
54
|
+
|
|
53
55
|
var self = this;
|
|
54
56
|
this.$nextTick(function () {
|
|
55
57
|
if (self.vmodel) {
|
|
@@ -57,9 +59,7 @@
|
|
|
57
59
|
self.$emit('loaded');
|
|
58
60
|
}
|
|
59
61
|
else if (typeof self.source !== 'undefined') {
|
|
60
|
-
self.loaderObj.Dtd(self.source
|
|
61
|
-
self.load(data);
|
|
62
|
-
});
|
|
62
|
+
this.model = self.loaderObj.Dtd(self.source);
|
|
63
63
|
}
|
|
64
64
|
else if (typeof self.api !== 'undefined') {
|
|
65
65
|
self.loaderObj.Dtd(self.api, (data) => {
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
<div slot="tip" class="el-upload__tip errorMessage" v-show="!valid">{{validMessage}}</div>
|
|
19
19
|
<div slot="file" slot-scope="{file}" :title="file.fileName">
|
|
20
20
|
<div class="cover-list-item">
|
|
21
|
-
<el-image fit="fill" :src="file.url"
|
|
22
|
-
style="width: 150px; height: 150px"
|
|
23
|
-
:preview-src-list="getPreviewSrcList(file)"
|
|
24
|
-
:z-index="previewZIndex"
|
|
21
|
+
<el-image fit="fill" :src="file.url"
|
|
22
|
+
style="width: 150px; height: 150px"
|
|
23
|
+
:preview-src-list="getPreviewSrcList(file)"
|
|
24
|
+
:z-index="previewZIndex"
|
|
25
25
|
@click="handlePictureCardPreview(file)">
|
|
26
26
|
</el-image>
|
|
27
27
|
<span class="cover-list-item-span-delete" v-if="!model.lock && file.rightDel">
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
{{file.mediaLabelName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
43
43
|
</span>
|
|
44
44
|
<el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
|
|
45
|
-
<el-dropdown-item v-for="(option, index) in model.optionModel.options" :key="index" :command="{option:option,file:file}">
|
|
46
|
-
{{option[model.optionModel.optionAttrs.label]}}
|
|
45
|
+
<el-dropdown-item v-for="(option, index) in model.optionModel.options" :key="index" :command="{option:option,file:file}">
|
|
46
|
+
{{option[model.optionModel.optionAttrs.label]}}
|
|
47
47
|
</el-dropdown-item>
|
|
48
48
|
</el-dropdown-menu>
|
|
49
49
|
</el-dropdown>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
//删除
|
|
98
98
|
handleRemove(file) {
|
|
99
|
-
this.$confirm("确定删除该附件?", "提示", {
|
|
99
|
+
this.$common.confirm("确定删除该附件?", "提示", {
|
|
100
100
|
confirmButtonText: "确定",
|
|
101
101
|
cancelButtonText: "取消",
|
|
102
102
|
//type: 'warning'
|
|
@@ -109,26 +109,26 @@
|
|
|
109
109
|
if (this.$common.isAssetTypeAnImage(this.getSuffix(file))) {
|
|
110
110
|
//this.$openPreview([file.mediaUrl]);
|
|
111
111
|
}
|
|
112
|
-
else {
|
|
112
|
+
else {
|
|
113
113
|
if (file.rightDownload) {
|
|
114
|
-
window.open(file.mediaUrl, "_blank");
|
|
114
|
+
window.open(file.mediaUrl, "_blank");
|
|
115
115
|
}
|
|
116
116
|
return [];
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
getPreviewSrcList(file) {
|
|
120
|
-
if (this.$common.isAssetTypeAnImage(this.getSuffix(file))) {
|
|
120
|
+
if (this.$common.isAssetTypeAnImage(this.getSuffix(file))) {
|
|
121
121
|
let arr = this.model.fileList.filter(at => this.$common.isAssetTypeAnImage(this.getSuffix(at))).map(attach => {
|
|
122
122
|
return attach.mediaUrl;
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
//让看起来有序
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
//让看起来有序
|
|
126
126
|
let nowIndex = arr.findIndex(photo => photo === file.mediaUrl)
|
|
127
127
|
if (nowIndex > -1) {
|
|
128
128
|
let start = arr.slice(0, nowIndex)
|
|
129
129
|
let end = arr.slice(nowIndex)
|
|
130
130
|
arr = [...end, ...start]
|
|
131
|
-
}
|
|
131
|
+
}
|
|
132
132
|
return arr;
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
field.doAction(self.model.getFormObj(), (data) => {
|
|
240
240
|
if (data.rtnCode === 200) {
|
|
241
241
|
if (self.model.flagAlertClose) {
|
|
242
|
-
self.$confirm('操作成功,是否关闭本页面?', '提示', {
|
|
242
|
+
self.$common.confirm('操作成功,是否关闭本页面?', '提示', {
|
|
243
243
|
confirmButtonText: '确定',
|
|
244
244
|
cancelButtonText: '取消',
|
|
245
245
|
type: 'warning'
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
if (field.alert) {
|
|
360
|
-
self.$confirm(field.alertMsg, field.alertCaption, {
|
|
360
|
+
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
361
361
|
confirmButtonText: field.alertOKButtonText,
|
|
362
362
|
cancelButtonText: field.alertCancelButtonText,
|
|
363
363
|
//type: 'warning'
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
this.$common.excute.call(this.model.scripts, field.change);
|
|
379
379
|
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
|
|
382
382
|
self.model.isChanged = true;
|
|
383
383
|
self.model.hiddenHandle(field);
|
|
384
384
|
self.model.requiredHandle(field);
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<div style="padding-left:15px;flex:1" v-bind="model.attrs" class="el-date-editor ct-input__inner">
|
|
10
10
|
<input style="text-align:left;width:100%" class="el-range-input" :placeholder="model.attrs.placeholder1"
|
|
11
11
|
v-model="model.value" @change="onChangeHandler($event)" @input="onInputHandler($event);isShowClear()"
|
|
12
|
+
@blur="onBlurHandler($event)"
|
|
12
13
|
:class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />
|
|
13
|
-
|
|
14
14
|
<!--<span v-if="!model.lock" class="cover-list-item-span">
|
|
15
15
|
<i class="el-input__icon el-icon-circle-close" @click="clearClickHandle"></i>
|
|
16
16
|
</span>-->
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
console.log('clearClickHandle');
|
|
68
68
|
},
|
|
69
69
|
onInputHandler: function (val) {
|
|
70
|
+
|
|
70
71
|
this.model.value = this.$common.numFloat(this.model.value, this.model.decimals, this.inputOld);//保留n位小数
|
|
71
72
|
if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
|
|
72
73
|
this.model.value = this.inputOld;
|
|
@@ -74,14 +75,17 @@
|
|
|
74
75
|
|
|
75
76
|
this.inputHandler(this.model.value);
|
|
76
77
|
this.changeHandler(this.model.value);//todo input事件里要不要加这个事件
|
|
77
|
-
this.isShowClear();
|
|
78
78
|
console.log('onInputHandler');
|
|
79
79
|
},
|
|
80
80
|
onChangeHandler: function (val) {
|
|
81
81
|
this.changeHandler(this.model.value);
|
|
82
|
-
this.isShowClear()
|
|
82
|
+
this.isShowClear();
|
|
83
83
|
console.log('onChangeHandler');
|
|
84
84
|
},
|
|
85
|
+
onBlurHandler:function(event){
|
|
86
|
+
this.model.value = this.$common.numToFloat(this.model.value, this.model.decimals);//保留n位小数
|
|
87
|
+
this.inputHandler();
|
|
88
|
+
},
|
|
85
89
|
//不能共用的数据校验
|
|
86
90
|
selfValidExcute: function (eventName) {
|
|
87
91
|
if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<div style="width:39%" class="ct-position-relative" @mouseover="mouseOverHandle('input1','value')" @mouseout="mouseOutHandle('input1')">
|
|
13
13
|
<input style="text-align:left;width:100%" class="el-range-input" :placeholder="model.attrs.placeholder1"
|
|
14
|
-
v-model="model.value" @change="changeHandler($event)" @input="onInputHandler($event);isShowClear('input1','value')" @focus="focusHandler" @blur="blurHandler"
|
|
14
|
+
v-model="model.value" @change="changeHandler($event)" @input="onInputHandler($event);isShowClear('input1','value')" @focus="focusHandler" @blur="blurHandler('value','decimals')"
|
|
15
15
|
:class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />
|
|
16
16
|
|
|
17
17
|
<span class="el-input__suffix el-input--mini" v-if="showClear.input1">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<span style="width:5%" class="el-range-separator">-</span>
|
|
24
24
|
<div style="width:39%" class="ct-position-relative" @mouseover="mouseOverHandle('input2','value1')" @mouseout="mouseOutHandle('input2')">
|
|
25
25
|
<input style="text-align:left;width:100%;" class="el-range-input" :placeholder="model.attrs.placeholder2"
|
|
26
|
-
v-model="model.value1" @change="changeHandler($event);" @input="onInputHandler($event);isShowClear('input2','value1')" @focus="focusHandler" @blur="blurHandler"
|
|
26
|
+
v-model="model.value1" @change="changeHandler($event);" @input="onInputHandler($event);isShowClear('input2','value1')" @focus="focusHandler" @blur="blurHandler('value1','decimals1')"
|
|
27
27
|
:class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />
|
|
28
28
|
<span class="el-input__suffix el-input--mini" v-if="showClear.input2">
|
|
29
29
|
<span class="el-input__suffix-inner ct-close">
|
|
@@ -72,8 +72,10 @@
|
|
|
72
72
|
focusHandler() {
|
|
73
73
|
this.isFocus = true;
|
|
74
74
|
},
|
|
75
|
-
blurHandler() {
|
|
75
|
+
blurHandler(valName,decName) {
|
|
76
76
|
this.isFocus = false;
|
|
77
|
+
this.model[valName] = this.$common.numToFloat(this.model[valName], this.model[decName]);//保留n位小数
|
|
78
|
+
this.inputHandler();
|
|
77
79
|
},
|
|
78
80
|
onInputHandler: function (val) {
|
|
79
81
|
this.model.value = this.$common.numFloat(this.model.value, this.model.decimals, this.inputOld);//保留n位小数
|
|
@@ -226,11 +226,10 @@
|
|
|
226
226
|
getOptionText: function (value) {
|
|
227
227
|
|
|
228
228
|
var self = this;
|
|
229
|
-
console.log(JSON.stringify(this.globalOptions))
|
|
230
229
|
var option = this.globalOptions.find((v) => { return v[self.model.optionAttrs.value] === value });
|
|
231
230
|
|
|
232
231
|
if (option) {
|
|
233
|
-
return option[self.model.optionAttrs.
|
|
232
|
+
return option[self.model.optionAttrs.label];
|
|
234
233
|
} else {
|
|
235
234
|
return value;
|
|
236
235
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<thead ref="tableHead">
|
|
23
23
|
<tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr">
|
|
24
24
|
<th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td">
|
|
25
|
-
<input type="checkbox" @click="selectAll($event)" />
|
|
25
|
+
<input type="checkbox" @click="selectAll($event)" v-model="model.selectAll" />
|
|
26
26
|
</th>
|
|
27
27
|
<th :ref="column.fixed?(column.fixed==='left'?'headLeftThs':'headRightThs'):'headThs'" v-for="(column,colIndex) in columns"
|
|
28
28
|
v-if="column.show" class="ct-td ct-searchtable-th"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
class="ct-tr"
|
|
70
70
|
:style="row.$style">
|
|
71
71
|
<td v-if="model.isMulti" class="ct-td tdFiexd left-fixation checkbox-td" align="center">
|
|
72
|
-
<input v-if="!model.rightMulti || row[model.rightMulti] == 1" type="checkbox" v-model="row.$select" />
|
|
72
|
+
<input v-if="!model.rightMulti || row[model.rightMulti] == 1" type="checkbox" v-model="row.$select" @change="selectOne($event)" />
|
|
73
73
|
</td>
|
|
74
74
|
<td :ref="column.fixed?(column.fixed==='left'?'headLeftTds':'headRightTds'):null"
|
|
75
75
|
v-for="(column,colIndex) in model.dataFieldcolumns"
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
}
|
|
747
747
|
|
|
748
748
|
if (field.alert) {
|
|
749
|
-
self.$confirm(field.alertMsg, field.alertCaption, {
|
|
749
|
+
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
750
750
|
confirmButtonText: field.alertOKButtonText,
|
|
751
751
|
cancelButtonText: field.alertCancelButtonText,
|
|
752
752
|
//type: 'warning'
|
|
@@ -766,8 +766,12 @@
|
|
|
766
766
|
ro.$select = $ev.srcElement.checked;
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
|
+
this.model.setButtonsDisabled();
|
|
769
770
|
this.$forceUpdate();
|
|
770
771
|
},
|
|
772
|
+
selectOne($ev) {
|
|
773
|
+
this.model.setButtonsDisabled();
|
|
774
|
+
},
|
|
771
775
|
calculatingRowHeight() {
|
|
772
776
|
let self = this;
|
|
773
777
|
let count = 0;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
return self.model.value === value[self.model.optionAttrs.value];
|
|
146
146
|
});
|
|
147
147
|
if (currentOption) {
|
|
148
|
-
this.model.text = currentOption[self.model.optionAttrs.
|
|
148
|
+
this.model.text = currentOption[self.model.optionAttrs.label];
|
|
149
149
|
}
|
|
150
150
|
else {
|
|
151
151
|
this.model.text = '';
|
|
@@ -151,8 +151,7 @@
|
|
|
151
151
|
return self.model.value === value[self.model.optionAttrs.value];
|
|
152
152
|
});
|
|
153
153
|
if (currentOption) {
|
|
154
|
-
|
|
155
|
-
this.model.text =currentOption[self.model.optionAttrs.displayLabel] || currentOption[self.model.optionAttrs.label];
|
|
154
|
+
this.model.text =currentOption[self.model.optionAttrs.label];
|
|
156
155
|
}
|
|
157
156
|
else {
|
|
158
157
|
this.model.text = '';
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
class="ct-flex-div-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':'']" :disabled="model.lock" :rows="model.rows"
|
|
11
11
|
:readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit">
|
|
12
12
|
<span slot="suffix" v-if="model.unitName" class="ct-unitname">{{model.unitName}}</span>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<span class="el-input__suffix el-input--mini" v-if="showClear">
|
|
13
|
+
|
|
14
|
+
<span slot="suffix" class="el-input__suffix el-input--mini" v-if="showClear" :class="model.unitName?'ct-right-10':'ct-right-0'">
|
|
16
15
|
<span class="el-input__suffix-inner ct-close">
|
|
17
16
|
<i class="el-select__caret el-input__icon el-icon-circle-close is-show-close" @click="clearClickHandle($event)"></i>
|
|
18
17
|
</span>
|
|
19
18
|
</span>
|
|
20
|
-
|
|
19
|
+
</el-input>
|
|
20
|
+
|
|
21
21
|
<span v-if="model.sufLabel" class="spanMessage ct-flex-div-span">{{model.sufLabel}}</span>
|
|
22
22
|
<transition name="el-fade-in" class="ct-flex-div-span">
|
|
23
23
|
<span v-show="!valid" class="errorMessage ">
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
var self = this;
|
|
238
238
|
var option = this.globalOptions.find((v) => { return v[self.model.optionAttrs.value] === value });
|
|
239
239
|
if (option) {
|
|
240
|
-
return option[self.model.optionAttrs.
|
|
240
|
+
return option[self.model.optionAttrs.label];
|
|
241
241
|
} else {
|
|
242
242
|
return "";
|
|
243
243
|
}
|