htui-yllkbz 1.5.38 → 1.5.40

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.5.38",
3
+ "version": "1.5.40",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -54,4 +54,4 @@
54
54
  "typescript": "~3.9.3",
55
55
  "vue-template-compiler": "^2.6.11"
56
56
  }
57
- }
57
+ }
@@ -4,21 +4,12 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-21 16:24:07
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-08-23 09:48:36
7
+ * @LastEditTime: 2024-12-20 14:54:36
8
8
  -->
9
9
  <template>
10
10
  <!-- <div>todo</div> -->
11
- <mavon-editor
12
- v-model="state.content"
13
- :subfield="subfield"
14
- default_open="{}"
15
- ref="md"
16
- @save="save"
17
- :placeholder="placeholder"
18
- :editable="!disabled"
19
- @imgAdd="addImg"
20
- @change="change"
21
- />
11
+ <mavon-editor v-model="state.content" :subfield="subfield" default_open="{}" ref="md" @save="save"
12
+ :placeholder="placeholder" :editable="!disabled" @imgAdd="addImg" @change="change" />
22
13
  </template>
23
14
  <script lang="ts">
24
15
  import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
@@ -46,6 +37,7 @@ export default class HtMd extends Vue {
46
37
  @Prop() placeholder!: string;
47
38
  /** 是否隐藏右侧预览界面 */
48
39
  @Prop() subfield!: boolean;
40
+ @Prop({ default: "file-management-service" }) proxy?: string;
49
41
  /** 数据 */
50
42
  state: State = {
51
43
  loading: false,
@@ -66,7 +58,7 @@ export default class HtMd extends Vue {
66
58
  formdata.append('file', f);
67
59
  //将下面上传接口替换为你自己的服务器接口
68
60
  _axios({
69
- url: '/files/api/filing/file/upload',
61
+ url: `/${this.proxy}/api/filing/file/upload`,
70
62
  method: 'post',
71
63
  data: formdata,
72
64
  headers: { 'Content-Type': 'multipart/form-data' },
@@ -74,7 +66,7 @@ export default class HtMd extends Vue {
74
66
  if (res.status === 200) {
75
67
  (this.$refs.md as any).$img2Url(
76
68
  e,
77
- `/files/api/filing/file/download/${res.data.fileToken}`
69
+ `/${this.proxy}/api/filing/file/download/${res.data.fileToken}`
78
70
  );
79
71
  }
80
72
  });
@@ -1,66 +1,38 @@
1
1
  <template>
2
- <el-table-column :label="item.title"
3
- :fixed="item.fixed"
4
- :align="item.align"
5
- v-if="fromColumn ? !item.hide : !item.hide && item.checked"
6
- :resizable="item.resizable===false?false:true"
7
- :header-align="item.headerAlign"
8
- :column-key="item.columnKey"
9
- :class-name="item.className"
10
- :prop="item.key"
11
- :show-overflow-tooltip="
12
- item.type === 'common' || item.type === 'org' || item.type === 'userId'
13
- ? false
14
- : item.showOverflowTooltip === false
2
+ <el-table-column :label="item.title" :fixed="item.fixed" :align="item.align"
3
+ v-if="fromColumn ? !item.hide : !item.hide && item.checked" :resizable="item.resizable === false ? false : true"
4
+ :header-align="item.headerAlign" :column-key="item.columnKey" :class-name="item.className" :prop="item.key"
5
+ :show-overflow-tooltip="item.type === 'common' || item.type === 'org' || item.type === 'userId'
6
+ ? false
7
+ : item.showOverflowTooltip === false
15
8
  ? false
16
9
  : true
17
- "
18
- :sortable="item.sortable"
19
- :sort-method="item.sortMethod"
20
- :sort-orders="item.sortOrders"
21
- :formatter="item.formatter"
22
- :sort-by="item.sortBy"
23
- :min-width="item.minWidth"
24
- :width="item.width">
10
+ " :sortable="item.sortable" :sort-method="item.sortMethod" :sort-orders="item.sortOrders"
11
+ :formatter="item.formatter" :sort-by="item.sortBy" :min-width="item.minWidth" :width="item.width">
25
12
 
26
13
  <template v-if="item.children && item.children.length">
27
- <HtTableColumn :item="child"
28
- :getAllBaseData="getAllBaseData"
29
- :getAllOrg="getAllOrg"
30
- :getAllRole="getAllRole"
31
- :getAllUser="getAllUser"
32
- v-for="(child, childindex) in item.children"
33
- @showFiles="(val) => $emit('showFiles', val)"
34
- :fromColumn="true"
35
- :key="`${child.key}_${childindex}_1`">
36
- <template :slot="child.key"
37
- slot-scope="scope">
38
- <slot :name="child.key"
39
- :row="scope.row"
40
- :column="scope.column"
41
- :rowIndex="scope.rowIndex">
14
+ <HtTableColumn :item="child" :getAllBaseData="getAllBaseData" :getAllOrg="getAllOrg" :getAllRole="getAllRole"
15
+ :getAllUser="getAllUser" v-for="(child, childindex) in item.children"
16
+ @showFiles="(val) => $emit('showFiles', val)" :fromColumn="true" :key="`${child.key}_${childindex}_1`">
17
+ <template :slot="child.key" slot-scope="scope">
18
+ <slot :name="child.key" :row="scope.row" :column="scope.column" :rowIndex="scope.rowIndex">
42
19
  </slot>
43
20
  </template>
44
21
  <!-- <template slot="title" slot-scope="{ data }">
45
22
  <slot name="title" :data="data"></slot
46
23
  ></template> -->
47
- <template slot-scope="scope"
48
- :slot="'header_' + child.key">
49
- <slot :name="'header_' + child.key"
50
- :column="scope.column"
51
- :$index="scope.$index"></slot>
24
+ <template slot-scope="scope" :slot="'header_' + child.key">
25
+ <slot :name="'header_' + child.key" :column="scope.column" :$index="scope.$index"></slot>
52
26
  </template>
53
27
  </HtTableColumn>
54
28
  </template>
55
29
  <template slot-scope="{ row, column, $index }">
56
30
 
57
- <slot :name="item.key"
58
- :row="row"
59
- :column="column"
60
- :rowIndex="$index">
31
+ <slot :name="item.key" :row="row" :column="column" :rowIndex="$index">
61
32
  <!-- 处理部门 -->
62
33
  <template v-if="item.type === 'org'">
63
- <el-tag v-if="getPropByPath(row, item.key)"> {{getAllOrg[getPropByPath(row, item.key)]?.displayName }}</el-tag>
34
+ <el-tag v-if="getPropByPath(row, item.key)"> {{ getAllOrg[getPropByPath(row, item.key)]?.displayName
35
+ }}</el-tag>
64
36
  <!-- <HtOrgInfo v-if="getPropByPath(row, item.key)"
65
37
  :org-id="getPropByPath(row, item.key)"
66
38
  type="tag"></HtOrgInfo> -->
@@ -68,28 +40,25 @@
68
40
  </template>
69
41
  <!-- 处理基础数据 -->
70
42
  <template v-else-if="item.type === 'common'">
71
- <span v-if="item.commonType === 'userId'&&getPropByPath(row, item.key)">
43
+ <span v-if="item.commonType === 'userId' && getPropByPath(row, item.key)">
72
44
  {{ getAllUser[getPropByPath(row, item.key)]?.value }}</span>
73
- <span v-else-if="item.commonType === 'departmentId'&&getPropByPath(row, item.key)">
45
+ <span v-else-if="item.commonType === 'departmentId' && getPropByPath(row, item.key)">
74
46
  {{ getAllOrg[getPropByPath(row, item.key)]?.displayName }}</span>
75
- <span v-else-if="item.commonType === 'roleId'&&getPropByPath(row, item.key)">
47
+ <span v-else-if="item.commonType === 'roleId' && getPropByPath(row, item.key)">
76
48
  {{ getAllRole[getPropByPath(row, item.key)]?.name }}</span>
77
- <span v-else-if="item.commonType === 'baseDataId'&&getPropByPath(row, item.key)">
78
- {{ getAllBaseData[getPropByPath(row, item.key)]?.name }}<span v-if="!item.hideCode">({{ getAllBaseData[getPropByPath(row, item.key)]?.value }})</span></span>
49
+ <span v-else-if="item.commonType === 'baseDataId' && getPropByPath(row, item.key)">
50
+ {{ getAllBaseData[getPropByPath(row, item.key)]?.name }}<span v-if="!item.hideCode">({{
51
+ getAllBaseData[getPropByPath(row, item.key)]?.value }})</span></span>
79
52
 
80
- <HtShowBaseData v-else-if="getPropByPath(row, item.key)&&(item.commonType === 'baseDataValue'|| item.commonType === 'baseDataName')"
81
- :hide-code="item.hideCode"
82
- :base-data-value="
83
- item.commonType === 'baseDataValue'
84
- ? getPropByPath(row, item.key)
85
- : ''
86
- "
87
- :base-data-name="
88
- item.commonType === 'baseDataName'
89
- ? getPropByPath(row, item.key)
90
- : ''
91
- "
92
- :base-data-info="true">
53
+ <HtShowBaseData
54
+ v-else-if="getPropByPath(row, item.key) && (item.commonType === 'baseDataValue' || item.commonType === 'baseDataName')"
55
+ :hide-code="item.hideCode" :base-data-value="item.commonType === 'baseDataValue'
56
+ ? getPropByPath(row, item.key)
57
+ : ''
58
+ " :base-data-name="item.commonType === 'baseDataName'
59
+ ? getPropByPath(row, item.key)
60
+ : ''
61
+ " :base-data-info="true">
93
62
  </HtShowBaseData>
94
63
 
95
64
  <span v-else>--</span>
@@ -102,24 +71,23 @@
102
71
  </template>
103
72
  <!-- 处理时间 yyyy-mm-dd HH:mm:ss -->
104
73
  <template v-else-if="item.type === 'time'">
105
- <div v-if="getPropByPath(row, item.key)"
106
- class="ht-column-cell">
74
+ <div v-if="getPropByPath(row, item.key)" class="ht-column-cell">
107
75
  <span v-if="!item.spread">
108
76
  {{
109
- getPropByPath(row, item.key)
110
- .replace('T', ' ')
111
- .slice(0, 19)
112
- }}</span>
77
+ getPropByPath(row, item.key)
78
+ .replace('T', ' ')
79
+ .slice(0, 19)
80
+ }}</span>
113
81
  <template v-else>
114
82
  <p style="color:var(--primary);margin:0;padding:0">
115
83
  {{ getPropByPath(row, item.key).slice(11, 19) }}
116
84
  </p>
117
85
  <p style="margin:0;padding:0">
118
86
  {{
119
- getPropByPath(row, item.key)
120
- .replace('T', ' ')
121
- .slice(0, 10)
122
- }}
87
+ getPropByPath(row, item.key)
88
+ .replace('T', ' ')
89
+ .slice(0, 10)
90
+ }}
123
91
  </p>
