ydb-components-material 0.1.119 → 0.1.121
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/build/docs/404.html +3 -3
- package/build/docs/_demos/:uuid +3 -3
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/static/situation.80bdb450.png +0 -0
- package/build/docs/{umi.ffb7b81c.css → umi.35f02979.css} +1 -1
- package/build/docs/umi.8b7db9c6.js +1 -0
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/3.js +2 -2
- package/build/lowcode/4.js +1 -1
- package/build/lowcode/5.js +1 -1
- package/build/lowcode/assets/8644ab95dcea871942e57b3d0e2e0eea.png +0 -0
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/1.js +2 -2
- package/build/lowcode/render/default/2.js +1 -1
- package/build/lowcode/render/default/3.js +1 -1
- package/build/lowcode/render/default/assets/8644ab95dcea871942e57b3d0e2e0eea.png +0 -0
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +26 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +26 -26
- package/dist/1.js +2 -2
- package/dist/2.js +1 -1
- package/dist/3.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +19 -19
- package/dist/BizComps.js.map +1 -1
- package/dist/assets/8644ab95dcea871942e57b3d0e2e0eea.png +0 -0
- package/es/components/file-list/item.js +2 -2
- package/es/components/file-list/seal.js +5 -1
- package/es/components/file-list/signUtil.js +9 -1
- package/es/components/guide-pc/comment.d.ts +9 -0
- package/es/components/guide-pc/comment.js +93 -0
- package/es/components/guide-pc/comment.scss +15 -0
- package/es/components/guide-pc/comment.vue +117 -0
- package/es/components/guide-pc/components/accept.d.ts +7 -0
- package/es/components/guide-pc/components/accept.js +30 -0
- package/es/components/guide-pc/components/accept.scss +18 -0
- package/es/components/guide-pc/components/accept.vue +50 -0
- package/es/components/guide-pc/components/basicInfo.d.ts +7 -0
- package/es/components/guide-pc/components/basicInfo.js +89 -0
- package/es/components/guide-pc/components/basicInfo.scss +30 -0
- package/es/components/guide-pc/components/basicInfo.vue +81 -0
- package/es/components/guide-pc/components/guideTabs.d.ts +8 -0
- package/es/components/guide-pc/components/guideTabs.js +32 -0
- package/es/components/guide-pc/components/guideTabs.scss +34 -0
- package/es/components/guide-pc/components/guideTabs.vue +48 -0
- package/es/components/guide-pc/components/guideTitle.d.ts +7 -0
- package/es/components/guide-pc/components/guideTitle.js +22 -0
- package/es/components/guide-pc/components/guideTitle.scss +15 -0
- package/es/components/guide-pc/components/guideTitle.vue +43 -0
- package/es/components/guide-pc/components/materialsList.d.ts +11 -0
- package/es/components/guide-pc/components/materialsList.js +386 -0
- package/es/components/guide-pc/components/materialsList.scss +139 -0
- package/es/components/guide-pc/components/materialsList.vue +403 -0
- package/es/components/guide-pc/components/places.d.ts +7 -0
- package/es/components/guide-pc/components/places.js +110 -0
- package/es/components/guide-pc/components/places.scss +144 -0
- package/es/components/guide-pc/components/places.vue +198 -0
- package/es/components/guide-pc/components/processImg.d.ts +9 -0
- package/es/components/guide-pc/components/processImg.js +220 -0
- package/es/components/guide-pc/components/processImg.scss +117 -0
- package/es/components/guide-pc/components/processImg.vue +300 -0
- package/es/components/guide-pc/components/result.d.ts +7 -0
- package/es/components/guide-pc/components/result.js +130 -0
- package/es/components/guide-pc/components/result.scss +104 -0
- package/es/components/guide-pc/components/result.vue +191 -0
- package/es/components/guide-pc/components/situation.d.ts +12 -0
- package/es/components/guide-pc/components/situation.js +142 -0
- package/es/components/guide-pc/components/situation.scss +79 -0
- package/es/components/guide-pc/components/situation.vue +430 -0
- package/es/components/guide-pc/guide.vue +179 -0
- package/es/components/guide-pc/imgs/bg.png +0 -0
- package/es/components/guide-pc/imgs/cant.png +0 -0
- package/es/components/guide-pc/imgs/dept.png +0 -0
- package/es/components/guide-pc/imgs/error.png +0 -0
- package/es/components/guide-pc/imgs/judge.png +0 -0
- package/es/components/guide-pc/imgs/pass.png +0 -0
- package/es/components/guide-pc/imgs/rightArr.png +0 -0
- package/es/components/guide-pc/imgs/situation.png +0 -0
- package/es/components/guide-pc/imgs/time.png +0 -0
- package/es/components/guide-pc/imgs/titleL.png +0 -0
- package/es/components/guide-pc/imgs/titleR.png +0 -0
- package/es/components/guide-pc/index.d.ts +37 -0
- package/es/components/guide-pc/index.js +440 -0
- package/es/components/guide-pc/index.scss +185 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -0
- package/lib/components/file-list/item.js +2 -2
- package/lib/components/file-list/seal.js +5 -1
- package/lib/components/file-list/signUtil.js +9 -1
- package/lib/components/guide-pc/comment.d.ts +9 -0
- package/lib/components/guide-pc/comment.js +98 -0
- package/lib/components/guide-pc/comment.scss +15 -0
- package/lib/components/guide-pc/comment.vue +117 -0
- package/lib/components/guide-pc/components/accept.d.ts +7 -0
- package/lib/components/guide-pc/components/accept.js +36 -0
- package/lib/components/guide-pc/components/accept.scss +18 -0
- package/lib/components/guide-pc/components/accept.vue +50 -0
- package/lib/components/guide-pc/components/basicInfo.d.ts +7 -0
- package/lib/components/guide-pc/components/basicInfo.js +95 -0
- package/lib/components/guide-pc/components/basicInfo.scss +30 -0
- package/lib/components/guide-pc/components/basicInfo.vue +81 -0
- package/lib/components/guide-pc/components/guideTabs.d.ts +8 -0
- package/lib/components/guide-pc/components/guideTabs.js +37 -0
- package/lib/components/guide-pc/components/guideTabs.scss +34 -0
- package/lib/components/guide-pc/components/guideTabs.vue +48 -0
- package/lib/components/guide-pc/components/guideTitle.d.ts +7 -0
- package/lib/components/guide-pc/components/guideTitle.js +28 -0
- package/lib/components/guide-pc/components/guideTitle.scss +15 -0
- package/lib/components/guide-pc/components/guideTitle.vue +43 -0
- package/lib/components/guide-pc/components/materialsList.d.ts +11 -0
- package/lib/components/guide-pc/components/materialsList.js +392 -0
- package/lib/components/guide-pc/components/materialsList.scss +139 -0
- package/lib/components/guide-pc/components/materialsList.vue +403 -0
- package/lib/components/guide-pc/components/places.d.ts +7 -0
- package/lib/components/guide-pc/components/places.js +116 -0
- package/lib/components/guide-pc/components/places.scss +144 -0
- package/lib/components/guide-pc/components/places.vue +198 -0
- package/lib/components/guide-pc/components/processImg.d.ts +9 -0
- package/lib/components/guide-pc/components/processImg.js +226 -0
- package/lib/components/guide-pc/components/processImg.scss +117 -0
- package/lib/components/guide-pc/components/processImg.vue +300 -0
- package/lib/components/guide-pc/components/result.d.ts +7 -0
- package/lib/components/guide-pc/components/result.js +136 -0
- package/lib/components/guide-pc/components/result.scss +104 -0
- package/lib/components/guide-pc/components/result.vue +191 -0
- package/lib/components/guide-pc/components/situation.d.ts +12 -0
- package/lib/components/guide-pc/components/situation.js +147 -0
- package/lib/components/guide-pc/components/situation.scss +79 -0
- package/lib/components/guide-pc/components/situation.vue +430 -0
- package/lib/components/guide-pc/guide.vue +179 -0
- package/lib/components/guide-pc/imgs/bg.png +0 -0
- package/lib/components/guide-pc/imgs/cant.png +0 -0
- package/lib/components/guide-pc/imgs/dept.png +0 -0
- package/lib/components/guide-pc/imgs/error.png +0 -0
- package/lib/components/guide-pc/imgs/judge.png +0 -0
- package/lib/components/guide-pc/imgs/pass.png +0 -0
- package/lib/components/guide-pc/imgs/rightArr.png +0 -0
- package/lib/components/guide-pc/imgs/situation.png +0 -0
- package/lib/components/guide-pc/imgs/time.png +0 -0
- package/lib/components/guide-pc/imgs/titleL.png +0 -0
- package/lib/components/guide-pc/imgs/titleR.png +0 -0
- package/lib/components/guide-pc/index.d.ts +37 -0
- package/lib/components/guide-pc/index.js +445 -0
- package/lib/components/guide-pc/index.scss +185 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -1
- package/lowcode/guide-pc/meta.ts +338 -0
- package/lowcode_es/guide-pc/meta.d.ts +22 -0
- package/lowcode_es/guide-pc/meta.js +315 -0
- package/lowcode_es/meta.js +3 -2
- package/lowcode_lib/guide-pc/meta.d.ts +22 -0
- package/lowcode_lib/guide-pc/meta.js +320 -0
- package/lowcode_lib/meta.js +17 -16
- package/package.json +3 -3
- package/build/docs/umi.55472eae.js +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.guideTabs-con {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-bottom: 1px solid #e8e8e8;
|
|
4
|
+
|
|
5
|
+
.tab-item {
|
|
6
|
+
flex: 1;
|
|
7
|
+
padding: 14px 0;
|
|
8
|
+
text-align: center;
|
|
9
|
+
font-size: 15px;
|
|
10
|
+
color: #666666;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
position: relative;
|
|
13
|
+
transition: all 0.2s;
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
color: #1678FF;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.active {
|
|
20
|
+
color: #1678FF;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
|
|
23
|
+
&::after {
|
|
24
|
+
content: '';
|
|
25
|
+
position: absolute;
|
|
26
|
+
bottom: -1px;
|
|
27
|
+
left: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
height: 2px;
|
|
30
|
+
background: #1678FF;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-tabs
|
|
3
|
+
v-model="activeName"
|
|
4
|
+
stretch
|
|
5
|
+
@tab-click="handleClick"
|
|
6
|
+
>
|
|
7
|
+
<el-tab-pane
|
|
8
|
+
v-for="item, index in tabList"
|
|
9
|
+
:key="index"
|
|
10
|
+
:label="item.name"
|
|
11
|
+
:name="item.name"
|
|
12
|
+
/>
|
|
13
|
+
</el-tabs>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
activeName: '材料清单',
|
|
21
|
+
tabList: [
|
|
22
|
+
{ name: '材料清单' },
|
|
23
|
+
{ name: '事项信息' },
|
|
24
|
+
{ name: '办事流程' },
|
|
25
|
+
{ name: '受理条件' },
|
|
26
|
+
{ name: '办事大厅' },
|
|
27
|
+
{ name: '成效分析' },
|
|
28
|
+
],
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
handleClick({ index }) {
|
|
33
|
+
console.log(index);
|
|
34
|
+
|
|
35
|
+
this.$emit('tabsChange', index)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
<style>
|
|
41
|
+
</style>
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
/deep/.el-tabs__item.is-active{
|
|
44
|
+
// color: red !important;
|
|
45
|
+
background: #E2EFFF;
|
|
46
|
+
padding: 0 !important;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import titleL from "../imgs/titleL.png";
|
|
3
|
+
import titleR from "../imgs/titleR.png";
|
|
4
|
+
import "./guideTitle.scss";
|
|
5
|
+
var GuideTitle = function GuideTitle(_ref) {
|
|
6
|
+
var title = _ref.title;
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: "guideTitle-con"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
10
|
+
className: "titleImg",
|
|
11
|
+
src: titleL,
|
|
12
|
+
alt: ""
|
|
13
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "titleText"
|
|
15
|
+
}, title), /*#__PURE__*/React.createElement("img", {
|
|
16
|
+
className: "titleImg",
|
|
17
|
+
src: titleR,
|
|
18
|
+
alt: ""
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
GuideTitle.displayName = 'GuideTitle';
|
|
22
|
+
export default GuideTitle;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="guideTitle-con">
|
|
3
|
+
<view class="titleImg" :style="{backgroundImage: `url(${titleL})`}" />
|
|
4
|
+
<view class="titleText">{{ title }}</view>
|
|
5
|
+
<view class="titleImg" :style="{backgroundImage: `url(${titleR})`}" />
|
|
6
|
+
</view>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
title: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ''
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
titleL: '../static/img/pc/declare/titleL.png',
|
|
20
|
+
titleR: '../static/img/pc/declare/titleR.png',
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style lang="scss" scoped>
|
|
27
|
+
.guideTitle-con{
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
|
|
32
|
+
.titleText{
|
|
33
|
+
font-size: 24px;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
margin: 0 10px;
|
|
36
|
+
}
|
|
37
|
+
.titleImg{
|
|
38
|
+
width: 20px;
|
|
39
|
+
height: 21px;
|
|
40
|
+
background-size: 100% 100%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './materialsList.scss';
|
|
3
|
+
export interface MaterialsListProps {
|
|
4
|
+
eventInfo?: any;
|
|
5
|
+
finalMaterials?: any[];
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
declarationAppToken?: string;
|
|
8
|
+
download?: (params: any) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const MaterialsList: React.FC<MaterialsListProps>;
|
|
11
|
+
export default MaterialsList;
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import _Dialog from "@alifd/next/es/dialog";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _Message from "@alifd/next/es/message";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import GuideTitle from "./guideTitle";
|
|
7
|
+
import "./materialsList.scss";
|
|
8
|
+
import { getUrlById, onlinePreview } from "../../../api.js";
|
|
9
|
+
var MaterialsList = function MaterialsList(_ref) {
|
|
10
|
+
var eventInfoProp = _ref.eventInfo,
|
|
11
|
+
finalMaterialsProp = _ref.finalMaterials,
|
|
12
|
+
baseUrlProp = _ref.baseUrl,
|
|
13
|
+
declarationAppTokenProp = _ref.declarationAppToken,
|
|
14
|
+
downloadProp = _ref.download;
|
|
15
|
+
var _React$useState = React.useState([]),
|
|
16
|
+
list = _React$useState[0],
|
|
17
|
+
setList = _React$useState[1];
|
|
18
|
+
var _React$useState2 = React.useState(false),
|
|
19
|
+
previewShow = _React$useState2[0],
|
|
20
|
+
setPreviewShow = _React$useState2[1];
|
|
21
|
+
var _React$useState3 = React.useState(''),
|
|
22
|
+
previewIframeUrl = _React$useState3[0],
|
|
23
|
+
setPreviewIframeUrl = _React$useState3[1];
|
|
24
|
+
var _React$useState4 = React.useState(false),
|
|
25
|
+
previewLoading = _React$useState4[0],
|
|
26
|
+
setPreviewLoading = _React$useState4[1];
|
|
27
|
+
React.useEffect(function () {
|
|
28
|
+
initData();
|
|
29
|
+
}, [finalMaterialsProp, eventInfoProp]);
|
|
30
|
+
var initData = function initData() {
|
|
31
|
+
// Use finalMaterials if available (after situation selection), else use original materials
|
|
32
|
+
var eventInfo = eventInfoProp;
|
|
33
|
+
var finalMaterials = finalMaterialsProp;
|
|
34
|
+
var materials = finalMaterials || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.taskGeneralMaterials) || [];
|
|
35
|
+
setList(materials);
|
|
36
|
+
};
|
|
37
|
+
var showTip = function showTip(type) {
|
|
38
|
+
var obj = {
|
|
39
|
+
'智': '本材料为智能生成材料,系统将根据您填写的信息自动生成申报材料。',
|
|
40
|
+
'享': '本材料为共享材料,数据由大数据共享获取,无需用户自行准备。',
|
|
41
|
+
'自': '需要用户自行准备申报材料'
|
|
42
|
+
};
|
|
43
|
+
_Message.show({
|
|
44
|
+
type: 'help',
|
|
45
|
+
content: obj[type] || ''
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var getFileType = function getFileType(file) {
|
|
49
|
+
if (file.formConvertMaterial) return '智';
|
|
50
|
+
if (file.noNeedSubmit) return '享';
|
|
51
|
+
return '自';
|
|
52
|
+
};
|
|
53
|
+
var checkPoint = function checkPoint(item) {
|
|
54
|
+
var keyPoint = item.keyPoint;
|
|
55
|
+
if (!(keyPoint !== null && keyPoint !== void 0 && keyPoint.fileUrl)) {
|
|
56
|
+
_Message.warning('该审查要点暂时无法查看');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// TODO: navigate to keyPoint page
|
|
60
|
+
// uni.setStorageSync('keyPoint', keyPoint);
|
|
61
|
+
// uni.navigateTo({ url: `/pagesDeclarePc/keyPoints` });
|
|
62
|
+
_Message.show({
|
|
63
|
+
type: 'help',
|
|
64
|
+
content: '审查要点查看功能待实现'
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
var goDownLoad = /*#__PURE__*/function () {
|
|
68
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileObj) {
|
|
69
|
+
var _fileObj$name;
|
|
70
|
+
var fileId, nameArr, format;
|
|
71
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
72
|
+
while (1) switch (_context.prev = _context.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
fileId = fileObj.id || fileObj.url;
|
|
75
|
+
nameArr = ((_fileObj$name = fileObj.name) === null || _fileObj$name === void 0 ? void 0 : _fileObj$name.split('.')) || [];
|
|
76
|
+
format = nameArr[nameArr.length - 1] || '';
|
|
77
|
+
downloadProp === null || downloadProp === void 0 ? void 0 : downloadProp({
|
|
78
|
+
fileId: fileId,
|
|
79
|
+
format: format
|
|
80
|
+
});
|
|
81
|
+
case 1:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context.stop();
|
|
84
|
+
}
|
|
85
|
+
}, _callee);
|
|
86
|
+
}));
|
|
87
|
+
return function goDownLoad(_x) {
|
|
88
|
+
return _ref2.apply(this, arguments);
|
|
89
|
+
};
|
|
90
|
+
}();
|
|
91
|
+
var previewFile = /*#__PURE__*/function () {
|
|
92
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fileObj) {
|
|
93
|
+
var fileUrl;
|
|
94
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
95
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
96
|
+
case 0:
|
|
97
|
+
_context2.next = 1;
|
|
98
|
+
return getFileUrl(fileObj.url || fileObj.id);
|
|
99
|
+
case 1:
|
|
100
|
+
fileUrl = _context2.sent;
|
|
101
|
+
if (fileUrl) {
|
|
102
|
+
preview(fileUrl);
|
|
103
|
+
}
|
|
104
|
+
case 2:
|
|
105
|
+
case "end":
|
|
106
|
+
return _context2.stop();
|
|
107
|
+
}
|
|
108
|
+
}, _callee2);
|
|
109
|
+
}));
|
|
110
|
+
return function previewFile(_x2) {
|
|
111
|
+
return _ref3.apply(this, arguments);
|
|
112
|
+
};
|
|
113
|
+
}();
|
|
114
|
+
var getFileUrl = /*#__PURE__*/function () {
|
|
115
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
|
|
116
|
+
var _urlRes$presignedUrlL, urlRes, _t;
|
|
117
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
118
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
119
|
+
case 0:
|
|
120
|
+
_context3.prev = 0;
|
|
121
|
+
_context3.next = 1;
|
|
122
|
+
return getUrlById({
|
|
123
|
+
id: id,
|
|
124
|
+
effectiveTime: 3600000
|
|
125
|
+
}, {
|
|
126
|
+
tokenTY: declarationAppTokenProp,
|
|
127
|
+
baseUrl: baseUrlProp
|
|
128
|
+
});
|
|
129
|
+
case 1:
|
|
130
|
+
urlRes = _context3.sent;
|
|
131
|
+
if (!((urlRes === null || urlRes === void 0 ? void 0 : (_urlRes$presignedUrlL = urlRes.presignedUrlList) === null || _urlRes$presignedUrlL === void 0 ? void 0 : _urlRes$presignedUrlL.length) > 0)) {
|
|
132
|
+
_context3.next = 2;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
return _context3.abrupt("return", urlRes.presignedUrlList[2]);
|
|
136
|
+
case 2:
|
|
137
|
+
_context3.next = 4;
|
|
138
|
+
break;
|
|
139
|
+
case 3:
|
|
140
|
+
_context3.prev = 3;
|
|
141
|
+
_t = _context3["catch"](0);
|
|
142
|
+
console.error(_t);
|
|
143
|
+
case 4:
|
|
144
|
+
return _context3.abrupt("return", null);
|
|
145
|
+
case 5:
|
|
146
|
+
case "end":
|
|
147
|
+
return _context3.stop();
|
|
148
|
+
}
|
|
149
|
+
}, _callee3, null, [[0, 3]]);
|
|
150
|
+
}));
|
|
151
|
+
return function getFileUrl(_x3) {
|
|
152
|
+
return _ref4.apply(this, arguments);
|
|
153
|
+
};
|
|
154
|
+
}();
|
|
155
|
+
var preview = /*#__PURE__*/function () {
|
|
156
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(url) {
|
|
157
|
+
var res, _t2;
|
|
158
|
+
return _regeneratorRuntime.wrap(function (_context4) {
|
|
159
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
160
|
+
case 0:
|
|
161
|
+
setPreviewLoading(true);
|
|
162
|
+
setPreviewShow(true);
|
|
163
|
+
_context4.prev = 1;
|
|
164
|
+
_context4.next = 2;
|
|
165
|
+
return onlinePreview({
|
|
166
|
+
url: url
|
|
167
|
+
}, {
|
|
168
|
+
tokenTY: declarationAppTokenProp,
|
|
169
|
+
baseUrl: baseUrlProp
|
|
170
|
+
});
|
|
171
|
+
case 2:
|
|
172
|
+
res = _context4.sent;
|
|
173
|
+
setPreviewIframeUrl(res.url);
|
|
174
|
+
setTimeout(function () {
|
|
175
|
+
var iframe = document.getElementById('previewIframe');
|
|
176
|
+
if (iframe) iframe.src = res.url;
|
|
177
|
+
}, 500);
|
|
178
|
+
_context4.next = 4;
|
|
179
|
+
break;
|
|
180
|
+
case 3:
|
|
181
|
+
_context4.prev = 3;
|
|
182
|
+
_t2 = _context4["catch"](1);
|
|
183
|
+
console.error(_t2);
|
|
184
|
+
case 4:
|
|
185
|
+
setPreviewLoading(false);
|
|
186
|
+
case 5:
|
|
187
|
+
case "end":
|
|
188
|
+
return _context4.stop();
|
|
189
|
+
}
|
|
190
|
+
}, _callee4, null, [[1, 3]]);
|
|
191
|
+
}));
|
|
192
|
+
return function preview(_x4) {
|
|
193
|
+
return _ref5.apply(this, arguments);
|
|
194
|
+
};
|
|
195
|
+
}();
|
|
196
|
+
var downloadFile = function downloadFile(row) {
|
|
197
|
+
if (!row.formGuid || row.formGuid === '[]') {
|
|
198
|
+
_Message.warning('暂无法下载');
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
var formGuidArr = JSON.parse(row.formGuid);
|
|
202
|
+
if (formGuidArr.length > 0) {
|
|
203
|
+
goDownLoad(formGuidArr[0]);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
var initFormGuid = function initFormGuid(row) {
|
|
207
|
+
if (!row.formGuid || row.formGuid === '[]') return [];
|
|
208
|
+
try {
|
|
209
|
+
return JSON.parse(row.formGuid);
|
|
210
|
+
} catch (_unused) {
|
|
211
|
+
return [];
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
var initMaterialExample = function initMaterialExample(row) {
|
|
215
|
+
if (!row.materialExample || row.materialExample === '[]') return [];
|
|
216
|
+
try {
|
|
217
|
+
return JSON.parse(row.materialExample);
|
|
218
|
+
} catch (_unused2) {
|
|
219
|
+
return [];
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
var hasSubMaterials = function hasSubMaterials(item) {
|
|
223
|
+
return item.subMaterials && item.subMaterials.length > 0;
|
|
224
|
+
};
|
|
225
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
226
|
+
className: "materialsList-content"
|
|
227
|
+
}, /*#__PURE__*/React.createElement(GuideTitle, {
|
|
228
|
+
title: "\u6750\u6599\u6E05\u5355"
|
|
229
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
230
|
+
className: "table-con"
|
|
231
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
232
|
+
className: "material-table"
|
|
233
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
|
|
234
|
+
className: "col-name"
|
|
235
|
+
}, "\u6750\u6599\u540D\u79F0"), /*#__PURE__*/React.createElement("th", {
|
|
236
|
+
className: "col-type"
|
|
237
|
+
}, "\u6750\u6599\u5206\u7C7B"), /*#__PURE__*/React.createElement("th", {
|
|
238
|
+
className: "col-need"
|
|
239
|
+
}, "\u6750\u6599\u5FC5\u8981\u6027"), /*#__PURE__*/React.createElement("th", {
|
|
240
|
+
className: "col-sample"
|
|
241
|
+
}, "\u6837\u8868"), /*#__PURE__*/React.createElement("th", {
|
|
242
|
+
className: "col-form"
|
|
243
|
+
}, "\u7A7A\u767D\u8868\u683C"), /*#__PURE__*/React.createElement("th", {
|
|
244
|
+
className: "col-check"
|
|
245
|
+
}, "\u5BA1\u67E5\u8981\u70B9"))), /*#__PURE__*/React.createElement("tbody", null, list.map(function (item, index) {
|
|
246
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
247
|
+
key: index
|
|
248
|
+
}, /*#__PURE__*/React.createElement("tr", {
|
|
249
|
+
className: "data-row"
|
|
250
|
+
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", {
|
|
251
|
+
className: "material-name-cell"
|
|
252
|
+
}, item.materialName)), /*#__PURE__*/React.createElement("td", {
|
|
253
|
+
className: "center"
|
|
254
|
+
}, !hasSubMaterials(item) && /*#__PURE__*/React.createElement("div", {
|
|
255
|
+
className: "type-btns"
|
|
256
|
+
}, getFileType(item) === '智' && /*#__PURE__*/React.createElement("span", {
|
|
257
|
+
className: "type-tag type-tag-zhi",
|
|
258
|
+
onClick: function onClick() {
|
|
259
|
+
return showTip('智');
|
|
260
|
+
}
|
|
261
|
+
}, "\u667A"), getFileType(item) === '享' && /*#__PURE__*/React.createElement("span", {
|
|
262
|
+
className: "type-tag type-tag-xiang",
|
|
263
|
+
onClick: function onClick() {
|
|
264
|
+
return showTip('享');
|
|
265
|
+
}
|
|
266
|
+
}, "\u4EAB"), getFileType(item) === '自' && /*#__PURE__*/React.createElement("span", {
|
|
267
|
+
className: "type-tag type-tag-zi",
|
|
268
|
+
onClick: function onClick() {
|
|
269
|
+
return showTip('自');
|
|
270
|
+
}
|
|
271
|
+
}, "\u81EA"))), /*#__PURE__*/React.createElement("td", {
|
|
272
|
+
className: "center"
|
|
273
|
+
}, item.isNeed === '1' ? '必要' : '非必要'), /*#__PURE__*/React.createElement("td", {
|
|
274
|
+
className: "center"
|
|
275
|
+
}, !hasSubMaterials(item) && /*#__PURE__*/React.createElement("div", {
|
|
276
|
+
className: "link-list"
|
|
277
|
+
}, initMaterialExample(item).map(function (sub, si) {
|
|
278
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
279
|
+
className: "link",
|
|
280
|
+
key: si,
|
|
281
|
+
onClick: function onClick() {
|
|
282
|
+
return previewFile(sub);
|
|
283
|
+
}
|
|
284
|
+
}, sub.name);
|
|
285
|
+
}))), /*#__PURE__*/React.createElement("td", {
|
|
286
|
+
className: "center"
|
|
287
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
className: "link-list"
|
|
289
|
+
}, initFormGuid(item).map(function (sub, si) {
|
|
290
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
291
|
+
className: "link",
|
|
292
|
+
key: si,
|
|
293
|
+
onClick: function onClick() {
|
|
294
|
+
return goDownLoad(sub);
|
|
295
|
+
}
|
|
296
|
+
}, sub.name);
|
|
297
|
+
}))), /*#__PURE__*/React.createElement("td", {
|
|
298
|
+
className: "center"
|
|
299
|
+
}, item.keyPoint && /*#__PURE__*/React.createElement("span", {
|
|
300
|
+
className: "link",
|
|
301
|
+
onClick: function onClick() {
|
|
302
|
+
return checkPoint(item);
|
|
303
|
+
}
|
|
304
|
+
}, "\u67E5\u770B"))), hasSubMaterials(item) && item.subMaterials.map(function (sub, si) {
|
|
305
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
306
|
+
className: "data-row sub-row",
|
|
307
|
+
key: "sub-" + si
|
|
308
|
+
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", {
|
|
309
|
+
className: "material-name-cell sub-name"
|
|
310
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
311
|
+
className: "sub-indent"
|
|
312
|
+
}), sub.materialName)), /*#__PURE__*/React.createElement("td", {
|
|
313
|
+
className: "center"
|
|
314
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
315
|
+
className: "type-btns"
|
|
316
|
+
}, getFileType(sub) === '智' && /*#__PURE__*/React.createElement("span", {
|
|
317
|
+
className: "type-tag type-tag-zhi",
|
|
318
|
+
onClick: function onClick() {
|
|
319
|
+
return showTip('智');
|
|
320
|
+
}
|
|
321
|
+
}, "\u667A"), getFileType(sub) === '享' && /*#__PURE__*/React.createElement("span", {
|
|
322
|
+
className: "type-tag type-tag-xiang",
|
|
323
|
+
onClick: function onClick() {
|
|
324
|
+
return showTip('享');
|
|
325
|
+
}
|
|
326
|
+
}, "\u4EAB"), getFileType(sub) === '自' && /*#__PURE__*/React.createElement("span", {
|
|
327
|
+
className: "type-tag type-tag-zi",
|
|
328
|
+
onClick: function onClick() {
|
|
329
|
+
return showTip('自');
|
|
330
|
+
}
|
|
331
|
+
}, "\u81EA"))), /*#__PURE__*/React.createElement("td", {
|
|
332
|
+
className: "center"
|
|
333
|
+
}, sub.isNeed === '1' ? '必要' : '非必要'), /*#__PURE__*/React.createElement("td", {
|
|
334
|
+
className: "center"
|
|
335
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
336
|
+
className: "link-list"
|
|
337
|
+
}, initMaterialExample(sub).map(function (s, sii) {
|
|
338
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
339
|
+
className: "link",
|
|
340
|
+
key: sii,
|
|
341
|
+
onClick: function onClick() {
|
|
342
|
+
return previewFile(s);
|
|
343
|
+
}
|
|
344
|
+
}, s.name);
|
|
345
|
+
}))), /*#__PURE__*/React.createElement("td", {
|
|
346
|
+
className: "center"
|
|
347
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
348
|
+
className: "link-list"
|
|
349
|
+
}, initFormGuid(sub).map(function (s, sii) {
|
|
350
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
351
|
+
className: "link",
|
|
352
|
+
key: sii,
|
|
353
|
+
onClick: function onClick() {
|
|
354
|
+
return goDownLoad(s);
|
|
355
|
+
}
|
|
356
|
+
}, s.name);
|
|
357
|
+
}))), /*#__PURE__*/React.createElement("td", {
|
|
358
|
+
className: "center"
|
|
359
|
+
}, sub.keyPoint && /*#__PURE__*/React.createElement("span", {
|
|
360
|
+
className: "link",
|
|
361
|
+
onClick: function onClick() {
|
|
362
|
+
return checkPoint(sub);
|
|
363
|
+
}
|
|
364
|
+
}, "\u67E5\u770B")));
|
|
365
|
+
}));
|
|
366
|
+
})))), previewShow && /*#__PURE__*/React.createElement(_Dialog, {
|
|
367
|
+
visible: previewShow,
|
|
368
|
+
onClose: function onClose() {
|
|
369
|
+
return setPreviewShow(false);
|
|
370
|
+
},
|
|
371
|
+
footer: false,
|
|
372
|
+
className: "preview-dialog"
|
|
373
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
374
|
+
className: "preview-inner"
|
|
375
|
+
}, previewLoading && /*#__PURE__*/React.createElement("div", {
|
|
376
|
+
className: "loading-con"
|
|
377
|
+
}, "\u52A0\u8F7D\u4E2D..."), /*#__PURE__*/React.createElement("iframe", {
|
|
378
|
+
id: "previewIframe",
|
|
379
|
+
frameBorder: "0",
|
|
380
|
+
height: "100%",
|
|
381
|
+
width: "100%",
|
|
382
|
+
title: "\u9884\u89C8"
|
|
383
|
+
}))));
|
|
384
|
+
};
|
|
385
|
+
MaterialsList.displayName = 'MaterialsList';
|
|
386
|
+
export default MaterialsList;
|