@lambo-design/shared 1.0.0-beta.207 → 1.0.0-beta.209

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.
@@ -129,3 +129,36 @@
129
129
  height: 95vh;
130
130
  text-align: center;
131
131
  }
132
+
133
+ .ind-file-preview-content {
134
+ width: 90vw;
135
+ height: 85vh;
136
+ }
137
+ .ind-file-preview-modal {
138
+ .ivu-modal-wrap {
139
+ display: flex;
140
+ align-items: center;
141
+ }
142
+ .ivu-modal {
143
+ top: 0;
144
+ }
145
+ .ivu-modal-content {
146
+ background: #f2f4f7;
147
+ }
148
+ .ivu-modal-footer {
149
+ background: #f2f4f7;
150
+ border: none;
151
+ }
152
+ .ivu-icon-ios-close {
153
+ border: 3px solid white;
154
+ border-radius: 20px;
155
+ background: #999999;
156
+ color: white;
157
+ font-weight: bold;
158
+ }
159
+ .ivu-modal-close {
160
+ overflow: visible;
161
+ right: -17px;
162
+ top: -17px;
163
+ }
164
+ }
@@ -1,4 +1,4 @@
1
- .ind-small-theme {
1
+ :root,.ind-small-theme {
2
2
  --ind-button-height-md: 30px;
3
3
  --ind-button-padding-md: 7px;
4
4
 
@@ -1,4 +1,4 @@
1
- .ind-small-theme {
1
+ :root,.ind-small-theme {
2
2
  --ind-menu-desc-margin-top: 0px;
3
3
  --ind-sc-padding-top: 10px; // 值来自四川
4
4
 
@@ -1,4 +1,4 @@
1
- .ind-small-theme {
1
+ :root,.ind-small-theme {
2
2
  // basic layout 系统布局变量 -begin
3
3
  --ivu-menu-item-font-size: var(--ind-font-size-md);
4
4
 
@@ -1,4 +1,4 @@
1
- .ind-small-theme {
1
+ :root,.ind-small-theme {
2
2
  --ind-table-padding: var(--ind-padding-sm);
3
3
  --ind-ag-cell-widget-spacing: 12px;
4
4
 
@@ -1,3 +1,3 @@
1
- .ind-small-theme {
1
+ :root,.ind-small-theme {
2
2
  --ind-tag-height: 18px; //22px // 16px;; // 值来自四川 // 又改一版
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.207",
3
+ "version": "1.0.0-beta.209",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
package/utils/bus.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import Vue from 'vue'
2
- const Bus = null //new Vue();
2
+ const Bus = new Vue();
3
3
  export default Bus;
@@ -5,6 +5,31 @@ import { setSessionStorage, getSessionStorage} from "../platform";
5
5
  import { axiosN as axios } from '../n/reuqest/axiosN'
6
6
  const CONTEXT = '/user-manage-server'
7
7
 
8
+ export async function getServiceUrlDict(res) {
9
+ if (res.serviceUrl) {
10
+ try {
11
+ const { data } = await ajax.get(res.serviceUrl)
12
+ let result = {}
13
+ if (data.code == 1) {
14
+ let dictList = data.data;
15
+ if(dictList.length > 0){
16
+ result['enumList'] = dictList
17
+ setSessionStorage(res.formKey + '_LIST', dictList)
18
+ let dictMap = {}
19
+ for(let dict of dictList) {
20
+ dictMap[dict.K] = dict.V;
21
+ }
22
+ result['enumData'] = dictMap
23
+ setSessionStorage(res.formKey + '_MAP', dictMap)
24
+ }
25
+ }
26
+ return result;
27
+ } catch (error) {
28
+ console.error(error)
29
+ }
30
+ }
31
+ }
32
+
8
33
  export async function getAllDict(dictIdArray) {
9
34
  if (dictIdArray.length > 0) {
10
35
  try {
package/utils/n/api.js CHANGED
@@ -5,4 +5,18 @@ const CONTEXT = `${config.immServerContext}/manage/pub/dateperiod`
5
5
 
6
6
  export function getWeeksByMonthAPI(params) {
7
7
  return axiosN.get(`${CONTEXT}/getWeekByMonth`, { params })
8
- }
8
+ }
9
+
10
+ /**
11
+ * 获取文档中心预览URL
12
+ *
13
+ * @param fileId 文件Id
14
+ * @returns 文件内容
15
+ */
16
+ export function getPreviewUrlApi(fileId) {
17
+ const axiosConfig = {}
18
+ return axiosN.get(
19
+ `${location.protocol}//${location.host}${config.ucExtServerContext}/api/wps/getPreviewUrl/${fileId}?previewMode=high_definition`,
20
+ axiosConfig,
21
+ )
22
+ }
@@ -13,3 +13,5 @@ instance.formPost = function (url, data, config) {
13
13
  return instance.post(url, data, Object.assign(Object.assign({}, config), { headers }));
14
14
  };
15
15
  export { instance as axiosN };
16
+
17
+ export default instance;
package/utils/oss.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { CONTENT_TYPE } from './ajax/content-type.js';
2
2
  import { config } from '../config/config.js';
3
3
  import ajax from "./ajax";
4
+ import axiosN from "./n/reuqest/axiosN.js";
4
5
 
5
6
  /**
6
7
  * 文档中心下载文件的url,主要用于图片等直接写在 href 里
@@ -47,7 +48,7 @@ export function putOssFileApi(filename, blob) {
47
48
  let formData = new FormData()
48
49
  formData.append('file', blob, filename)
49
50
 
50
- return ajax({
51
+ return axiosN({
51
52
  method: 'post',
52
53
  url: putOssFileUrl(),
53
54
  headers: { 'Content-Type': CONTENT_TYPE.multiForm },