bri-components 1.1.2 → 1.1.3

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 (80) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/10.bri-components.min.js +1 -0
  4. package/lib/2.bri-components.min.js +1 -1
  5. package/lib/3.bri-components.min.js +1 -1
  6. package/lib/4.bri-components.min.js +1 -1
  7. package/lib/5.bri-components.min.js +1 -1
  8. package/lib/6.bri-components.min.js +1 -1
  9. package/lib/7.bri-components.min.js +1 -1
  10. package/lib/8.bri-components.min.js +1 -1
  11. package/lib/9.bri-components.min.js +1 -1
  12. package/lib/bri-components.min.js +6 -6
  13. package/package.json +1 -1
  14. package/src/components/controls/base/DshCascader.vue +14 -11
  15. package/src/components/controls/base/DshCascaderMultiple.vue +13 -4
  16. package/src/components/controls/base/DshCheckbox.vue +16 -19
  17. package/src/components/controls/base/DshCoordinates.vue +9 -8
  18. package/src/components/controls/base/DshDate.vue +24 -37
  19. package/src/components/controls/base/DshDaterange.vue +3 -1
  20. package/src/components/controls/base/DshEditor.vue +72 -59
  21. package/src/components/controls/base/DshInput.vue +66 -59
  22. package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +1 -1
  23. package/src/components/controls/base/DshNumber/DshNumber.vue +50 -48
  24. package/src/components/controls/base/DshNumberange.vue +11 -21
  25. package/src/components/controls/base/DshSelect.vue +12 -16
  26. package/src/components/controls/base/YSerialNumber.vue +10 -3
  27. package/src/components/controls/base/ZUpload/index.vue +16 -12
  28. package/src/components/controls/base/ZUpload/upload-list.vue +20 -13
  29. package/src/components/controls/base/ZUpload/uploadMixin.js +5 -1
  30. package/src/components/controls/base/textMultiple/DshTextMultiple.vue +13 -5
  31. package/src/components/controls/base/textMultiple/MultipleInput.vue +5 -5
  32. package/src/components/controls/controlMap.js +6 -4
  33. package/src/components/controls/controlMixin.js +36 -26
  34. package/src/components/controls/controlShow.vue +44 -0
  35. package/src/components/controls/{base → senior}/BriLabels.vue +7 -12
  36. package/src/components/controls/{base → senior}/DshPackage.vue +6 -25
  37. package/src/components/controls/senior/cascaderTable.vue +52 -51
  38. package/src/components/controls/senior/flatTable.vue +20 -17
  39. package/src/components/controls/{base → special}/DshBack.vue +4 -4
  40. package/src/components/controls/{base → special}/DshUndeveloped.vue +3 -1
  41. package/src/components/form/DshAdvSearchForm.vue +10 -1
  42. package/src/components/form/DshForm.vue +10 -3
  43. package/src/components/list/BriFlatTable.vue +5 -5
  44. package/src/components/list/BriTable.vue +6 -8
  45. package/src/components/list/DshBox/DshCard.vue +2 -2
  46. package/src/components/list/DshBox/DshCrossTable.vue +4 -8
  47. package/src/components/list/DshCascaderTable.vue +1 -1
  48. package/src/components/small/DshControlDefine.vue +1 -1
  49. package/src/components/small/DshModal.vue +0 -134
  50. package/src/components/unit/DshFormItem.vue +7 -10
  51. package/src/components/unit/DshUnit.vue +1 -11
  52. package/src/components/unit/unitMixin.js +8 -5
  53. package/src/index.js +5 -10
  54. package/src/styles/common/control.less +49 -12
  55. package/src/styles/components/controls/BriLabels.less +4 -2
  56. package/src/styles/components/controls/DshCheckbox.less +45 -42
  57. package/src/styles/components/controls/DshCoordinates.less +24 -27
  58. package/src/styles/components/controls/DshDate.less +1 -52
  59. package/src/styles/components/controls/DshEditor.less +51 -34
  60. package/src/styles/components/controls/DshInput.less +13 -34
  61. package/src/styles/components/controls/DshNumber.less +33 -0
  62. package/src/styles/components/controls/DshNumberange.less +8 -3
  63. package/src/styles/components/controls/DshSelect.less +78 -92
  64. package/src/styles/components/controls/ZUpload.less +1 -2
  65. package/src/styles/components/controls/cascaderTable.less +10 -24
  66. package/src/styles/components/controls/controlShow.less +3 -1
  67. package/src/styles/components/controls/flatTable.less +10 -23
  68. package/src/styles/components/form/DshAdvSearchForm.less +0 -9
  69. package/src/styles/components/form/DshDefaultSearch.less +0 -20
  70. package/src/styles/components/index.less +2 -1
  71. package/src/styles/components/other/InfoCascader.less +4 -4
  72. package/src/styles/components/small/DshControlDefine.less +4 -7
  73. package/src/styles/components/small/DshDropdown.less +1 -0
  74. package/src/styles/components/small/DshModal.less +207 -0
  75. package/src/styles/components/unit/DshFormItem.less +2 -0
  76. package/src/styles/reset.less +14 -0
  77. package/src/utils/table.js +3 -3
  78. package/src/components/controls/base/DshLabels.vue +0 -309
  79. package/src/components/controls/base/controlShow.vue +0 -52
  80. package/src/styles/components/controls/DshLabels.less +0 -187
