centaline-data-driven-v3 0.0.71 → 0.0.72
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
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
17
17
|
@click="clickHandle">{{ model.controlLabel }}</el-link>
|
|
18
18
|
<el-upload v-else-if="model.isImport" :action="model.action" :data="uploadData" :headers="headers" :multiple="false"
|
|
19
|
-
:show-file-list="false" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
|
|
19
|
+
:show-file-list="false" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
|
|
20
|
+
:before-upload="handleAvatarBeforeUpload">
|
|
20
21
|
<el-button type="primary" v-bind="model.attrs"
|
|
21
22
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
22
23
|
:disabled="model.disabled || model.locked">
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
<div>{{ model.controlLabel }}</div>
|
|
38
39
|
<div class="subText">{{ model.subText }}</div>
|
|
39
40
|
</el-button>
|
|
40
|
-
<el-button v-else type="primary" v-bind="model.attrs" @click="clickHandle"
|
|
41
|
+
<el-button v-else type="primary" :loading="model.loading" v-bind="model.attrs" @click="clickHandle"
|
|
41
42
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
42
43
|
:disabled="model.disabled || model.locked">
|
|
43
44
|
<template #icon v-if="model.icon">
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
<img :src="model.imgUrl" :height="model.buttonHeight" />
|
|
48
49
|
<div style="margin-top:5px;" class="labelText" v-html="model.controlLabel"></div>
|
|
49
50
|
</template>
|
|
50
|
-
<template v-else>
|
|
51
|
+
<template v-else :style="{display:model.loading?'inline-block':''}">
|
|
51
52
|
<img v-if="model.imgUrl" :title="model.controlLabel" :src="model.imgUrl" :height="model.buttonHeight" />
|
|
52
53
|
<span v-else v-html="model.controlLabel"></span>
|
|
53
54
|
</template>
|
|
@@ -80,14 +81,14 @@ const uploadData = computed(() => {
|
|
|
80
81
|
//因传输方式是FormData,故需要对Value是object的进行转化
|
|
81
82
|
let data = {};
|
|
82
83
|
for (var key in props.fileData) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
if (typeof props.fileData[key] === "object") {
|
|
85
|
+
data[key] = JSON.stringify(props.fileData[key]);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
data[key] = props.fileData[key];
|
|
89
|
+
}
|
|
89
90
|
}
|
|
90
|
-
data.flagHaveAlert=0;
|
|
91
|
+
data.flagHaveAlert = 0;
|
|
91
92
|
return data;
|
|
92
93
|
})
|
|
93
94
|
const headers = computed(() => {
|
|
@@ -98,20 +99,20 @@ function clickHandle() {
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
function handleAvatarBeforeUpload(file) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
if (model.value.form && model.value.form.$vue) {
|
|
103
|
+
let submitData = model.value.form.$vue.getFileData(model.value);
|
|
104
|
+
for (var key in submitData) {
|
|
105
|
+
if (typeof submitData[key] === "object") {
|
|
106
|
+
uploadData.value[key] = JSON.stringify(submitData[key]);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
uploadData.value[key] = submitData[key];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
110
112
|
}
|
|
111
|
-
}
|
|
112
113
|
}
|
|
113
114
|
function handleAvatarSuccess(res) {
|
|
114
|
-
|
|
115
|
+
emit('importComplete', res, model.value);
|
|
115
116
|
}
|
|
116
117
|
function handleAvatarError(info) {
|
|
117
118
|
ElMessage({
|
|
@@ -137,47 +138,47 @@ function commandClick(code) {
|
|
|
137
138
|
color: var(--chinaRed);
|
|
138
139
|
font-weight: 700;
|
|
139
140
|
}
|
|
141
|
+
|
|
140
142
|
/* 查询搜索 */
|
|
141
143
|
.search-btn,
|
|
142
144
|
.more-btn {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
height: 26px;
|
|
146
|
+
background: var(--chinaRed);
|
|
147
|
+
border-color: var(--chinaRed);
|
|
148
|
+
box-shadow: 0px 2px 4px 0px rgba(238, 107, 107, 0.25);
|
|
149
|
+
border-radius: 6px;
|
|
150
|
+
color: #fff;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
/* 重置按钮 更多按钮*/
|
|
152
154
|
.reset-btn {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
height: 26px;
|
|
156
|
+
background: #FFFFFF;
|
|
157
|
+
border-color: var(--chinaRed);
|
|
158
|
+
border-radius: 6px;
|
|
159
|
+
color: var(--chinaRed);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
/* 搜索按钮,重置按钮和更多按钮的hover */
|
|
161
163
|
.search-btn:hover,
|
|
162
164
|
.reset-btn:hover,
|
|
163
165
|
.more-btn:hover {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
background-color: var(--btnHoverRed);
|
|
167
|
+
border-color: var(--btnHoverRed);
|
|
168
|
+
color: #fff;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
.more-btn:hover .open,
|
|
170
172
|
.more-btn:hover .fold {
|
|
171
|
-
|
|
173
|
+
background-color: var(--btnHoverRed);
|
|
172
174
|
}
|
|
173
175
|
|
|
174
176
|
.search-btn:active,
|
|
175
177
|
.search-btn:focus,
|
|
176
178
|
.reset-btn:active.reset-btn:focus,
|
|
177
179
|
.more-btn:active.more-btn:focus {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
background-color: var(--btnFocusRed);
|
|
181
|
+
border-color: var(--btnFocusRed);
|
|
182
|
+
color: #fff;
|
|
181
183
|
}
|
|
182
|
-
|
|
183
184
|
</style>
|
package/src/loader/src/Router.js
CHANGED
package/src/main.js
CHANGED
|
@@ -21,10 +21,11 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
|
-
baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
24
|
+
//baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
25
25
|
//baseUrl: "http://10.88.22.66:6060/xian/",
|
|
26
26
|
//baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
|
|
27
|
-
|
|
27
|
+
baseUrl: "http://10.88.22.66:6060/onecard-api/",
|
|
28
|
+
|
|
28
29
|
flagRouterSelf: true,
|
|
29
30
|
flagApp: false,//是否app端
|
|
30
31
|
zindex: 999,
|
|
@@ -63,8 +64,8 @@ app.use(centaline, {
|
|
|
63
64
|
return {
|
|
64
65
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
65
66
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
66
|
-
|
|
67
|
-
authObject: '{EmpID:"Token_2e493771-28ae-485d-afea-0e6dcef23f64",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_2e493771-28ae-485d-afea-0e6dcef23f64",Platform:"WEB"}',
|
|
67
|
+
authObject: '{token:"1647-1902992017571581952",platform:"WEB"}',
|
|
68
|
+
//authObject: '{EmpID:"Token_2e493771-28ae-485d-afea-0e6dcef23f64",MachineCode:"e1f39b75-7069-4c4f-b5d5-c590da2d9aa2",SSO_Token:"SSOToken_2e493771-28ae-485d-afea-0e6dcef23f64",Platform:"WEB"}',
|
|
68
69
|
};
|
|
69
70
|
},
|
|
70
71
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/utils/mixins.js
CHANGED
|
@@ -437,7 +437,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
437
437
|
submitData = field.getActionPara(submitData).para;
|
|
438
438
|
common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
439
439
|
}
|
|
440
|
-
else if(field.isVueComponentInTab){
|
|
440
|
+
else if (field.isVueComponentInTab) {
|
|
441
441
|
submitData = field.getActionPara(submitData).para;
|
|
442
442
|
common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
443
443
|
}
|
|
@@ -665,7 +665,12 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
else {
|
|
668
|
+
field.loading = true;
|
|
669
|
+
if (!field.flagAlert && field.content) {
|
|
670
|
+
common.message( field.content, 'info',1500,true)
|
|
671
|
+
}
|
|
668
672
|
field.doBlobAction(submitData, (data, headers) => {
|
|
673
|
+
field.loading=false;
|
|
669
674
|
if (data.type == "application/json") {
|
|
670
675
|
const reader = new FileReader();
|
|
671
676
|
reader.readAsText(data, 'utf-8');
|
|
@@ -838,10 +843,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
838
843
|
}
|
|
839
844
|
else {
|
|
840
845
|
if (source == 'table') {
|
|
841
|
-
|
|
846
|
+
model.$vue.operationLoading = true
|
|
842
847
|
}
|
|
843
|
-
else{
|
|
844
|
-
|
|
848
|
+
else {
|
|
849
|
+
submitData = field.getActionPara(submitData).para;
|
|
845
850
|
}
|
|
846
851
|
field.doAction(submitData, (data) => {
|
|
847
852
|
if (source == 'table') {
|
|
@@ -928,10 +933,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
928
933
|
fun(submitData, title, model);
|
|
929
934
|
}
|
|
930
935
|
}
|
|
936
|
+
if (typeof field.onChanged !== 'undefined') {
|
|
937
|
+
common.excute.call(model.scripts, field.onChanged)
|
|
938
|
+
}
|
|
931
939
|
if (field.isSubmit && field.flagVerifyData) {
|
|
932
|
-
if (typeof field.onChanged !== 'undefined') {
|
|
933
|
-
common.excute.call(model.scripts, field.onChanged)
|
|
934
|
-
}
|
|
935
940
|
if (source == 'form' && !model.$vue.validExcute()) {
|
|
936
941
|
return;
|
|
937
942
|
}
|
|
@@ -1602,7 +1607,7 @@ export function RouterMouseenterHandler(field, submitData, action, model, source
|
|
|
1602
1607
|
cancelButtonText: '取消',
|
|
1603
1608
|
type: 'warning'
|
|
1604
1609
|
}).then(() => {
|
|
1605
|
-
|
|
1610
|
+
|
|
1606
1611
|
submitData.flagHaveAlert = '1';
|
|
1607
1612
|
field.doAction(submitData, (res) => {
|
|
1608
1613
|
if (res.rtnCode === Enum.ReturnCode.Successful) {
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
5
|
-
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/ReportMonthAttendanceList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/ReportMonthAttendanceList/getListOfSearchModel'"></ct-searchlist>
|
|
6
5
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
7
6
|
|
|
8
7
|
</div>
|