cloud-web-corejs 1.0.2 → 1.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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloud-web-corejs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vue-cli-service serve",
|
|
7
7
|
"lint": "eslint --ext .js,.vue src",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"new": "plop",
|
|
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
|
-
"test:ci": "npm run lint && npm run test:unit"
|
|
14
|
+
"test:ci": "npm run lint && npm run test:unit",
|
|
15
|
+
"updateCorejs": "npm uninstall cloud-web-corejs && npm install cloud-web-corejs"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@vue/preload-webpack-plugin": "^2.0.0",
|
|
@@ -158,10 +159,11 @@
|
|
|
158
159
|
"src/lang/index.js",
|
|
159
160
|
"src//layout",
|
|
160
161
|
"permission.js",
|
|
161
|
-
"src/index.js"
|
|
162
|
+
"src/index.js",
|
|
163
|
+
"src/App.vue"
|
|
162
164
|
],
|
|
163
165
|
"publishConfig": {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
"access": "public",
|
|
167
|
+
"registry": "https://registry.npmjs.org/"
|
|
168
|
+
}
|
|
167
169
|
}
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app" :class="{mobileApp:isMobile}">
|
|
3
|
+
<router-view/>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import settting from '@/settings.js';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'App',
|
|
12
|
+
data() {
|
|
13
|
+
let isMobile = this.getIsMobile();
|
|
14
|
+
return {
|
|
15
|
+
isMobile: isMobile
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
created() {
|
|
19
|
+
window.addEventListener(
|
|
20
|
+
'hashchange',
|
|
21
|
+
event => {
|
|
22
|
+
var currentPath = window.location.hash.slice(1).split('?')[0]; // 获取输入的路由
|
|
23
|
+
if (currentPath != '/404' && currentPath != '/login' && this.$router.path !== currentPath) {
|
|
24
|
+
this.$store.dispatch('tagsView/delAllViews').then(visitedViews => {
|
|
25
|
+
this.$router.replace({path: '/redirect' + '/home'});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
false
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
window.addEventListener('beforeunload', async event => {
|
|
33
|
+
// 如果按下的键是 F5,则执行相应的操作
|
|
34
|
+
var currentPath = window.location.hash.slice(1).split('?')[0]; // 获取输入的路由
|
|
35
|
+
if (currentPath != '/home' && currentPath != '/' && currentPath != '/login' && currentPath != '/404') {
|
|
36
|
+
sessionStorage.setItem('toHome', '1');
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
window.addEventListener('load', async event => {
|
|
41
|
+
// 滚动事件变为 scroll
|
|
42
|
+
let title = settting.title;
|
|
43
|
+
if (location.host.indexOf('pcp.sc.5mall.com') == 0 || location.host.indexOf('pipuat.bears.com.cn') == 0) {
|
|
44
|
+
title = '产品创新平台PIP';
|
|
45
|
+
} else if (location.host.indexOf('chigo.sc.5mall.com') == 0) {
|
|
46
|
+
title = '志高营销平台';
|
|
47
|
+
} else if (location.host.indexOf('ngerp.sc.5mall.com') == 0) {
|
|
48
|
+
title = 'NG ERP';
|
|
49
|
+
}
|
|
50
|
+
document.title = title;
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
},
|
|
54
|
+
mounted() {
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
getIsMobile() {
|
|
58
|
+
const userAgent = navigator.userAgent;
|
|
59
|
+
const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i;
|
|
60
|
+
return mobileRegex.test(userAgent);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
65
|
+
<style>
|
|
66
|
+
.inner-dialog .el-dialog__wrapper {
|
|
67
|
+
top: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* #app .el-submenu .el-menu {
|
|
71
|
+
height: 500px;
|
|
72
|
+
} */
|
|
73
|
+
</style>
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-form-item label-width="0">
|
|
4
|
-
<el-divider class="custom-divider-margin-top">请求访问设置</el-divider>
|
|
5
|
-
</el-form-item>
|
|
6
|
-
<el-form-item label="数据返回类型">
|
|
7
|
-
<el-select v-model="optionModel.accessReturnType">
|
|
8
|
-
<el-option value="1" label="集合List"></el-option>
|
|
9
|
-
<el-option value="2" label="分页集合数据"></el-option><!--
|
|
10
|
-
<el-option :value="3" label="单条数据"></el-option>-->
|
|
11
|
-
</el-select>
|
|
12
|
-
</el-form-item>
|
|
13
|
-
<!-- <el-form-item label="启用表单脚本">
|
|
14
|
-
<el-switch v-model="optionModel.formScriptEnabled"></el-switch>
|
|
15
|
-
</el-form-item>-->
|
|
16
|
-
<template>
|
|
17
|
-
<el-form-item label="表单脚本编码">
|
|
18
|
-
<el-input v-model="optionModel.formScriptCode" clearable></el-input>
|
|
19
|
-
</el-form-item>
|
|
20
|
-
<el-form-item label="查询参数">
|
|
21
|
-
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
22
|
-
@click="editEventHandler('formScriptParam', ['dataId', 'formCode'])">
|
|
23
|
-
<span>{{ optionModel.formScriptParam }}</span>
|
|
24
|
-
<i class="el-icon-edit"></i>
|
|
25
|
-
</a>
|
|
26
|
-
</el-form-item>
|
|
27
|
-
<el-form-item label="自定义回调">
|
|
28
|
-
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
29
|
-
@click="editEventHandler('formScriptParam', ['dataId', 'formCode','res'])">
|
|
30
|
-
<span>{{ optionModel.formScriptCallback }}</span>
|
|
31
|
-
<i class="el-icon-edit"></i>
|
|
32
|
-
</a>
|
|
33
|
-
</el-form-item>
|
|
34
|
-
</template>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script>
|
|
39
|
-
import i18n from "../../../../../../components/xform/utils/i18n"
|
|
40
|
-
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin"
|
|
41
|
-
|
|
42
|
-
export default {
|
|
43
|
-
name: "accessUrl-editor",
|
|
44
|
-
mixins: [i18n, eventMixin],
|
|
45
|
-
props: {
|
|
46
|
-
designer: Object,
|
|
47
|
-
selectedWidget: Object,
|
|
48
|
-
optionModel: Object,
|
|
49
|
-
scriptConfig: Object,
|
|
50
|
-
title: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: () => "请求访问设置"
|
|
53
|
-
},
|
|
54
|
-
isFormSetting: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: () => false
|
|
57
|
-
},
|
|
58
|
-
accessParamArguments: {
|
|
59
|
-
type: Array,
|
|
60
|
-
default: () => []
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
components: {}
|
|
65
|
-
}
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<style scoped>
|
|
69
|
-
|
|
70
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item label-width="0">
|
|
4
|
+
<el-divider class="custom-divider-margin-top">请求访问设置</el-divider>
|
|
5
|
+
</el-form-item>
|
|
6
|
+
<el-form-item label="数据返回类型">
|
|
7
|
+
<el-select v-model="optionModel.accessReturnType">
|
|
8
|
+
<el-option value="1" label="集合List"></el-option>
|
|
9
|
+
<el-option value="2" label="分页集合数据"></el-option><!--
|
|
10
|
+
<el-option :value="3" label="单条数据"></el-option>-->
|
|
11
|
+
</el-select>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
<!-- <el-form-item label="启用表单脚本">
|
|
14
|
+
<el-switch v-model="optionModel.formScriptEnabled"></el-switch>
|
|
15
|
+
</el-form-item>-->
|
|
16
|
+
<template>
|
|
17
|
+
<el-form-item label="表单脚本编码">
|
|
18
|
+
<el-input v-model="optionModel.formScriptCode" clearable></el-input>
|
|
19
|
+
</el-form-item>
|
|
20
|
+
<el-form-item label="查询参数">
|
|
21
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
22
|
+
@click="editEventHandler('formScriptParam', ['dataId', 'formCode'])">
|
|
23
|
+
<span>{{ optionModel.formScriptParam }}</span>
|
|
24
|
+
<i class="el-icon-edit"></i>
|
|
25
|
+
</a>
|
|
26
|
+
</el-form-item>
|
|
27
|
+
<el-form-item label="自定义回调">
|
|
28
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
29
|
+
@click="editEventHandler('formScriptParam', ['dataId', 'formCode','res'])">
|
|
30
|
+
<span>{{ optionModel.formScriptCallback }}</span>
|
|
31
|
+
<i class="el-icon-edit"></i>
|
|
32
|
+
</a>
|
|
33
|
+
</el-form-item>
|
|
34
|
+
</template>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import i18n from "../../../../../../components/xform/utils/i18n"
|
|
40
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin"
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
name: "accessUrl-editor",
|
|
44
|
+
mixins: [i18n, eventMixin],
|
|
45
|
+
props: {
|
|
46
|
+
designer: Object,
|
|
47
|
+
selectedWidget: Object,
|
|
48
|
+
optionModel: Object,
|
|
49
|
+
scriptConfig: Object,
|
|
50
|
+
title: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: () => "请求访问设置"
|
|
53
|
+
},
|
|
54
|
+
isFormSetting: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: () => false
|
|
57
|
+
},
|
|
58
|
+
accessParamArguments: {
|
|
59
|
+
type: Array,
|
|
60
|
+
default: () => []
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
},
|
|
64
|
+
components: {}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style scoped>
|
|
69
|
+
|
|
70
|
+
</style>
|