cloud-web-corejs-haier 1.0.4 → 1.0.6
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 +7 -4
- package/src/App.vue +30 -34
- package/src/api/user.js +8 -0
- package/src/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/image-viewer.vue +2 -2
- package/src/components/VabUpload/index.js +1 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/privateProfileDialogMixins.js +1 -1063
- package/src/components/VabUpload/view.vue +6 -2
- package/src/components/base-textarea/index.vue +104 -0
- package/src/components/baseAlert/mixins.js +1 -1
- package/src/components/baseAttachment/mixins.js +2 -1
- package/src/components/baseInputExport/index.vue +19 -12
- package/src/components/baseInputExport/mixins.js +1 -1
- package/src/components/baseTabs/mixins.js +1 -1
- package/src/components/code-editor/index.vue +102 -63
- package/src/components/confirmDialog/index.vue +24 -17
- package/src/components/confirmDialog/mixins.js +1 -1
- package/src/components/errorMsg/index.vue +42 -34
- package/src/components/errorMsg/mixins.js +1 -1
- package/src/components/excelExport/index.js +1 -2
- package/src/components/excelExport/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +179 -89
- package/src/components/fileLibrary/filterDialog.vue +45 -21
- package/src/components/fileLibrary/index.vue +579 -238
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +4 -1
- package/src/components/fileLibrary/mixins/indexMixins.js +3 -0
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptTest/mixins.js +1 -1
- package/src/components/table/index.js +1 -1
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/tempStorage/index.vue +1 -1
- package/src/components/vb-tabs/x-tabs.vue +0 -1
- package/src/components/wf/content.vue +32 -36
- package/src/components/wf/mixins/setCandidateDialog2.js +1 -1
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -3
- package/src/components/wf/setCandidateDialog2.vue +76 -66
- package/src/components/wf/wf.js +2176 -1
- package/src/components/wf/wfFlowEleScriptDialog.vue +5 -1
- package/src/components/wf/wfStartDialog.vue +6 -10
- package/src/components/wf/wfUtil.js +279 -1
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +16 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +17 -4
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +247 -187
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +2 -0
- package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +10 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +65 -4
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +132 -118
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +124 -50
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -1
- package/src/components/xform/form-render/index.vue +8 -0
- package/src/components/xform/form-render/indexMixin copy.js +3462 -0
- package/src/components/xform/form-render/indexMixin.js +3496 -1
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/utils/format.js +14 -4
- package/src/components/xform/utils/formula-util.js +0 -4
- package/src/components/xform/utils/util.js +1 -1
- package/src/index.js +215 -190
- package/src/lang/index.js +56 -51
- package/src/lang/locale/en/login.js +20 -0
- package/src/lang/locale/zh/login.js +20 -0
- package/src/layout/components/Sidebar/default.vue +1423 -1266
- package/src/layout/components/TagsView/index.vue +37 -11
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/layout/components/extractedCode/viewDialog.vue +1 -0
- package/src/layout/defaultLayout.vue +1 -1
- package/src/layout/index.vue +3 -5
- package/src/mixins/table/index.js +151 -0
- package/src/permission.js +1 -18
- package/src/router/modules/customer.js +3 -8
- package/src/store/getters.js +24 -23
- package/src/store/modules/user.js +1 -30
- package/src/utils/index.js +1 -6
- package/src/utils/vab.js +1 -1
- package/src/views/bd/setting/config_manage/list.vue +36 -19
- package/src/views/bd/setting/form_script/edit.vue +9 -0
- package/src/views/bd/setting/form_script/edit1.vue +29 -3
- package/src/views/bd/setting/form_script/form_list.vue +99 -37
- package/src/views/bd/setting/form_script/list1.vue +181 -118
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +199 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
- package/src/views/bd/setting/form_script/mixins/list.js +236 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +410 -1
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/edit.vue +13 -0
- package/src/views/bd/setting/form_template/list.vue +326 -214
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +279 -1
- package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
- package/src/views/bd/setting/form_template/mixins/list.js +667 -3
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/logic_param/mixins/edit.js +1 -91
- package/src/views/bd/setting/logic_param/mixins/list.js +2 -362
- package/src/views/bd/setting/menu_kind/list.vue +172 -87
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
- package/src/views/bd/setting/table_model/edit.vue +345 -304
- package/src/views/bd/setting/table_model/list.vue +190 -128
- package/src/views/bd/setting/table_model/mixins/edit.js +1191 -1
- package/src/views/bd/setting/table_model/mixins/list.js +428 -2
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/user/access_log/list.vue +418 -349
- package/src/views/user/area/dialog.vue +223 -116
- package/src/views/user/area/list.vue +318 -0
- package/src/views/user/common_attribute/list.vue +4 -1
- package/src/views/user/extend_datasource/dialog.vue +3 -0
- package/src/views/user/extend_datasource/edit.vue +2 -1
- package/src/views/user/extend_datasource/list.vue +3 -0
- package/src/views/user/form/vform/designer.vue +2 -1
- package/src/views/user/home/bears/index.vue +1032 -0
- package/src/views/user/home/default.vue +6 -5
- package/src/views/user/home/taili/index.vue +1034 -0
- package/src/views/user/ledger_library/list.vue +10 -12
- package/src/views/user/login/default.vue +165 -36
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +184 -8
- package/src/views/user/menu/list.vue +24 -1
- package/src/views/user/notify_message/dialog.vue +2 -6
- package/src/views/user/outLink/index.vue +57 -18
- package/src/views/user/role/authConfig.vue +89 -0
- package/src/views/user/role/dialog.vue +70 -48
- package/src/views/user/role/edit.vue +114 -4
- package/src/views/user/user/form_dialog.vue +158 -0
- package/src/views/user/user/list.vue +652 -582
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/wfReport/index.vue +137 -28
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +15 -116
- package/src/views/user/wf/wf_obj_config/itemOperateDialog.vue +414 -0
- package/src/views/user/wf/wf_obj_config/list.vue +84 -78
- package/src/views/user/wf/wf_transfer_setting/edit.vue +52 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +10 -0
- package/src/components/xform/form-render/container-item/data-table-mixin2.js +0 -2169
- package/src/views/bd/setting/table_model/mixins/edit copy.js +0 -903
- package/src/views/user/login/index2.vue +0 -131
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloud-web-corejs-haier",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vue-cli-service serve",
|
|
7
7
|
"lint": "eslint --ext .js,.vue src",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
|
13
13
|
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
|
14
14
|
"test:ci": "npm run lint && npm run test:unit",
|
|
15
|
-
"updateCorejs": "npm install cloud-web-corejs --
|
|
15
|
+
"updateCorejs": "npm install cloud-web-corejs --registry https://registry.npmjs.org",
|
|
16
16
|
"publishDev": "npm publish --tag dev"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"copy-webpack-plugin": "5.1.2",
|
|
26
26
|
"core-js": "^3.8.3",
|
|
27
27
|
"dayjs": "^1.11.13",
|
|
28
|
-
"dhtmlx-gantt": "^
|
|
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",
|
|
32
32
|
"js-base64": "^3.7.7",
|
|
33
33
|
"js-cookie": "2.2.0",
|
|
34
|
-
"jsqr": "^1.4.0",
|
|
35
34
|
"jspdf": "^3.0.1",
|
|
35
|
+
"jsqr": "^1.4.0",
|
|
36
36
|
"less": "^4.2.0",
|
|
37
37
|
"less-loader": "^7.0.1",
|
|
38
38
|
"lodash": "4.17.21",
|
|
@@ -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",
|
|
@@ -171,6 +172,8 @@
|
|
|
171
172
|
"src/store",
|
|
172
173
|
"src/resources/js",
|
|
173
174
|
"src/lang/index.js",
|
|
175
|
+
"src/lang/locale/en/login.js",
|
|
176
|
+
"src/lang/locale/zh/login.js",
|
|
174
177
|
"src/layout",
|
|
175
178
|
"src/filters",
|
|
176
179
|
"src/router",
|
package/src/App.vue
CHANGED
|
@@ -1,67 +1,63 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div id="app" :class="{mobileApp:isMobile}">
|
|
3
|
-
<router-view/>
|
|
2
|
+
<div id="app" :class="{ mobileApp: isMobile }">
|
|
3
|
+
<router-view />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
import settting from
|
|
8
|
+
import settting from "@/settings.js";
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
name:
|
|
11
|
+
name: "App",
|
|
12
12
|
data() {
|
|
13
13
|
let isMobile = this.getIsMobile();
|
|
14
14
|
return {
|
|
15
|
-
isMobile: isMobile
|
|
16
|
-
}
|
|
15
|
+
isMobile: isMobile,
|
|
16
|
+
};
|
|
17
17
|
},
|
|
18
18
|
created() {
|
|
19
|
-
if (process.env.NODE_ENV !== "development") {
|
|
19
|
+
if (settting.reflushRouter!== true && process.env.NODE_ENV !== "development") {
|
|
20
20
|
window.addEventListener(
|
|
21
|
-
|
|
22
|
-
event => {
|
|
23
|
-
var currentPath = window.location.hash.slice(1).split(
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
"hashchange",
|
|
22
|
+
(event) => {
|
|
23
|
+
var currentPath = window.location.hash.slice(1).split("?")[0]; // 获取输入的路由
|
|
24
|
+
if (
|
|
25
|
+
currentPath != "/404" &&
|
|
26
|
+
currentPath != "/login" &&
|
|
27
|
+
this.$router.path !== currentPath
|
|
28
|
+
) {
|
|
29
|
+
this.$store.dispatch("tagsView/delAllViews").then((visitedViews) => {
|
|
30
|
+
this.$router.replace({ path: "/redirect" + "/home" });
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
false
|
|
31
35
|
);
|
|
32
36
|
|
|
33
|
-
window.addEventListener(
|
|
37
|
+
window.addEventListener("beforeunload", async (event) => {
|
|
34
38
|
// 如果按下的键是 F5,则执行相应的操作
|
|
35
|
-
var currentPath = window.location.hash.slice(1).split(
|
|
36
|
-
if (
|
|
37
|
-
|
|
39
|
+
var currentPath = window.location.hash.slice(1).split("?")[0]; // 获取输入的路由
|
|
40
|
+
if (
|
|
41
|
+
currentPath != "/home" &&
|
|
42
|
+
currentPath != "/" &&
|
|
43
|
+
currentPath != "/login" &&
|
|
44
|
+
currentPath != "/404"
|
|
45
|
+
) {
|
|
46
|
+
sessionStorage.setItem("toHome", "1");
|
|
38
47
|
}
|
|
39
48
|
});
|
|
40
49
|
}
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
// 滚动事件变为 scroll
|
|
44
|
-
let title = settting.title;
|
|
45
|
-
if (location.host.indexOf('pcp.sc.5mall.com') == 0 || location.host.indexOf('pipuat.bears.com.cn') == 0) {
|
|
46
|
-
title = '产品创新平台PIP';
|
|
47
|
-
} else if (location.host.indexOf('chigo.sc.5mall.com') == 0) {
|
|
48
|
-
title = '志高营销平台';
|
|
49
|
-
} else if (location.host.indexOf('ngerp.sc.5mall.com') == 0) {
|
|
50
|
-
title = 'NG ERP';
|
|
51
|
-
}
|
|
52
|
-
document.title = title;
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
mounted() {
|
|
51
|
+
document.title = settting.title;
|
|
57
52
|
},
|
|
53
|
+
mounted() {},
|
|
58
54
|
methods: {
|
|
59
55
|
getIsMobile() {
|
|
60
56
|
const userAgent = navigator.userAgent;
|
|
61
57
|
const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i;
|
|
62
58
|
return mobileRegex.test(userAgent);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
59
|
+
},
|
|
60
|
+
},
|
|
65
61
|
};
|
|
66
62
|
</script>
|
|
67
63
|
<style>
|
package/src/api/user.js
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div
|
|
3
|
+
:class="[fullscreen ? 'fullscreen' : null, readonly ? 'readonly' : null]"
|
|
4
|
+
class="tinymce-container"
|
|
5
|
+
:style="{ width: containerWidth }"
|
|
6
|
+
>
|
|
7
|
+
<textarea :id="tinymceId" class="tinymce-textarea" v-if="isActivated" />
|
|
5
8
|
<!-- <div class="editor-custom-btn-container">
|
|
6
9
|
<editorImage color="#ED6C44 " class="editor-upload-btn" @successCBK="imageSuccessCBK" />
|
|
7
10
|
</div> -->
|
|
8
11
|
<template v-if="!readonly">
|
|
9
12
|
<div class="editor-custom-btn-container">
|
|
10
13
|
<div class="upload-container">
|
|
11
|
-
<el-button
|
|
12
|
-
|
|
14
|
+
<el-button
|
|
15
|
+
icon="el-icon-upload"
|
|
16
|
+
size="mini"
|
|
17
|
+
type="primary"
|
|
18
|
+
@click="handleShow({ key: 'value' })"
|
|
19
|
+
>
|
|
20
|
+
{{ $t2("上传", "components.Tinymce.uploadButton") }}
|
|
13
21
|
</el-button>
|
|
14
22
|
</div>
|
|
15
23
|
</div>
|
|
16
|
-
<vab-upload
|
|
24
|
+
<vab-upload
|
|
25
|
+
ref="vabUpload"
|
|
26
|
+
accept="image/png, image/jpeg"
|
|
27
|
+
@callback="fileConfirm"
|
|
28
|
+
></vab-upload>
|
|
17
29
|
</template>
|
|
18
30
|
</div>
|
|
19
31
|
</template>
|
|
@@ -23,56 +35,56 @@
|
|
|
23
35
|
* docs:
|
|
24
36
|
* https://panjiachen.github.io/vue-element-admin-site/feature/component/rich-editor.html#tinymce
|
|
25
37
|
*/
|
|
26
|
-
import plugins from
|
|
27
|
-
import toolbar from
|
|
28
|
-
import load from
|
|
38
|
+
import plugins from "./plugins";
|
|
39
|
+
import toolbar from "./toolbar";
|
|
40
|
+
import load from "./dynamicLoadScript";
|
|
29
41
|
// import EditorImage from './components/EditorImage.vue'
|
|
30
42
|
|
|
31
43
|
// why use this cdn, detail see https://github.com/PanJiaChen/tinymce-all-in-one
|
|
32
|
-
const tinymceCDN = window.WEB_PREFIX +
|
|
44
|
+
const tinymceCDN = window.WEB_PREFIX + "/base/tinymce/tinymce.min.js";
|
|
33
45
|
|
|
34
46
|
export default {
|
|
35
|
-
name:
|
|
36
|
-
components: {VabUpload: () => import(
|
|
47
|
+
name: "Tinymce",
|
|
48
|
+
components: { VabUpload: () => import("../../components/VabUpload/index.vue") },
|
|
37
49
|
props: {
|
|
38
50
|
id: {
|
|
39
51
|
type: String,
|
|
40
52
|
default: function () {
|
|
41
|
-
return
|
|
42
|
-
}
|
|
53
|
+
return "vue-tinymce-" + +new Date() + ((Math.random() * 1000).toFixed(0) + "");
|
|
54
|
+
},
|
|
43
55
|
},
|
|
44
56
|
value: {
|
|
45
57
|
type: String,
|
|
46
|
-
default:
|
|
58
|
+
default: "",
|
|
47
59
|
},
|
|
48
60
|
toolbar: {
|
|
49
61
|
type: Array,
|
|
50
62
|
required: false,
|
|
51
63
|
default() {
|
|
52
64
|
return [];
|
|
53
|
-
}
|
|
65
|
+
},
|
|
54
66
|
},
|
|
55
67
|
menubar: {
|
|
56
68
|
type: String,
|
|
57
|
-
default:
|
|
69
|
+
default: "file edit insert view format table",
|
|
58
70
|
},
|
|
59
71
|
height: {
|
|
60
72
|
type: [Number, String],
|
|
61
73
|
required: false,
|
|
62
|
-
default: 360
|
|
74
|
+
default: 360,
|
|
63
75
|
},
|
|
64
76
|
width: {
|
|
65
77
|
type: [Number, String],
|
|
66
78
|
required: false,
|
|
67
|
-
default:
|
|
79
|
+
default: "auto",
|
|
68
80
|
},
|
|
69
81
|
color: {
|
|
70
82
|
type: String,
|
|
71
|
-
default:
|
|
83
|
+
default: "#1890ff",
|
|
72
84
|
},
|
|
73
85
|
readonly: {
|
|
74
86
|
type: Boolean,
|
|
75
|
-
default: () => false
|
|
87
|
+
default: () => false,
|
|
76
88
|
},
|
|
77
89
|
},
|
|
78
90
|
data() {
|
|
@@ -83,11 +95,11 @@ export default {
|
|
|
83
95
|
tinymceId: this.id,
|
|
84
96
|
fullscreen: false,
|
|
85
97
|
languageTypeList: {
|
|
86
|
-
en:
|
|
87
|
-
zh:
|
|
88
|
-
es:
|
|
89
|
-
ja:
|
|
90
|
-
}
|
|
98
|
+
en: "en",
|
|
99
|
+
zh: "zh_CN",
|
|
100
|
+
es: "es_MX",
|
|
101
|
+
ja: "ja",
|
|
102
|
+
},
|
|
91
103
|
};
|
|
92
104
|
},
|
|
93
105
|
computed: {
|
|
@@ -98,14 +110,14 @@ export default {
|
|
|
98
110
|
return `${width}px`;
|
|
99
111
|
}
|
|
100
112
|
return width;
|
|
101
|
-
}
|
|
113
|
+
},
|
|
102
114
|
},
|
|
103
115
|
watch: {
|
|
104
116
|
value(val) {
|
|
105
117
|
if (!this.hasChange && this.hasInit) {
|
|
106
|
-
this.$nextTick(() => window.tinymce.get(this.tinymceId).setContent(val ||
|
|
118
|
+
this.$nextTick(() => window.tinymce.get(this.tinymceId).setContent(val || ""));
|
|
107
119
|
}
|
|
108
|
-
}
|
|
120
|
+
},
|
|
109
121
|
},
|
|
110
122
|
mounted() {
|
|
111
123
|
this.init();
|
|
@@ -115,7 +127,7 @@ export default {
|
|
|
115
127
|
this.isActivated = true;
|
|
116
128
|
this.$nextTick(() => {
|
|
117
129
|
this.initTinymce();
|
|
118
|
-
})
|
|
130
|
+
});
|
|
119
131
|
}
|
|
120
132
|
},
|
|
121
133
|
deactivated() {
|
|
@@ -127,11 +139,18 @@ export default {
|
|
|
127
139
|
},
|
|
128
140
|
methods: {
|
|
129
141
|
handleShow(data) {
|
|
130
|
-
this.$
|
|
142
|
+
this.$baseUpload.open({
|
|
143
|
+
accept: "image/png, image/jpeg",
|
|
144
|
+
callback: this.fileConfirm,
|
|
145
|
+
// pickPrivateProfile:this.pickPrivateProfile,
|
|
146
|
+
// confirmUpload: this.confirmUpload,
|
|
147
|
+
// otherParams: this.$attrs,
|
|
148
|
+
});
|
|
149
|
+
// this.$refs['vabUpload'].handleShow(data);
|
|
131
150
|
},
|
|
132
151
|
init() {
|
|
133
152
|
// dynamic load tinymce from cdn
|
|
134
|
-
load(tinymceCDN, err => {
|
|
153
|
+
load(tinymceCDN, (err) => {
|
|
135
154
|
if (err) {
|
|
136
155
|
this.$message.error(err.message);
|
|
137
156
|
return;
|
|
@@ -142,47 +161,47 @@ export default {
|
|
|
142
161
|
},
|
|
143
162
|
initTinymce() {
|
|
144
163
|
const _this = this;
|
|
145
|
-
let locale = this.$i18n && this.$i18n.locale ? this.$i18n.locale :
|
|
164
|
+
let locale = this.$i18n && this.$i18n.locale ? this.$i18n.locale : "zh";
|
|
146
165
|
window.tinymce.init({
|
|
147
166
|
selector: `#${this.tinymceId}`,
|
|
148
167
|
language: this.languageTypeList[locale],
|
|
149
168
|
height: this.height,
|
|
150
|
-
body_class:
|
|
169
|
+
body_class: "panel-body ",
|
|
151
170
|
object_resizing: false,
|
|
152
171
|
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
|
|
153
172
|
menubar: this.menubar,
|
|
154
173
|
plugins: plugins,
|
|
155
174
|
end_container_on_empty_block: true,
|
|
156
|
-
powerpaste_word_import:
|
|
175
|
+
powerpaste_word_import: "clean",
|
|
157
176
|
code_dialog_height: 450,
|
|
158
177
|
code_dialog_width: 1000,
|
|
159
|
-
advlist_bullet_styles:
|
|
160
|
-
advlist_number_styles:
|
|
161
|
-
imagetools_cors_hosts: [
|
|
162
|
-
default_link_target:
|
|
178
|
+
advlist_bullet_styles: "square",
|
|
179
|
+
advlist_number_styles: "default",
|
|
180
|
+
imagetools_cors_hosts: ["www.tinymce.com", "codepen.io"],
|
|
181
|
+
default_link_target: "_blank",
|
|
163
182
|
link_title: false,
|
|
164
183
|
nonbreaking_force_tab: true, // inserting nonbreaking space need Nonbreaking Space Plugin
|
|
165
184
|
paste_data_images: true, // 允许粘贴图像
|
|
166
185
|
readonly: this.readonly,
|
|
167
|
-
init_instance_callback: editor => {
|
|
186
|
+
init_instance_callback: (editor) => {
|
|
168
187
|
if (_this.value) {
|
|
169
188
|
editor.setContent(_this.value);
|
|
170
189
|
}
|
|
171
190
|
_this.hasInit = true;
|
|
172
|
-
editor.on(
|
|
191
|
+
editor.on("NodeChange Change KeyUp SetContent", () => {
|
|
173
192
|
this.hasChange = true;
|
|
174
|
-
this.$emit(
|
|
193
|
+
this.$emit("input", editor.getContent());
|
|
175
194
|
});
|
|
176
195
|
},
|
|
177
196
|
setup(editor) {
|
|
178
|
-
editor.on(
|
|
197
|
+
editor.on("FullscreenStateChanged", (e) => {
|
|
179
198
|
_this.fullscreen = e.state;
|
|
180
199
|
});
|
|
181
200
|
},
|
|
182
201
|
// it will try to keep these URLs intact
|
|
183
202
|
// https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/
|
|
184
203
|
// https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions
|
|
185
|
-
convert_urls: false
|
|
204
|
+
convert_urls: false,
|
|
186
205
|
// 整合七牛上传
|
|
187
206
|
// images_dataimg_filter(img) {
|
|
188
207
|
// setTimeout(() => {
|
|
@@ -198,31 +217,50 @@ export default {
|
|
|
198
217
|
// }, 0);
|
|
199
218
|
// return img
|
|
200
219
|
// },
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
220
|
+
images_upload_handler(blobInfo, success, failure, progress) {
|
|
221
|
+
/* progress(0);
|
|
222
|
+
_this.$baseUpload.upload({
|
|
223
|
+
file:blobInfo.blob(),
|
|
224
|
+
onProgress:(e)=>{
|
|
225
|
+
progress(e.percent)
|
|
226
|
+
},
|
|
227
|
+
callback:(res)=>{
|
|
228
|
+
if(res.type=="success"){
|
|
229
|
+
let url = res.objx.domain + res.objx.url;
|
|
230
|
+
success(url);
|
|
231
|
+
progress(100);
|
|
232
|
+
}else{
|
|
233
|
+
failure(res.content)
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
error:(e)=>{
|
|
237
|
+
failure(e.message)
|
|
238
|
+
}
|
|
239
|
+
}) */
|
|
240
|
+
/* progress(0);
|
|
241
|
+
const token = _this.$store.getters.token;
|
|
242
|
+
getToken(token).then(response => {
|
|
243
|
+
const url = response.data.qiniu_url;
|
|
244
|
+
const formData = new FormData();
|
|
245
|
+
formData.append('token', response.data.qiniu_token);
|
|
246
|
+
formData.append('key', response.data.qiniu_key);
|
|
247
|
+
formData.append('file', blobInfo.blob(), url);
|
|
248
|
+
upload(formData).then(() => {
|
|
249
|
+
success(url);
|
|
250
|
+
progress(100);
|
|
251
|
+
})
|
|
252
|
+
}).catch(err => {
|
|
253
|
+
failure('出现未知问题,刷新页面,或者联系程序员')
|
|
254
|
+
console.log(err);
|
|
255
|
+
}); */
|
|
256
|
+
},
|
|
219
257
|
});
|
|
220
258
|
},
|
|
221
259
|
destroyTinymce() {
|
|
222
260
|
if (window.tinymce && window.tinymce.get) {
|
|
223
261
|
const tinymce = window.tinymce.get(this.tinymceId);
|
|
224
262
|
if (this.fullscreen) {
|
|
225
|
-
tinymce.execCommand(
|
|
263
|
+
tinymce.execCommand("mceFullScreen");
|
|
226
264
|
}
|
|
227
265
|
|
|
228
266
|
if (tinymce) {
|
|
@@ -237,17 +275,21 @@ export default {
|
|
|
237
275
|
window.tinymce.get(this.tinymceId).getContent();
|
|
238
276
|
},
|
|
239
277
|
imageSuccessCBK(arr) {
|
|
240
|
-
arr.forEach(v =>
|
|
278
|
+
arr.forEach((v) =>
|
|
279
|
+
window.tinymce
|
|
280
|
+
.get(this.tinymceId)
|
|
281
|
+
.insertContent(`<img class="wscnph" src="${v.url}" >`)
|
|
282
|
+
);
|
|
241
283
|
},
|
|
242
284
|
fileConfirm(arr) {
|
|
243
|
-
let txt =
|
|
244
|
-
arr.forEach(v => {
|
|
245
|
-
let realUrl = v.
|
|
246
|
-
txt = txt + '<img class="wscnph" src="' + realUrl + '" >'
|
|
285
|
+
let txt = "";
|
|
286
|
+
arr.forEach((v) => {
|
|
287
|
+
let realUrl = v.domain + v.url;
|
|
288
|
+
txt = txt + '<img class="wscnph" src="' + realUrl + '" >';
|
|
247
289
|
});
|
|
248
290
|
window.tinymce.get(this.tinymceId).insertContent(`<p>${txt}</p>`);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
291
|
+
},
|
|
292
|
+
},
|
|
251
293
|
};
|
|
252
294
|
</script>
|
|
253
295
|
|
|
@@ -291,5 +333,4 @@ export default {
|
|
|
291
333
|
.editor-upload-btn {
|
|
292
334
|
display: inline-block;
|
|
293
335
|
}
|
|
294
|
-
|
|
295
336
|
</style>
|
|
@@ -181,9 +181,9 @@ export default {
|
|
|
181
181
|
return imageDto;
|
|
182
182
|
} else {
|
|
183
183
|
if (flag == 1) {
|
|
184
|
-
return imageDto.domain + imageDto.
|
|
184
|
+
return imageDto.domain + imageDto.url;
|
|
185
185
|
} else if (flag == 2) {
|
|
186
|
-
return imageDto.domain + imageDto.medium;
|
|
186
|
+
return imageDto.domain + (imageDto.medium || imageDto.url);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
},
|