cnhis-design-vue 0.2.19-beta → 0.2.23-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "0.2.19-beta",
3
+ "version": "0.2.23-beta",
4
4
  "description": "基于 Ant Desgin Vue 的UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -353,6 +353,10 @@ export default create({
353
353
  },
354
354
  isScanMultiTable() {
355
355
  return this.columnConfig?.isScanMultiTable
356
+ },
357
+ tableNoSetting(){
358
+ let { noSetting } = this.getOtherConfigInit() || {};
359
+ return noSetting || this.showSettings?.hideSettingBtn == 1;
356
360
  }
357
361
  },
358
362
  watch: {
@@ -2145,6 +2149,7 @@ export default create({
2145
2149
  if (!imageArr || !imageArr.length) return curSrc;
2146
2150
  let matchItem = imageArr.find(item => item.type === type);
2147
2151
  if (!matchItem) return curSrc;
2152
+ if(matchItem.suffix) return curSrc + matchItem.suffix
2148
2153
  let h = matchItem.h;
2149
2154
  let w = matchItem.w;
2150
2155
  if (matchItem.h === 'adaptive' && matchItem.w != 'adaptive') {
@@ -2864,10 +2869,6 @@ export default create({
2864
2869
  const config = tableOptions?.config || {};
2865
2870
  return config || undefined;
2866
2871
  },
2867
- tableNoSetting(){
2868
- let { noSetting } = this.getOtherConfigInit() || {};
2869
- return noSetting || this.showSettings?.hideSettingBtn == 1;
2870
- },
2871
2872
  // 单选
2872
2873
  radioOnChange(rowData = {}) {
2873
2874
  let { data, row, $rowIndex } = rowData;
@@ -189,6 +189,7 @@ body {
189
189
  .vxe-header--column .vxe-cell--title {
190
190
  height: 100%;
191
191
  line-height: unset;
192
+ width: 100%;
192
193
  }
193
194
  }
194
195
  .vxe-table--footer-wrapper.body--wrapper,
@@ -219,6 +220,10 @@ body {
219
220
  /deep/ .filter-box {
220
221
  display: flex;
221
222
  align-items: center;
223
+ width: 100%;
224
+ .text-over-tooltip-components {
225
+ max-width: calc(100% - 20px);
226
+ }
222
227
  .vxe-filter--btn {
223
228
  border-top-color: #c0c4cc;
224
229
  border-right-color: #c0c4cc;
@@ -89,7 +89,7 @@ export default {
89
89
  <style lang="less" scoped>
90
90
  .text-over-tooltip-components {
91
91
  display: inline-block;
92
- max-width: 100%;
92
+ max-width: 98%;
93
93
  /* 文字超出宽度显示省略号 单行 */
94
94
  .ellipsis {
95
95
  font-size: 14px;
@@ -131,7 +131,7 @@
131
131
  </a-tabs>
132
132
  <div v-if="isNormalStyle" class="footer-operate">
133
133
  <!-- 状态切换 -->
134
- <UserStatus v-if="hideHeader" type="left-bottom" />
134
+ <UserStatus v-if="hideHeader" placement="topCenter" />
135
135
  <div class="footer-operate-right">
136
136
  <span v-if="showSetting" class="setting-span">
137
137
  <svg-icon icon-class="a-xitongtubiaoliaotianshezhi" @click="handleSetting" />
@@ -18,7 +18,7 @@
18
18
  <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
19
19
  <img v-else :src="getImg(status)" height="16" />
20
20
  {{ statusDesc }}
21
- <a-icon type="down" />
21
+ <a-icon type="up" />
22
22
  </div>
23
23
  <a-menu slot="overlay">
24
24
  <a-menu-item v-for="{ title, status, description, icon } in statusList" :key="status" @click="handleStatusChange(status)">
@@ -27,11 +27,11 @@ export default {
27
27
  },
28
28
 
29
29
  computed: {
30
+ questionScore() {
31
+ return this.item?.questionScore;
32
+ },
30
33
  answerSuccess() {
31
- let { questionScore } = this.item;
32
- // let { questionScore, maxScore } = this.item?.scoreConfigs || {};
33
- // if (questionScore && questionScore == maxScore) return true;
34
- return questionScore > 0;
34
+ return this.questionScore > 0;
35
35
  },
36
36
  answerIcon() {
37
37
  return this.answerSuccess ? "xitongtubiaodui" : "xitongtubiaocuo";
@@ -0,0 +1,129 @@
1
+ <template>
2
+ <div class="edit-content">
3
+ <!-- disable -->
4
+ <div v-if="!itemList" class="label-disable-wrap">
5
+ <p class="label-disable-title">无可选标签</p>
6
+ <p class="label-disable-desc">请联系管理员进行标签管理设置</p>
7
+ </div>
8
+ <!-- -->
9
+ <div v-else class="label-content">
10
+ <a-checkable-tag
11
+ v-for="item in itemList"
12
+ v-model="item.isSelect"
13
+ @change="handleLabelChange($event, item, classifyItem)"
14
+ :key="item.labelId"
15
+ :style="handleLabelColor(item)"
16
+ :class="{ 'sys-label-tag': item.isPublic && item.isPublic == 1 }"
17
+ >
18
+ <a-tooltip placement="topLeft">
19
+ <template slot="title">
20
+ <span>{{ item.labelName }}</span>
21
+ </template>
22
+ {{ item.labelName }}
23
+ </a-tooltip>
24
+
25
+ <template v-if="sourceType != 'guage'">
26
+ <a-icon class="label-close" v-show="!(item.isPublic && item.isPublic == 1)" type="close" @click.native.stop="handleDelLabel(item, classifyItem)" />
27
+ </template>
28
+ </a-checkable-tag>
29
+ <template v-if="classifyItem.allowCreateByPersonal == 1 ">
30
+ <a-button v-if="isEdit && !classifyItem.isNoAdd && sourceType != 'guage'" type="dashed" class="label-add" v-show="!classifyItem.showAdd" @click="handleAddLabel($event, classifyItem)">
31
+ <a-icon type="plus" />
32
+ <!-- {{ $t("1.1.2") }} -->
33
+ 标签
34
+ </a-button>
35
+ <!-- 是否允许新增个人标签 allowCreateByPersonal -->
36
+ <a-input v-if="isEdit && !classifyItem.isNoAdd && sourceType != 'guage'" class="label-add add-input" v-model.trim="classifyItem.addVal" v-show="classifyItem.showAdd" @blur="hanldeBlur($event, classifyItem)">
37
+ <a-icon slot="suffix" type="close" @click.native.stop="clearaddVal($event, classifyItem)" />
38
+ </a-input>
39
+ </template>
40
+ </div>
41
+ </div>
42
+ </template>
43
+
44
+ <script>
45
+ import { Tooltip, Icon, Button, Input, Tag, Tabs, Anchor } from 'ant-design-vue';
46
+ import create from '@/core/create';
47
+ export default create({
48
+ name: 'label-classify',
49
+ data() {
50
+ return {};
51
+ },
52
+ props: {
53
+ classifyItem:{
54
+ type: Object,
55
+ default:()=>({})
56
+ },
57
+
58
+ handleLabelChange: {
59
+ type: Function,
60
+ default: ()=>{}
61
+ },
62
+ handleLabelColor: {
63
+ type: Function,
64
+ default: ()=>{}
65
+ },
66
+ handleDelLabel: {
67
+ type: Function,
68
+ default: ()=>{}
69
+ },
70
+ handleAddLabel : {
71
+ type: Function,
72
+ default: ()=>{}
73
+ },
74
+ hanldeBlur: {
75
+ type: Function,
76
+ default: ()=>{}
77
+ },
78
+ clearaddVal: {
79
+ type: Function,
80
+ default: ()=>{}
81
+ },
82
+ isEdit:{
83
+ type: Boolean,
84
+ default: false
85
+ },
86
+ sourceType: String,
87
+
88
+ },
89
+ computed: {
90
+ itemList(){
91
+ return this?.classifyItem?.itemList || [];
92
+ }
93
+ },
94
+ watch: {},
95
+ beforeCreate() {},
96
+ created() {},
97
+ beforeMount() {},
98
+ mounted() {},
99
+ beforeUpdate() {},
100
+ updated() {},
101
+ beforeDestroy() {},
102
+ destroyed() {},
103
+ activated() {},
104
+ methods: {},
105
+ components: {
106
+ [Input.name]: Input,
107
+ [Icon.name]: Icon,
108
+ [Tabs.name]: Tabs,
109
+ [Tabs.TabPane.name]: Tabs.TabPane,
110
+ [Anchor.name]: Anchor,
111
+ [Anchor.Link.name]: Anchor.Link,
112
+ [Tooltip.name]: Tooltip,
113
+ [Button.name]: Button,
114
+ [Tag.name]: Tag,
115
+ [Tag.CheckableTag.name]: Tag.CheckableTag
116
+ },
117
+ });
118
+ </script>
119
+
120
+ <style lang="less" scoped>
121
+ .label-disable-wrap {
122
+ text-align: center;
123
+ }
124
+ .label-content {
125
+ /deep/ .ant-tag {
126
+ border: 1px solid #f1f1f1;
127
+ }
128
+ }
129
+ </style>