cnhis-design-vue 0.1.79-beta → 0.1.83-beta

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.
Files changed (51) hide show
  1. package/es/age/index.js +2 -2
  2. package/es/big-table/index.js +21 -21
  3. package/es/button/index.js +2 -2
  4. package/es/captcha/index.js +3 -3
  5. package/es/checkbox/index.js +1 -1
  6. package/es/color-picker/index.js +1 -1
  7. package/es/drag-layout/index.js +3 -3
  8. package/es/editor/index.js +1 -1
  9. package/es/fabric-chart/index.js +9 -9
  10. package/es/img/no-data2.0ca9388b.png +0 -0
  11. package/es/index/index.js +618 -493
  12. package/es/index/style.css +1 -1
  13. package/es/input/index.js +1 -1
  14. package/es/map/index.js +1 -1
  15. package/es/multi-chat/index.js +185 -135
  16. package/es/multi-chat/style.css +1 -1
  17. package/es/multi-chat-client/index.js +97 -66
  18. package/es/multi-chat-client/style.css +1 -1
  19. package/es/multi-chat-history/index.js +4 -4
  20. package/es/multi-chat-record/index.js +4 -4
  21. package/es/multi-chat-setting/index.js +51 -38
  22. package/es/multi-chat-setting/style.css +1 -1
  23. package/es/multi-chat-sip/index.js +1 -1
  24. package/es/radio/index.js +1 -1
  25. package/es/scale-view/index.js +100 -73
  26. package/es/scale-view/style.css +1 -1
  27. package/es/select/index.js +3 -3
  28. package/es/select-label/index.js +2 -2
  29. package/es/select-person/index.js +2 -2
  30. package/es/table-filter/index.js +228 -185
  31. package/es/table-filter/style.css +1 -1
  32. package/es/tag/index.js +1 -1
  33. package/es/utils/vexutils.js +93 -0
  34. package/es/verification-code/index.js +2 -2
  35. package/lib/cui.common.js +940 -726
  36. package/lib/cui.umd.js +940 -726
  37. package/lib/cui.umd.min.js +65 -65
  38. package/lib/img/no-data2.0ca9388b.png +0 -0
  39. package/package.json +2 -2
  40. package/packages/multi-chat/chat/chatFooter.vue +18 -5
  41. package/packages/multi-chat/chat/index.vue +2 -1
  42. package/packages/multi-chat/chat/scrollList.vue +56 -28
  43. package/packages/multi-chat/img/no-data2.png +0 -0
  44. package/packages/multi-chat/setting/baseInfo/index.vue +5 -0
  45. package/packages/scale-view/formitem/r-choice.vue +8 -1
  46. package/packages/scale-view/scaleView.vue +19 -5
  47. package/packages/table-filter/src/components/multi-select/multi-select.vue +52 -33
  48. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +6 -39
  49. package/packages/table-filter/src/mixins/wordBookutils.js +99 -0
  50. package/packages/table-filter/src/quick-search/QuickSearch.vue +6 -41
  51. package/src/utils/vexutils.js +70 -0
@@ -715,6 +715,7 @@ import multiSelect from '../components/multi-select/multi-select';
715
715
  import resize from 'vue-resize-directive';
716
716
  import { durationMixin, $utils, filterApiFn } from '../mixins/mixins';
717
717
  import vexutils from '@/utils/vexutils';
718
+ import wordBookutils from '../mixins/wordBookutils';
718
719
  import create from '@/core/create';