@@ -3,10 +3,9 @@
3
3
  <Input
4
4
  class="DshTextMultiple-control"
5
5
  v-model="text"
6
- :placeholder="$showPlaceholder(canEdit, propsObj) ? `请输入${propsObj._name}` : ''"
6
+ :placeholder="selfPropsObj._placeholder"
7
7
  :type="'text'"
8
- :readonly="!canEdit"
9
- :disabled="propsObj.canEdit === false"
8
+ :disabled="!finalCanEdit"
10
9
  :clearable="true"
11
10
  :size="propsObj._size"
12
11
  />
@@ -30,7 +29,9 @@
30
29
 
31
30
  export default {
32
31
  name: "DshTextMultiple",
33
- mixins: [controlMixin],
32
+ mixins: [
33
+ controlMixin
34
+ ],
34
35
  props: {},
35
36
  data () {
36
37
  return {
@@ -51,7 +52,14 @@
51
52
  }
52
53
  };
53
54
  },
54
- computed: {},
55
+ computed: {
56
+ selfPropsObj () {
57
+ return {
58
+ ...this.propsObj,
59
+ ...this.commonDealPropsObj
60
+ };
61
+ }
62
+ },
55
63
  created () {},
56
64
  methods: {
57
65
  createTag () {
@@ -2,7 +2,7 @@
2
2
  <div class="MutipleInput">
3
3
  <Input
4
4
  v-show="status === 'edit'"
5
- v-model="curVal"
5
+ v-model="curInputVal"
6
6
  icon="ios-search"
7
7
  :placeholder="selfPropsObj._placeholder"
8
8
  @on-enter="clickConfirm"
@@ -55,7 +55,7 @@
55
55
  data () {
56
56
  return {
57
57
  status: "edit", // show
58
- curVal: "",
58
+ curInputVal: "",
59
59
  curIndex: -1
60
60
  };
61
61
  },
@@ -72,7 +72,7 @@
72
72
  },
73
73
  methods: {
74
74
  clickConfirm () {
75
- let val = this.curVal.trim();
75
+ let val = this.curInputVal.trim();
76
76
  if (val && !this.value[this.controlKey].includes(val)) {
77
77
  // 有值,且不存在于当前数组中
78
78
  if (this.curIndex < 0) {
@@ -81,12 +81,12 @@
81
81
  this.$set(this.value[this.controlKey], this.curIndex, val);
82
82
  }
83
83
  }
84
- this.curVal = "";
84
+ this.curInputVal = "";
85
85
  this.status = "show";
86
86
  this.change();
87
87
  },
88
88
  clickEdit (val, index) {
89
- this.curVal = val;
89
+ this.curInputVal = val;
90
90
  this.curIndex = index;
91
91
  this.status = "edit";
92
92
  },
@@ -33,6 +33,7 @@ const componentNameMap = {
33
33
  coordinates: "DshCoordinates",
34
34
  editor: "DshEditor",
35
35
  tag: "DshDivider",
36
+
36
37
  labels: "BriLabels",
37
38
  package: "DshPackage",
38
39
  flatTable: "flatTable",
@@ -62,13 +63,14 @@ const pathMap = {
62
63
  DshCoordinates: "./base/DshCoordinates.vue",
63
64
  DshEditor: "./base/DshEditor.vue",
64
65
  DshDivider: "./base/DshDivider.vue",
65
- BriLabels: "./base/BriLabels.vue",
66
- DshPackage: "./base/DshPackage.vue",
66
+
67
+ BriLabels: "./senior/BriLabels.vue",
68
+ DshPackage: "./senior/DshPackage.vue",
67
69
  flatTable: "./senior/flatTable.vue",
68
70
  cascaderTable: "./senior/cascaderTable",
69
71
 
70
- DshBack: "./base/DshBack.vue",
71
- DshUndeveloped: "./base/DshUndeveloped.vue"
72
+ DshBack: "./special/DshBack.vue",
73
+ DshUndeveloped: "./special/DshUndeveloped.vue"
72
74
  }
73
75
  };
74
76
 
@@ -1,5 +1,14 @@
1
+ import controlShow from "./controlShow.vue";
2
+
1
3
  export default {
4
+ components: {
5
+ controlShow
6
+ },
2
7
  props: {
8
+ canEdit: {
9
+ type: Boolean,
10
+ default: true
11
+ },
3
12
  value: {
4
13
  type: Object,
5
14
  default () {
@@ -13,16 +22,15 @@ export default {
13
22
  }
14
23
  },
15
24
 
16
- /* 表单形式用到的 */
17
- canEdit: {
18
- type: Boolean,
19
- default: true
20
- },
21
- /* 列表形式用到的 */
22
- isUnit: {
23
- type: Boolean,
24
- default: false
25
+ /* 表单形式下用到的 */
26
+ // 暂时是dshDate里在用,时间对比时需要用其他时间字段
27
+ allFormList: {
28
+ type: Array,
29
+ default () {
30
+ return [];
31
+ }
25
32
  },
33
+ /* 列表形式下用到的 */
26
34
  parentData: {
27
35
  type: Array,
28
36
  default () {
@@ -40,20 +48,26 @@ export default {
40
48
  curVal () {
41
49
  return this.value[this.controlKey];
42
50
  },
51
+ emptyShowVal () {
52
+ return this.isUnitShow ? "-" : "暂无内容";
53
+ },
43
54
  showText () {
44
- return this.curVal || (this.isUnit ? "-" : "暂无内容");
55
+ return this.curVal || this.emptyShowVal;
45
56
  },
46
57
 
58
+ isUnitShow () {
59
+ return !this.canEdit && this.inTable;
60
+ },
47
61
  finalCanEdit () {
48
- return this.$canEdit(this.canEdit, this.propsObj);
62
+ return this.canEdit && (this.propsObj.canEdit == undefined ? true : this.propsObj.canEdit);
49
63
  },
50
64
  commonDealPropsObj () {
51
65
  const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
52
66
  return {
53
67
  // TODO: 此处的请输入可能还有请选择之类的,待处理
54
- _placeholder: this.$showPlaceholder(this.canEdit, this.propsObj)
68
+ _placeholder: this.canEdit && this.propsObj._enterType !== "calculate"
55
69
  ? (this.propsObj._placeholder || `请${selectControlTypes.includes(this.propsObj._type) ? "选择" : "输入"}${this.propsObj._name}`)
56
- : "",
70
+ : undefined,
57
71
  _clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable)
58
72
  };
59
73
  },
@@ -61,14 +75,19 @@ export default {
61
75
  return {
62
76
  "dsh-ellipsis": true,
63
77
  "control-edit": this.finalCanEdit,
64
- "control-disabled": this.$isDisabled(this.canEdit, this.propsObj),
65
- // "control-readonly": this.$isReadonly(this.canEdit, this.propsObj),
78
+ "control-disabled": !this.finalCanEdit,
66
79
  "control-show": !this.canEdit,
67
80
  "control-notext": !this.curVal
68
81
  };
69
82
  },
70
83
 
71
84
  // 部分控件或部分条件下 才使用的属性
85
+ inTable () {
86
+ return !!this.propsObj.inTable;
87
+ },
88
+ isShare () {
89
+ return !!this.propsObj.isShare;
90
+ },
72
91
  compKey () {
73
92
  return this.propsObj.compKey;
74
93
  },
@@ -77,23 +96,14 @@ export default {
77
96
  },
78
97
  entityKey () {
79
98
  return this.propsObj.entityKey;
80
- },
81
- inTable () {
82
- return !!this.propsObj.inTable;
83
- },
84
- stopModInit () {
85
- return this.inTable;
86
- },
87
- isShare () {
88
- return !!this.propsObj.isShare;
89
99
  }
90
100
  },
91
101
  methods: {
92
102
  change (...params) {
93
- this.$emit("change", this.value[this.propsObj._key]);
103
+ this.$emit("change", this.curVal);
94
104
  },
95
105
  refChange (...params) {
96
- this.$emit("refChange", this.value[this.propsObj._key]);
106
+ this.$emit("refChange", this.curVal);
97
107
  }
98
108
  }
99
109
  };
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <div class="controlShow">
3
+ <Ctooltip
4
+ :content="showVal"
5
+ maxWidth="200"
6
+ :transfer="true"
7
+ >
8
+ <div
9
+ v-if="!$isEmptyData(showVal)"
10
+ class="controlShow-val"
11
+ >
12
+ {{ showVal }}
13
+ </div>
14
+
15
+ <div
16
+ v-else
17
+ class="controlShow-nodata"
18
+ >
19
+ {{ emptyShowVal }}
20
+ </div>
21
+ </Ctooltip>
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ export default {
27
+ name: "controlShow",
28
+ props: {
29
+ showVal: String,
30
+ emptyShowVal: {
31
+ type: String,
32
+ default () {
33
+ return "-";
34
+ }
35
+ }
36
+ },
37
+ data () {
38
+ return {};
39
+ },
40
+ computed: {},
41
+ created () {},
42
+ methods: {}
43
+ };
44
+ </script>
@@ -34,6 +34,7 @@
34
34
  :type="inputIcon"
35
35
  />
36
36
  </div>
37
+
37
38
  <template #list>
38
39
  <DropdownMenu>
39
40
  <DropdownItem
@@ -82,7 +83,10 @@
82
83
  </Input>
83
84
  </div>
84
85
  </DropdownItem>
85
- <div class="BriLabels-dropdown-btnWrap">
86
+ <div
87
+ class="BriLabels-dropdown-btnWrap"
88
+ v-if="!selfPropsObj._onlySelect"
89
+ >
86
90
  <bri-button
87
91
  class="BriLabels-dropdown-add"
88
92
  :propsObj="{
@@ -97,6 +101,7 @@
97
101
  </DropdownMenu>
98
102
  </template>
99
103
  </Dropdown>
104
+
100
105
  <!-- 查看 -->
101
106
  <div
102
107
  v-else
@@ -126,12 +131,7 @@
126
131
  v-else
127
132
  class="BriLabels-view-nodata"
128
133
  >
129
- <template v-if="isUnit">
130
- -
131
- </template>
132
- <template v-else>
133
- 暂无内容
134
- </template>
134
+ {{ emptyShowVal }}
135
135
  </div>
136
136
  </div>
137
137
  </div>
@@ -158,9 +158,6 @@
158
158
  ...this.commonDealPropsObj
159
159
  };
160
160
  },
161
- modKey () {
162
- return this.propsObj.modKey;
163
- },
164
161
  val: {
165
162
  get () {
166
163
  return this.value[this.propsObj._key] || [];
@@ -189,8 +186,6 @@
189
186
  params: {
190
187
  search: {
191
188
  entityKey: this.entityKey, // 当前工作表关联的数据表Key
192
- modKey: this.modKey,
193
- name: this.curVal,
194
189
  fieldKey: this.selfPropsObj._key === "_default" ? this.value._key : (this.selfPropsObj.__realKey__ || this.selfPropsObj._key), // 当前字段Key
195
190
  labelType: this.selfPropsObj._labelType
196
191
  },
@@ -33,41 +33,22 @@
33
33
  v-else
34
34
  class="DshPackage-nodata"
35
35
  >
36
- <template v-if="isUnit">
37
- -
38
- </template>
39
- <template v-else>
40
- 暂无内容
41
- </template>
36
+ {{ emptyShowVal }}
42
37
  </div>
43
38
  </div>
44
39
  </div>
45
40
  </template>
41
+
46
42
  <script>
47
43
  import controlMixin from "../controlMixin.js";
48
44
 
49
45
  export default {
50
46
  name: "DshPackage",
51
- mixins: [controlMixin],
47
+ mixins: [
48
+ controlMixin
49
+ ],
52
50
  components: {},
53
- props: {
54
- canEdit: {
55
- type: Boolean,
56
- default: true
57
- },
58
- formData: {
59
- type: Object,
60
- default () {
61
- return {};
62
- }
63
- },
64
- formList: {
65
- type: Array,
66
- default () {
67
- return [];
68
- }
69
- }
70
- },
51
+ props: {},
71
52
  data () {
72
53
  return {};
73
54
  },
@@ -1,11 +1,8 @@
1
1
  <template>
2
- <div
3
- class="cascaderTable"
4
- :id="`cascaderTable${controlKey}`"
5
- >
6
- <!-- 表格查看 -->
2
+ <div class="cascaderTable">
3
+ <!-- 在表格内的查看 -->
7
4
  <span
8
- v-if="isUnit"
5
+ v-if="isUnitShow"
9
6
  class="cascaderTable-unit"
10
7
  >
11
8
  <dsh-icons :list="$getOperationList(['link'])"></dsh-icons>
@@ -15,7 +12,7 @@
15
12
  </span>
16
13
 
17
14
  <template v-else>
18
- <!-- 配置端默认模式-->
15
+ <!-- 配置端 设置默认值用-->
19
16
  <dsh-btn-modal v-if="propsObj._key === '_default'">
20
17
  <dsh-cascader-table
21
18
  :canEdit="finalCanEdit"
@@ -27,17 +24,17 @@
27
24
  ></dsh-cascader-table>
28
25
  </dsh-btn-modal>
29
26
 
27
+ <!-- 正常使用 -->
30
28
  <template v-else>
31
29
  <!-- 操作按钮 -->
32
30
  <dsh-buttons
33
31
  class="cascaderTable-btns"
34
32
  itemClass="cascaderTable-btns-item"
35
- :list="$getOperationList(operationFieldList)"
33
+ :list="$getOperationList(operationBtns)"
36
34
  @click="$dispatchEvent($event)"
37
35
  ></dsh-buttons>
38
36
 
39
37
  <dsh-cascader-table
40
- v-if="value[controlKey]"
41
38
  useCol
42
39
  :canEdit="finalCanEdit"
43
40
  :treeColumns="treeColumns"
@@ -47,6 +44,7 @@
47
44
  @change="change"
48
45
  ></dsh-cascader-table>
49
46
 
47
+ <!-- 全屏查看 -->
50
48
  <dsh-modal
51
49
  v-model="isEnlarge"
52
50
  mode="custom"
@@ -73,11 +71,15 @@
73
71
 
74
72
  export default {
75
73
  name: "cascaderTable",
76
- mixins: [controlMixin],
74
+ mixins: [
75
+ controlMixin
76
+ ],
77
77
  components: {},
78
78
  props: {},
79
79
  data () {
80
80
  return {
81
+ isEnlarge: false,
82
+ timer: null,
81
83
  operationMap: {
82
84
  canExport: {
83
85
  name: "导出",
@@ -85,7 +87,7 @@
85
87
  icon: "md-share-alt",
86
88
  size: "small",
87
89
  btnType: "text",
88
- event: "openExportModal"
90
+ event: "clickExport"
89
91
  },
90
92
  canEnlarge: {
91
93
  name: "全屏展示",
@@ -93,17 +95,29 @@
93
95
  icon: "md-expand",
94
96
  size: "small",
95
97
  btnType: "text",
96
- event: "enlarge"
98
+ event: "clickEnlarge"
97
99
  },
98
100
  link: {
99
101
  customIcon: "bico-Cascadetable"
100
102
  }
101
- },
102
- isEnlarge: false,
103
- timer: null
103
+ }
104
104
  };
105
105
  },
106
106
  computed: {
107
+ treeColumns () {
108
+ return this.value[this.controlKey] && this.value[this.controlKey]._treeForm
109
+ ? this.value[this.controlKey]._treeForm
110
+ : this.propsObj._treeForm;
111
+ },
112
+ subColumns () {
113
+ return this.propsObj._subForm;
114
+ },
115
+
116
+ operationBtns () {
117
+ return this.propsObj._isExport
118
+ ? ["canExport", "canEnlarge"]
119
+ : ["canEnlarge"];
120
+ },
107
121
  modalPropsObj () {
108
122
  return {
109
123
  title: this.propsObj._name,
@@ -111,56 +125,44 @@
111
125
  showSlotClose: false,
112
126
  closable: true
113
127
  };
114
- },
115
- operationFieldList () {
116
- return this.propsObj._isExport ? ["canExport", "canEnlarge"] : ["canEnlarge"];
117
- },
118
- treeColumns () {
119
- return this.value[this.controlKey]._treeForm
120
- ? this.value[this.controlKey]._treeForm
121
- : this.propsObj._treeForm;
122
- },
123
- subColumns () {
124
- return this.propsObj._subForm;
125
128
  }
126
129
  },
127
130
  created () {},
128
131
  methods: {
132
+ // 点击导出
133
+ clickExport (operationItem) {
134
+ operationItem.disabled = true;
135
+ this.handleExport(operationItem);
136
+ },
137
+ // 打开全屏模态框
138
+ clickEnlarge () {
139
+ this.isEnlarge = true;
140
+ },
129
141
  // 发生变动
130
142
  change (...params) {
131
143
  this.$emit("change", ...params);
132
144
  },
133
145
 
134
- // 导出点击
135
- openExportModal (operationItem) {
136
- operationItem.disabled = true;
146
+ // 接口 -导出级联表
147
+ handleExport (operationItem) {
137
148
  this.$https({
138
149
  url: {
139
150
  module: "sheet",
140
- name: "exportCascaderTableExcel",
141
- params: {
142
- modKey: this.modKey
143
- }
151
+ name: "exportCascaderTableExcel"
144
152
  },
145
153
  params: {
146
154
  _key: this.controlKey,
147
155
  _id: this.value._id
148
156
  },
149
157
  callback: data => {
150
- setTimeout(() => {
151
- operationItem.disabled = false;
152
- }, 500);
153
- this.timer = setInterval(this.getTransitStatus(data.jobId, data.excel_url), 1000);
158
+ this.timer = setInterval(() => {
159
+ this.getJobStatusData(operationItem, data.jobId, data.excel_url);
160
+ }, 1000);
154
161
  }
155
162
  });
156
163
  },
157
- getTransitStatus (id, url) {
158
- let that = this;
159
- return function () {
160
- that.getJobStatus(id, url);
161
- };
162
- },
163
- getJobStatus (id, url) {
164
+ // 接口 -
165
+ getJobStatusData (operationItem, id, url) {
164
166
  this.$https({
165
167
  url: {
166
168
  module: "sheet",
@@ -170,24 +172,23 @@
170
172
  jobId: id
171
173
  },
172
174
  callback: data => {
175
+ operationItem.disabled = false;
176
+
173
177
  if (data.status === "completed") {
174
178
  clearInterval(this.timer);
175
179
  window.location.href = data.url;
176
180
  } else if (data.status === "failed") {
177
181
  clearInterval(this.timer);
178
- // this.exportBtnLoading = false;
179
- this.$Message.info({ content: "操作失败,请稍后再试" });
182
+ this.$Message.info({
183
+ content: "操作失败,请稍后再试"
184
+ });
180
185
  }
181
186
  },
182
187
  error: data => {
188
+ operationItem.disabled = false;
183
189
  this.timer = null;
184
190
  }
185
191
  });
186
- },
187
-
188
- // 打开全屏模态框
189
- enlarge () {
190
- this.isEnlarge = true;
191
192
  }
192
193
  }
193
194
  };
@@ -1,17 +1,20 @@
1
1
  <template>
2
2
  <div class="flatTable">
3
+ <!-- 在表格内的查看 -->
3
4
  <span
4
- v-if="isUnit"
5
+ v-if="isUnitShow"
5
6
  class="flatTable-unit"
6
7
  >
7
- <dsh-icons :list="$getOperationList(['link'])"></dsh-icons>
8
+ <dsh-icons :list="[{
9
+ customIcon: 'bico-internaltable'
10
+ }]"></dsh-icons>
8
11
  <span class="flatTable-unit-text">
9
12
  {{ val.list.length }}行
10
13
  </span>
11
14
  </span>
12
15
 
13
16
  <template v-else>
14
- <!-- 设置默认值所用的控件 -->
17
+ <!-- 配置端 设置默认值用-->
15
18
  <dsh-btn-modal v-if="propsObj._key === '_default'">
16
19
  <bri-flat-table
17
20
  :canEdit="finalCanEdit"
@@ -24,8 +27,9 @@
24
27
  ></bri-flat-table>
25
28
  </dsh-btn-modal>
26
29
 
27
- <!-- 操作按钮 -->
30
+ <!-- 正常使用 -->
28
31
  <template v-else>
32
+ <!-- 操作按钮 -->
29
33
  <dsh-buttons
30
34
  class="flatTable-btns"
31
35
  itemClass="flatTable-btns-item"
@@ -45,6 +49,7 @@
45
49
  @change="change"
46
50
  ></bri-flat-table>
47
51
 
52
+ <!-- 全屏查看 -->
48
53
  <dsh-modal
49
54
  v-model="isEnlarge"
50
55
  mode="custom"
@@ -89,24 +94,13 @@
89
94
  size: "small",
90
95
  btnType: "text",
91
96
  event: "enlarge"
92
- },
93
- link: {
94
- customIcon: "bico-internaltable"
95
97
  }
96
98
  }
97
99
  };
98
100
  },
99
101
  computed: {
100
- modalPropsObj () {
101
- return {
102
- title: this.propsObj._name,
103
- fullscreen: true,
104
- showSlotClose: false,
105
- closable: true
106
- };
107
- },
108
102
  val () {
109
- // TODOS: 待定处理
103
+ // TODO: 待定处理
110
104
  return this.value[this.controlKey] || {
111
105
  list: [],
112
106
  oldList: [],
@@ -115,6 +109,15 @@
115
109
  },
116
110
  columns () {
117
111
  return this.propsObj._subForm;
112
+ },
113
+
114
+ modalPropsObj () {
115
+ return {
116
+ title: this.propsObj._name,
117
+ fullscreen: true,
118
+ showSlotClose: false,
119
+ closable: true
120
+ };
118
121
  }
119
122
  },
120
123
  created () {},
@@ -123,11 +126,11 @@
123
126
  validate () {
124
127
  return this.$refs.dshFatTable.validate();
125
128
  },
129
+
126
130
  // 打开全屏模态框
127
131
  enlarge () {
128
132
  this.isEnlarge = true;
129
133
  },
130
-
131
134
  change (...params) {
132
135
  this.$emit("change", ...params);
133
136
  }