124
92
  </template>
125
93
  </div>
@@ -127,77 +95,63 @@
127
95
  </template>
128
96
  <!-- 处理日期 yyyy-mm-dd -->
129
97
  <template v-else-if="item.type === 'date'">
130
- <div v-if="getPropByPath(row, item.key)"
131
- class="ht-column-cell">
98
+ <div v-if="getPropByPath(row, item.key)" class="ht-column-cell">
132
99
  <span>
133
100
  {{
134
- getPropByPath(row, item.key)
135
- .replace('T', ' ')
136
- .slice(0, 10)
137
- }}</span>
101
+ getPropByPath(row, item.key)
102
+ .replace('T', ' ')
103
+ .slice(0, 10)
104
+ }}</span>
138
105
  </div>
139
106
  <span v-else>--</span>
140
107
  </template>
141
108
  <!-- 处理布尔值显示 -->
142
109
  <template v-else-if="item.type === 'boolean'">
143
- <el-tag :type="'success'"
144
- :size="'small'"
145
- v-if="getPropByPath(row, item.key)">是</el-tag>
146
- <el-tag type="danger"
147
- :size="'small'"
148
- v-else>否</el-tag>
110
+ <el-tag :type="'success'" :size="'small'" v-if="getPropByPath(row, item.key)">是</el-tag>
111
+ <el-tag type="danger" :size="'small'" v-else>否</el-tag>
149
112
  </template>
