ydb-components-material 0.1.102 → 0.1.104
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/bg2.a0dfd810.png +0 -0
- package/build/docs/static/commonBg.83239798.png +0 -0
- package/build/docs/static/empty.7e69f478.png +0 -0
- package/build/docs/{umi.41b85bf9.css → umi.82ebabdb.css} +1 -1
- package/build/docs/umi.967ad73e.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/260814268e08d6e791032a27843cd215.png +0 -0
- package/build/lowcode/assets/3eb597ba730c5870765c2c09b7853d78.png +0 -0
- package/build/lowcode/assets/56daf7f96b7eadb3665f9b32b176a50e.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/260814268e08d6e791032a27843cd215.png +0 -0
- package/build/lowcode/render/default/assets/3eb597ba730c5870765c2c09b7853d78.png +0 -0
- package/build/lowcode/render/default/assets/56daf7f96b7eadb3665f9b32b176a50e.png +0 -0
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +17 -17
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- 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 +23 -23
- package/dist/BizComps.js.map +1 -1
- package/dist/assets/260814268e08d6e791032a27843cd215.png +0 -0
- package/dist/assets/3eb597ba730c5870765c2c09b7853d78.png +0 -0
- package/dist/assets/56daf7f96b7eadb3665f9b32b176a50e.png +0 -0
- package/es/components/check-loading/index.scss +3 -0
- package/es/components/guide/_utils.d.ts +4 -0
- package/es/components/guide/_utils.js +45 -0
- package/es/components/guide/comment.d.ts +9 -0
- package/es/components/guide/comment.js +97 -0
- package/es/components/guide/comment.scss +23 -0
- package/es/components/guide/compoents/accept.d.ts +7 -0
- package/es/components/guide/compoents/accept.js +35 -0
- package/es/components/guide/compoents/accept.scss +11 -0
- package/es/components/guide/compoents/basicInfo.d.ts +7 -0
- package/es/components/guide/compoents/basicInfo.js +81 -0
- package/es/components/guide/compoents/basicInfo.scss +32 -0
- package/es/components/guide/compoents/eventInfo.d.ts +8 -0
- package/es/components/guide/compoents/eventInfo.js +87 -0
- package/es/components/guide/compoents/eventInfo.scss +87 -0
- package/es/components/guide/compoents/guideTabs.d.ts +20 -0
- package/es/components/guide/compoents/guideTabs.js +55 -0
- package/es/components/guide/compoents/guideTabs.scss +39 -0
- package/es/components/guide/compoents/materials/checkPoint.d.ts +3 -0
- package/es/components/guide/compoents/materials/checkPoint.js +154 -0
- package/es/components/guide/compoents/materials/checkPoint.scss +120 -0
- package/es/components/guide/compoents/materials/materials.d.ts +22 -0
- package/es/components/guide/compoents/materials/materials.js +60 -0
- package/es/components/guide/compoents/materials/materials.scss +3 -0
- package/es/components/guide/compoents/materials/materialsList.d.ts +11 -0
- package/es/components/guide/compoents/materials/materialsList.js +411 -0
- package/es/components/guide/compoents/materials/materialsList.scss +170 -0
- package/es/components/guide/compoents/materials/situation.d.ts +20 -0
- package/es/components/guide/compoents/materials/situation.js +152 -0
- package/es/components/guide/compoents/materials/situation.scss +63 -0
- package/es/components/guide/compoents/places.d.ts +7 -0
- package/es/components/guide/compoents/places.js +129 -0
- package/es/components/guide/compoents/places.scss +71 -0
- package/es/components/guide/compoents/processImg.d.ts +9 -0
- package/es/components/guide/compoents/processImg.js +149 -0
- package/es/components/guide/compoents/processImg.scss +88 -0
- package/es/components/guide/compoents/result.d.ts +7 -0
- package/es/components/guide/compoents/result.js +121 -0
- package/es/components/guide/compoents/result.scss +88 -0
- package/es/components/guide/imgs/bg1.png +0 -0
- package/es/components/guide/imgs/bg2.png +0 -0
- package/es/components/guide/imgs/bg22.png +0 -0
- package/es/components/guide/imgs/cant.png +0 -0
- package/es/components/guide/imgs/checkBg.png +0 -0
- package/es/components/guide/imgs/checkBgPc.png +0 -0
- package/es/components/guide/imgs/comment.png +0 -0
- package/es/components/guide/imgs/commonBg.png +0 -0
- package/es/components/guide/imgs/down.png +0 -0
- package/es/components/guide/imgs/download.png +0 -0
- package/es/components/guide/imgs/empty.png +0 -0
- package/es/components/guide/imgs/icon1.png +0 -0
- package/es/components/guide/imgs/icon2.png +0 -0
- package/es/components/guide/imgs/icon3.png +0 -0
- package/es/components/guide/imgs/icon4.png +0 -0
- package/es/components/guide/imgs/iconA.png +0 -0
- package/es/components/guide/imgs/iconB.png +0 -0
- package/es/components/guide/imgs/iconC.png +0 -0
- package/es/components/guide/imgs/loading.gif +0 -0
- package/es/components/guide/imgs/mapMarker.png +0 -0
- package/es/components/guide/imgs/share.png +0 -0
- package/es/components/guide/imgs/tab_switch.png +0 -0
- package/es/components/guide/index.d.ts +48 -0
- package/es/components/guide/index.js +440 -0
- package/es/components/guide/index.scss +178 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +2 -0
- package/es/style.js +3 -0
- package/lib/components/check-loading/index.scss +3 -0
- package/lib/components/guide/_utils.d.ts +4 -0
- package/lib/components/guide/_utils.js +52 -0
- package/lib/components/guide/comment.d.ts +9 -0
- package/lib/components/guide/comment.js +102 -0
- package/lib/components/guide/comment.scss +23 -0
- package/lib/components/guide/compoents/accept.d.ts +7 -0
- package/lib/components/guide/compoents/accept.js +40 -0
- package/lib/components/guide/compoents/accept.scss +11 -0
- package/lib/components/guide/compoents/basicInfo.d.ts +7 -0
- package/lib/components/guide/compoents/basicInfo.js +86 -0
- package/lib/components/guide/compoents/basicInfo.scss +32 -0
- package/lib/components/guide/compoents/eventInfo.d.ts +8 -0
- package/lib/components/guide/compoents/eventInfo.js +92 -0
- package/lib/components/guide/compoents/eventInfo.scss +87 -0
- package/lib/components/guide/compoents/guideTabs.d.ts +20 -0
- package/lib/components/guide/compoents/guideTabs.js +60 -0
- package/lib/components/guide/compoents/guideTabs.scss +39 -0
- package/lib/components/guide/compoents/materials/checkPoint.d.ts +3 -0
- package/lib/components/guide/compoents/materials/checkPoint.js +159 -0
- package/lib/components/guide/compoents/materials/checkPoint.scss +120 -0
- package/lib/components/guide/compoents/materials/materials.d.ts +22 -0
- package/lib/components/guide/compoents/materials/materials.js +66 -0
- package/lib/components/guide/compoents/materials/materials.scss +3 -0
- package/lib/components/guide/compoents/materials/materialsList.d.ts +11 -0
- package/lib/components/guide/compoents/materials/materialsList.js +416 -0
- package/lib/components/guide/compoents/materials/materialsList.scss +170 -0
- package/lib/components/guide/compoents/materials/situation.d.ts +20 -0
- package/lib/components/guide/compoents/materials/situation.js +156 -0
- package/lib/components/guide/compoents/materials/situation.scss +63 -0
- package/lib/components/guide/compoents/places.d.ts +7 -0
- package/lib/components/guide/compoents/places.js +135 -0
- package/lib/components/guide/compoents/places.scss +71 -0
- package/lib/components/guide/compoents/processImg.d.ts +9 -0
- package/lib/components/guide/compoents/processImg.js +155 -0
- package/lib/components/guide/compoents/processImg.scss +88 -0
- package/lib/components/guide/compoents/result.d.ts +7 -0
- package/lib/components/guide/compoents/result.js +127 -0
- package/lib/components/guide/compoents/result.scss +88 -0
- package/lib/components/guide/imgs/bg1.png +0 -0
- package/lib/components/guide/imgs/bg2.png +0 -0
- package/lib/components/guide/imgs/bg22.png +0 -0
- package/lib/components/guide/imgs/cant.png +0 -0
- package/lib/components/guide/imgs/checkBg.png +0 -0
- package/lib/components/guide/imgs/checkBgPc.png +0 -0
- package/lib/components/guide/imgs/comment.png +0 -0
- package/lib/components/guide/imgs/commonBg.png +0 -0
- package/lib/components/guide/imgs/down.png +0 -0
- package/lib/components/guide/imgs/download.png +0 -0
- package/lib/components/guide/imgs/empty.png +0 -0
- package/lib/components/guide/imgs/icon1.png +0 -0
- package/lib/components/guide/imgs/icon2.png +0 -0
- package/lib/components/guide/imgs/icon3.png +0 -0
- package/lib/components/guide/imgs/icon4.png +0 -0
- package/lib/components/guide/imgs/iconA.png +0 -0
- package/lib/components/guide/imgs/iconB.png +0 -0
- package/lib/components/guide/imgs/iconC.png +0 -0
- package/lib/components/guide/imgs/loading.gif +0 -0
- package/lib/components/guide/imgs/mapMarker.png +0 -0
- package/lib/components/guide/imgs/share.png +0 -0
- package/lib/components/guide/imgs/tab_switch.png +0 -0
- package/lib/components/guide/index.d.ts +48 -0
- package/lib/components/guide/index.js +445 -0
- package/lib/components/guide/index.scss +178 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -1
- package/lib/style.js +3 -0
- package/lowcode/comment/meta.ts +86 -0
- package/lowcode/guide/meta.ts +483 -0
- package/lowcode_es/comment/meta.d.ts +22 -0
- package/lowcode_es/comment/meta.js +76 -0
- package/lowcode_es/guide/meta.d.ts +22 -0
- package/lowcode_es/guide/meta.js +455 -0
- package/lowcode_es/meta.js +4 -2
- package/lowcode_lib/comment/meta.d.ts +22 -0
- package/lowcode_lib/comment/meta.js +81 -0
- package/lowcode_lib/guide/meta.d.ts +22 -0
- package/lowcode_lib/guide/meta.js +460 -0
- package/lowcode_lib/meta.js +21 -19
- package/package.json +3 -3
- package/build/docs/umi.a65f236e.js +0 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import "./situation.scss";
|
|
3
|
+
|
|
4
|
+
// TODO: checkSituation2 and apiConfig are not available in this project
|
|
5
|
+
// import { checkSituation2 } from '@/utils/situation.js'
|
|
6
|
+
// import apiConfig from '@/config/api.cofig'
|
|
7
|
+
|
|
8
|
+
var Situation = function Situation(_ref) {
|
|
9
|
+
var eventInfoProp = _ref.eventInfo,
|
|
10
|
+
stepListProp = _ref.stepList,
|
|
11
|
+
applicationIdProp = _ref.applicationId,
|
|
12
|
+
accessTokenProp = _ref.accessToken,
|
|
13
|
+
acctTypeProp = _ref.acctType,
|
|
14
|
+
formDataProp = _ref.formData,
|
|
15
|
+
finalMaterialsProp = _ref.finalMaterials,
|
|
16
|
+
formFieldNamesProp = _ref.formFieldNames,
|
|
17
|
+
itemSituationRowUidProp = _ref.itemSituationRowUid,
|
|
18
|
+
workNoProp = _ref.workNo,
|
|
19
|
+
declarationAppTokenProp = _ref.declarationAppToken,
|
|
20
|
+
declarePageProp = _ref.declarePage,
|
|
21
|
+
taskHandleItemProp = _ref.taskHandleItem,
|
|
22
|
+
situationResRechangeProp = _ref.situationResRechange;
|
|
23
|
+
var _React$useState = React.useState('说明:因个人情况不同上交材料不同,可通过情形选择查看必须上传的材料!'),
|
|
24
|
+
tip = _React$useState[0];
|
|
25
|
+
var _React$useState2 = React.useState(false),
|
|
26
|
+
isExpend = _React$useState2[0],
|
|
27
|
+
setIsExpend = _React$useState2[1];
|
|
28
|
+
var _React$useState3 = React.useState(''),
|
|
29
|
+
iframeSrc = _React$useState3[0],
|
|
30
|
+
setIframeSrc = _React$useState3[1];
|
|
31
|
+
React.useEffect(function () {
|
|
32
|
+
initPage();
|
|
33
|
+
window.addEventListener('message', getMessage);
|
|
34
|
+
return function () {
|
|
35
|
+
window.removeEventListener('message', getMessage);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
var initPage = function initPage() {
|
|
39
|
+
var stepList = stepListProp;
|
|
40
|
+
if (!stepList) return;
|
|
41
|
+
var situationPage = stepList.find(function (item) {
|
|
42
|
+
return item.name === '智能导办';
|
|
43
|
+
});
|
|
44
|
+
if (situationPage !== null && situationPage !== void 0 && situationPage.link && declarePageProp) {
|
|
45
|
+
var applicationId = applicationIdProp;
|
|
46
|
+
var access_token = accessTokenProp;
|
|
47
|
+
var acctType = acctTypeProp;
|
|
48
|
+
var finalLink = declarePageProp + "/preview.html?pageID=" + situationPage.id;
|
|
49
|
+
var url = finalLink + "&isFirst=1&isReCheck=1&applicationId=" + applicationId + "&access_token=" + access_token + "&acctType=" + acctType;
|
|
50
|
+
setIframeSrc(url);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var getMessage = function getMessage(e) {
|
|
54
|
+
var typeArr = ['getAccessToken', 'getDeclaraToken', 'getApplicationId', 'getTaskHandleItem', 'getFormId', 'getMaterials', 'getFormData', 'getFormFieldNames', 'getItemSituationRowUid', 'getWorkNo'];
|
|
55
|
+
var _ref2 = e.data || {},
|
|
56
|
+
type = _ref2.type,
|
|
57
|
+
data = _ref2.data;
|
|
58
|
+
if (typeArr.includes(type)) {
|
|
59
|
+
sendInfoHandle(type, data);
|
|
60
|
+
} else if (type === 'situationRes') {
|
|
61
|
+
situationResRechangeProp === null || situationResRechangeProp === void 0 ? void 0 : situationResRechangeProp(data);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var sendInfoHandle = function sendInfoHandle(type, _data) {
|
|
65
|
+
var _eventInfo$taskGenera, _eventInfo$taskGenera2;
|
|
66
|
+
// TODO: postMessage to iframe – implementation depends on iframe availability
|
|
67
|
+
var applicationId = applicationIdProp;
|
|
68
|
+
// const taskHandleItem = taskHandleItemProp;
|
|
69
|
+
var eventInfo = eventInfoProp;
|
|
70
|
+
var formData = formDataProp;
|
|
71
|
+
var finalMaterials = finalMaterialsProp;
|
|
72
|
+
var formFieldNames = formFieldNamesProp;
|
|
73
|
+
var itemSituationRowUid = itemSituationRowUidProp;
|
|
74
|
+
var workNo = workNoProp;
|
|
75
|
+
var sendData = {
|
|
76
|
+
type: type,
|
|
77
|
+
data: {}
|
|
78
|
+
};
|
|
79
|
+
switch (type) {
|
|
80
|
+
case 'getAccessToken':
|
|
81
|
+
sendData.data.accessToken = accessTokenProp;
|
|
82
|
+
sendData.data.acctType = acctTypeProp;
|
|
83
|
+
break;
|
|
84
|
+
case 'getDeclaraToken':
|
|
85
|
+
sendData.data.declarationAppToken = declarationAppTokenProp;
|
|
86
|
+
break;
|
|
87
|
+
case 'getApplicationId':
|
|
88
|
+
sendData.data.applicationId = applicationId;
|
|
89
|
+
break;
|
|
90
|
+
case 'getTaskHandleItem':
|
|
91
|
+
sendData.data.taskHandleItem = taskHandleItemProp;
|
|
92
|
+
break;
|
|
93
|
+
case 'getFormId':
|
|
94
|
+
if (eventInfo !== null && eventInfo !== void 0 && (_eventInfo$taskGenera = eventInfo.taskGeneralForms) !== null && _eventInfo$taskGenera !== void 0 && (_eventInfo$taskGenera2 = _eventInfo$taskGenera[0]) !== null && _eventInfo$taskGenera2 !== void 0 && _eventInfo$taskGenera2.formId) {
|
|
95
|
+
sendData.data.formId = eventInfo.taskGeneralForms[0].formId;
|
|
96
|
+
} else {
|
|
97
|
+
sendData.data.formId = '12023122617035840604349816';
|
|
98
|
+
// TODO: uni.$u.toast('没有查到表单id')
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case 'getMaterials':
|
|
102
|
+
sendData.data.materials = finalMaterials || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.taskGeneralMaterials);
|
|
103
|
+
break;
|
|
104
|
+
case 'getFormData':
|
|
105
|
+
sendData.data.formData = formData;
|
|
106
|
+
break;
|
|
107
|
+
case 'getFormFieldNames':
|
|
108
|
+
sendData.data.formFieldNames = formFieldNames;
|
|
109
|
+
break;
|
|
110
|
+
case 'getItemSituationRowUid':
|
|
111
|
+
sendData.data.itemSituationRowUid = itemSituationRowUid;
|
|
112
|
+
break;
|
|
113
|
+
case 'getWorkNo':
|
|
114
|
+
sendData.data.workNo = workNo;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
var formIframe = document.getElementById('situationIframe');
|
|
118
|
+
if (formIframe !== null && formIframe !== void 0 && formIframe.contentWindow) {
|
|
119
|
+
formIframe.contentWindow.postMessage(sendData, '*');
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
var expendChange = function expendChange() {
|
|
123
|
+
setIsExpend(!isExpend);
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
className: "situation-content"
|
|
127
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: "situation-tip"
|
|
129
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: "title-con"
|
|
131
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: "title"
|
|
133
|
+
}, "\u5BFC\u529E\u60C5\u5F62\u9009\u62E9"), /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: "btn-con",
|
|
135
|
+
onClick: expendChange
|
|
136
|
+
}, /*#__PURE__*/React.createElement("div", null, isExpend ? '收起' : '展开'), /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "icon"
|
|
138
|
+
}, /*#__PURE__*/React.createElement("span", null, isExpend ? '▲' : '▼')))), /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: "tip"
|
|
140
|
+
}, tip)), isExpend && /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "situation-inner"
|
|
142
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
|
143
|
+
id: "situationIframe",
|
|
144
|
+
src: iframeSrc,
|
|
145
|
+
frameBorder: "0",
|
|
146
|
+
height: "100%",
|
|
147
|
+
width: "100%",
|
|
148
|
+
title: "\u60C5\u5F62\u9009\u62E9"
|
|
149
|
+
})));
|
|
150
|
+
};
|
|
151
|
+
Situation.displayName = 'Situation';
|
|
152
|
+
export default Situation;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.situation-content {
|
|
2
|
+
background: #ffffff !important;
|
|
3
|
+
|
|
4
|
+
.situation-tip {
|
|
5
|
+
border: 1px solid #ffffff;
|
|
6
|
+
padding: 16px;
|
|
7
|
+
border-radius: 8px 8px 0 0;
|
|
8
|
+
background: linear-gradient(180deg, #E1EDFF 0%, #FFFFFF 100%);
|
|
9
|
+
|
|
10
|
+
.title-con {
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: center;
|
|
14
|
+
|
|
15
|
+
.title {
|
|
16
|
+
background: linear-gradient(96deg, #0047A8 0%, #1678FF 98%);
|
|
17
|
+
-webkit-background-clip: text;
|
|
18
|
+
-webkit-text-fill-color: transparent;
|
|
19
|
+
background-clip: text;
|
|
20
|
+
font-size: 15px;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.btn-con {
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
color: #1678FF;
|
|
29
|
+
font-size: 13px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
|
|
32
|
+
.icon {
|
|
33
|
+
width: 14px;
|
|
34
|
+
height: 14px;
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
border: 1px solid #1678FF;
|
|
40
|
+
margin-left: 4px;
|
|
41
|
+
font-size: 8px;
|
|
42
|
+
color: #1678FF;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tip {
|
|
48
|
+
margin-top: 8px;
|
|
49
|
+
font-size: 13px;
|
|
50
|
+
line-height: 20px;
|
|
51
|
+
color: #5C7292;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.situation-inner {
|
|
56
|
+
background: #ffffff;
|
|
57
|
+
border-radius: 0 0 8px 8px;
|
|
58
|
+
border-top: none;
|
|
59
|
+
overflow-y: scroll;
|
|
60
|
+
height: 500px;
|
|
61
|
+
padding: 10px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import "./places.scss";
|
|
3
|
+
import emptyImg from "../imgs/empty.png";
|
|
4
|
+
var Places = function Places(_ref) {
|
|
5
|
+
var eventInfoProp = _ref.eventInfo;
|
|
6
|
+
var _React$useState = React.useState({
|
|
7
|
+
longitude: NaN,
|
|
8
|
+
latitude: NaN
|
|
9
|
+
}),
|
|
10
|
+
local = _React$useState[0],
|
|
11
|
+
setLocal = _React$useState[1];
|
|
12
|
+
var _React$useState2 = React.useState([]),
|
|
13
|
+
list = _React$useState2[0],
|
|
14
|
+
setList = _React$useState2[1];
|
|
15
|
+
React.useEffect(function () {
|
|
16
|
+
initData();
|
|
17
|
+
}, []);
|
|
18
|
+
var initData = function initData() {
|
|
19
|
+
var eventInfo = eventInfoProp;
|
|
20
|
+
var hallList = (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.hallList) || [];
|
|
21
|
+
setList(hallList);
|
|
22
|
+
if (hallList.length > 0) {
|
|
23
|
+
clickDotHandle(hallList[0]);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// TODO: uni.getLocation → browser geolocation not implemented
|
|
28
|
+
// initSelfPos() was using uni.getLocation
|
|
29
|
+
|
|
30
|
+
var setCenter = function setCenter(latitude, longitude) {
|
|
31
|
+
setLocal({
|
|
32
|
+
latitude: latitude,
|
|
33
|
+
longitude: longitude
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var clickDotHandle = function clickDotHandle(point) {
|
|
37
|
+
var latitude = point.latitude,
|
|
38
|
+
longitude = point.longitude;
|
|
39
|
+
if (latitude && longitude) {
|
|
40
|
+
setCenter(latitude, longitude);
|
|
41
|
+
} else {
|
|
42
|
+
setCenter(37.81, 112.52);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// TODO: commonMap component not available in React. Map display not implemented.
|
|
47
|
+
// The original used a <commonMap> uni-app component with mapbox/amap integration.
|
|
48
|
+
React.useEffect(function () {
|
|
49
|
+
var hallList = (eventInfoProp === null || eventInfoProp === void 0 ? void 0 : eventInfoProp.hallList) || [];
|
|
50
|
+
window.onload = function () {
|
|
51
|
+
// 2. 初始化地图
|
|
52
|
+
if (!AMap) return;
|
|
53
|
+
var map = new AMap.Map('mapContainer', {
|
|
54
|
+
zoom: 14,
|
|
55
|
+
// 缩放级别
|
|
56
|
+
// 注意:经纬度格式为 [经度, 纬度]
|
|
57
|
+
center: [hallList[0].longitude, hallList[0].latitude]
|
|
58
|
+
});
|
|
59
|
+
// 3. 添加一个标记点
|
|
60
|
+
new AMap.Marker({
|
|
61
|
+
position: [hallList[0].longitude, hallList[0].latitude],
|
|
62
|
+
map: map
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: "places-content"
|
|
68
|
+
}, list.length > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: "map-con"
|
|
70
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
id: "mapContainer",
|
|
72
|
+
style: {
|
|
73
|
+
height: 200,
|
|
74
|
+
background: '#f0f0f0',
|
|
75
|
+
display: 'flex',
|
|
76
|
+
justifyContent: 'center',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
color: '#999',
|
|
79
|
+
fontSize: 14
|
|
80
|
+
}
|
|
81
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: "list-con"
|
|
83
|
+
}, list.map(function (item, index) {
|
|
84
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: "item",
|
|
86
|
+
key: index,
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return clickDotHandle(item);
|
|
89
|
+
}
|
|
90
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: "name"
|
|
92
|
+
}, item.hallName), /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: "info"
|
|
94
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
95
|
+
className: "icon-placeholder"
|
|
96
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: "title_"
|
|
98
|
+
}, "\u5730\u5740\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
className: "desc"
|
|
100
|
+
}, item.addressDetail)), /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: "info"
|
|
102
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
103
|
+
className: "icon-placeholder"
|
|
104
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
className: "title_"
|
|
106
|
+
}, "\u65F6\u95F4\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "desc"
|
|
108
|
+
}, item.firstStartTime, " - ", item.firstEndTime, " / ", item.secondStartTime, " - ", item.secondEndTime)), /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
className: "info"
|
|
110
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
111
|
+
className: "icon-placeholder"
|
|
112
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: "title_"
|
|
114
|
+
}, "\u7535\u8BDD\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: "desc"
|
|
116
|
+
}, item.consultPhone)));
|
|
117
|
+
}))) : /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
className: "empty-con"
|
|
119
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
className: "empty-img",
|
|
121
|
+
style: {
|
|
122
|
+
backgroundImage: "url(" + emptyImg + ")"
|
|
123
|
+
}
|
|
124
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
className: "empty-text"
|
|
126
|
+
}, "\u6682\u65E0\u529E\u4E8B\u5927\u5385")));
|
|
127
|
+
};
|
|
128
|
+
Places.displayName = 'Places';
|
|
129
|
+
export default Places;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.places-content {
|
|
2
|
+
background: #ffffff;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
padding: 12px 12px 0;
|
|
5
|
+
margin-top: 12px;
|
|
6
|
+
|
|
7
|
+
.map-con {
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.list-con {
|
|
13
|
+
.item {
|
|
14
|
+
padding: 16px 0;
|
|
15
|
+
border-bottom: 1px solid #EEEEEE;
|
|
16
|
+
|
|
17
|
+
&:last-child {
|
|
18
|
+
border: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.name {
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
color: #333333;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.info {
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
margin-top: 8px;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
color: #666666;
|
|
35
|
+
|
|
36
|
+
.icon-placeholder {
|
|
37
|
+
margin-right: 6px;
|
|
38
|
+
margin-top: 4px;
|
|
39
|
+
width: 16px;
|
|
40
|
+
height: 16px;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.desc {
|
|
45
|
+
flex: 1;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.empty-con {
|
|
52
|
+
background: #ffffff;
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
height: 50vh;
|
|
58
|
+
|
|
59
|
+
.empty-img {
|
|
60
|
+
width: 189px;
|
|
61
|
+
height: 120px;
|
|
62
|
+
background-size: 100% 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.empty-text {
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
color: #8BB5ED;
|
|
68
|
+
margin-top: 5px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import _Loading from "@alifd/next/es/loading";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import "./processImg.scss";
|
|
6
|
+
import { getUrlById } from "../../../api.js";
|
|
7
|
+
// TODO: getFileUrlApi not available in this project
|
|
8
|
+
// import { getFileUrlApi } from '@/api/business.js'
|
|
9
|
+
|
|
10
|
+
var ProcessImg = function ProcessImg(_ref) {
|
|
11
|
+
var eventInfoProp = _ref.eventInfo,
|
|
12
|
+
declarationAppTokenProp = _ref.declarationAppToken,
|
|
13
|
+
baseUrlProp = _ref.baseUrl;
|
|
14
|
+
var _React$useState = React.useState(true),
|
|
15
|
+
loading = _React$useState[0],
|
|
16
|
+
setLoading = _React$useState[1];
|
|
17
|
+
var _React$useState2 = React.useState(''),
|
|
18
|
+
processImg = _React$useState2[0],
|
|
19
|
+
setProcessImg = _React$useState2[1];
|
|
20
|
+
var _React$useState3 = React.useState([]),
|
|
21
|
+
strategyList = _React$useState3[0],
|
|
22
|
+
setStrategyList = _React$useState3[1];
|
|
23
|
+
React.useEffect(function () {
|
|
24
|
+
initData();
|
|
25
|
+
}, []);
|
|
26
|
+
var initData = /*#__PURE__*/function () {
|
|
27
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
28
|
+
var _eventInfo$taskGenera;
|
|
29
|
+
var eventInfo, imgObj, imgObjParsed, urlRes, strategies, _t;
|
|
30
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
31
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32
|
+
case 0:
|
|
33
|
+
eventInfo = eventInfoProp;
|
|
34
|
+
if (eventInfo) {
|
|
35
|
+
_context.next = 1;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return _context.abrupt("return");
|
|
39
|
+
case 1:
|
|
40
|
+
// Process image (workflow chart)
|
|
41
|
+
// TODO: getFileUrlApi needs to be implemented
|
|
42
|
+
imgObj = (_eventInfo$taskGenera = eventInfo.taskGeneralExtend) === null || _eventInfo$taskGenera === void 0 ? void 0 : _eventInfo$taskGenera.programProcess;
|
|
43
|
+
_context.prev = 2;
|
|
44
|
+
imgObjParsed = JSON.parse(imgObj);
|
|
45
|
+
if (!(imgObjParsed.length > 0 && imgObjParsed[0].id)) {
|
|
46
|
+
_context.next = 4;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
_context.next = 3;
|
|
50
|
+
return getUrlById({
|
|
51
|
+
id: imgObjParsed[0].id,
|
|
52
|
+
effectiveTime: 3600000
|
|
53
|
+
}, {
|
|
54
|
+
tokenTY: declarationAppTokenProp,
|
|
55
|
+
baseUrl: baseUrlProp
|
|
56
|
+
});
|
|
57
|
+
case 3:
|
|
58
|
+
urlRes = _context.sent;
|
|
59
|
+
setProcessImg(urlRes.presignedUrlList[2]);
|
|
60
|
+
// TODO: getFileUrl API call not implemented – file ID: ${imgObjParsed[0].id}
|
|
61
|
+
setLoading(false);
|
|
62
|
+
_context.next = 5;
|
|
63
|
+
break;
|
|
64
|
+
case 4:
|
|
65
|
+
setLoading(false);
|
|
66
|
+
case 5:
|
|
67
|
+
_context.next = 7;
|
|
68
|
+
break;
|
|
69
|
+
case 6:
|
|
70
|
+
_context.prev = 6;
|
|
71
|
+
_t = _context["catch"](2);
|
|
72
|
+
setLoading(false);
|
|
73
|
+
case 7:
|
|
74
|
+
// Strategy guide list
|
|
75
|
+
strategies = eventInfo.applicationAffairsStrategy || [];
|
|
76
|
+
setStrategyList(strategies);
|
|
77
|
+
|
|
78
|
+
// TODO: initStrategyList – fetch file URLs for each strategy item
|
|
79
|
+
case 8:
|
|
80
|
+
case "end":
|
|
81
|
+
return _context.stop();
|
|
82
|
+
}
|
|
83
|
+
}, _callee, null, [[2, 6]]);
|
|
84
|
+
}));
|
|
85
|
+
return function initData() {
|
|
86
|
+
return _ref2.apply(this, arguments);
|
|
87
|
+
};
|
|
88
|
+
}();
|
|
89
|
+
|
|
90
|
+
// TODO: uni.previewImage not implemented
|
|
91
|
+
var preView = function preView() {
|
|
92
|
+
// uni.previewImage({ urls: [this.processImg] })
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: "processImg-content"
|
|
96
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: "card"
|
|
98
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
className: "title"
|
|
100
|
+
}, "\u529E\u4E8B\u653B\u7565"), /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: "list-con"
|
|
102
|
+
}, strategyList.length > 0 ? strategyList.map(function (item, index) {
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: "item",
|
|
105
|
+
key: index
|
|
106
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "title-con"
|
|
108
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
className: "num"
|
|
110
|
+
}, "0", index + 1), /*#__PURE__*/React.createElement("div", {
|
|
111
|
+
className: "item-title"
|
|
112
|
+
}, item.title)), /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: "desc-con"
|
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: "desc-info"
|
|
116
|
+
}, item.introduction, item.fileUrl && item.isImg && /*#__PURE__*/React.createElement("img", {
|
|
117
|
+
src: item.fileUrl,
|
|
118
|
+
alt: "",
|
|
119
|
+
style: {
|
|
120
|
+
width: '100%'
|
|
121
|
+
}
|
|
122
|
+
}), item.fileUrl && !item.isImg && /*#__PURE__*/React.createElement("video", {
|
|
123
|
+
className: "video-con",
|
|
124
|
+
src: item.fileUrl,
|
|
125
|
+
controls: true
|
|
126
|
+
}))));
|
|
127
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: "empty-text"
|
|
129
|
+
}, "\u6682\u65E0\u529E\u4E8B\u653B\u7565"))), /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: "card"
|
|
131
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: "title"
|
|
133
|
+
}, "\u529E\u4E8B\u6D41\u7A0B"), processImg ? /*#__PURE__*/React.createElement("img", {
|
|
134
|
+
style: {
|
|
135
|
+
width: '100%'
|
|
136
|
+
},
|
|
137
|
+
src: processImg,
|
|
138
|
+
alt: "\u529E\u4E8B\u6D41\u7A0B",
|
|
139
|
+
onClick: preView
|
|
140
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "empty-content"
|
|
142
|
+
}, loading ? /*#__PURE__*/React.createElement(_Loading, {
|
|
143
|
+
tip: "\u52A0\u8F7D\u4E2D"
|
|
144
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: "empty-text"
|
|
146
|
+
}, "\u6682\u65E0\u76F8\u5173\u6750\u6599"))));
|
|
147
|
+
};
|
|
148
|
+
ProcessImg.displayName = 'ProcessImg';
|
|
149
|
+
export default ProcessImg;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.processImg-content {
|
|
2
|
+
margin-top: 12px;
|
|
3
|
+
|
|
4
|
+
.card {
|
|
5
|
+
background: #FFFFFF;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
margin-bottom: 15px;
|
|
9
|
+
padding: 16px 14px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
|
|
12
|
+
.title {
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
color: #333333;
|
|
16
|
+
margin-bottom: 16px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.list-con {
|
|
21
|
+
.item {
|
|
22
|
+
margin: 10px 0;
|
|
23
|
+
|
|
24
|
+
.title-con {
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
align-items: center;
|
|
28
|
+
|
|
29
|
+
.num {
|
|
30
|
+
background: linear-gradient(90deg, #73AEFF 0%, #1678FF 100%);
|
|
31
|
+
color: #ffffff;
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
padding: 0 7px;
|
|
34
|
+
border-radius: 2px;
|
|
35
|
+
transform: skew(-10deg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.item-title {
|
|
39
|
+
font-size: 15px;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
color: #333333;
|
|
42
|
+
margin-left: 10px;
|
|
43
|
+
|
|
44
|
+
&::after {
|
|
45
|
+
content: '';
|
|
46
|
+
display: block;
|
|
47
|
+
width: 68px;
|
|
48
|
+
height: 8px;
|
|
49
|
+
margin-top: -7px;
|
|
50
|
+
background: linear-gradient(90deg, #D9E9FF 0%, #FFFFFF 98%);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.desc-con {
|
|
56
|
+
border-left: 1px dashed #1678FF;
|
|
57
|
+
margin-left: 14px;
|
|
58
|
+
margin-top: 10px;
|
|
59
|
+
padding-left: 22px;
|
|
60
|
+
|
|
61
|
+
.desc-info {
|
|
62
|
+
background: #F5F9FF;
|
|
63
|
+
padding: 12px;
|
|
64
|
+
font-size: 13px;
|
|
65
|
+
line-height: 22px;
|
|
66
|
+
color: #333333;
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
|
|
69
|
+
.video-con {
|
|
70
|
+
width: 100%;
|
|
71
|
+
margin-top: 10px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:last-child .desc-con {
|
|
77
|
+
border: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.empty-content {
|
|
83
|
+
height: 400px;
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
}
|