yh-pub 1.0.0 → 1.0.2
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/README.MD +19 -19
- package/layout/admin/adminIndex.vue +104 -104
- package/layout/admin/api/loginApi.js +24 -24
- package/layout/admin/api/routers.js +93 -93
- package/layout/admin/api/tenantApi.js +123 -123
- package/layout/admin/home/homeIndex.vue +25 -25
- package/layout/admin/login/login.vue +161 -161
- package/layout/admin/menu/MenuIndex.vue +648 -648
- package/layout/admin/menu/icon.vue +108 -108
- package/layout/admin/menu/iconList.js +934 -934
- package/layout/admin/saTenant/saTenant.vue +173 -173
- package/layout/admin/saTenant/saTenantForm.js +80 -80
- package/layout/admin/saTenant/saTenantForm.vue +61 -61
- package/layout/admin/saTenant/saTenantRoleManage.js +417 -417
- package/layout/admin/saTenant/saTenantRoleManage.vue +99 -99
- package/layout/admin/user/saUser.less +6 -6
- package/layout/admin/user/saUser.vue +72 -72
- package/layout/main/components/console/console.vue +205 -205
- package/layout/main/components/error-store/error-store.vue +72 -72
- package/layout/main/components/error-store/index.js +2 -2
- package/layout/main/components/fullscreen/fullscreen.vue +57 -57
- package/layout/main/components/fullscreen/index.js +2 -2
- package/layout/main/components/language/language.vue +71 -71
- package/layout/main/components/side-menu/side-menu.less +73 -73
- package/layout/main/components/side-menu/side-menu.vue +75 -75
- package/layout/main/components/tags-nav/tags-nav.less +44 -44
- package/layout/main/components/tags-nav/tags-nav.vue +144 -144
- package/layout/main/components/user/user.less +12 -12
- package/layout/main/components/user/user.vue +185 -185
- package/layout/main/home/home.vue +480 -480
- package/layout/main/home/index.js +2 -2
- package/layout/main/home/toDoList.vue +32 -32
- package/layout/main/login/login.less +93 -93
- package/layout/main/login/login.vue +151 -151
- package/layout/main/main.less +81 -81
- package/layout/main/main.vue +254 -202
- package/layout/main/system/dict.vue +64 -64
- package/layout/main/system/orgManage.vue +473 -473
- package/layout/main/system/roleManage.js +807 -755
- package/layout/main/system/roleManage.vue +424 -399
- package/package.json +11 -11
- package/view/basic/error-logger.vue +74 -74
- package/view/basic/error-page/401.vue +22 -22
- package/view/basic/error-page/404.vue +22 -22
- package/view/basic/error-page/500.vue +22 -22
- package/view/basic/error-page/back-btn-group.vue +48 -48
- package/view/basic/error-page/error-content.vue +28 -28
- package/view/basic/error-page/error.less +46 -46
- package/view/config/component/confFormItem.vue +49 -49
- package/view/config/config.scss +45 -45
- package/view/config/configIndex.vue +150 -150
- package/view/config/subPage/router-config.vue +4 -4
- package/view/config/subPage/sys-config.vue +249 -249
- package/view/window/IframeFReportView.vue +27 -27
- package/view/window/windowIndex.vue +22 -22
|
@@ -1,249 +1,249 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form label-position="top">
|
|
3
|
-
<el-row gutter="20">
|
|
4
|
-
<conf-form-item
|
|
5
|
-
label="logo 图标"
|
|
6
|
-
tips="建议:宽小于200像素,高小于50像素">
|
|
7
|
-
<el-upload
|
|
8
|
-
class="config-upload"
|
|
9
|
-
drag
|
|
10
|
-
accept="image/jpeg,image/png"
|
|
11
|
-
:show-file-list="false"
|
|
12
|
-
:before-upload="() => false"
|
|
13
|
-
:on-change="logoChange">
|
|
14
|
-
<div class="el-upload__text">点击选择,或拖拽图片至此</div>
|
|
15
|
-
</el-upload>
|
|
16
|
-
<div class="logo">
|
|
17
|
-
<img
|
|
18
|
-
class="logo-image"
|
|
19
|
-
:src="config.logo || defaultLogo" />
|
|
20
|
-
</div>
|
|
21
|
-
</conf-form-item>
|
|
22
|
-
<conf-form-item
|
|
23
|
-
label="minLogo 小图标"
|
|
24
|
-
tips="建议:宽小于64像素,高小于50像素">
|
|
25
|
-
<el-upload
|
|
26
|
-
class="config-upload"
|
|
27
|
-
drag
|
|
28
|
-
accept="image/jpeg,image/png"
|
|
29
|
-
:show-file-list="false"
|
|
30
|
-
:before-upload="() => false"
|
|
31
|
-
:on-change="minLogoChange">
|
|
32
|
-
<div class="el-upload__text">点击选择,或拖拽图片至此</div>
|
|
33
|
-
</el-upload>
|
|
34
|
-
<div class="logo-min">
|
|
35
|
-
<img
|
|
36
|
-
class="logo-image min"
|
|
37
|
-
:src="config.minLogo || defaultMinLogo" />
|
|
38
|
-
</div>
|
|
39
|
-
</conf-form-item>
|
|
40
|
-
<conf-form-item
|
|
41
|
-
label="请求基础路径(开发环境)"
|
|
42
|
-
tips="请求的基础路径,例如:/api">
|
|
43
|
-
<el-input
|
|
44
|
-
v-model="config.baseUrl.dev"
|
|
45
|
-
@change="valueChange($event, 'string', ['baseUrl', 'dev'])"></el-input>
|
|
46
|
-
</conf-form-item>
|
|
47
|
-
<conf-form-item
|
|
48
|
-
label="请求基础路径(生产环境)"
|
|
49
|
-
tips="请求的基础路径,例如:/ccs">
|
|
50
|
-
<el-input
|
|
51
|
-
v-model="config.baseUrl.pro"
|
|
52
|
-
@change="valueChange($event, 'string', ['baseUrl', 'pro'])"></el-input>
|
|
53
|
-
</conf-form-item>
|
|
54
|
-
<conf-form-item
|
|
55
|
-
label="前台首页名称"
|
|
56
|
-
tips="业务端首页的名称,例如:home">
|
|
57
|
-
<el-input
|
|
58
|
-
v-model="config.homeName"
|
|
59
|
-
@change="valueChange($event, 'string', ['homeName'])"></el-input>
|
|
60
|
-
</conf-form-item>
|
|
61
|
-
<conf-form-item
|
|
62
|
-
label="前台首页地址"
|
|
63
|
-
tips="业务端首页的路由地址,例如:/home">
|
|
64
|
-
<el-input
|
|
65
|
-
v-model="config.homePath"
|
|
66
|
-
@change="valueChange($event, 'string', ['homePath'])"></el-input>
|
|
67
|
-
</conf-form-item>
|
|
68
|
-
<conf-form-item
|
|
69
|
-
label="后台首页名称"
|
|
70
|
-
tips="管理后端首页的名称,例如:admin">
|
|
71
|
-
<el-input
|
|
72
|
-
v-model="config.saHomeName"
|
|
73
|
-
@change="valueChange($event, 'string', ['saHomeName'])"></el-input>
|
|
74
|
-
</conf-form-item>
|
|
75
|
-
<conf-form-item
|
|
76
|
-
label="后台首页地址"
|
|
77
|
-
tips="管理后端首页的路由地址,例如:/admin">
|
|
78
|
-
<el-input
|
|
79
|
-
v-model="config.adminPath"
|
|
80
|
-
@change="valueChange($event, 'string', ['adminPath'])"></el-input>
|
|
81
|
-
</conf-form-item>
|
|
82
|
-
<conf-form-item
|
|
83
|
-
label="路由白名单"
|
|
84
|
-
tips="配置到路由地址,不会被拦截,可以直接访问">
|
|
85
|
-
<el-select
|
|
86
|
-
v-model="config.whiteList"
|
|
87
|
-
filterable
|
|
88
|
-
collapse-tags
|
|
89
|
-
collapse-tags-tooltip
|
|
90
|
-
multiple
|
|
91
|
-
@change="valueChange($event, 'array', ['whiteList'])">
|
|
92
|
-
<el-option
|
|
93
|
-
:value="route.path"
|
|
94
|
-
:label="route?.meta?.title || route.name"
|
|
95
|
-
v-for="route in routers"></el-option>
|
|
96
|
-
</el-select>
|
|
97
|
-
</conf-form-item>
|
|
98
|
-
<conf-form-item
|
|
99
|
-
label="帆软服务地址"
|
|
100
|
-
tips="配置帆软打印/报表服务的地址">
|
|
101
|
-
<el-input
|
|
102
|
-
v-model="config.frUrl"
|
|
103
|
-
@change="valueChange($event, 'string', ['frUrl'])"></el-input>
|
|
104
|
-
</conf-form-item>
|
|
105
|
-
<el-col :span="24">
|
|
106
|
-
<el-alert type="warning">
|
|
107
|
-
如果您在更新当前项目的配置文件,那么在您保存配置文件之后会触发页面的刷新效果,请悉知!
|
|
108
|
-
</el-alert>
|
|
109
|
-
</el-col>
|
|
110
|
-
<el-col :span="24">
|
|
111
|
-
<el-button
|
|
112
|
-
type="primary"
|
|
113
|
-
style="width: 100%"
|
|
114
|
-
@click="saveConfig">
|
|
115
|
-
保存
|
|
116
|
-
</el-button>
|
|
117
|
-
</el-col>
|
|
118
|
-
</el-row>
|
|
119
|
-
</el-form>
|
|
120
|
-
</template>
|
|
121
|
-
<script>
|
|
122
|
-
import { defineComponent } from "vue";
|
|
123
|
-
import confFormItem from "../component/confFormItem.vue";
|
|
124
|
-
import defaultMinLogo from "@/assets/images/logo-min.png";
|
|
125
|
-
import defaultLogo from "@/assets/images/logo.png";
|
|
126
|
-
import { getChildFile, saveChildFile } from "yh-fsa";
|
|
127
|
-
import { $, findObject } from "yh-ggc";
|
|
128
|
-
import { arrayToCode } from "yh-ggc";
|
|
129
|
-
|
|
130
|
-
export default defineComponent({
|
|
131
|
-
name: "sysConfig",
|
|
132
|
-
props: ["dirHandle", "routers"],
|
|
133
|
-
components: {
|
|
134
|
-
confFormItem,
|
|
135
|
-
},
|
|
136
|
-
data() {
|
|
137
|
-
return {
|
|
138
|
-
defaultMinLogo,
|
|
139
|
-
defaultLogo,
|
|
140
|
-
logoChange: false,
|
|
141
|
-
ast: null,
|
|
142
|
-
saveTimer: null,
|
|
143
|
-
config: {
|
|
144
|
-
baseUrl: {},
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
},
|
|
148
|
-
mounted() {
|
|
149
|
-
this.getConfig();
|
|
150
|
-
},
|
|
151
|
-
methods: {
|
|
152
|
-
async getConfig() {
|
|
153
|
-
let confText = await getChildFile("src/config/index.js", this.dirHandle);
|
|
154
|
-
if (confText) {
|
|
155
|
-
let confAST = $(confText);
|
|
156
|
-
this.ast = confAST;
|
|
157
|
-
let obj = await findObject(confAST);
|
|
158
|
-
for (const key in obj) {
|
|
159
|
-
const val = obj[key];
|
|
160
|
-
this.config[key] = val;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
saveConfig() {
|
|
165
|
-
if (this.timer) {
|
|
166
|
-
clearTimeout(this.timer);
|
|
167
|
-
this.timer = null;
|
|
168
|
-
}
|
|
169
|
-
this.timer = setTimeout(() => {
|
|
170
|
-
let contents = this.ast.generate();
|
|
171
|
-
saveChildFile("src/config/index.js", this.dirHandle, contents);
|
|
172
|
-
this.timer = null;
|
|
173
|
-
}, 1000);
|
|
174
|
-
},
|
|
175
|
-
valueChange(val, type, paths) {
|
|
176
|
-
if (this.ast) {
|
|
177
|
-
let currentAst;
|
|
178
|
-
paths.forEach((path) => {
|
|
179
|
-
currentAst = this.ast.find(`${path}:$_$1`);
|
|
180
|
-
});
|
|
181
|
-
switch (type) {
|
|
182
|
-
case "number":
|
|
183
|
-
val = parseInt(val);
|
|
184
|
-
currentAst.attr("value", val.valueOf());
|
|
185
|
-
break;
|
|
186
|
-
case "boolean":
|
|
187
|
-
val = !!val;
|
|
188
|
-
currentAst.attr("value", val.valueOf());
|
|
189
|
-
break;
|
|
190
|
-
case "string":
|
|
191
|
-
val = !!val;
|
|
192
|
-
currentAst.attr("value", `"${val}"`);
|
|
193
|
-
break;
|
|
194
|
-
case "array":
|
|
195
|
-
val = arrayToCode(val);
|
|
196
|
-
currentAst.attr("value", val);
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
getImageWH(file) {
|
|
202
|
-
return new Promise((resolve, reject) => {
|
|
203
|
-
let img = new Image();
|
|
204
|
-
img.onload = () => {
|
|
205
|
-
resolve({
|
|
206
|
-
width: img.naturalWidth,
|
|
207
|
-
height: img.naturalHeight,
|
|
208
|
-
});
|
|
209
|
-
};
|
|
210
|
-
img.onerror = (e) => {
|
|
211
|
-
reject(e);
|
|
212
|
-
};
|
|
213
|
-
img.src = URL.createObjectURL(file);
|
|
214
|
-
return;
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
async minLogoChange(e) {
|
|
218
|
-
console.log(e);
|
|
219
|
-
let path = "/public/image/logo-min.png";
|
|
220
|
-
let contents = e.raw;
|
|
221
|
-
await saveChildFile(path, this.dirHandle, contents);
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
});
|
|
225
|
-
</script>
|
|
226
|
-
<style lang="scss">
|
|
227
|
-
.logo,
|
|
228
|
-
.logo-min {
|
|
229
|
-
display: flex;
|
|
230
|
-
justify-content: center;
|
|
231
|
-
align-items: center;
|
|
232
|
-
height: 50px;
|
|
233
|
-
width: 200px;
|
|
234
|
-
box-sizing: border-box;
|
|
235
|
-
background-color: #0051c1;
|
|
236
|
-
.logo-image {
|
|
237
|
-
width: auto;
|
|
238
|
-
height: 44px;
|
|
239
|
-
margin: 0 auto;
|
|
240
|
-
&.min {
|
|
241
|
-
width: 44px;
|
|
242
|
-
height: auto;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
.logo-min {
|
|
247
|
-
width: 64px;
|
|
248
|
-
}
|
|
249
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-form label-position="top">
|
|
3
|
+
<el-row gutter="20">
|
|
4
|
+
<conf-form-item
|
|
5
|
+
label="logo 图标"
|
|
6
|
+
tips="建议:宽小于200像素,高小于50像素">
|
|
7
|
+
<el-upload
|
|
8
|
+
class="config-upload"
|
|
9
|
+
drag
|
|
10
|
+
accept="image/jpeg,image/png"
|
|
11
|
+
:show-file-list="false"
|
|
12
|
+
:before-upload="() => false"
|
|
13
|
+
:on-change="logoChange">
|
|
14
|
+
<div class="el-upload__text">点击选择,或拖拽图片至此</div>
|
|
15
|
+
</el-upload>
|
|
16
|
+
<div class="logo">
|
|
17
|
+
<img
|
|
18
|
+
class="logo-image"
|
|
19
|
+
:src="config.logo || defaultLogo" />
|
|
20
|
+
</div>
|
|
21
|
+
</conf-form-item>
|
|
22
|
+
<conf-form-item
|
|
23
|
+
label="minLogo 小图标"
|
|
24
|
+
tips="建议:宽小于64像素,高小于50像素">
|
|
25
|
+
<el-upload
|
|
26
|
+
class="config-upload"
|
|
27
|
+
drag
|
|
28
|
+
accept="image/jpeg,image/png"
|
|
29
|
+
:show-file-list="false"
|
|
30
|
+
:before-upload="() => false"
|
|
31
|
+
:on-change="minLogoChange">
|
|
32
|
+
<div class="el-upload__text">点击选择,或拖拽图片至此</div>
|
|
33
|
+
</el-upload>
|
|
34
|
+
<div class="logo-min">
|
|
35
|
+
<img
|
|
36
|
+
class="logo-image min"
|
|
37
|
+
:src="config.minLogo || defaultMinLogo" />
|
|
38
|
+
</div>
|
|
39
|
+
</conf-form-item>
|
|
40
|
+
<conf-form-item
|
|
41
|
+
label="请求基础路径(开发环境)"
|
|
42
|
+
tips="请求的基础路径,例如:/api">
|
|
43
|
+
<el-input
|
|
44
|
+
v-model="config.baseUrl.dev"
|
|
45
|
+
@change="valueChange($event, 'string', ['baseUrl', 'dev'])"></el-input>
|
|
46
|
+
</conf-form-item>
|
|
47
|
+
<conf-form-item
|
|
48
|
+
label="请求基础路径(生产环境)"
|
|
49
|
+
tips="请求的基础路径,例如:/ccs">
|
|
50
|
+
<el-input
|
|
51
|
+
v-model="config.baseUrl.pro"
|
|
52
|
+
@change="valueChange($event, 'string', ['baseUrl', 'pro'])"></el-input>
|
|
53
|
+
</conf-form-item>
|
|
54
|
+
<conf-form-item
|
|
55
|
+
label="前台首页名称"
|
|
56
|
+
tips="业务端首页的名称,例如:home">
|
|
57
|
+
<el-input
|
|
58
|
+
v-model="config.homeName"
|
|
59
|
+
@change="valueChange($event, 'string', ['homeName'])"></el-input>
|
|
60
|
+
</conf-form-item>
|
|
61
|
+
<conf-form-item
|
|
62
|
+
label="前台首页地址"
|
|
63
|
+
tips="业务端首页的路由地址,例如:/home">
|
|
64
|
+
<el-input
|
|
65
|
+
v-model="config.homePath"
|
|
66
|
+
@change="valueChange($event, 'string', ['homePath'])"></el-input>
|
|
67
|
+
</conf-form-item>
|
|
68
|
+
<conf-form-item
|
|
69
|
+
label="后台首页名称"
|
|
70
|
+
tips="管理后端首页的名称,例如:admin">
|
|
71
|
+
<el-input
|
|
72
|
+
v-model="config.saHomeName"
|
|
73
|
+
@change="valueChange($event, 'string', ['saHomeName'])"></el-input>
|
|
74
|
+
</conf-form-item>
|
|
75
|
+
<conf-form-item
|
|
76
|
+
label="后台首页地址"
|
|
77
|
+
tips="管理后端首页的路由地址,例如:/admin">
|
|
78
|
+
<el-input
|
|
79
|
+
v-model="config.adminPath"
|
|
80
|
+
@change="valueChange($event, 'string', ['adminPath'])"></el-input>
|
|
81
|
+
</conf-form-item>
|
|
82
|
+
<conf-form-item
|
|
83
|
+
label="路由白名单"
|
|
84
|
+
tips="配置到路由地址,不会被拦截,可以直接访问">
|
|
85
|
+
<el-select
|
|
86
|
+
v-model="config.whiteList"
|
|
87
|
+
filterable
|
|
88
|
+
collapse-tags
|
|
89
|
+
collapse-tags-tooltip
|
|
90
|
+
multiple
|
|
91
|
+
@change="valueChange($event, 'array', ['whiteList'])">
|
|
92
|
+
<el-option
|
|
93
|
+
:value="route.path"
|
|
94
|
+
:label="route?.meta?.title || route.name"
|
|
95
|
+
v-for="route in routers"></el-option>
|
|
96
|
+
</el-select>
|
|
97
|
+
</conf-form-item>
|
|
98
|
+
<conf-form-item
|
|
99
|
+
label="帆软服务地址"
|
|
100
|
+
tips="配置帆软打印/报表服务的地址">
|
|
101
|
+
<el-input
|
|
102
|
+
v-model="config.frUrl"
|
|
103
|
+
@change="valueChange($event, 'string', ['frUrl'])"></el-input>
|
|
104
|
+
</conf-form-item>
|
|
105
|
+
<el-col :span="24">
|
|
106
|
+
<el-alert type="warning">
|
|
107
|
+
如果您在更新当前项目的配置文件,那么在您保存配置文件之后会触发页面的刷新效果,请悉知!
|
|
108
|
+
</el-alert>
|
|
109
|
+
</el-col>
|
|
110
|
+
<el-col :span="24">
|
|
111
|
+
<el-button
|
|
112
|
+
type="primary"
|
|
113
|
+
style="width: 100%"
|
|
114
|
+
@click="saveConfig">
|
|
115
|
+
保存
|
|
116
|
+
</el-button>
|
|
117
|
+
</el-col>
|
|
118
|
+
</el-row>
|
|
119
|
+
</el-form>
|
|
120
|
+
</template>
|
|
121
|
+
<script>
|
|
122
|
+
import { defineComponent } from "vue";
|
|
123
|
+
import confFormItem from "../component/confFormItem.vue";
|
|
124
|
+
import defaultMinLogo from "@/assets/images/logo-min.png";
|
|
125
|
+
import defaultLogo from "@/assets/images/logo.png";
|
|
126
|
+
import { getChildFile, saveChildFile } from "yh-fsa";
|
|
127
|
+
import { $, findObject } from "yh-ggc";
|
|
128
|
+
import { arrayToCode } from "yh-ggc";
|
|
129
|
+
|
|
130
|
+
export default defineComponent({
|
|
131
|
+
name: "sysConfig",
|
|
132
|
+
props: ["dirHandle", "routers"],
|
|
133
|
+
components: {
|
|
134
|
+
confFormItem,
|
|
135
|
+
},
|
|
136
|
+
data() {
|
|
137
|
+
return {
|
|
138
|
+
defaultMinLogo,
|
|
139
|
+
defaultLogo,
|
|
140
|
+
logoChange: false,
|
|
141
|
+
ast: null,
|
|
142
|
+
saveTimer: null,
|
|
143
|
+
config: {
|
|
144
|
+
baseUrl: {},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
mounted() {
|
|
149
|
+
this.getConfig();
|
|
150
|
+
},
|
|
151
|
+
methods: {
|
|
152
|
+
async getConfig() {
|
|
153
|
+
let confText = await getChildFile("src/config/index.js", this.dirHandle);
|
|
154
|
+
if (confText) {
|
|
155
|
+
let confAST = $(confText);
|
|
156
|
+
this.ast = confAST;
|
|
157
|
+
let obj = await findObject(confAST);
|
|
158
|
+
for (const key in obj) {
|
|
159
|
+
const val = obj[key];
|
|
160
|
+
this.config[key] = val;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
saveConfig() {
|
|
165
|
+
if (this.timer) {
|
|
166
|
+
clearTimeout(this.timer);
|
|
167
|
+
this.timer = null;
|
|
168
|
+
}
|
|
169
|
+
this.timer = setTimeout(() => {
|
|
170
|
+
let contents = this.ast.generate();
|
|
171
|
+
saveChildFile("src/config/index.js", this.dirHandle, contents);
|
|
172
|
+
this.timer = null;
|
|
173
|
+
}, 1000);
|
|
174
|
+
},
|
|
175
|
+
valueChange(val, type, paths) {
|
|
176
|
+
if (this.ast) {
|
|
177
|
+
let currentAst;
|
|
178
|
+
paths.forEach((path) => {
|
|
179
|
+
currentAst = this.ast.find(`${path}:$_$1`);
|
|
180
|
+
});
|
|
181
|
+
switch (type) {
|
|
182
|
+
case "number":
|
|
183
|
+
val = parseInt(val);
|
|
184
|
+
currentAst.attr("value", val.valueOf());
|
|
185
|
+
break;
|
|
186
|
+
case "boolean":
|
|
187
|
+
val = !!val;
|
|
188
|
+
currentAst.attr("value", val.valueOf());
|
|
189
|
+
break;
|
|
190
|
+
case "string":
|
|
191
|
+
val = !!val;
|
|
192
|
+
currentAst.attr("value", `"${val}"`);
|
|
193
|
+
break;
|
|
194
|
+
case "array":
|
|
195
|
+
val = arrayToCode(val);
|
|
196
|
+
currentAst.attr("value", val);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
getImageWH(file) {
|
|
202
|
+
return new Promise((resolve, reject) => {
|
|
203
|
+
let img = new Image();
|
|
204
|
+
img.onload = () => {
|
|
205
|
+
resolve({
|
|
206
|
+
width: img.naturalWidth,
|
|
207
|
+
height: img.naturalHeight,
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
img.onerror = (e) => {
|
|
211
|
+
reject(e);
|
|
212
|
+
};
|
|
213
|
+
img.src = URL.createObjectURL(file);
|
|
214
|
+
return;
|
|
215
|
+
});
|
|
216
|
+
},
|
|
217
|
+
async minLogoChange(e) {
|
|
218
|
+
console.log(e);
|
|
219
|
+
let path = "/public/image/logo-min.png";
|
|
220
|
+
let contents = e.raw;
|
|
221
|
+
await saveChildFile(path, this.dirHandle, contents);
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
</script>
|
|
226
|
+
<style lang="scss">
|
|
227
|
+
.logo,
|
|
228
|
+
.logo-min {
|
|
229
|
+
display: flex;
|
|
230
|
+
justify-content: center;
|
|
231
|
+
align-items: center;
|
|
232
|
+
height: 50px;
|
|
233
|
+
width: 200px;
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
background-color: #0051c1;
|
|
236
|
+
.logo-image {
|
|
237
|
+
width: auto;
|
|
238
|
+
height: 44px;
|
|
239
|
+
margin: 0 auto;
|
|
240
|
+
&.min {
|
|
241
|
+
width: 44px;
|
|
242
|
+
height: auto;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
.logo-min {
|
|
247
|
+
width: 64px;
|
|
248
|
+
}
|
|
249
|
+
</style>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<iframe
|
|
3
|
-
:src="url"
|
|
4
|
-
frameborder="0"
|
|
5
|
-
width="100%"
|
|
6
|
-
:height="iframeHeight + 'px'"
|
|
7
|
-
scrolling="auto"
|
|
8
|
-
style="background-color: #fff"></iframe>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: "IframeFReportView",
|
|
14
|
-
computed: {
|
|
15
|
-
iframeHeight() {
|
|
16
|
-
return document.documentElement.clientHeight - 100;
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
data() {
|
|
20
|
-
return {
|
|
21
|
-
url: "",
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
mounted() {
|
|
25
|
-
this.url = this.$route.params.url;
|
|
26
|
-
},
|
|
27
|
-
};
|
|
1
|
+
<template>
|
|
2
|
+
<iframe
|
|
3
|
+
:src="url"
|
|
4
|
+
frameborder="0"
|
|
5
|
+
width="100%"
|
|
6
|
+
:height="iframeHeight + 'px'"
|
|
7
|
+
scrolling="auto"
|
|
8
|
+
style="background-color: #fff"></iframe>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "IframeFReportView",
|
|
14
|
+
computed: {
|
|
15
|
+
iframeHeight() {
|
|
16
|
+
return document.documentElement.clientHeight - 100;
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
url: "",
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
mounted() {
|
|
25
|
+
this.url = this.$route.params.url;
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
28
|
</script>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slw-window-index :window-id="windowId"></slw-window-index>
|
|
3
|
-
</template>
|
|
4
|
-
<script setup>
|
|
5
|
-
import { ref, watch, onMounted } from "vue";
|
|
6
|
-
import { useRoute, onBeforeRouteUpdate } from "vue-router";
|
|
7
|
-
|
|
8
|
-
let windowId = ref("");
|
|
9
|
-
const route = useRoute();
|
|
10
|
-
// watch(
|
|
11
|
-
// () => route.meta.id,
|
|
12
|
-
// (id) => (windowId.value = id)
|
|
13
|
-
// );
|
|
14
|
-
onMounted(() => {
|
|
15
|
-
windowId.value = route.params.id;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// onBeforeRouteUpdate((to, from, next) => {
|
|
19
|
-
// windowId.value = to.meta.id;
|
|
20
|
-
// next();
|
|
21
|
-
// });
|
|
22
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<slw-window-index :window-id="windowId"></slw-window-index>
|
|
3
|
+
</template>
|
|
4
|
+
<script setup>
|
|
5
|
+
import { ref, watch, onMounted } from "vue";
|
|
6
|
+
import { useRoute, onBeforeRouteUpdate } from "vue-router";
|
|
7
|
+
|
|
8
|
+
let windowId = ref("");
|
|
9
|
+
const route = useRoute();
|
|
10
|
+
// watch(
|
|
11
|
+
// () => route.meta.id,
|
|
12
|
+
// (id) => (windowId.value = id)
|
|
13
|
+
// );
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
windowId.value = route.params.id;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// onBeforeRouteUpdate((to, from, next) => {
|
|
19
|
+
// windowId.value = to.meta.id;
|
|
20
|
+
// next();
|
|
21
|
+
// });
|
|
22
|
+
</script>
|