htui-yllkbz 2.0.2 → 2.0.4

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": "2.0.2",
3
+ "version": "2.0.4",
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
+ }
package/src/App.vue CHANGED
@@ -8,13 +8,14 @@
8
8
  -->
9
9
  <template>
10
10
  <div id="app">
11
- <HtButtonText @click="handelClick">编辑</HtButtonText>
11
+ <!-- 111 -->
12
+ <!-- <HtButtonText @click="handelClick">编辑</HtButtonText>
12
13
 
13
14
  <HtButtonText type='delete'>编辑</HtButtonText>
14
15
  <HtSelectUser :isTag="true"
15
16
  v-model="state.value"
16
17
  :readonly="true">
17
- </HtSelectUser>
18
+ </HtSelectUser> -->
18
19
  <!-- <iframe
19
20
  id="mainFrame"
20
21
  name="mainFrame"
@@ -81,11 +82,15 @@
81
82
  v-model="state.value"
82
83
  data-type-id="SeverityLevel"
83
84
  ></ht-select-base-data> -->
84
- <ht-select-base-data :onlyParent="true"
85
- v-model="state.value"
86
- :dataTypeId="'TextList'"></ht-select-base-data>
87
- <ht-select-base-data :parentId="state.value"
88
- :dataTypeId="'TextList'"></ht-select-base-data>
85
+ <!-- <ht-select-base-data
86
+ :onlyParent="true"
87
+ v-model="state.value"
88
+ :dataTypeId="'TextList'"
89
+ ></ht-select-base-data>
90
+ <ht-select-base-data
91
+ :parentId="state.value"
92
+ :dataTypeId="'TextList'"
93
+ ></ht-select-base-data> -->
89
94
 
90
95
  <router-view></router-view>
91
96
  </div>
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2022-09-28 10:24:08
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2025-03-31 15:29:34
7
+ * @LastEditTime: 2025-03-31 16:12:14
8
8
  -->
9
9
  <template>
10
10
  <el-button :loading="loading"
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 15:47:47
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2025-02-10 14:30:46
7
+ * @LastEditTime: 2025-03-31 16:23:07
8
8
  -->
9
9
 
10
10
  <template>
@@ -43,12 +43,12 @@
43
43
  :base-data-id="!byCode ? value : undefined"
44
44
  :base-data-value="byCode ? value : undefined"
45
45
  :base-data-info="true"
46
- com-style="font-size:12px"
47
- style="font-size:12px">
46
+ com-style="font-size:var(--font-size-content)"
47
+ style="font-size:var(--font-size-content)">
48
48
  </HtShowBaseData>
49
49
 
50
50
  <!-- <div is='common-datas-info-id'
51
- com-style="font-size:12px"
51
+ com-style="font-size:var(--font-size-content)"
52
52
  v-if="this.value"
53
53
  :hide-code="hideCode"
54
54
  :base-data-id='this.value'
@@ -0,0 +1,13 @@
1
+ /*
2
+ * @Descripttion:markdown 编辑器
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-11-15 15:00:57
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2021-12-21 16:24:26
8
+ */
9
+ import HtSelectDevice from "./index.vue";
10
+ (HtSelectDevice as any).install = function (Vue: any) {
11
+ Vue.component("HtSelectDevice", HtSelectDevice);
12
+ };
13
+ export default HtSelectDevice;
@@ -0,0 +1,81 @@
1
+ <!--
2
+ * @Descripttion:markdown编辑器
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-12-21 16:24:07
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2024-12-20 14:54:36
8
+ -->
9
+ <template>
10
+ <asset-select-assets-plus
11
+ :multiple="true"
12
+ :asset-type="'2'"
13
+ title="添加运维设备"
14
+ @callback="changeAsset"
15
+ >
16
+ <slot></slot>
17
+ </asset-select-assets-plus>
18
+ </template>
19
+ <script lang="ts">
20
+ import { Component, Prop, Vue, Watch } from "vue-property-decorator";
21
+ import mavonEditor from "mavon-editor";
22
+ import "mavon-editor/dist/css/index.css";
23
+ import { _axios } from "vue-kst-auth";
24
+
25
+ Vue.use(mavonEditor);
26
+ interface State {
27
+ /** 数据状态 */
28
+ loading: boolean;
29
+ content: string;
30
+ }
31
+ @Component({
32
+ name: "HtSelectDevice",
33
+ components: {},
34
+ })
35
+ export default class HtMd extends Vue {
36
+ /** 是否加载图片的回调 callBackImg*/
37
+ @Prop() changImg!: boolean;
38
+ /** 是否禁用 */
39
+ @Prop() disabled!: boolean;
40
+ /** v-model处理数据 */
41
+ @Prop() value!: string;
42
+ /** placeholder */
43
+ @Prop() placeholder!: string;
44
+ /** 是否隐藏右侧预览界面 */
45
+ @Prop() subfield!: boolean;
46
+ @Prop({ default: "file-management-service" }) proxy?: string;
47
+ /** 数据 */
48
+ state: State = {
49
+ loading: false,
50
+ content: "",
51
+ };
52
+ /** 生命周期 */
53
+ created() {
54
+ this.state.content = this.value;
55
+ }
56
+ /** 方法 */
57
+ changeAsset(data: any) {
58
+ console.log(data);
59
+ }
60
+ /** 实时改变 */
61
+ change(e: string, text: string) {
62
+ this.$emit("input", e);
63
+ this.$emit("change", e, text);
64
+ //
65
+ }
66
+ /** 保存数据 */
67
+ save(e: string, text: string) {
68
+ this.$emit("save", e, text);
69
+ }
70
+
71
+ /** 监听 */
72
+ @Watch("value", { deep: true })
73
+ onContent(val: string) {
74
+ this.state.content = val;
75
+ }
76
+ /** 计算属性 */
77
+ }
78
+ </script>
79
+ <style lang="scss">
80
+ @import url("/publicData/styles/theme/index.css");
81
+ </style>
@@ -16,33 +16,53 @@
16
16
  -->
