cnhis-design-vue 2.0.6 → 2.0.9
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/CHANGELOG.md +24 -2
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +50 -46
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +58 -35
- package/es/button/style.css +1 -1
- package/es/captcha/index.js +3 -3
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +3 -3
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/fabric-chart/index.js +9 -9
- package/es/form-table/index.js +17 -17
- package/es/index/index.js +284 -257
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +24 -24
- package/es/multi-chat-client/index.js +18 -18
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +20 -20
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-view/index.js +67 -67
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +3 -3
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/table-filter/index.js +77 -54
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +365 -341
- package/lib/cui.umd.js +365 -341
- package/lib/cui.umd.min.js +17 -17
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +5 -1
- package/packages/button/src/ButtonPrint/index.vue +18 -1
- package/packages/scale-view/scaleView.vue +22 -22
package/package.json
CHANGED
|
@@ -380,7 +380,11 @@ export default create({
|
|
|
380
380
|
const list = value.map(v => {
|
|
381
381
|
const newV = {};
|
|
382
382
|
for (let i in v) {
|
|
383
|
-
|
|
383
|
+
if (typeof v[i] === 'number') {
|
|
384
|
+
newV[i] = v[i]
|
|
385
|
+
} else {
|
|
386
|
+
newV[i] = JSON.parse(JSON.stringify(v[i] || ""));
|
|
387
|
+
}
|
|
384
388
|
if (newV[i] && typeof v[i] === "string" && !newV[i].includes('security-code')) {
|
|
385
389
|
newV[i] = this.$xss(v[i]);
|
|
386
390
|
}
|
|
@@ -214,11 +214,14 @@ export default create({
|
|
|
214
214
|
timeout: 5000
|
|
215
215
|
};
|
|
216
216
|
let printUrlPrefix = this?.printConfig?.printUrlPrefix;
|
|
217
|
+
let customCofing = this?.printConfig?.customCofing || {};
|
|
218
|
+
let cCofing = this.getCustomCofing(customCofing);
|
|
217
219
|
if (axios !== this.axios && printUrlPrefix) {
|
|
218
220
|
config.baseURL = printUrlPrefix;
|
|
219
221
|
}
|
|
220
222
|
httpFn = axios.create({
|
|
221
|
-
...config
|
|
223
|
+
...config,
|
|
224
|
+
...cCofing
|
|
222
225
|
});
|
|
223
226
|
const formatListResult = await this.queryFormatList();
|
|
224
227
|
if (this.versionType == 1 || this.versionType == 3) {
|
|
@@ -637,6 +640,20 @@ export default create({
|
|
|
637
640
|
},
|
|
638
641
|
callLocalServicesErrorCb(res) {
|
|
639
642
|
this.$emit('error', res);
|
|
643
|
+
},
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* 获取 axios 自定义配置
|
|
647
|
+
*/
|
|
648
|
+
getCustomCofing(customCofing){
|
|
649
|
+
let cCofing = {}
|
|
650
|
+
let type = typeof customCofing;
|
|
651
|
+
if(type === 'function'){
|
|
652
|
+
cCofing = customCofing();
|
|
653
|
+
} else if(type === 'object'){
|
|
654
|
+
cCofing = customCofing;
|
|
655
|
+
}
|
|
656
|
+
return cCofing;
|
|
640
657
|
}
|
|
641
658
|
}
|
|
642
659
|
});
|
|
@@ -1770,6 +1770,7 @@ export default create({
|
|
|
1770
1770
|
if (!Object.keys(tempObj).length) return {};
|
|
1771
1771
|
for (let key in tempObj) {
|
|
1772
1772
|
let itemTemp = this.formArray.find(item => this.formKey(item) == key);
|
|
1773
|
+
let curValue = tempObj[key];
|
|
1773
1774
|
if (key && itemTemp) {
|
|
1774
1775
|
let keyTemp;
|
|
1775
1776
|
if (itemTemp && itemTemp.databaseTitle) keyTemp = itemTemp.databaseTitle;
|
|
@@ -1778,40 +1779,39 @@ export default create({
|
|
|
1778
1779
|
itemTemp &&
|
|
1779
1780
|
itemTemp.setting &&
|
|
1780
1781
|
itemTemp.setting.startToStop != 1 &&
|
|
1781
|
-
|
|
1782
|
+
curValue &&
|
|
1782
1783
|
itemTemp.type == "DATETIME"
|
|
1783
1784
|
) {
|
|
1784
|
-
if (itemTemp.setting && itemTemp.setting.dateType == "time" &&
|
|
1785
|
-
|
|
1786
|
-
if (itemTemp.setting && itemTemp.setting.dateType == "date" &&
|
|
1787
|
-
|
|
1788
|
-
moment(
|
|
1785
|
+
if (itemTemp.setting && itemTemp.setting.dateType == "time" && curValue)
|
|
1786
|
+
curValue = moment().format("YYYY-MM-DD ") + curValue;
|
|
1787
|
+
if (itemTemp.setting && itemTemp.setting.dateType == "date" && curValue)
|
|
1788
|
+
curValue =
|
|
1789
|
+
moment(curValue).format("YYYY-MM-DD ") + moment().format("HH:mm:ss");
|
|
1789
1790
|
}
|
|
1790
|
-
if (key.includes("~-~")) {
|
|
1791
|
-
let newKey = keyTemp ? keyTemp.replace(/~-~/g, ".") : key.replace(/~-~/g, ".");
|
|
1792
|
-
res[newKey] = tempObj[key];
|
|
1793
|
-
} else {
|
|
1794
|
-
res[keyTemp || key] = !tempObj[key] ? null : tempObj[key];
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
1791
|
|
|
1798
1792
|
// 处理choice选项 将key替换为value
|
|
1799
1793
|
let isChoice = ["RADIO_BLOCK", "CHECKBOX_BLOCK"].includes(itemTemp.type);
|
|
1800
1794
|
if (isChoice) {
|
|
1801
1795
|
let { options } = itemTemp;
|
|
1802
|
-
let
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
if (itemTemp.type === "RADIO_BLOCK" && value) {
|
|
1806
|
-
res[useKey] = this.handleChoiceItem(value, options, obj);
|
|
1796
|
+
let obj = this.choiceComObj[key];
|
|
1797
|
+
if (itemTemp.type === "RADIO_BLOCK" && curValue) {
|
|
1798
|
+
curValue = this.handleChoiceItem(curValue, options, obj);
|
|
1807
1799
|
}
|
|
1808
|
-
if (itemTemp.type === "CHECKBOX_BLOCK" &&
|
|
1809
|
-
let resArr = this.handleCheckboxParams(
|
|
1810
|
-
|
|
1800
|
+
if (itemTemp.type === "CHECKBOX_BLOCK" && curValue?.length) {
|
|
1801
|
+
let resArr = this.handleCheckboxParams(curValue, options, obj);
|
|
1802
|
+
curValue = resArr;
|
|
1811
1803
|
}
|
|
1812
1804
|
}
|
|
1805
|
+
|
|
1806
|
+
if (key.includes("~-~")) {
|
|
1807
|
+
let newKey = keyTemp ? keyTemp.replace(/~-~/g, ".") : key.replace(/~-~/g, ".");
|
|
1808
|
+
res[newKey] = curValue;
|
|
1809
|
+
} else {
|
|
1810
|
+
res[keyTemp || key] = !curValue ? null : curValue;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
1813
|
} else {
|
|
1814
|
-
res[key] =
|
|
1814
|
+
res[key] = curValue;
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
1817
|
console.log("res", res);
|