centaline-data-driven-v3 0.0.60 → 0.0.61
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/dist/centaline-data-driven-v3.umd.js +56 -56
- package/package.json +1 -1
- package/src/components/web/FormList.vue +2 -1
- package/src/components/web/PhotoSelectList.vue +25 -7
- package/src/loader/src/Form.js +3 -3
- package/src/loader/src/SearchTable.js +4 -4
- package/src/main.js +1 -1
- package/src/utils/mixins.js +1 -0
- package/src/components/web/PopupGroupList.vue +0 -6
package/package.json
CHANGED
|
@@ -273,7 +273,8 @@ function saveRow(row, index, isCancel) {
|
|
|
273
273
|
if (k !== '$sourceIndex') {
|
|
274
274
|
row[k].code1 = data[k].code1;
|
|
275
275
|
row[k].code2 = data[k].code2;
|
|
276
|
-
row[k].
|
|
276
|
+
row[k].name1 = data[k].name1;
|
|
277
|
+
row[k].name2 = data[k].name2;
|
|
277
278
|
}
|
|
278
279
|
};
|
|
279
280
|
if (model.value.currentRow.isNew) {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
<div v-loading="loading" style="width: 100%;height: 100%;">
|
|
3
3
|
<div style="width: 100%;height: 100%;position: relative;" class="ct-photoSelectList" v-if="FlagPhoto">
|
|
4
4
|
<div style="padding: 10px 0 0 20px" v-if="paramName">
|
|
5
|
-
<el-select-v2 v-model="mediaLabelID" :props="optionAttrs" :options="options"
|
|
6
|
-
style="width: 150px;" @change="change"
|
|
5
|
+
<el-select-v2 v-model="mediaLabelID" :props="optionAttrs" :options="options"
|
|
6
|
+
:placeholder="common.LocalizedString('类别', '類別')" style="width: 150px;" @change="change"
|
|
7
|
+
clearable />
|
|
7
8
|
</div>
|
|
8
9
|
<el-main :style="paramName ? 'top: 40px' : 'top: 10px'"
|
|
9
10
|
style="position: absolute; bottom: 50PX;left: 10px;right: 0;padding:0px">
|
|
@@ -11,7 +12,9 @@
|
|
|
11
12
|
<template v-if="imageList.length > 0">
|
|
12
13
|
<template v-if="layout">
|
|
13
14
|
<div style="display: flex;" v-for="(item, index) in imageList" :key="index">
|
|
14
|
-
<el-
|
|
15
|
+
<el-radio v-if="selectedMode == 1" style="margin: 0 5px;height: auto;"
|
|
16
|
+
@change="chooseRadio(item)" v-model="item.ischeck" :label="true"> </el-radio>
|
|
17
|
+
<el-checkbox v-else style="margin: 0 5px;" @change="choose(item, true)"
|
|
15
18
|
v-model="item.ischeck"></el-checkbox>
|
|
16
19
|
<ct-layout :vmodel="item" :cellLayout="layout" :rowindex="index" :flagMediaSelect="true"
|
|
17
20
|
@rolRouterclick="rolRouterCellClickHandler">
|
|
@@ -53,14 +56,15 @@
|
|
|
53
56
|
</template>
|
|
54
57
|
</template>
|
|
55
58
|
<template v-else>
|
|
56
|
-
<el-empty :description="common.LocalizedString('没有数据','沒有數據')" />
|
|
59
|
+
<el-empty :description="common.LocalizedString('没有数据', '沒有數據')" />
|
|
57
60
|
</template>
|
|
58
61
|
</el-main>
|
|
59
62
|
|
|
60
63
|
<div style="width:100%;text-align:center">
|
|
61
|
-
<el-checkbox style="position:absolute;bottom:10px;left: 15px;"
|
|
62
|
-
v-model="allcheck">{{common.LocalizedString('全选','全選')}}</el-checkbox>
|
|
63
|
-
<el-button type="primary" style="position:absolute;bottom:10px;" @click="handleClick()">{{
|
|
64
|
+
<el-checkbox v-if="selectedMode != 1" style="position:absolute;bottom:10px;left: 15px;"
|
|
65
|
+
@change="allchoose" v-model="allcheck">{{ common.LocalizedString('全选', '全選') }}</el-checkbox>
|
|
66
|
+
<el-button type="primary" style="position:absolute;bottom:10px;" @click="handleClick()">{{
|
|
67
|
+
common.LocalizedString('确定', '確認') }}</el-button>
|
|
64
68
|
</div>
|
|
65
69
|
</div>
|
|
66
70
|
</div>
|
|
@@ -91,6 +95,7 @@ const allcheck = ref(false)
|
|
|
91
95
|
const options = ref([])
|
|
92
96
|
const mediaLabelID = ref('')
|
|
93
97
|
const loading = ref(true)
|
|
98
|
+
const selectedMode = ref(2)
|
|
94
99
|
const optionAttrs = {
|
|
95
100
|
label: 'name',
|
|
96
101
|
value: 'code',
|
|
@@ -121,6 +126,9 @@ function load(data) {
|
|
|
121
126
|
layout.value = data.source.content.layout;
|
|
122
127
|
paramName.value = data.source.content.paramName;
|
|
123
128
|
sourceRows = common.deepClone(data.source.content.mediaList);
|
|
129
|
+
if (data.source.content.selectedMode) {
|
|
130
|
+
selectedMode.value = data.source.content.selectedMode
|
|
131
|
+
}
|
|
124
132
|
}
|
|
125
133
|
else {
|
|
126
134
|
sourceRows = common.deepClone(data.source.content);
|
|
@@ -192,6 +200,16 @@ function choose(item, flagCheckbox) {
|
|
|
192
200
|
item.ischeck = false;
|
|
193
201
|
}
|
|
194
202
|
|
|
203
|
+
}
|
|
204
|
+
function chooseRadio(item) {
|
|
205
|
+
let chooseItem = common.deepClone(item);
|
|
206
|
+
chooseList.value = [];
|
|
207
|
+
imageList.value.forEach((v) => {
|
|
208
|
+
v.ischeck = false;
|
|
209
|
+
});
|
|
210
|
+
item.ischeck = true;
|
|
211
|
+
chooseList.value.push(chooseItem);
|
|
212
|
+
|
|
195
213
|
}
|
|
196
214
|
function allchoose() {
|
|
197
215
|
chooseList.value = [];
|
package/src/loader/src/Form.js
CHANGED
|
@@ -838,7 +838,7 @@ function requiredHandle(item, model) {
|
|
|
838
838
|
//清除关联当前组件的组件值
|
|
839
839
|
function clearRelatedHandle(field, fields) {
|
|
840
840
|
var f = fields.filter((v) => {
|
|
841
|
-
return v.parentField && v.parentField.indexOf(field.fieldName1) > -1;
|
|
841
|
+
return v.parentField && field.fieldName1 && (','+v.parentField+',').indexOf(','+field.fieldName1+',') > -1;
|
|
842
842
|
});
|
|
843
843
|
f.forEach((v) => {
|
|
844
844
|
if (v.reset) {
|
|
@@ -1098,10 +1098,10 @@ function changeHandler(field, model) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
if (field.onAfterChanged && field.controlType !== Enum.ControlType.NumericTextBox) {
|
|
1100
1100
|
var router = model.actionRouters.find((v) => {
|
|
1101
|
-
return v.
|
|
1101
|
+
return v.key === field.onAfterChanged;
|
|
1102
1102
|
});
|
|
1103
1103
|
if (router) {
|
|
1104
|
-
clickHandler(router);
|
|
1104
|
+
model.$vue.clickHandler(router);
|
|
1105
1105
|
}
|
|
1106
1106
|
else {
|
|
1107
1107
|
if (model.scripts) {
|
|
@@ -1106,7 +1106,7 @@ function doAction(response, model) {
|
|
|
1106
1106
|
model.dataDictionary = response.content;
|
|
1107
1107
|
|
|
1108
1108
|
model.source.page.rows = model.source.page.rows + response.content.length;
|
|
1109
|
-
model.setRow(
|
|
1109
|
+
model.setRow(model.listData);
|
|
1110
1110
|
if (!common.flagApp()) {
|
|
1111
1111
|
model.$vue.calculatingRowHeight();
|
|
1112
1112
|
model.$vue.emit("searchComplate");
|
|
@@ -1125,10 +1125,10 @@ function doAction(response, model) {
|
|
|
1125
1125
|
if (response.content && Array.isArray(response.content)) {
|
|
1126
1126
|
response.content.forEach((row) => {
|
|
1127
1127
|
for (var vkey in row) {
|
|
1128
|
-
model.dataDictionary[row[model.
|
|
1128
|
+
model.dataDictionary[row[model.primaryFieldName]][vkey] = row[vkey];
|
|
1129
1129
|
}
|
|
1130
1130
|
});
|
|
1131
|
-
model.setRow(
|
|
1131
|
+
model.setRow(model.listData);
|
|
1132
1132
|
}
|
|
1133
1133
|
else {
|
|
1134
1134
|
model.$vue.updateCurrentRow({ flagFreshCurrentRow: true }, { responseData: response });
|
|
@@ -1154,7 +1154,7 @@ function doAction(response, model) {
|
|
|
1154
1154
|
|
|
1155
1155
|
case Enum.ActionType.Replace: //替换
|
|
1156
1156
|
if (response.content && Array.isArray(response.content)) {
|
|
1157
|
-
delete model.dataDictionary[
|
|
1157
|
+
delete model.dataDictionary[model.listData[model.selectIndex][model.primaryFieldName]];
|
|
1158
1158
|
response.content.forEach((row) => {
|
|
1159
1159
|
model.listData.splice(model.selectIndex, 1, row);
|
|
1160
1160
|
});
|
package/src/main.js
CHANGED
|
@@ -64,7 +64,7 @@ app.use(centaline, {
|
|
|
64
64
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
65
65
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
66
66
|
//authObject: '{token:"1-7acf3f06-c2ea-471c-a5fa-07e1c2a81728"}',
|
|
67
|
-
authObject: '{EmpID:"
|
|
67
|
+
authObject: '{EmpID:"Token_0f977713-7a8d-420b-9536-967f8c8183c7",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_0f977713-7a8d-420b-9536-967f8c8183c7",Platform:"WEB"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
package/src/utils/mixins.js
CHANGED
|
@@ -125,6 +125,7 @@ function validExcuteMessage(validtemp, model) {
|
|
|
125
125
|
|
|
126
126
|
//路由操作事件
|
|
127
127
|
export function RouterClickHandler(field, submitData, action, model, source, callBack) {
|
|
128
|
+
debugger
|
|
128
129
|
if (source == 'form') {
|
|
129
130
|
model.scripts.$fd = field.id;
|
|
130
131
|
model.scripts.$result = [];
|