17
17
  <template>
18
18
  <div>
19
- <el-upload class="ht-upload" v-if="!disabled" style="width:368px;height:108px" :show-file-list="false"
20
- :disabled="disabled" :on-success="onSuccess" :before-upload="beforeUpload" drag
21
- :action="`/${proxy}/api/filing/file/upload`" multiple>
19
+ <el-upload class="ht-upload"
20
+ v-if="!disabled"
21
+ style="width:368px;height:108px"
22
+ :show-file-list="false"
23
+ :disabled="disabled"
24
+ :on-success="onSuccess"
25
+ :before-upload="beforeUpload"
26
+ drag
27
+ :action="`/${proxy}/api/filing/file/upload`"
28
+ multiple>
22
29
  <!-- <i class="el-icon-upload"></i> -->
23
- <div style="margin-top:8px;font-size:12px;color:#999" class="el-upload__text">
30
+ <div style="margin-top:8px;font-size:var(--font-size-content);color:#999"
31
+ class="el-upload__text">
24
32
  拖动文件到此处,或<br /><em>点击上传</em>
25
33
  </div>
26
34
  <!-- <div class="el-upload__tip"
27
35
  slot="tip">只能上传jpg/png文件,且不超过5M</div> -->
28
36
  </el-upload>
29
37
  <ul class="ht-ul-upload">
