gcs-ui-lib 1.1.433
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/.env.development +5 -0
- package/.env.production +7 -0
- package/.eslintrc.js +5 -0
- package/README.md +97 -0
- package/_webpack.config.js +135 -0
- package/babel.config.js +17 -0
- package/lib/demo.html +10 -0
- package/lib/fonts/SIMSUN.5e0c362c.5e0c362c.ttf +0 -0
- package/lib/fonts/element-icons.535877f5.535877f5.woff +0 -0
- package/lib/fonts/element-icons.732389de.732389de.ttf +0 -0
- package/lib/fonts/iconfont.09d221ee.09d221ee.woff +0 -0
- package/lib/fonts/iconfont.1c4bfacc.1c4bfacc.ttf +0 -0
- package/lib/fonts/iconfont.a6f34dc7.a6f34dc7.woff2 +0 -0
- package/lib/fonts/iconfont.f4c32765.f4c32765.ttf +0 -0
- package/lib/gcs-ui-lib.common.js +40576 -0
- package/lib/gcs-ui-lib.css +3 -0
- package/lib/gcs-ui-lib.umd.js +40586 -0
- package/lib/gcs-ui-lib.umd.min.js +40 -0
- package/lib/img/bankbackground(1).e1f6e40f.jpg +0 -0
- package/lib/img/busibackground(2).7e09bf1f.jpg +0 -0
- package/lib/img/document.193a282d.svg +8 -0
- package/lib/img/folder.8e019792.svg +9 -0
- package/lib/img/icon.fc86764f.gif +0 -0
- package/npm +1 -0
- package/package.json +100 -0
- package/packages/DynamicForm/index.js +7 -0
- package/packages/DynamicForm/src/components/Amount.vue +51 -0
- package/packages/DynamicForm/src/components/AmountRange.vue +76 -0
- package/packages/DynamicForm/src/components/CheckboxGroup.vue +63 -0
- package/packages/DynamicForm/src/components/DMY.vue +126 -0
- package/packages/DynamicForm/src/components/Date.vue +51 -0
- package/packages/DynamicForm/src/components/DateRange.vue +51 -0
- package/packages/DynamicForm/src/components/Dialog.vue +247 -0
- package/packages/DynamicForm/src/components/Input.vue +48 -0
- package/packages/DynamicForm/src/components/InputNumber.vue +69 -0
- package/packages/DynamicForm/src/components/InputNumberRange.vue +47 -0
- package/packages/DynamicForm/src/components/LazySelect.vue +311 -0
- package/packages/DynamicForm/src/components/RadioGroup.vue +43 -0
- package/packages/DynamicForm/src/components/Rate.vue +57 -0
- package/packages/DynamicForm/src/components/Select.vue +307 -0
- package/packages/DynamicForm/src/components/Switch.vue +32 -0
- package/packages/DynamicForm/src/components/Textarea.vue +58 -0
- package/packages/DynamicForm/src/components/TimeSelect.vue +61 -0
- package/packages/DynamicForm/src/components/unitTreeSelect.vue +141 -0
- package/packages/DynamicForm/src/components/urlLinkInput.vue +100 -0
- package/packages/DynamicForm/src/demo/index.vue +486 -0
- package/packages/DynamicForm/src/fileUpload.js +232 -0
- package/packages/DynamicForm/src/formConfig.js +2910 -0
- package/packages/DynamicForm/src/helpers.js +18 -0
- package/packages/DynamicForm/src/main.vue +1095 -0
- package/packages/FileImport/index.js +7 -0
- package/packages/FileImport/src/demo/index.vue +29 -0
- package/packages/FileImport/src/main.vue +306 -0
- package/packages/SelectTicket/index.js +7 -0
- package/packages/SelectTicket/src/Tree/index.vue +13 -0
- package/packages/SelectTicket/src/demo/index.vue +139 -0
- package/packages/SelectTicket/src/header.js +276 -0
- package/packages/SelectTicket/src/main.vue +581 -0
- package/packages/SelectTicket/src/printDialog/dialogO.vue +116 -0
- package/packages/SelectTicket/src/printDialog/index.vue +69 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/README.MD +6 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/mixins/index.js +35 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/obverse.vue +768 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/overview.vue +115 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/printList.vue +127 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/reverse.vue +205 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation//351/231/204/345/212/240/344/277/235/350/257/201/344/277/241/346/201/257/345/255/227/346/256/265/345/257/271/347/205/247.md +246 -0
- package/packages/SelectTicket/src/ticketDetail/dialog.vue +73 -0
- package/packages/SelectTicket/src/ticketDetail/img/bankbackground(1).jpg +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/busibackground(2).jpg +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/icon.gif +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/icon2.png +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/noData.png +0 -0
- package/packages/SelectTicket/src/ticketDetail/index.vue +188 -0
- package/packages/SelectTreeUnit/index.js +7 -0
- package/packages/SelectTreeUnit/src/Tree/document.svg +8 -0
- package/packages/SelectTreeUnit/src/Tree/folder.svg +9 -0
- package/packages/SelectTreeUnit/src/Tree/index.vue +239 -0
- package/packages/SelectTreeUnit/src/demo/index.vue +219 -0
- package/packages/SelectTreeUnit/src/forEachs.js +16 -0
- package/packages/SelectTreeUnit/src/main.vue +1136 -0
- package/packages/SelectTreeUnitForm/index.js +7 -0
- package/packages/SelectTreeUnitForm/src/Tree/document.svg +8 -0
- package/packages/SelectTreeUnitForm/src/Tree/folder.svg +9 -0
- package/packages/SelectTreeUnitForm/src/Tree/index.vue +254 -0
- package/packages/SelectTreeUnitForm/src/demo/index.vue +230 -0
- package/packages/SelectTreeUnitForm/src/forEachs.js +16 -0
- package/packages/SelectTreeUnitForm/src/main.vue +1065 -0
- package/packages/Trade/index.js +7 -0
- package/packages/Trade/src/components/all/index.vue +891 -0
- package/packages/Trade/src/components/dynamicColumnMixin.js +69 -0
- package/packages/Trade/src/components/getDCloumn.js +15 -0
- package/packages/Trade/src/components/i18n.json +3337 -0
- package/packages/Trade/src/components/pendingEvent/index.vue +909 -0
- package/packages/Trade/src/components/server-config.js +60 -0
- package/packages/Trade/src/components/setUnitName.js +10 -0
- package/packages/Trade/src/components/specialHandle.js +171 -0
- package/packages/Trade/src/components/topendingTabs.js +21 -0
- package/packages/Trade/src/demo/index.vue +42 -0
- package/packages/Trade/src/main.vue +86 -0
- package/packages/ZipImport/index.js +7 -0
- package/packages/ZipImport/src/demo/index.vue +139 -0
- package/packages/ZipImport/src/main.vue +303 -0
- package/packages/approvel/index.js +8 -0
- package/packages/approvel/src/demo/index.vue +28 -0
- package/packages/approvel/src/main.vue +26 -0
- package/packages/approvel/src/progress.vue +167 -0
- package/packages/approvel/src/url.json +29 -0
- package/packages/extends/ElSelect.vue +180 -0
- package/packages/imgs/list-select.png +0 -0
- package/packages/imgs/list-unselect.png +0 -0
- package/packages/imgs/list.png +0 -0
- package/packages/imgs/tree-select.png +0 -0
- package/packages/imgs/tree-unselect.png +0 -0
- package/packages/imgs/tree.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +19 -0
- package/src/App.vue +61 -0
- package/src/api/aims.js +8 -0
- package/src/api/common.js +103 -0
- package/src/api/fileApi.js +22 -0
- package/src/config/appSettings.js +12 -0
- package/src/config/favicon.ico +0 -0
- package/src/css/selectTreeUnit.scss +247 -0
- package/src/filter/filter.js +1 -0
- package/src/filter/index.js +274 -0
- package/src/fonts/demo.css +539 -0
- package/src/fonts/iconfont.css +21 -0
- package/src/fonts/iconfont.js +1 -0
- package/src/fonts/iconfont.json +23 -0
- package/src/fonts/iconfont.ttf +0 -0
- package/src/index.js +109 -0
- package/src/locale/format.js +47 -0
- package/src/locale/index.js +48 -0
- package/src/locale/lang/cn2hk.json +1270 -0
- package/src/locale/lang/en.js +73 -0
- package/src/locale/lang/es.js +7 -0
- package/src/locale/lang/index.js +66 -0
- package/src/locale/lang/ja.js +7 -0
- package/src/locale/lang/zh.js +74 -0
- package/src/locale/lang/zht.js +28 -0
- package/src/main.js +44 -0
- package/src/preview/page/Aside/index.vue +60 -0
- package/src/preview/router.js +46 -0
- package/src/utils/auth.js +12 -0
- package/src/utils/directive/asciiWidth.js +107 -0
- package/src/utils/directive/clickOutside.js +21 -0
- package/src/utils/directive/vtitle.js +140 -0
- package/src/utils/index.js +545 -0
- package/src/utils/request.js +191 -0
- package/src/utils/requestCache.js +68 -0
- package/src/utils/thems.js +62 -0
- package/types/favicon.ico +0 -0
- package/vue.config.js +45 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { getToken } from "@/utils/auth";
|
|
3
|
+
import { randomString } from "@/utils";
|
|
4
|
+
import { getByBussValue, getUploadedFile } from "@/api/fileApi.js";
|
|
5
|
+
let token = getToken();
|
|
6
|
+
// NEW_PRODUCT("新增产品","invest_041001001"),
|
|
7
|
+
// DEPOSIT_APPLY("存入申请","invest_041002001"),
|
|
8
|
+
// DEPOSIT_REGISTER("存款登记","invest_041003001"),
|
|
9
|
+
// TRADING_APPLY("交易申请",""),
|
|
10
|
+
// TRADING_REGISTER("交易登记",""),
|
|
11
|
+
// AGREEMENT_APPLY("协定申请","invest_041006001"),
|
|
12
|
+
// AGREEMENT_REGISTER("协定登记","invest_041007001"),
|
|
13
|
+
// TRADING_REGISTER_MODIFY("交易登记-修改",""),
|
|
14
|
+
// TRADING_REGISTER_DELETE("交易登记-删除",""),
|
|
15
|
+
// INFORMATION_CORRECTION("信息修正","invest_041009001"),
|
|
16
|
+
// DUE_PROCESSING("到期处理","invest_041010001"),
|
|
17
|
+
// DEPOSIT_ABANDON("存款废弃",""),
|
|
18
|
+
// ASSOCIATED_BUSINESS("关联业务",""),
|
|
19
|
+
// OPEN_POSITION_APPLY("建仓申请","invest_041011001"),
|
|
20
|
+
// OPEN_POSITION_REGISTER("建仓登记","invest_041012001"),
|
|
21
|
+
// HOLD_POSITION_ABANDON("持仓废弃",""),
|
|
22
|
+
// INCOME_WITHHOLDING("收益预提","invest_041013001"),
|
|
23
|
+
export const fileUploadTableMixin = {
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
fileUploadTableData: [],
|
|
27
|
+
fileAction: "/api/neams/eamsbaserecord/save",
|
|
28
|
+
seeTypes: /\.jpg|\.png|\.gif|\.pdf|\.swf|\.xls|\.xlsx|\.docx|\.doc$/i,
|
|
29
|
+
dataPorp: {
|
|
30
|
+
// 可选文件类型 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file
|
|
31
|
+
fileAccept: ".rar,.zip,.doc,.docx,.pdf,image/*,.xls,.xlsx",
|
|
32
|
+
typeOptions: [],
|
|
33
|
+
},
|
|
34
|
+
// uploadParam: {
|
|
35
|
+
// syscode: "",
|
|
36
|
+
// appno: "",
|
|
37
|
+
// bussValue: "",
|
|
38
|
+
// attno: "",
|
|
39
|
+
// bussId: null,
|
|
40
|
+
// },
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
addRow() {
|
|
46
|
+
// 自行添加
|
|
47
|
+
this.fileUploadTableData.splice(0, 0, {
|
|
48
|
+
id: "n" + Math.random(),
|
|
49
|
+
type: "",
|
|
50
|
+
name: "",
|
|
51
|
+
time: "",
|
|
52
|
+
user: "",
|
|
53
|
+
_fileData: {
|
|
54
|
+
/* 上传时附带的额外参数 */
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
downRows(rows) {
|
|
59
|
+
if (rows && rows.length == 0) return this.$message.error("请选择数据");
|
|
60
|
+
rows.map(item => {
|
|
61
|
+
axios({
|
|
62
|
+
method: "POST",
|
|
63
|
+
url: "/api/neams/eamsbaserecord/downloadFile",
|
|
64
|
+
responseType: "blob",
|
|
65
|
+
headers: {
|
|
66
|
+
charset: "utf-8",
|
|
67
|
+
Authorization: `Bearer ${token}`,
|
|
68
|
+
"Content-Type": "application/json",
|
|
69
|
+
// "Content-Type": "multipart/form-data",
|
|
70
|
+
timestamp: Date.now(),
|
|
71
|
+
OperationDesc: "yYarJp",
|
|
72
|
+
requestKey: randomString(16),
|
|
73
|
+
},
|
|
74
|
+
data: { beid: item.beid },
|
|
75
|
+
}).then((response) => {
|
|
76
|
+
let resp = response.data;
|
|
77
|
+
if (resp.type === "application/octet-stream") {
|
|
78
|
+
// const fileName = decodeURIComponent(sessionStorage.getItem('excelFileName'));
|
|
79
|
+
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
80
|
+
const blob = new Blob([resp], {
|
|
81
|
+
type: "application/zip",
|
|
82
|
+
});
|
|
83
|
+
window.navigator.msSaveOrOpenBlob(blob, item.name);
|
|
84
|
+
} else {
|
|
85
|
+
/* 火狐谷歌的文件下载方式 */
|
|
86
|
+
const blob = new Blob([resp], {
|
|
87
|
+
type: "application/zip",
|
|
88
|
+
});
|
|
89
|
+
const url = window.URL.createObjectURL(blob);
|
|
90
|
+
const link = document.createElement("a");
|
|
91
|
+
link.href = url;
|
|
92
|
+
link.download = item.name; // 文件重命名
|
|
93
|
+
link.click();
|
|
94
|
+
URL.revokeObjectURL(url);
|
|
95
|
+
}
|
|
96
|
+
// resolve(response)
|
|
97
|
+
} else {
|
|
98
|
+
this.$message.error(this.$t(`common_w_0094`) + "!");
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
.catch((error) => this.$message.error(error));
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
},
|
|
105
|
+
deleteRows(rows) {
|
|
106
|
+
// 自行判断是不是可以删除并删除
|
|
107
|
+
rows.forEach((row) => {
|
|
108
|
+
let index = this.fileUploadTableData.findIndex((r) => r.id === row.id);
|
|
109
|
+
if (index > -1) {
|
|
110
|
+
this.fileUploadTableData.splice(index, 1);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
// 如果不需要自定义上传方法,不用写此方法
|
|
115
|
+
uploadRequest(options, row) {
|
|
116
|
+
// row 在表格中单条上传,对应的当前行数据
|
|
117
|
+
/* 配置请求数据 */
|
|
118
|
+
let { file } = options;
|
|
119
|
+
let data = new FormData();
|
|
120
|
+
data.append("file", file);
|
|
121
|
+
data.append(
|
|
122
|
+
"data",
|
|
123
|
+
JSON.stringify({
|
|
124
|
+
syscode: this.uploadParam.syscode,
|
|
125
|
+
appno: this.uploadParam.appno, //模块名
|
|
126
|
+
bussValue: this.uploadParam.bussValue, // 业务品种
|
|
127
|
+
attno: row.type, // 附件类型
|
|
128
|
+
bussId: this.uploadParam.bussId, // 业务ID
|
|
129
|
+
cltno: JSON.parse(sessionStorage.getItem("userInfo")).cltNo,
|
|
130
|
+
memo: file.name,
|
|
131
|
+
recordname: file.name,
|
|
132
|
+
fileSize: file.size,
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
data.append(
|
|
136
|
+
"date",
|
|
137
|
+
// dayjs().format("YYYY-MM-DD HH:mm:ss") + ",2099-12-31 23:59:59"
|
|
138
|
+
"2022-01-01 00:00:00" + ",2099-12-31 23:59:59"
|
|
139
|
+
);
|
|
140
|
+
/* 设置一个回调Promise */
|
|
141
|
+
let por = new Promise((resolve, reject) => {
|
|
142
|
+
axios.post(`/api/neams/eamsbaserecord/batchSavejson`, data, {
|
|
143
|
+
headers: {
|
|
144
|
+
"Content-Type": "multipart/form-data",
|
|
145
|
+
charset: "utf-8",
|
|
146
|
+
timestamp: Date.now(),
|
|
147
|
+
Authorization: `Bearer ${token}`,
|
|
148
|
+
requestKey: randomString(16),
|
|
149
|
+
OperationDesc: "yYarJp",
|
|
150
|
+
},
|
|
151
|
+
loading: false,
|
|
152
|
+
noMsg: true,
|
|
153
|
+
})
|
|
154
|
+
.then(({ data }) => {
|
|
155
|
+
resolve(data); // 将返回值传递给上传组件
|
|
156
|
+
})
|
|
157
|
+
.catch((err) => {
|
|
158
|
+
reject(err)
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
return por;
|
|
162
|
+
},
|
|
163
|
+
// 获取附件类型
|
|
164
|
+
getByBussValueFn() {
|
|
165
|
+
getByBussValue({
|
|
166
|
+
bussValue: this.uploadParam.bussValue,
|
|
167
|
+
}).then((res) => {
|
|
168
|
+
this.dataPorp.typeOptions = (res || []).map((item) => {
|
|
169
|
+
item.type = item.attno;
|
|
170
|
+
item.label = item.attname;
|
|
171
|
+
return item;
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
// 获取附件信息
|
|
176
|
+
getUploadedFiles() {
|
|
177
|
+
getUploadedFile({
|
|
178
|
+
bussValue: this.uploadParam.bussValue,
|
|
179
|
+
bussId: this.uploadParam.bussId,
|
|
180
|
+
}).then((res) => {
|
|
181
|
+
this.fileUploadTableData =
|
|
182
|
+
(res || []).map((item) => {
|
|
183
|
+
item.type = item.attno;
|
|
184
|
+
item.name = item.memo || item.recordname;
|
|
185
|
+
item.time = item.uploadtime;
|
|
186
|
+
item.user = item.creator;
|
|
187
|
+
item.url = `/api/neams/eamsbaserecord/download/${item.beid}`;
|
|
188
|
+
item['_name'] = item.memo;
|
|
189
|
+
return item;
|
|
190
|
+
}) || [];
|
|
191
|
+
});
|
|
192
|
+
},
|
|
193
|
+
// 批量上传成功数据加入到表格后,设置其他自定义字段
|
|
194
|
+
onSuccess(file, row) {
|
|
195
|
+
let _fileData = file.response;
|
|
196
|
+
this.$set(row, "id", _fileData.data);
|
|
197
|
+
this.$set(
|
|
198
|
+
row,
|
|
199
|
+
"user",
|
|
200
|
+
JSON.parse(sessionStorage.getItem("User_Info")).userName
|
|
201
|
+
);
|
|
202
|
+
this.$set(row, "archiveId", _fileData.data);
|
|
203
|
+
this.$set(row, "beid", _fileData.data);
|
|
204
|
+
},
|
|
205
|
+
onRemove(file) {
|
|
206
|
+
if (file.status === "success") {
|
|
207
|
+
// 如果表格中存在这条数据则删除这条数据
|
|
208
|
+
let { beid } = file.response;
|
|
209
|
+
let i = this.fileUploadTableData.findIndex((d) => d.id === beid);
|
|
210
|
+
i !== -1 && this.fileUploadTableData.splice(i, 1);
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
// mounted() {
|
|
215
|
+
// this.getByBussValueFn();
|
|
216
|
+
// this.getUploadedFiles();
|
|
217
|
+
// },
|
|
218
|
+
watch: {
|
|
219
|
+
uploadParam: {
|
|
220
|
+
immediate: true,
|
|
221
|
+
deep: true,
|
|
222
|
+
handler(){
|
|
223
|
+
if(this.uploadParam.bussValue){
|
|
224
|
+
this.getByBussValueFn();
|
|
225
|
+
}
|
|
226
|
+
if(this.uploadParam.bussId){
|
|
227
|
+
this.getUploadedFiles();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
}
|