150
113
  <!-- 处理新资产的单位 -->
151
114
  <template v-else-if="item.type === 'unit'">
152
- <HtSelectUnit :readonly="true"
153
- :value="getPropByPath(row, item.key)"></HtSelectUnit>
115
+ <HtSelectUnit :readonly="true" :value="getPropByPath(row, item.key)"></HtSelectUnit>
154
116
  </template>
155
117
  <!-- 处理新资产的单位 -->
156
118
  <template v-else-if="item.type === 'position'">
157
- <HtSelectPosition :readonly="true"
158
- :value="getPropByPath(row, item.key)"></HtSelectPosition>
119
+ <HtSelectPosition :readonly="true" :value="getPropByPath(row, item.key)"></HtSelectPosition>
159
120
  </template>
160
121
  <!-- 处理图片显示 -->
161
122
  <template v-else-if="item.type === 'img'">
162
123
  <span v-if="getPropByPath(row, item.key)">
163
- <el-image style="width: 38px; height: 38px;margin-right:5px"
164
- :key="fileToken"
165
- v-for="fileToken in getPropByPath(row, item.key).split(',')"
166
- :src="'/files/api/filing/file/download/' + fileToken"
167
- :preview-src-list="[
168
- '/files/api/filing/file/download/' + fileToken,
169
- ]">
124
+ <el-image style="width: 38px; height: 38px;margin-right:5px" :key="fileToken"
125
+ v-for="fileToken in getPropByPath(row, item.key).split(',')"
126
+ :src="`/${proxy}/api/filing/file/download/` + fileToken" :preview-src-list="[
127
+ `/${proxy}/api/filing/file/download/` + fileToken,
128
+ ]">
170
129
  </el-image>
