cloud-web-corejs 1.0.54-dev.511 → 1.0.54-dev.513

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.511",
4
+ "version": "1.0.54-dev.513",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -25,7 +25,7 @@
25
25
  "copy-webpack-plugin": "5.1.2",
26
26
  "core-js": "^3.8.3",
27
27
  "dayjs": "^1.11.13",
28
- "dhtmlx-gantt": "^7.1.13",
28
+ "dhtmlx-gantt": "^9.1.0",
29
29
  "element-ui": "^2.15.14",
30
30
  "esdk-obs-browserjs": "^3.25.6",
31
31
  "html2canvas": "^1.4.1",
@@ -125,6 +125,7 @@
125
125
  "src/components/baseInputNumber",
126
126
  "src/components/baseInputPrint",
127
127
  "src/components/baseTabs",
128
+ "src/components/base-textarea",
128
129
  "src/components/cnPrint",
129
130
  "src/components/code-editor",
130
131
  "src/components/confirmDialog",
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <div class="bt-input">
3
+ <el-input v-bind="$attrs" v-on="$listeners" type="textarea">
4
+ ></el-input>
5
+ <el-tooltip effect="dark" placement="top" :disabled="!$attrs.value">
6
+ <div slot="content" v-html="handleNewlines($attrs.value)"></div>
7
+ <el-link icon="el-icon-question" @click="openDialog" :disabled="$attrs.disabled || $attrs.readonly" v-if="showIcon">
8
+ </el-link>
9
+ </el-tooltip>
10
+ <el-dialog
11
+ :title="title || $t1('内容')"
12
+ :append-to-body="true"
13
+ :modal-append-to-body="true"
14
+ :close-on-click-modal="false"
15
+ v-if="showDialog"
16
+ :visible.sync="showDialog"
17
+ :modal="false"
18
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
19
+ width="1200px"
20
+ v-el-drag-dialog
21
+ v-el-dialog-center
22
+ >
23
+ <div class="cont" style="height: 450px">
24
+ <el-input
25
+ type="textarea"
26
+ v-model="content"
27
+ :rows="25"
28
+ :placeholder="$attrs.placeholder || $t1('请输入内容')"
29
+ resize="none"
30
+ :disabled="$attrs.disabled"
31
+ :readonly="$attrs.readonly"
32
+ >
33
+ </el-input>
34
+ </div>
35
+ <span slot="footer" class="dialog-footer">
36
+ <el-button type="primary" plain class="button-sty" @click="close">
37
+ <i class="el-icon-close el-icon"></i>
38
+ 取 消
39
+ </el-button>
40
+ <el-button
41
+ type="primary"
42
+ @click="confirm"
43
+ class="button-sty"
44
+ v-if="!$attrs.disabled && !$attrs.readonly"
45
+ >
46
+ <i class="el-icon-check el-icon"></i>
47
+ 确 定
48
+ </el-button>
49
+ </span>
50
+ </el-dialog>
51
+ </div>
52
+ </template>
53
+ <script>
54
+ export default {
55
+ name: "BaseTextarea",
56
+ components: {
57
+ },
58
+ props: {
59
+ title: {
60
+ type: String,
61
+ default: null,
62
+ },
63
+ showIcon: {
64
+ type: Boolean,
65
+ default: true,
66
+ },
67
+ },
68
+ data() {
69
+ return {
70
+ content: null,
71
+ showDialog: false,
72
+ };
73
+ },
74
+ methods: {
75
+ openDialog() {
76
+ this.content = this.$attrs.value;
77
+ this.showDialog = true;
78
+ },
79
+ confirm() {
80
+ this.$emit("input", this.content);
81
+ this.showDialog = false;
82
+ },
83
+
84
+ close() {
85
+ this.showDialog = false;
86
+ },
87
+ handleNewlines(text) {
88
+ if (text && text.includes("\n")) {
89
+ return text.replaceAll("\n", "<br/>");
90
+ } else {
91
+ return text;
92
+ }
93
+ },
94
+ },
95
+ };
96
+ </script>
97
+ <style scoped>
98
+ .el-link.el-link--default.is-disabled {
99
+ color: #606266;
100
+ }
101
+ ::v-deep.el-textarea {
102
+ width: calc(100% - 12px) !important;
103
+ }
104
+ </style>
@@ -206,7 +206,8 @@ export default {
206
206
  //自适应甘特图的尺寸大小, 使得在不出现滚动条的情况下, 显示全部任务
207
207
  gantt.config.autosize = false;
208
208
  //只读模式
209
- gantt.config.readonly = true;
209
+ // gantt.config.readonly = true;
210
+ gantt.config.readonly = false;
210
211
  //是否显示左侧树表格
211
212
  gantt.config.show_grid = true;
212
213
  // 设置表头高度
@@ -320,6 +321,20 @@ export default {
320
321
  // 销毁gantt实例 按需开启
321
322
  // gantt.destructor()
322
323
  // 初始化
324
+
325
+ // 启用插件
326
+ gantt.plugins({
327
+ tooltip: true,
328
+ marker: true,
329
+ });
330
+
331
+ // 配置工具提示模板
332
+ gantt.templates.tooltip_text = function (start, end, task) {
333
+ return `<b>任务名称:</b> ${task.text}<br/>
334
+ <b>开始时间:</b> ${gantt.templates.tooltip_date_format(start)}<br/>
335
+ <b>结束时间:</b> ${gantt.templates.tooltip_date_format(end)}`;
336
+ };
337
+
323
338
  this.ganttInstance = gantt.init(this.$refs.gantt);
324
339
  // 数据解析
325
340
  gantt.parse(this.tasks);
@@ -746,6 +746,7 @@ export default {
746
746
  gantt.parse(this.tasks);
747
747
  },
748
748
  initGantt() {
749
+ gantt.config.tooltip = true;
749
750
  // 配置国内日期格式(示例 1:YYYY-MM-DD)
750
751
  gantt.config.date_format = "%Y-%m-%d";
751
752
 
@@ -777,6 +778,7 @@ export default {
777
778
  this.initConfig();
778
779
  // 初始化
779
780
  gantt.init(this.$refs.gantt);
781
+
780
782
  /* *******重点******* */
781
783
  /*
782
784
  // 数据解析
package/src/index.js CHANGED
@@ -161,6 +161,11 @@ Vue.component('scriptDescriptionButton', () => import('@base/components/scriptDe
161
161
 
162
162
  Vue.component('scriptTestButton', () => import('@base/components/scriptTest/button'));
163
163
 
164
+
165
+ import baseTextarea from '@base/components/base-textarea/index.vue'
166
+
167
+ Vue.component(baseTextarea.name, baseTextarea);
168
+
164
169
  import jsonImport from '@base/components/jsonImport/index.js';
165
170
 
166
171
  Vue.use(jsonImport);