719
720
  export default create({
720
721
  name: "quick-search",
@@ -1114,47 +1115,11 @@ export default create({
1114
1115
  });
1115
1116
  },
1116
1117
  handleWordbookData(item, data, params) {
1117
- let { setting = {} } = item;
1118
- let { showKeys = [], defaultValue, defaultValueTitle } = setting.wordbook || {};
1119
- let defaultItem = null;
1120
- if (defaultValue && defaultValueTitle) {
1121
- defaultItem = {
1122
- myName: defaultValue,
1123
- showKeys: defaultValueTitle
1124
- };
1125
- }
1126
- if (data && data.result) {
1127
- let { page, hasNextPage } = data.map;
1128
- item.searchPageConfig = Object.assign(item.searchPageConfig, {
1129
- page,
1130
- hasNextPage,
1131
- isRequest: true,
1132
- keyword: params?.keyword || undefined
1133
- });
1134
- // 数组赋值并添加唯一name
1135
- let rows = data.map.rows.map(row => {
1136
- let showKeysStr = [];
1137
- showKeys.forEach(ren => {
1138
- let str = vexutils.stringToValue(row[ren],'change_text')
1139
- showKeysStr.push(str);
1140
- });
1141
- let name = vexutils.stringToValue(row[item.setting.wordbook.field_key],'value')
1142
- return Object.assign(row, {
1143
- myName: name,
1144
- showKeys: showKeysStr.join("")
1145
- });
1146
- });
1147
- // 数组对象去重
1148
- let obj = {};
1149
- let arr = rows.reduce((cur, next) => {
1150
- obj[next.myName] ? "" : (obj[next.myName] = true && cur.push(next));
1151
- return cur;
1152
- }, []);
1153
- if (defaultItem) {
1154
- arr.unshift(defaultItem);
1155
- }
1156
- this.$set(item, "dataSource", arr);
1157
- }
1118
+ this.$set(item, "hasFieldList", false);
1119
+ const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
1120
+ this.$set(item, "hasFieldList", hasFieldList);
1121
+ this.$set(item, "dataSource", rows);
1122
+ item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
1158
1123
  },
1159
1124
  filterChange() {},
1160
1125
  maxTagPlaceholder(item) {
@@ -698,6 +698,76 @@ XEUtils.mixin({
698
698
  }
699
699
  return item;
700
700
  },
701
+
702
+ notEmpty(text) {
703
+ return XEUtils.isBoolean(text) || String(text) === "0" || !!text;
704
+ },
705
+
706
+ /**
707
+ * 变量转换
708
+ * @param {string} str
709
+ * @param {object} obj
710
+ * @param {string | number} noval // 没有值,默认赋值
711
+ */
712
+ handleSysParams(str, obj = {}, noval = "") {
713
+ let p = {
714
+ ...obj
715
+ };
716
+ const that = this;
717
+ // 解析变量
718
+ const getValList = (plsList = [], obj = {}) => {
719
+ var l = [];
720
+ var o = obj;
721
+ plsList.forEach(v => {
722
+ let c = v;
723
+ // xx.xx
724
+ if (v.includes(".")) {
725
+ try {
726
+ // 使用 eval 解析 'result.map.map.filed'
727
+ eval(`c=o.${v}`);
728
+ } catch (error) {
729
+ c = "";
730
+ }
731
+ }
732
+ if (XEUtils.notEmpty(c)) {
733
+ l.push(c);
734
+ }
735
+ });
736
+ return l;
737
+ };
738
+ const getVal = (t, r, k) => {
739
+ return t.replace(r, function() {
740
+ var pKey = arguments[1];
741
+ // 切割
742
+ var pls = pKey.split("!");
743
+ // 取值
744
+ var l = getValList(pls, p);
745
+ var f = l.find(v => XEUtils.notEmpty(v));
746
+ var res = f;
747
+ res = XEUtils.notEmpty(res) ? res : noval;
748
+ return res;
749
+ });
750
+ };
751
+ if (typeof str === "string") {
752
+ if (str.includes("form")) {
753
+ str = getVal(str, /\${(.*?)\}/g, "form");
754
+ }
755
+ if (str.includes("sys")) {
756
+ str = getVal(str, /\${(.*?)\}/g, "sys");
757
+ }
758
+ if (str.includes("db")) {
759
+ str = getVal(str, /\${(.*?)\}/g, "db");
760
+ }
761
+ if (str.includes("table")) {
762
+ str = getVal(str, /\${(.*?)\}/g, "table");
763
+ }
764
+ if (str.includes("result")) {
765
+ str = getVal(str, /\${(.*?)\}/g, "result");
766
+ }
767
+ }
768
+ return str;
769
+ },
770
+
701
771
  });
702
772
 
703
773
  export default XEUtils;