171
130
  </span>
172
131
  </template>
173
132
  <!-- 处理附件显示 -->
174
133
  <template v-else-if="item.type === 'file'">
175
134
  <span v-if="getPropByPath(row, item.key)">
176
- <i class="el-icon-paperclip"
177
- @click="$emit('showFiles', getPropByPath(row, item.key))"
178
- style="color:var(--primary);cursor:pointer">{{
179
- Array.isArray(getPropByPath(row, item.key))
180
- ? getPropByPath(row, item.key).length
181
- : getPropByPath(row, item.key).split(',').length
182
- }}</i>
135
+ <i class="el-icon-paperclip" @click="$emit('showFiles', getPropByPath(row, item.key))"
136
+ style="color:var(--primary);cursor:pointer">{{
137
+ Array.isArray(getPropByPath(row, item.key))
138
+ ? getPropByPath(row, item.key).length
139
+ : getPropByPath(row, item.key).split(',').length
140
+ }}</i>
183
141
  </span>
184
142
  <span v-else>--</span>
185
143
  </template>
186
144
  <!-- 其他 -->
187
- <span :style="item.style"
188
- v-else>{{
145
+ <span :style="item.style" v-else>{{
189
146
  getPropByPath(row, item.key)
190
- }}</span>
147
+ }}</span>
191
148
  </slot>
192
149
  </template>
193
150
  <!-- 处理重定义table头相关信息 header_key -->
194
- <template slot-scope="{ column, $index }"
195
- slot="header">
196
- <slot :name="'header_' + item.key"
197
- :column="column"
198
- :$index="$index">{{
151
+ <template slot-scope="{ column, $index }" slot="header">
152
+ <slot :name="'header_' + item.key" :column="column" :$index="$index">{{
199
153
  item.title
200
- }}</slot>
154
+ }}</slot>
201
155
  </template>
202
156
  </el-table-column>
203
157
  </template>
@@ -231,6 +185,7 @@ export default class Index extends Vue {
231
185
  @Prop() getAllOrg!: any;
232
186
  @Prop() getAllRole!: any;
233
187
  @Prop() getAllUser!: any;
188
+ @Prop({ default: "file-management-service" }) proxy?: string;
234
189
  /** 是否来自循环嵌套 */
235
190
  @Prop() fromColumn!: boolean;
236
191
  /** 数据 */