centaline-data-driven 1.1.37 → 1.1.38
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/build/centaline/centaline.path.js +1 -0
- package/package.json +1 -1
- package/src/centaline/dynamicCb/index.js +11 -0
- package/src/centaline/dynamicCb/src/dynamicCb.vue +72 -0
- package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +1 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +5 -2
- package/src/centaline/dynamicTree/src/dynamicTree.vue +5 -1
- package/src/centaline/dynamicTree/src/dynamicTreeList.vue +9 -11
- package/src/centaline/loader/src/ctl/Cb.js +27 -0
- package/src/centaline/loader/src/ctl/Tree.js +1 -4
- package/src/centaline/loader/src/ctl/lib/Enum.js +5 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +5 -0
- package/wwwroot/static/centaline/centaline-data-driven.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -35,6 +35,7 @@ const paths = {
|
|
|
35
35
|
"dynamicDetail": "./src/centaline/dynamicDetail/index.js",//详情页控件
|
|
36
36
|
"dynamicTree": "./src/centaline/dynamicTree/index.js",//树组件
|
|
37
37
|
"dynamicSensitiveEye": "./src/centaline/dynamicSensitiveEye/index.js",////敏感数据小眼睛控
|
|
38
|
+
"dynamicCb": "./src/centaline/dynamicCb/index.js",////复选框
|
|
38
39
|
"progress": "./src/centaline/progress/index.js",//进度条
|
|
39
40
|
},
|
|
40
41
|
"plugs": {
|
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="field-top">
|
|
3
|
+
<div v-if="model !== null" class="ct-checkbox">
|
|
4
|
+
<div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
|
|
5
|
+
<div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
|
|
6
|
+
{{model.label}}
|
|
7
|
+
</div>
|
|
8
|
+
<div class="ct-radios">
|
|
9
|
+
<el-checkbox v-model="model.value" :disabled="model.lock" @change="changeCheckBoxHandler"></el-checkbox>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<transition name="el-fade-in">
|
|
13
|
+
<span v-show="!valid" class="errorMessage">
|
|
14
|
+
{{validMessage}}
|
|
15
|
+
</span>
|
|
16
|
+
</transition>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
<script>
|
|
21
|
+
import dynamicElement from '../../mixins/dynamicElement';
|
|
22
|
+
export default {
|
|
23
|
+
name: 'ct-cb',
|
|
24
|
+
mixins: [dynamicElement],
|
|
25
|
+
props: {
|
|
26
|
+
vmodel: Object,
|
|
27
|
+
api: String
|
|
28
|
+
},
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
mounted() {
|
|
35
|
+
var self = this;
|
|
36
|
+
this.$nextTick(function () {
|
|
37
|
+
|
|
38
|
+
if (self.vmodel) {
|
|
39
|
+
self.load(self.vmodel);
|
|
40
|
+
self.$emit('loaded');
|
|
41
|
+
}
|
|
42
|
+
else if (typeof self.source !== 'undefined') {
|
|
43
|
+
self.loaderObj.Seg(self.source, (data) => {
|
|
44
|
+
self.load(data);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
load(data) {
|
|
51
|
+
this.model = data;
|
|
52
|
+
},
|
|
53
|
+
changeCheckBoxHandler: function (event) {
|
|
54
|
+
this.changeHandler();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
<style>
|
|
60
|
+
.ct-checkbox {
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
.ct-checkbox .ct-radios {
|
|
65
|
+
color: #606266;
|
|
66
|
+
/* border-radius: 4px; */
|
|
67
|
+
/* border: 1px solid #dcdfe6; */
|
|
68
|
+
padding-left: 15px;
|
|
69
|
+
padding-bottom: 3px;
|
|
70
|
+
padding-top: 3px;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -761,8 +761,11 @@
|
|
|
761
761
|
}
|
|
762
762
|
//执行客户端脚本
|
|
763
763
|
else {
|
|
764
|
-
let parm={submitData:submitData,field:field}
|
|
765
|
-
self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
764
|
+
// let parm={submitData:submitData,field:field}
|
|
765
|
+
// self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
766
|
+
let title=field.pageTitle==undefined ?field.label:field.pageTitle;
|
|
767
|
+
var fun =self.$common.getDataDrivenOpts().handler[action];
|
|
768
|
+
fun(submitData,title,self.model);
|
|
766
769
|
// var fun = self.model.scripts.formData[action];
|
|
767
770
|
// fun(submitData,field);
|
|
768
771
|
}
|
|
@@ -89,7 +89,11 @@
|
|
|
89
89
|
if (self.LastClickNode != data) {
|
|
90
90
|
self.LastClickNode = data;
|
|
91
91
|
var rowRouter = self.model.rowSelectRouter;
|
|
92
|
-
|
|
92
|
+
var SearchData = {};
|
|
93
|
+
rowRouter.submitFormField.forEach(v => {
|
|
94
|
+
SearchData[v] = data[v];
|
|
95
|
+
})
|
|
96
|
+
this.model.getCurrentRowApiData(rowRouter.action, SearchData, function (rowdata) {
|
|
93
97
|
var newdata = self.$common.deepClone(data);
|
|
94
98
|
newdata.rowRouter = rowdata
|
|
95
99
|
self.$emit('loaded', newdata);
|
|
@@ -27,17 +27,14 @@
|
|
|
27
27
|
props: {
|
|
28
28
|
vmodel: Object,
|
|
29
29
|
searchConditionApi: String,
|
|
30
|
-
searchDataApi: String
|
|
31
|
-
apiParam: {
|
|
32
|
-
type: Object,
|
|
33
|
-
default: () => { }
|
|
34
|
-
}
|
|
30
|
+
searchDataApi: String
|
|
35
31
|
},
|
|
36
32
|
data() {
|
|
37
33
|
return {
|
|
38
34
|
searchTableConditionApi: "",
|
|
39
35
|
searchTableDataApi: "",
|
|
40
|
-
isShowSearchlist: false
|
|
36
|
+
isShowSearchlist: false,
|
|
37
|
+
apiParam: {}
|
|
41
38
|
};
|
|
42
39
|
},
|
|
43
40
|
methods: {
|
|
@@ -51,7 +48,8 @@
|
|
|
51
48
|
delete defaultPara.rowRouter;
|
|
52
49
|
delete defaultPara.getLayoutOfSearch;
|
|
53
50
|
delete defaultPara.getList;
|
|
54
|
-
|
|
51
|
+
|
|
52
|
+
self.apiParam = defaultPara;
|
|
55
53
|
self.$nextTick(() => {
|
|
56
54
|
self.isShowSearchlist = true;
|
|
57
55
|
});
|
|
@@ -69,8 +67,8 @@
|
|
|
69
67
|
#app-Tree .el-main {
|
|
70
68
|
padding: 0 0px 0px 10px;
|
|
71
69
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
|
|
71
|
+
#app-Tree .el-main .ct-table-content {
|
|
72
|
+
padding: 0 0 0 15px;
|
|
73
|
+
}
|
|
76
74
|
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
import valid from '../../../validate/index';
|
|
4
|
+
import Axios from 'axios';
|
|
5
|
+
const Cb = function (source, callBack) {
|
|
6
|
+
var self = this;
|
|
7
|
+
var init = function (data) {
|
|
8
|
+
var rtn = {
|
|
9
|
+
get value() {
|
|
10
|
+
return data.code1 === "1";
|
|
11
|
+
},
|
|
12
|
+
set value(v) {
|
|
13
|
+
if (v) {
|
|
14
|
+
data.code1 = "1";
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
data.code1 = "0";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
rtn = base.copy(Base(data), rtn);
|
|
22
|
+
return rtn;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return init(source);
|
|
26
|
+
}
|
|
27
|
+
export default Cb;
|
|
@@ -101,12 +101,9 @@ const tree = function (source, callBack, searchModel, defaultSearchData, resolve
|
|
|
101
101
|
getCurrentRowApiData(api, searchModel, callback) {
|
|
102
102
|
var self = this;
|
|
103
103
|
var para = searchModel ? searchModel : {};
|
|
104
|
-
|
|
105
104
|
Vue.prototype.$api.postHandler(common.globalUri(), {
|
|
106
105
|
action: api,
|
|
107
|
-
para:
|
|
108
|
-
paramDataQuery: para
|
|
109
|
-
}
|
|
106
|
+
para: para
|
|
110
107
|
})
|
|
111
108
|
.then(function (response) {
|
|
112
109
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
@@ -28,6 +28,7 @@ import File from '../File';
|
|
|
28
28
|
import HyperLink from '../HyperLink';
|
|
29
29
|
import PlaceHolder from '../PlaceHolder';
|
|
30
30
|
import SensitiveEye from '../SensitiveEye';
|
|
31
|
+
import Cb from '../Cb';
|
|
31
32
|
|
|
32
33
|
const LibFunction = {
|
|
33
34
|
install(Vue) {
|
|
@@ -294,6 +295,10 @@ const LibFunction = {
|
|
|
294
295
|
item = SensitiveEye(field);
|
|
295
296
|
item.is = 'ct-sensitiveeye';
|
|
296
297
|
break;
|
|
298
|
+
case Enum.ControlType.CheckBox://复选框
|
|
299
|
+
item = Cb(field);
|
|
300
|
+
item.is = 'ct-cb';
|
|
301
|
+
break;
|
|
297
302
|
default:
|
|
298
303
|
item = L(field);
|
|
299
304
|
item.is = 'ct-labelText';
|