venus-design 0.2.2 → 0.2.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/dist/Config/utils.js +4 -5
- package/dist/ProForm/index.js +2 -2
- package/dist/Upload/styles.less +46 -0
- package/dist/VenusForm/staticAttr.d.ts +4 -0
- package/dist/VenusForm/staticAttr.js +5 -0
- package/dist/VenusUploadForm/index.d.ts +4 -0
- package/dist/VenusUploadForm/index.js +236 -0
- package/dist/VenusUploadForm/service.d.ts +2 -0
- package/dist/VenusUploadForm/service.js +57 -0
- package/dist/VenusUploadForm/services.d.ts +1 -0
- package/dist/VenusUploadForm/services.js +10 -0
- package/dist/VenusUploadForm/styles.less +51 -0
- package/dist/common.less +48 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +11 -11
package/dist/Config/utils.js
CHANGED
|
@@ -259,12 +259,11 @@ export var getUmi = function getUmi() {
|
|
|
259
259
|
// src/utils/history.ts
|
|
260
260
|
var umiData;
|
|
261
261
|
try {
|
|
262
|
-
|
|
263
|
-
umiData = require('@umijs/max');
|
|
262
|
+
umiData = require('umi');
|
|
264
263
|
} catch (e) {
|
|
265
264
|
try {
|
|
266
|
-
//
|
|
267
|
-
umiData = require('
|
|
265
|
+
// 尝试从 @umijs/max 中引入 history
|
|
266
|
+
umiData = require('@umijs/max');
|
|
268
267
|
} catch (e) {
|
|
269
268
|
// 如果都失败,可以考虑使用其他方式创建 history 或抛出错误
|
|
270
269
|
console.warn('无法找到 umi 模块。请确保你的项目中安装了 @umijs/max 或 umi。');
|
|
@@ -293,7 +292,7 @@ export var getApp = function getApp() {
|
|
|
293
292
|
};
|
|
294
293
|
}
|
|
295
294
|
} catch (e) {
|
|
296
|
-
console.warn('无法找到
|
|
295
|
+
console.warn('无法找到 antd 模块。请确保你的项目中安装了antd');
|
|
297
296
|
}
|
|
298
297
|
return appData;
|
|
299
298
|
};
|
package/dist/ProForm/index.js
CHANGED
|
@@ -65,7 +65,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
65
65
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
66
66
|
import React from 'react';
|
|
67
67
|
import classnames from 'classnames';
|
|
68
|
-
import { CheckBoxInput, NumberPercent, NumberUnit, RadioAndInput, Search, TreeSelect, UploadImage,
|
|
68
|
+
import { CheckBoxInput, NumberPercent, NumberUnit, RadioAndInput, Search, TreeSelect, UploadImage, VenusUploadSecLevelForm, Upload } from "./..";
|
|
69
69
|
import "./styles.less";
|
|
70
70
|
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";
|
|
71
71
|
var ProForm = function ProForm(props) {
|
|
@@ -859,7 +859,7 @@ export var VenusFormUploadPro = function VenusFormUploadPro(props) {
|
|
|
859
859
|
disabled = props.disabled,
|
|
860
860
|
isDuo = props.isDuo,
|
|
861
861
|
others = _objectWithoutProperties(props, _excluded38);
|
|
862
|
-
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(
|
|
862
|
+
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(VenusUploadSecLevelForm, _extends({
|
|
863
863
|
placeholder: placeholder,
|
|
864
864
|
isDuo: isDuo,
|
|
865
865
|
disabled: disabled
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@import '~@/common';
|
|
2
|
+
|
|
3
|
+
.uploadList{
|
|
4
|
+
width: 300px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
color: rgba(0,0,0,.85);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-variant: tabular-nums;
|
|
11
|
+
list-style: none;
|
|
12
|
+
-webkit-font-feature-settings: "tnum";
|
|
13
|
+
font-feature-settings: "tnum";
|
|
14
|
+
line-height: 1.5715;
|
|
15
|
+
.container{
|
|
16
|
+
transition: opacity .3s,height .3s;
|
|
17
|
+
.listItem{
|
|
18
|
+
position: relative;
|
|
19
|
+
height: 22.001px;
|
|
20
|
+
margin-top: 8px;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
.listItemInfo{
|
|
23
|
+
height: 100%;
|
|
24
|
+
padding: 0 4px;
|
|
25
|
+
transition: background-color .3s;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-flow: row;
|
|
28
|
+
.Prewload{
|
|
29
|
+
margin-left: 10px;
|
|
30
|
+
}
|
|
31
|
+
.uploadSpan{
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
.uploadLinkIcon{
|
|
35
|
+
flex: none;
|
|
36
|
+
margin-right: 5px;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.listItem:hover{
|
|
43
|
+
background-color: @tableHoverBgColor;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VenusFormItemInterface } from "./interface";
|
|
2
|
+
import moment from "moment";
|
|
2
3
|
/**
|
|
3
4
|
* 保存时表单项值的处理
|
|
4
5
|
*/
|
|
@@ -79,6 +80,9 @@ export declare const VENUS_FORM_EDIT_ITEM_VALUE: {
|
|
|
79
80
|
type: string;
|
|
80
81
|
} | null;
|
|
81
82
|
};
|
|
83
|
+
DatePicker: (data: any, formItem: VenusFormItemInterface) => {
|
|
84
|
+
[x: string]: moment.Moment;
|
|
85
|
+
};
|
|
82
86
|
};
|
|
83
87
|
/**
|
|
84
88
|
* 解析选择人员时标识和名称
|
|
@@ -330,6 +330,11 @@ export var VENUS_FORM_EDIT_ITEM_VALUE = {
|
|
|
330
330
|
label: data[dataIndex],
|
|
331
331
|
type: 'custom'
|
|
332
332
|
});
|
|
333
|
+
},
|
|
334
|
+
"DatePicker": function DatePicker(data, formItem) {
|
|
335
|
+
var dataVal = data != null && data != undefined ? data : {};
|
|
336
|
+
var dataValue = dataVal[formItem.fieldId];
|
|
337
|
+
return _defineProperty({}, formItem.fieldId, moment(dataValue));
|
|
333
338
|
}
|
|
334
339
|
};
|
|
335
340
|
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
import "antd/es/spin/style";
|
|
3
|
+
import _Spin from "antd/es/spin";
|
|
4
|
+
import "antd/es/upload/style";
|
|
5
|
+
import _Upload from "antd/es/upload";
|
|
6
|
+
import "antd/es/button/style";
|
|
7
|
+
import _Button from "antd/es/button";
|
|
8
|
+
import "antd/es/message/style";
|
|
9
|
+
import _message from "antd/es/message";
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
23
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
26
|
+
import { UploadOutlined, DownloadOutlined, FileDoneOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
27
|
+
import { DownLoad, storage, deleteNewFile, downloadFile, uploadFile, SelectKYSeclevel } from "./..";
|
|
28
|
+
import "./styles.less";
|
|
29
|
+
import { updateFileSecLevelNew } from "./service";
|
|
30
|
+
var VenusUploadSecLevelForm = function VenusUploadSecLevelForm(props) {
|
|
31
|
+
var _useState = useState([]),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
fileList = _useState2[0],
|
|
34
|
+
setFileList = _useState2[1];
|
|
35
|
+
var downNode = useRef(null);
|
|
36
|
+
var _useState3 = useState(false),
|
|
37
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
38
|
+
isup = _useState4[0],
|
|
39
|
+
setisup = _useState4[1];
|
|
40
|
+
var _useState5 = useState(false),
|
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
+
load = _useState6[0],
|
|
43
|
+
setload = _useState6[1];
|
|
44
|
+
var _useState7 = useState(undefined),
|
|
45
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
+
level = _useState8[0],
|
|
47
|
+
setLevel = _useState8[1];
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
var value = (props.value || []).map(function (ls) {
|
|
50
|
+
return _objectSpread(_objectSpread({
|
|
51
|
+
fileId: ls.response != undefined && ls.response.data != undefined && ls.response.data.fileId != undefined ? ls.response.data.fileId : "-1"
|
|
52
|
+
}, ls), {}, {
|
|
53
|
+
status: 'done',
|
|
54
|
+
uid: ls.uid || ls.fileId
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
setFileList(value);
|
|
58
|
+
if (props.isDuo != undefined && props.isDuo == false) {
|
|
59
|
+
if (fileList.length > 0) {
|
|
60
|
+
setisup(true);
|
|
61
|
+
}
|
|
62
|
+
if (fileList.length < 1) {
|
|
63
|
+
setisup(false);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, [props.value]);
|
|
67
|
+
/**
|
|
68
|
+
* 监听密级选择框
|
|
69
|
+
*/
|
|
70
|
+
var onChange = function onChange(info) {
|
|
71
|
+
var files = [];
|
|
72
|
+
var dataLevel = [];
|
|
73
|
+
(props.value || []).map(function (v, n) {
|
|
74
|
+
dataLevel[v.id] = v.secId;
|
|
75
|
+
});
|
|
76
|
+
files = info.fileList.map(function (file) {
|
|
77
|
+
if (file.response && file.response.success) {
|
|
78
|
+
file.id = file.response.data.id;
|
|
79
|
+
}
|
|
80
|
+
file.secId = dataLevel.length > 0 && dataLevel[file.uid] != undefined ? {
|
|
81
|
+
label: dataLevel[file.uid].label,
|
|
82
|
+
value: dataLevel[file.uid].value
|
|
83
|
+
} : level != undefined && level[file.uid] != undefined ? {
|
|
84
|
+
label: level[file.uid].label,
|
|
85
|
+
value: level[file.uid].value
|
|
86
|
+
} : undefined;
|
|
87
|
+
return file;
|
|
88
|
+
});
|
|
89
|
+
setFileList(files);
|
|
90
|
+
propsOnChange(files);
|
|
91
|
+
};
|
|
92
|
+
var propsOnChange = function propsOnChange(files) {
|
|
93
|
+
if (props.onChange) {
|
|
94
|
+
props.onChange(files);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var onRemove = /*#__PURE__*/function () {
|
|
98
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
99
|
+
var res;
|
|
100
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
101
|
+
while (1) switch (_context.prev = _context.next) {
|
|
102
|
+
case 0:
|
|
103
|
+
_context.next = 2;
|
|
104
|
+
return deleteNewFile(file.fileId);
|
|
105
|
+
case 2:
|
|
106
|
+
res = _context.sent;
|
|
107
|
+
if (res && res.success) {
|
|
108
|
+
_message.success(res.message);
|
|
109
|
+
}
|
|
110
|
+
case 4:
|
|
111
|
+
case "end":
|
|
112
|
+
return _context.stop();
|
|
113
|
+
}
|
|
114
|
+
}, _callee);
|
|
115
|
+
}));
|
|
116
|
+
return function onRemove(_x) {
|
|
117
|
+
return _ref.apply(this, arguments);
|
|
118
|
+
};
|
|
119
|
+
}();
|
|
120
|
+
useEffect(function () {
|
|
121
|
+
if (level != undefined) {
|
|
122
|
+
onChange({
|
|
123
|
+
fileList: fileList
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}, [level]);
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 选择密级
|
|
130
|
+
*/
|
|
131
|
+
var onSelectLevel = /*#__PURE__*/function () {
|
|
132
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(v, file) {
|
|
133
|
+
var fileId;
|
|
134
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
135
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
136
|
+
case 0:
|
|
137
|
+
//设置表单属性
|
|
138
|
+
setLevel(_objectSpread(_objectSpread({}, level), {}, _defineProperty({}, file.uid, v)));
|
|
139
|
+
if (!(file.fileId || file.response != undefined && file.response.code == 200)) {
|
|
140
|
+
_context2.next = 6;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
console.log(file);
|
|
144
|
+
fileId = file.fileId || file.response.data.fileId;
|
|
145
|
+
_context2.next = 6;
|
|
146
|
+
return updateFileSecLevelNew(fileId, v.value);
|
|
147
|
+
case 6:
|
|
148
|
+
case "end":
|
|
149
|
+
return _context2.stop();
|
|
150
|
+
}
|
|
151
|
+
}, _callee2);
|
|
152
|
+
}));
|
|
153
|
+
return function onSelectLevel(_x2, _x3) {
|
|
154
|
+
return _ref2.apply(this, arguments);
|
|
155
|
+
};
|
|
156
|
+
}();
|
|
157
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Spin, {
|
|
158
|
+
spinning: load
|
|
159
|
+
}, /*#__PURE__*/React.createElement(_Upload, _extends({
|
|
160
|
+
disabled: props.disabled,
|
|
161
|
+
showUploadList: {
|
|
162
|
+
showDownloadIcon: true,
|
|
163
|
+
downloadIcon: function downloadIcon(file) {
|
|
164
|
+
return /*#__PURE__*/React.createElement(DownLoad, {
|
|
165
|
+
hideProgress: true,
|
|
166
|
+
params: {
|
|
167
|
+
method: 'get'
|
|
168
|
+
},
|
|
169
|
+
fileName: function fileName() {
|
|
170
|
+
return file.name;
|
|
171
|
+
},
|
|
172
|
+
text: /*#__PURE__*/React.createElement("a", {
|
|
173
|
+
rel: "noopener noreferrer"
|
|
174
|
+
}, /*#__PURE__*/React.createElement(DownloadOutlined, null)),
|
|
175
|
+
loadUrl: downloadFile(file.fileId)
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
itemRender: function itemRender(originNode, file, fileList, actions) {
|
|
180
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
181
|
+
className: "showList",
|
|
182
|
+
style: {
|
|
183
|
+
width: 500,
|
|
184
|
+
display: "flex"
|
|
185
|
+
}
|
|
186
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FileDoneOutlined, null), file.name), /*#__PURE__*/React.createElement(SelectKYSeclevel, {
|
|
187
|
+
secId: props.secId,
|
|
188
|
+
disabled: props.disabled,
|
|
189
|
+
value: file.secId,
|
|
190
|
+
onChange: function onChange(v) {
|
|
191
|
+
return onSelectLevel(v, file);
|
|
192
|
+
},
|
|
193
|
+
style: {
|
|
194
|
+
width: "20%"
|
|
195
|
+
},
|
|
196
|
+
bordered: false
|
|
197
|
+
}), /*#__PURE__*/React.createElement(DownLoad, {
|
|
198
|
+
hideProgress: true,
|
|
199
|
+
params: {
|
|
200
|
+
method: 'get'
|
|
201
|
+
},
|
|
202
|
+
fileName: function fileName() {
|
|
203
|
+
return file.name;
|
|
204
|
+
},
|
|
205
|
+
text: /*#__PURE__*/React.createElement("a", {
|
|
206
|
+
rel: "noopener noreferrer"
|
|
207
|
+
}, /*#__PURE__*/React.createElement(DownloadOutlined, null)),
|
|
208
|
+
loadUrl: downloadFile(file.fileId)
|
|
209
|
+
}), props.disabled ? null :
|
|
210
|
+
/*#__PURE__*/
|
|
211
|
+
//@ts-ignore
|
|
212
|
+
React.createElement("a", {
|
|
213
|
+
onClick: actions.remove,
|
|
214
|
+
className: "deleteIcon"
|
|
215
|
+
}, " ", /*#__PURE__*/React.createElement(DeleteOutlined, null)));
|
|
216
|
+
}
|
|
217
|
+
}, props, {
|
|
218
|
+
fileList: fileList
|
|
219
|
+
// onDownload={onDownload}
|
|
220
|
+
,
|
|
221
|
+
onRemove: onRemove,
|
|
222
|
+
onChange: onChange,
|
|
223
|
+
headers: {
|
|
224
|
+
Authorization: storage.getAccessToken()
|
|
225
|
+
},
|
|
226
|
+
action: uploadFile()
|
|
227
|
+
}), /*#__PURE__*/React.createElement(_Button, {
|
|
228
|
+
icon: /*#__PURE__*/React.createElement(UploadOutlined, null),
|
|
229
|
+
size: "small",
|
|
230
|
+
disabled: isup
|
|
231
|
+
}, props.text ? props.text : "upload")), /*#__PURE__*/React.createElement(DownLoad, {
|
|
232
|
+
ref: downNode,
|
|
233
|
+
text: " "
|
|
234
|
+
})));
|
|
235
|
+
};
|
|
236
|
+
export default VenusUploadSecLevelForm;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
import { request } from "./..";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* 修改附件密级
|
|
9
|
+
*/
|
|
10
|
+
export function updateFileSecLevel(_x, _x2) {
|
|
11
|
+
return _updateFileSecLevel.apply(this, arguments);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* 修改附件密级
|
|
16
|
+
*/
|
|
17
|
+
function _updateFileSecLevel() {
|
|
18
|
+
_updateFileSecLevel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id, secId) {
|
|
19
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21
|
+
case 0:
|
|
22
|
+
return _context.abrupt("return", request("/file/updateSecLevelId/".concat(id, "/").concat(secId), {
|
|
23
|
+
method: 'get',
|
|
24
|
+
prefix: '/fileApi'
|
|
25
|
+
}));
|
|
26
|
+
case 1:
|
|
27
|
+
case "end":
|
|
28
|
+
return _context.stop();
|
|
29
|
+
}
|
|
30
|
+
}, _callee);
|
|
31
|
+
}));
|
|
32
|
+
return _updateFileSecLevel.apply(this, arguments);
|
|
33
|
+
}
|
|
34
|
+
export function updateFileSecLevelNew(_x3, _x4) {
|
|
35
|
+
return _updateFileSecLevelNew.apply(this, arguments);
|
|
36
|
+
}
|
|
37
|
+
function _updateFileSecLevelNew() {
|
|
38
|
+
_updateFileSecLevelNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(id, secId) {
|
|
39
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
40
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
41
|
+
case 0:
|
|
42
|
+
return _context2.abrupt("return", request("/file/updateSecLevelId", {
|
|
43
|
+
method: 'post',
|
|
44
|
+
data: {
|
|
45
|
+
fileId: id,
|
|
46
|
+
secId: secId
|
|
47
|
+
},
|
|
48
|
+
prefix: '/fileApi'
|
|
49
|
+
}));
|
|
50
|
+
case 1:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context2.stop();
|
|
53
|
+
}
|
|
54
|
+
}, _callee2);
|
|
55
|
+
}));
|
|
56
|
+
return _updateFileSecLevelNew.apply(this, arguments);
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uploadUrl(prefix: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { hostMap } from "./..";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* 导入
|
|
5
|
+
*/
|
|
6
|
+
export function uploadUrl(prefix) {
|
|
7
|
+
var host = hostMap[prefix][process.env.BUILD_ENV || "production"];
|
|
8
|
+
var prefixStr = process.env.ENV === 'production' ? host : "/" + prefix || "/workhour";
|
|
9
|
+
return "".concat(prefixStr, "/system/tools/excel/import");
|
|
10
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@import '~@/common';
|
|
2
|
+
|
|
3
|
+
.uploadList{
|
|
4
|
+
width: 300px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
color: rgba(0,0,0,.85);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-variant: tabular-nums;
|
|
11
|
+
list-style: none;
|
|
12
|
+
-webkit-font-feature-settings: "tnum";
|
|
13
|
+
font-feature-settings: "tnum";
|
|
14
|
+
line-height: 1.5715;
|
|
15
|
+
.container{
|
|
16
|
+
transition: opacity .3s,height .3s;
|
|
17
|
+
.listItem{
|
|
18
|
+
position: relative;
|
|
19
|
+
height: 22.001px;
|
|
20
|
+
margin-top: 8px;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
.listItemInfo{
|
|
23
|
+
height: 100%;
|
|
24
|
+
padding: 0 4px;
|
|
25
|
+
transition: background-color .3s;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-flow: row;
|
|
28
|
+
.Prewload{
|
|
29
|
+
margin-left: 10px;
|
|
30
|
+
}
|
|
31
|
+
.uploadSpan{
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
.uploadLinkIcon{
|
|
35
|
+
flex: none;
|
|
36
|
+
margin-right: 5px;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.listItem:hover{
|
|
43
|
+
background-color: @tableHoverBgColor;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.showList:hover{
|
|
48
|
+
background-color: @tableHoverBgColor;
|
|
49
|
+
}
|
|
50
|
+
.showList{
|
|
51
|
+
}
|
package/dist/common.less
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//全局布局
|
|
2
|
+
@contentBg: #0a1025; //内容区背景
|
|
3
|
+
@rootBg: #f9f9f9; //工程背景
|
|
4
|
+
@secondSliderBg: #f8fafa; //二级菜单背景
|
|
5
|
+
//全局color
|
|
6
|
+
@primaryColor: #2e61f2; //主题色 --关键行动点,操作状态、重要信息高亮,图形化等场
|
|
7
|
+
@textPrimaryColor: #2c3f53; //重要文字颜色 --用于重要级文字信息、内页标题信息(label)
|
|
8
|
+
@textGeneralColor: #5a6876; //普通文字颜色 --用于普通级段落信息、内标题信息(如详情段落标题信息)(value)
|
|
9
|
+
@textSupplyColor: #848f9b; //辅助文字颜色 --用于辅助、次要文字信息、普通按钮描边
|
|
10
|
+
@textHolderColor: #aeb4ba; // --用于表格输入框文字提示、缺省图下方文案
|
|
11
|
+
@borderColor: #ececec; // --分割线及边框颜色
|
|
12
|
+
@tableHoverBgColor: #f9fbff; // --用于表格的选中底色
|
|
13
|
+
@disabledColor: #f9f9f9; //禁用颜色
|
|
14
|
+
@errorColor: #ff5363; //错误提示颜色
|
|
15
|
+
@emphasizeColor: #ff9430; //错误提示颜色
|
|
16
|
+
@hoverColor: fade(@primaryColor, 10); //鼠标悬停颜色
|
|
17
|
+
@operateColor: fade(@primaryColor, 80); //表格操作按钮颜色
|
|
18
|
+
@timelineColor: fade(@primaryColor, 20); //时间轴颜色
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// 菜单设置
|
|
23
|
+
@headerHeight: 60px; //菜单高度
|
|
24
|
+
@firstMenuWidth: 70px; // 一级菜单宽度
|
|
25
|
+
@secondMenuWidth: 180px; // 一级菜单宽度
|
|
26
|
+
//全局字号
|
|
27
|
+
@textFontLgX: 18px; //标题
|
|
28
|
+
@textFontLg: 16px; //小标题&需醒目区别的正文
|
|
29
|
+
@textFontGen: 14px; //正文
|
|
30
|
+
@textFontSm: 12px; //正文和辅助文字
|
|
31
|
+
|
|
32
|
+
//全局间距
|
|
33
|
+
@marginLgX: 24px;
|
|
34
|
+
@marginLg: 16px;
|
|
35
|
+
@marginGen: 12px;
|
|
36
|
+
@marginSm: 8px;
|
|
37
|
+
@marginSmX: 4px;
|
|
38
|
+
@paddingLgX: 24px;
|
|
39
|
+
@paddingLg: 16px;
|
|
40
|
+
@paddingGen: 12px;
|
|
41
|
+
@paddingSm: 8px;
|
|
42
|
+
@paddingSmX: 4px;
|
|
43
|
+
|
|
44
|
+
//全局圆角
|
|
45
|
+
@borderRadius: 4px;
|
|
46
|
+
|
|
47
|
+
// 小圆角 用于复选框等
|
|
48
|
+
@smallBorderRadius: 2px;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { default as DownLoadFile } from './DownLoadFile';
|
|
|
8
8
|
export { default as VenusUpload } from './VenusUpload';
|
|
9
9
|
export { default as RadioAndInput } from './RadioAndInput';
|
|
10
10
|
export { default as CheckBoxInput } from './CheckBoxInput';
|
|
11
|
+
export { default as VenusUploadSecLevelForm } from './VenusUploadForm';
|
|
11
12
|
export { default as UploadImage } from './UploadImage';
|
|
12
13
|
export { default as NotificationManager, notifier } from './NotificationManager';
|
|
13
14
|
export { getUserInfo, getLockScreenTime, getMenuConfig, addMenuConfig, editMenuConfig, getUserMenu, getMenus, getDifyConfigs, deleteFile, validateLogin, deleteNewFile, downloadFile, venusAi, uploadFile, updateSecLevelId, fileByAssId, mnLoginDify, refreshTokenFn, getFileData, getUserOrgTreeList, getRoleList, getVenusAdjust, getColumnData, getFormData, getDetailColumnData, getSecLevelDataList, getExpressionList, getUserListBySecLevelId, getDictItemByType, getDataListBase, getDataListTable, getUserList, listAppData, getAppByUser, SelectBysceneIdAndCreateBy } from './Config/api';
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { default as DownLoadFile } from "./DownLoadFile";
|
|
|
8
8
|
export { default as VenusUpload } from "./VenusUpload";
|
|
9
9
|
export { default as RadioAndInput } from "./RadioAndInput";
|
|
10
10
|
export { default as CheckBoxInput } from "./CheckBoxInput";
|
|
11
|
+
export { default as VenusUploadSecLevelForm } from "./VenusUploadForm";
|
|
11
12
|
export { default as UploadImage } from "./UploadImage";
|
|
12
13
|
export { default as NotificationManager, notifier } from "./NotificationManager";
|
|
13
14
|
export { getUserInfo, getLockScreenTime, getMenuConfig, addMenuConfig, editMenuConfig, getUserMenu, getMenus, getDifyConfigs, deleteFile, validateLogin, deleteNewFile, downloadFile, venusAi, uploadFile, updateSecLevelId, fileByAssId, mnLoginDify, refreshTokenFn, getFileData, getUserOrgTreeList, getRoleList, getVenusAdjust, getColumnData, getFormData, getDetailColumnData, getSecLevelDataList, getExpressionList, getUserListBySecLevelId, getDictItemByType, getDataListBase, getDataListTable, getUserList, listAppData, getAppByUser, SelectBysceneIdAndCreateBy } from "./Config/api";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "venus-design",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "venus all compoments",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,10 +50,6 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"optionalDependencies": {
|
|
54
|
-
"@umijs/max": "^4.4.4",
|
|
55
|
-
"umi": "^3.5.0"
|
|
56
|
-
},
|
|
57
53
|
"peerDependencies": {
|
|
58
54
|
"@ant-design/icons": "^4.8.3 ||^5.6.1",
|
|
59
55
|
"@ant-design/cssinjs": "^1.5.6",
|
|
@@ -62,6 +58,8 @@
|
|
|
62
58
|
"@types/js-cookie": "^2.2.7",
|
|
63
59
|
"@types/lodash": "^4.17.15",
|
|
64
60
|
"@types/react-loadable": "^5.5.11",
|
|
61
|
+
"react": "^16.12.0|| ^18.3.1 ||^19.1.0",
|
|
62
|
+
"react-dom": "^16.8.5 || ^18.3.1 ||^19.1.0",
|
|
65
63
|
"antd": "^4.6.4 || ^5.23.4",
|
|
66
64
|
"babel-plugin-import": "^1.13.8",
|
|
67
65
|
"classnames": "^2.2.6",
|
|
@@ -73,11 +71,11 @@
|
|
|
73
71
|
"lottie-web": "^5.12.2",
|
|
74
72
|
"moment": "^2.28.0",
|
|
75
73
|
"qs": "^6.10.1",
|
|
76
|
-
"react": "^16.12.0|| ^18.3.1 ||^19.1.0",
|
|
77
|
-
"react-dom": "^16.8.5 || ^18.3.1 ||^19.1.0",
|
|
78
74
|
"react-loadable": "^5.5.0",
|
|
79
75
|
"react-resizable": "^3.0.4",
|
|
80
|
-
"umi-request": "^1.4.0"
|
|
76
|
+
"umi-request": "^1.4.0",
|
|
77
|
+
"@umijs/max": "^4.4.4",
|
|
78
|
+
"umi": "^3.5.0"
|
|
81
79
|
},
|
|
82
80
|
"devDependencies": {
|
|
83
81
|
"@ant-design/cssinjs": "^1.5.6",
|
|
@@ -95,6 +93,8 @@
|
|
|
95
93
|
"@types/react-resizable": "^3.0.3",
|
|
96
94
|
"@umijs/lint": "^4.0.0",
|
|
97
95
|
"@umijs/max": "^4.4.4",
|
|
96
|
+
"react": "^16.12.0|| ^18.3.1 ||^19.1.0",
|
|
97
|
+
"react-dom": "^16.8.5 || ^18.3.1 ||^19.1.0",
|
|
98
98
|
"antd": "^4.6.4 || ^5.23.4",
|
|
99
99
|
"babel-plugin-import": "^1.13.8",
|
|
100
100
|
"classnames": "^2.2.6",
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"prettier-plugin-organize-imports": "^3.0.0",
|
|
116
116
|
"prettier-plugin-packagejson": "^2.2.18",
|
|
117
117
|
"qs": "^6.10.1",
|
|
118
|
-
"react": "^18.0.0",
|
|
119
|
-
"react-dom": "^18.0.0",
|
|
120
118
|
"react-loadable": "^5.5.0",
|
|
121
119
|
"react-resizable": "^3.0.4",
|
|
122
120
|
"stylelint": "^14.9.1",
|
|
123
|
-
"umi-request": "^1.4.0"
|
|
121
|
+
"umi-request": "^1.4.0",
|
|
122
|
+
"@umijs/max": "^4.4.4",
|
|
123
|
+
"umi": "^3.5.0"
|
|
124
124
|
}
|
|
125
125
|
}
|