30
- <li :key="item.fileToken" v-for="(item, index) in state.filesInfo">
31
- <a @click="downLoadFile(item)"><i class="le-icon el-icon-document" style="margin-right:7px"></i>{{ item.fileName
38
+ <li :key="item.fileToken"
39
+ v-for="(item, index) in state.filesInfo">
40
+ <a @click="downLoadFile(item)"><i class="le-icon el-icon-document"
41
+ style="margin-right:7px"></i>{{ item.fileName
32
42
  }}</a>
33
43
  <span>
34
- <i v-if="!disabled" class="el-icon el-icon-circle-check"></i>
35
- <i v-if="!disabled" class="el-icon el-icon-close" @click="delItem(item, index)" title="删除"></i>
36
- <i class="el-icon el-icon-download" style="margin-right:24px" @click="downLoadFile(item)" title="下载"></i>
44
+ <i v-if="!disabled"
45
+ class="el-icon el-icon-circle-check"></i>
46
+ <i v-if="!disabled"
47
+ class="el-icon el-icon-close"
48
+ @click="delItem(item, index)"
49
+ title="删除"></i>
50
+ <i class="el-icon el-icon-download"
51
+ style="margin-right:24px"
52
+ @click="downLoadFile(item)"
53
+ title="下载"></i>
37
54
  </span>
38
55
  </li>
39
56
  </ul>
40
- <a :href="state.fileSrc" target="_blank" v-show="false" ref="download1"></a>
57
+ <a :href="state.fileSrc"
58
+ target="_blank"
59
+ v-show="false"
60
+ ref="download1"></a>
41
61
  </div>
42
62
  </template>
43
63
  <script lang="ts">
44
- import { _axios } from 'vue-kst-auth';
45
- import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
64
+ import { _axios } from "vue-kst-auth";
65
+ import { Component, Prop, Vue, Watch } from "vue-property-decorator";
46
66
  interface State {
47
67
  /** 数据状态 */
48
68
  loading: boolean;
@@ -67,7 +87,7 @@ interface CreateAttachmentDto {
67
87
  sortNum?: number;
68
88
  }
69
89
  @Component({
70
- name: 'HtUploadFiles',
90
+ name: "HtUploadFiles",
71
91
  })
72
92
  export default class HtUploadFiles extends Vue {
73
93
  @Prop() value!: string | string[];
@@ -83,7 +103,7 @@ export default class HtUploadFiles extends Vue {
83
103
  /** 数据 */
84
104
  state: State = {
85
105
  loading: false,
86
- fileSrc: '',
106
+ fileSrc: "",
87
107
  fileToken: [],
88
108
  filesInfo: [],
89
109
  dialogVisible: false,
@@ -98,11 +118,11 @@ export default class HtUploadFiles extends Vue {
98
118
  /** 附件上传之前的判断 */
99
119
  beforeUpload(file: File) {
100
120
  const isLt10MB = file.size / 1024 / 1024 < 5;
101
- const arr = ['jpg', 'png', 'xlsx', 'lsx', 'doc', 'pdf'];
102
- const lastArr = file.name.split('.');
121
+ const arr = ["jpg", "png", "xlsx", "lsx", "doc", "pdf"];
122
+ const lastArr = file.name.split(".");
103
123
  const type = lastArr[lastArr.length - 1];
104
124
  if (!isLt10MB) {
105
- this.$message.error('大小不能超过 5MB!');
125
+ this.$message.error("大小不能超过 5MB!");
106
126
  }
107
127
  if (arr.includes(type)) {
108
128
  return true;
@@ -162,33 +182,33 @@ export default class HtUploadFiles extends Vue {
162
182
  get fileList() {
163
183
  return [];
164
184
  }
165
- @Watch('state.filesInfo')
185
+ @Watch("state.filesInfo")
166
186
  onFileToken(val: CreateAttachmentDto[], old: string) {
167
187
  if (!this.readonly && !this.isArray) {
168
188
  const arr: string[] = [];
169
189
  val.forEach((item) => {
170
190
  if (item.fileToken) arr.push(item.fileToken);
171
191
  });
172
- this.$emit('input', arr.toString());
173
- this.$emit('change', arr.toString());
192
+ this.$emit("input", arr.toString());
193
+ this.$emit("change", arr.toString());
174
194
  }
175
195
  if (this.isArray) {
176
- this.$emit('change', val);
196
+ this.$emit("change", val);
177
197
  }
178
198
  }
179
- @Watch('filesInfo', { immediate: true })
199
+ @Watch("filesInfo", { immediate: true })
180
200
  onArrValue(val: CreateAttachmentDto[]) {
181
201
  if (this.isArray) {
182
202
  this.state.filesInfo = val || [];
183
203
  }
184
204
  }
185
- @Watch('value', { immediate: true })
205
+ @Watch("value", { immediate: true })
186
206
  onValue(val: string | string[]) {
187
207
  if (val && !this.isArray) {
188
208
  if (Array.isArray(val)) {
189
209
  this.state.fileToken = val;
190
210
  } else {
191
- this.state.fileToken = val.split(',');
211
+ this.state.fileToken = val.split(",");
192
212
  }
193
213
 
194
214
  this.getAllFileInfo();
@@ -44,6 +44,7 @@ import HtPopover from './HtPopover'
44
44
  import HtTimeLine from './HtTimeLine'
45
45
  import HtTimeLineItem from './HtTimeLineItem'
46
46
  import HtRealTime from './HtRealTime'
47
+ import HtSelectDevice from './HtSelectDevice'
47
48
  // import HtOffice from './HtOffice'
48
49
 
49
50
 
@@ -52,7 +53,7 @@ import HtRealTime from './HtRealTime'
52
53
 
53
54
 
54
55
  // 存储组件列表
55
- const components = [HtRealTime,HtButtonText, HtDialog,HtRow, HtTimeLineItem, HtCol, HtTimeLine, HtBread, HtPopover, HtModel, HtMenu, HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
56
+ const components = [HtSelectDevice, HtRealTime, HtButtonText, HtDialog, HtRow, HtTimeLineItem, HtCol, HtTimeLine, HtBread, HtPopover, HtModel, HtMenu, HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
56
57
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
57
58
  const install = function (Vue: any) {
58
59
  // 判断是否安装
@@ -68,9 +69,9 @@ export default {
68
69
  // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
69
70
  install,
70
71
  // 以下是具体的组件列表
71
- HtRow,HtButtonText, HtCol, HtRealTime, HtModel, HtBread, HtPopover,
72
+ HtRow, HtButtonText, HtCol, HtRealTime, HtModel, HtBread, HtPopover,
72
73
  HtSelectTable, HtSelectPosition, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtMore,
73
74
  HtSelectUnit, HtSelectCategory, HtMenu,
74
- HtSelectBaseData, HtSelectOrg,HtDialog, HtTimeLine, HtTimeLineItem, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData, HtDrawer, HtSelectCron, HtSelectTimeSlot
75
+ HtSelectBaseData, HtSelectOrg, HtDialog, HtTimeLine, HtTimeLineItem, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData, HtDrawer, HtSelectCron, HtSelectTimeSlot
75
76
  }
76
77