Spaces:
Running
Running
Upload util.js
Browse files- wps-test/js/util.js +19 -0
wps-test/js/util.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
//在后续的wps版本中,wps的所有枚举值都会通过wps.Enum对象来自动支持,现阶段先人工定义
|
2 |
+
var WPS_Enum = {
|
3 |
+
msoCTPDockPositionLeft:0,
|
4 |
+
msoCTPDockPositionRight:2
|
5 |
+
}
|
6 |
+
|
7 |
+
function GetUrlPath() {
|
8 |
+
let e = document.location.toString()
|
9 |
+
return -1!=(e=decodeURI(e)).indexOf("/")&&(e=e.substring(0,e.lastIndexOf("/"))),e
|
10 |
+
}
|
11 |
+
/**
|
12 |
+
* 通过wps提供的接口执行一段脚本
|
13 |
+
* @param {*} param 需要执行的脚本
|
14 |
+
*/
|
15 |
+
function shellExecuteByOAAssist(param) {
|
16 |
+
if (wps != null) {
|
17 |
+
wps.OAAssist.ShellExecute(param)
|
18 |
+
}
|
19 |
+
}
|