vue2-client 1.18.3 → 1.18.5
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/.claude/settings.local.json +20 -20
- package/.cursorrules +19 -19
- package/.env.apply +19 -19
- package/.env.gaslink +19 -19
- package/.env.his +19 -19
- package/.env.liuli +20 -20
- package/.env.scada +19 -19
- package/.serena/memories/code_style_conventions.md +217 -217
- package/.serena/memories/project_overview.md +54 -54
- package/.serena/memories/project_structure.md +329 -329
- package/.serena/memories/suggested_commands.md +127 -127
- package/.serena/memories/task_completion_checklist.md +183 -183
- package/.serena/memories/tech_stack.md +94 -94
- package/CHANGELOG.md +830 -830
- package/CLAUDE.md +97 -97
- package/docs/LowCode/lowcode.md +155 -155
- package/docs/LowCode/lowcodeForDeveloper.md +230 -230
- package/jsconfig.json +19 -19
- package/package.json +1 -1
- package/public/his/editor/editor.html +51 -51
- package/public/his/editor/mock/bind_data.html +779 -779
- package/public/his/editor/mock/data_table.html +40 -40
- package/public/his/editor/mock/sign.html +75 -75
- package/public/his/editor/vender/JsBarcode.all.js +3669 -3669
- package/public/his/editor/vender/date97/My97DatePicker.htm +65 -65
- package/public/his/editor/vender/date97/WdatePicker.js +677 -677
- package/public/his/editor/vender/date97/calendar.js +4 -4
- package/public/his/editor/vender/date97/lang/en.js +13 -13
- package/public/his/editor/vender/date97/lang/zh-cn.js +13 -13
- package/public/his/editor/vender/date97/lang/zh-tw.js +13 -13
- package/public/his/editor/vender/date97/skin/WdatePicker.css +10 -10
- package/public/his/editor/vender/date97/skin/default/datepicker.css +328 -328
- package/public/his/editor/vender/date97/skin/ext/datepicker.css +308 -308
- package/public/his/editor/vender/date97/skin/whyGreen/datepicker.css +255 -255
- package/public/his/editor/vender/diff.js +1627 -1627
- package/public/his/editor/vender/editor.js +1 -1
- package/public/his/editor/vender/fabric.js +31187 -31187
- package/public/his/editor/vender/jquery/jquery.base64.js +190 -190
- package/public/his/editor/vender/jquery/jquery.js +10872 -10872
- package/public/his/editor/vender/jquery/jquery.print.js +255 -255
- package/public/his/editor/vender/jquery/zTreeStyle/zTreeStyle.css +96 -96
- package/public/his/editor/vender/mui/mui.min.css +4 -4
- package/public/his/editor/vender/mui/mui.min.js +5 -5
- package/public/his/editor/vender/mui/mui.picker.min.css +6 -6
- package/public/his/editor/vender/mui/mui.picker.min.js +6 -6
- package/public/his/editor/vender/qrcode.js +7 -7
- package/public/his/editor/vender/requirejs/require.js +2145 -2145
- package/public/his/editor/vender/signature/jSignature.CompressorSVG.js +518 -518
- package/public/his/editor/vender/signature/jSignature.UndoButton.js +164 -164
- package/public/his/editor/vender/signature/jSignature.js +1486 -1486
- package/public/his/editor/vender/validator.js +5094 -5094
- package/public/his/editor/vender/weui/weui.css +5659 -5659
- package/public/his/editor/vender/weui/weui.min.css +4 -4
- package/public/his/editor/vender/weui/weui.min.js +11 -11
- package/src/assets/img/paymentMethod/package.info +1 -1
- package/src/assets/svg/badtwo.svg +1 -1
- package/src/assets/svg/goodtwo.svg +1 -1
- package/src/base-client/components/AI/AskAiBtn.vue +136 -136
- package/src/base-client/components/AI/demo.vue +31 -31
- package/src/base-client/components/common/AddressSearchCombobox/IcMapIcon.vue +16 -16
- package/src/base-client/components/common/AddressSearchCombobox/demo.vue +36 -36
- package/src/base-client/components/common/AddressSearchCombobox/ic_map.svg +6 -6
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
- package/src/base-client/components/common/HIS/demo.vue +61 -61
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +413 -413
- package/src/base-client/components/common/LowCodeComponent/LowCodePageOrganization.vue +502 -502
- package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +728 -728
- package/src/base-client/components/common/LowCodeComponent/LowCodeRenderEnter.vue +29 -29
- package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +219 -219
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
- package/src/base-client/components/common/Recording/Recording.vue +243 -243
- package/src/base-client/components/common/Recording/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +113 -113
- package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +304 -304
- package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
- package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
- package/src/base-client/components/common/XAddReport/index.js +3 -3
- package/src/base-client/components/common/XAddReport/index.md +56 -56
- package/src/base-client/components/common/XBadge/XBadge.vue +94 -94
- package/src/base-client/components/common/XButtons/XButtonDemo.vue +28 -28
- package/src/base-client/components/common/XButtons/index.js +3 -3
- package/src/base-client/components/common/XButtons/index.md +61 -61
- package/src/base-client/components/common/XCalendar/XCalendar.vue +4 -4
- package/src/base-client/components/common/XCheckList/XCheckList.vue +106 -106
- package/src/base-client/components/common/XCheckList/XCheckListDemo.vue +41 -41
- package/src/base-client/components/common/XDataCard/index.js +3 -3
- package/src/base-client/components/common/XDataCard/index.md +1 -1
- package/src/base-client/components/common/XDatePicker/demo.vue +153 -153
- package/src/base-client/components/common/XDetailsView/XDetailsView.vue +238 -238
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XForm/XStatusButton.vue +54 -54
- package/src/base-client/components/common/XForm/itemComponent/XClickChangeBtn/index.vue +49 -49
- package/src/base-client/components/common/XFormGroup/index.js +3 -3
- package/src/base-client/components/common/XFormGroup/index.md +38 -38
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1258 -1257
- package/src/base-client/components/common/XFormTable/index.md +92 -92
- package/src/base-client/components/common/XLabelSelect/XLabelSelect.vue +110 -110
- package/src/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue +35 -35
- package/src/base-client/components/common/XLicensePlate/XLicensePlate.vue +193 -193
- package/src/base-client/components/common/XLicensePlate/XLicensePlateDemo.vue +48 -48
- package/src/base-client/components/common/XPrint/OpenInvoice.vue +21 -21
- package/src/base-client/components/common/XPrint/PrintHtml.js +98 -98
- package/src/base-client/components/common/XPrint/css/hiPrintCss.js +359 -359
- package/src/base-client/components/common/XPrint/css/lodopCss.js +26 -26
- package/src/base-client/components/common/XPrint/css/print-lock.css +351 -351
- package/src/base-client/components/common/XPrint/index.vue +97 -97
- package/src/base-client/components/common/XReport/XReportDesign.vue +463 -463
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +381 -381
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReport/print.js +186 -186
- package/src/base-client/components/common/XReportDrawer/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/index.md +44 -44
- package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
- package/src/base-client/components/common/XReportSlot/index.js +3 -3
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
- package/src/base-client/components/common/XSimpleDescriptions/index.js +3 -3
- package/src/base-client/components/common/XSimpleDescriptions/index.md +7 -7
- package/src/base-client/components/common/XTab/XTabDemo.vue +22 -22
- package/src/base-client/components/common/XTab/index.js +3 -3
- package/src/base-client/components/common/XTable/CustomFuncCel.vue +51 -51
- package/src/base-client/components/common/XTable/TableCellRenderer.vue +161 -161
- package/src/base-client/components/common/XTable/XTableWrapper.vue +1 -1
- package/src/base-client/components/common/XTagGroup/index.vue +52 -52
- package/src/base-client/components/common/XTree/XTree.vue +424 -424
- package/src/base-client/components/common/XTree/index.js +3 -3
- package/src/base-client/components/common/XTree/index.md +36 -36
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +113 -113
- package/src/base-client/components/common/XTreeOne/XTreeOnePro.vue +128 -128
- package/src/base-client/components/common/richTextModal/index.vue +56 -56
- package/src/base-client/components/common/richTextModal/richDemo.vue +48 -48
- package/src/base-client/components/his/XCharge/XChargeDemo.vue +145 -145
- package/src/base-client/components/his/XHisEditor/index.js +3 -3
- package/src/base-client/components/index.js +51 -51
- package/src/base-client/components/layout/XTreeView/XTreeView.vue +130 -130
- package/src/base-client/components/layout/XTreeView/index.js +3 -3
- package/src/base-client/components/layout/XTreeView/index.md +46 -46
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
- package/src/base-client/plugins/GetLoginInfoService.js +183 -183
- package/src/base-client/plugins/Recording.js +258 -258
- package/src/base-client/plugins/index.js +23 -23
- package/src/components/CodeMirror/inedx.vue +118 -118
- package/src/components/CodeMirror/setting.js +40 -40
- package/src/components/checkbox/ImgCheckbox.vue +117 -117
- package/src/components/checkbox/ImgCheckboxGroup.vue +76 -76
- package/src/components/checkbox/index.js +9 -9
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/g2Charts/constants.js +202 -202
- package/src/components/g2Charts/demo.vue +808 -808
- package/src/components/g2Charts/designer.vue +228 -228
- package/src/components/g2Charts/designerBaseConfig.vue +61 -61
- package/src/components/g2Charts/designerDataConfig.vue +259 -259
- package/src/components/g2Charts/designerStyleConfig.vue +16 -16
- package/src/components/g2Charts/index.vue +397 -397
- package/src/components/setting/Setting.vue +234 -234
- package/src/config/CreateQueryConfig.js +325 -325
- package/src/config/default/antd.config.js +89 -89
- package/src/config/default/setting.config.js +55 -55
- package/src/font-style/font.css +60 -60
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +136 -136
- package/src/layouts/header/AdminHeader.vue +132 -132
- package/src/layouts/header/InstitutionDetail.vue +181 -181
- package/src/layouts/tabs/TabsHead.vue +189 -189
- package/src/pages/DefaultExample/index.vue +77 -77
- package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
- package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
- package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
- package/src/pages/DynamicStatistics/index.vue +282 -282
- package/src/pages/Example/childIndex.vue +15 -15
- package/src/pages/Example/index.vue +30 -30
- package/src/pages/NewDynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/NewDynamicStatistics/DataTabs.vue +122 -122
- package/src/pages/NewDynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/NewDynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/NewDynamicStatistics/FavoriteList.vue +50 -50
- package/src/pages/NewDynamicStatistics/QuestionHistoryAndFavorites.vue +289 -289
- package/src/pages/NewDynamicStatistics/SearchBar.vue +193 -193
- package/src/pages/NewDynamicStatistics/index.vue +258 -258
- package/src/pages/Recording/index.vue +77 -77
- package/src/pages/ServiceReview/index.vue +284 -284
- package/src/pages/SubExample/index.vue +26 -26
- package/src/pages/WorkflowDetail/WorkflowPageDetail/TrimTextTail.vue +23 -23
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +1815 -1815
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowTimeline.vue +1014 -1014
- package/src/pages/XReportView/index.vue +64 -64
- package/src/pages/XTreeOneProExample/index.vue +67 -67
- package/src/pages/login/Login.vue +379 -379
- package/src/pages/login/LoginV3.vue +389 -389
- package/src/pages/lowCode/lowCodeEditor.vue +1219 -1219
- package/src/pages/lowCode/lowCodeRenderPage.vue +43 -43
- package/src/pages/report/ReportTable.js +124 -124
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/settings/modifyPassword.vue +117 -117
- package/src/pages/system/ticket/index.vue +480 -480
- package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
- package/src/pages/userInfoDetailManage/ChangeMeterRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/InfoChangeRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/InstructRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/MeterParamRecordQuery/index.vue +64 -64
- package/src/pages/userInfoDetailManage/TransferRecordQuery/index.vue +66 -66
- package/src/pages/userInfoDetailManage/WatchCollectionRecordQuery/index.vue +64 -64
- package/src/plugins/EventLogPlugin.js +33 -33
- package/src/plugins/FindParentsData.js +17 -17
- package/src/services/DataModel.js +30 -30
- package/src/services/LodopFuncs.js +137 -137
- package/src/services/api/TicketDetailsViewApi.js +46 -46
- package/src/services/api/entity.js +18 -18
- package/src/services/api/index.js +17 -17
- package/src/store/modules/account.js +121 -121
- package/src/store/modules/index.js +5 -5
- package/src/store/modules/lowCode.js +33 -33
- package/src/theme/default/style.less +58 -58
- package/src/theme/global.less +313 -313
- package/src/utils/formatter.js +74 -74
- package/src/utils/htmlToPDF.js +108 -108
- package/src/utils/htmlToPDFApi.js +5 -5
- package/src/utils/login.js +188 -188
- package/src/utils/lowcode/lowcodeComponentMixin.js +120 -120
- package/src/utils/lowcode/lowcodeLog.js +29 -29
- package/src/utils/lowcode/lowcodeUtils.js +373 -373
- package/src/utils/lowcode/registerComponentForEditor.js +1 -1
- package/src/utils/lowcode/registerComponentForRender.js +11 -11
- package/src/utils/map-utils.js +47 -47
- package/src/utils/reg.js +95 -95
- package/src/utils/runEvalFunction.js +14 -14
- package/src/utils/theme-color-replacer-extend.js +92 -92
- package/src/utils/util.js +329 -329
- package/src/utils/waterMark.js +31 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 48 48"><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M4.18 26.834A2 2 0 0 0 6.175 29H10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H7.84a2 2 0 0 0-1.993 1.834zM18 26.626c0 .835.52 1.583 1.275 1.94c1.649.777 4.458 2.34 5.725 4.454c1.633 2.723 1.941 7.644 1.991 8.771c.007.158.003.316.024.472c.271 1.953 4.04-.328 5.485-2.74c.785-1.308.885-3.027.803-4.37c-.089-1.435-.51-2.823-.923-4.201l-.88-2.937h10.857a2 2 0 0 0 1.925-2.543l-5.37-19.016A2 2 0 0 0 36.986 5H20a2 2 0 0 0-2 2z"/></svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 48 48"><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M4.18 26.834A2 2 0 0 0 6.175 29H10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H7.84a2 2 0 0 0-1.993 1.834zM18 26.626c0 .835.52 1.583 1.275 1.94c1.649.777 4.458 2.34 5.725 4.454c1.633 2.723 1.941 7.644 1.991 8.771c.007.158.003.316.024.472c.271 1.953 4.04-.328 5.485-2.74c.785-1.308.885-3.027.803-4.37c-.089-1.435-.51-2.823-.923-4.201l-.88-2.937h10.857a2 2 0 0 0 1.925-2.543l-5.37-19.016A2 2 0 0 0 36.986 5H20a2 2 0 0 0-2 2z"/></svg>
|
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, computed, nextTick } from 'vue'
|
|
3
|
-
import XConversation from '@vue2-client/base-client/components/common/XConversation/XConversation.vue'
|
|
4
|
-
import { getConfigByNameAsync } from '@vue2-client/services/api/common'
|
|
5
|
-
|
|
6
|
-
const xConversationRef = ref(null)
|
|
7
|
-
|
|
8
|
-
const isModalVisible = ref(false)
|
|
9
|
-
|
|
10
|
-
const aiModel = ref('')
|
|
11
|
-
|
|
12
|
-
const aiModelOptions = ref([])
|
|
13
|
-
|
|
14
|
-
const props = defineProps({
|
|
15
|
-
chatId: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
default: undefined
|
|
19
|
-
},
|
|
20
|
-
prompt: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: false,
|
|
23
|
-
default: undefined
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
const showModal = () => {
|
|
28
|
-
isModalVisible.value = true
|
|
29
|
-
getConfigByNameAsync('ai_config').then(res => {
|
|
30
|
-
const options = res.modelProviders.flatMap(provider =>
|
|
31
|
-
provider.models.map(model => ({
|
|
32
|
-
label: model,
|
|
33
|
-
value: model
|
|
34
|
-
}))
|
|
35
|
-
)
|
|
36
|
-
aiModelOptions.value = options
|
|
37
|
-
aiModel.value = options[0].value
|
|
38
|
-
nextTick(() => {
|
|
39
|
-
xConversationRef.value.init({
|
|
40
|
-
type: 'AI',
|
|
41
|
-
streamApi: '/ai/chat',
|
|
42
|
-
chatId: props.chatId,
|
|
43
|
-
aiModel: aiModel.value,
|
|
44
|
-
serviceName: process.env.VUE_APP_SERVICE_NAME
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const aiModelChange = (value) => {
|
|
51
|
-
xConversationRef.value.init({
|
|
52
|
-
type: 'AI',
|
|
53
|
-
streamApi: '/ai/chat',
|
|
54
|
-
chatId: props.chatId,
|
|
55
|
-
aiModel: value,
|
|
56
|
-
serviceName: process.env.VUE_APP_SERVICE_NAME
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const handleOk = () => {
|
|
61
|
-
isModalVisible.value = false
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const state = ref({
|
|
65
|
-
styleTop: 80,
|
|
66
|
-
styleLeft: 460,
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
const dialogStyle = computed(() => {
|
|
70
|
-
return { left: state.value.styleLeft + 'px', top: state.value.styleTop + 'px', resize: 'both' }
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
// 计算是否超出屏幕;超出后
|
|
74
|
-
const inWindow = (left, top, startPosX, startPosY) => {
|
|
75
|
-
const H = document.body.clientHeight
|
|
76
|
-
const W = document.body.clientWidth
|
|
77
|
-
if ((left < 20 && startPosX > left) || (left > W - 20 && startPosX < left) ||
|
|
78
|
-
(top < 20 && startPosY > top) || ((top > H - 20 && startPosY < top))) {
|
|
79
|
-
document.body.onmousemove = null
|
|
80
|
-
document.body.onmouseup = null
|
|
81
|
-
return false
|
|
82
|
-
}
|
|
83
|
-
return true
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const onMouseDown = (e) => {
|
|
87
|
-
e.preventDefault()
|
|
88
|
-
const startPosX = e.clientX
|
|
89
|
-
const startPosY = e.clientY
|
|
90
|
-
const { styleLeft, styleTop } = state.value
|
|
91
|
-
document.body.onmousemove = e => {
|
|
92
|
-
const left = e.clientX - startPosX + styleLeft
|
|
93
|
-
const top = e.clientY - startPosY + styleTop
|
|
94
|
-
if (inWindow(e.clientX, e.clientY, startPosX, startPosY)) {
|
|
95
|
-
state.value.styleLeft = left
|
|
96
|
-
state.value.styleTop = top
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
// 鼠标放开时去掉移动事件
|
|
100
|
-
document.body.onmouseup = function () {
|
|
101
|
-
document.body.onmousemove = null
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
</script>
|
|
106
|
-
|
|
107
|
-
<template>
|
|
108
|
-
<div>
|
|
109
|
-
<a-button icon="rocket" @click="showModal">问问AI</a-button>
|
|
110
|
-
<a-modal
|
|
111
|
-
:z-index="1020"
|
|
112
|
-
:style="{ pointerEvents: 'none'}"
|
|
113
|
-
v-model="isModalVisible"
|
|
114
|
-
:footer="null"
|
|
115
|
-
:mask="false"
|
|
116
|
-
:maskClosable="false"
|
|
117
|
-
:dialogStyle="dialogStyle"
|
|
118
|
-
@ok="handleOk"
|
|
119
|
-
>
|
|
120
|
-
<template #title>
|
|
121
|
-
<div :style="{width:'100%',cursor:'move'}" @mousedown="onMouseDown">
|
|
122
|
-
AI对话
|
|
123
|
-
<a-select style="width: 120px" v-model="aiModel" placeholder="选择模型" @change="aiModelChange">
|
|
124
|
-
<a-select-option :value="model.value" v-for="model in aiModelOptions" :key="model.value">
|
|
125
|
-
{{ model.label }}
|
|
126
|
-
</a-select-option>
|
|
127
|
-
</a-select>
|
|
128
|
-
</div>
|
|
129
|
-
</template>
|
|
130
|
-
<XConversation ref="xConversationRef" :prompt="prompt"/>
|
|
131
|
-
</a-modal>
|
|
132
|
-
</div>
|
|
133
|
-
</template>
|
|
134
|
-
|
|
135
|
-
<style scoped lang="less">
|
|
136
|
-
</style>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, nextTick } from 'vue'
|
|
3
|
+
import XConversation from '@vue2-client/base-client/components/common/XConversation/XConversation.vue'
|
|
4
|
+
import { getConfigByNameAsync } from '@vue2-client/services/api/common'
|
|
5
|
+
|
|
6
|
+
const xConversationRef = ref(null)
|
|
7
|
+
|
|
8
|
+
const isModalVisible = ref(false)
|
|
9
|
+
|
|
10
|
+
const aiModel = ref('')
|
|
11
|
+
|
|
12
|
+
const aiModelOptions = ref([])
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
chatId: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
default: undefined
|
|
19
|
+
},
|
|
20
|
+
prompt: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: false,
|
|
23
|
+
default: undefined
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const showModal = () => {
|
|
28
|
+
isModalVisible.value = true
|
|
29
|
+
getConfigByNameAsync('ai_config').then(res => {
|
|
30
|
+
const options = res.modelProviders.flatMap(provider =>
|
|
31
|
+
provider.models.map(model => ({
|
|
32
|
+
label: model,
|
|
33
|
+
value: model
|
|
34
|
+
}))
|
|
35
|
+
)
|
|
36
|
+
aiModelOptions.value = options
|
|
37
|
+
aiModel.value = options[0].value
|
|
38
|
+
nextTick(() => {
|
|
39
|
+
xConversationRef.value.init({
|
|
40
|
+
type: 'AI',
|
|
41
|
+
streamApi: '/ai/chat',
|
|
42
|
+
chatId: props.chatId,
|
|
43
|
+
aiModel: aiModel.value,
|
|
44
|
+
serviceName: process.env.VUE_APP_SERVICE_NAME
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const aiModelChange = (value) => {
|
|
51
|
+
xConversationRef.value.init({
|
|
52
|
+
type: 'AI',
|
|
53
|
+
streamApi: '/ai/chat',
|
|
54
|
+
chatId: props.chatId,
|
|
55
|
+
aiModel: value,
|
|
56
|
+
serviceName: process.env.VUE_APP_SERVICE_NAME
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const handleOk = () => {
|
|
61
|
+
isModalVisible.value = false
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const state = ref({
|
|
65
|
+
styleTop: 80,
|
|
66
|
+
styleLeft: 460,
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
const dialogStyle = computed(() => {
|
|
70
|
+
return { left: state.value.styleLeft + 'px', top: state.value.styleTop + 'px', resize: 'both' }
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
// 计算是否超出屏幕;超出后
|
|
74
|
+
const inWindow = (left, top, startPosX, startPosY) => {
|
|
75
|
+
const H = document.body.clientHeight
|
|
76
|
+
const W = document.body.clientWidth
|
|
77
|
+
if ((left < 20 && startPosX > left) || (left > W - 20 && startPosX < left) ||
|
|
78
|
+
(top < 20 && startPosY > top) || ((top > H - 20 && startPosY < top))) {
|
|
79
|
+
document.body.onmousemove = null
|
|
80
|
+
document.body.onmouseup = null
|
|
81
|
+
return false
|
|
82
|
+
}
|
|
83
|
+
return true
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const onMouseDown = (e) => {
|
|
87
|
+
e.preventDefault()
|
|
88
|
+
const startPosX = e.clientX
|
|
89
|
+
const startPosY = e.clientY
|
|
90
|
+
const { styleLeft, styleTop } = state.value
|
|
91
|
+
document.body.onmousemove = e => {
|
|
92
|
+
const left = e.clientX - startPosX + styleLeft
|
|
93
|
+
const top = e.clientY - startPosY + styleTop
|
|
94
|
+
if (inWindow(e.clientX, e.clientY, startPosX, startPosY)) {
|
|
95
|
+
state.value.styleLeft = left
|
|
96
|
+
state.value.styleTop = top
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// 鼠标放开时去掉移动事件
|
|
100
|
+
document.body.onmouseup = function () {
|
|
101
|
+
document.body.onmousemove = null
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<template>
|
|
108
|
+
<div>
|
|
109
|
+
<a-button icon="rocket" @click="showModal">问问AI</a-button>
|
|
110
|
+
<a-modal
|
|
111
|
+
:z-index="1020"
|
|
112
|
+
:style="{ pointerEvents: 'none'}"
|
|
113
|
+
v-model="isModalVisible"
|
|
114
|
+
:footer="null"
|
|
115
|
+
:mask="false"
|
|
116
|
+
:maskClosable="false"
|
|
117
|
+
:dialogStyle="dialogStyle"
|
|
118
|
+
@ok="handleOk"
|
|
119
|
+
>
|
|
120
|
+
<template #title>
|
|
121
|
+
<div :style="{width:'100%',cursor:'move'}" @mousedown="onMouseDown">
|
|
122
|
+
AI对话
|
|
123
|
+
<a-select style="width: 120px" v-model="aiModel" placeholder="选择模型" @change="aiModelChange">
|
|
124
|
+
<a-select-option :value="model.value" v-for="model in aiModelOptions" :key="model.value">
|
|
125
|
+
{{ model.label }}
|
|
126
|
+
</a-select-option>
|
|
127
|
+
</a-select>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
<XConversation ref="xConversationRef" :prompt="prompt"/>
|
|
131
|
+
</a-modal>
|
|
132
|
+
</div>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<style scoped lang="less">
|
|
136
|
+
</style>
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import AskAiBtn from './AskAiBtn.vue'
|
|
3
|
-
import { ref } from 'vue'
|
|
4
|
-
const text = ref('')
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<a-drawer
|
|
9
|
-
:keyboard="false"
|
|
10
|
-
:mask-closable="false"
|
|
11
|
-
title="测试"
|
|
12
|
-
placement="right"
|
|
13
|
-
:destroy-on-close="true"
|
|
14
|
-
:bodyStyle="{height:'93%'}"
|
|
15
|
-
:visible="true"
|
|
16
|
-
width="80vw"
|
|
17
|
-
>
|
|
18
|
-
<a-tabs style="height: 89vh">
|
|
19
|
-
<template #tabBarExtraContent>
|
|
20
|
-
<AskAiBtn chatId="1111"></AskAiBtn>
|
|
21
|
-
</template>
|
|
22
|
-
<a-tab-pane key="1" tab="编辑页面">
|
|
23
|
-
<a-textarea v-model="text"></a-textarea>
|
|
24
|
-
</a-tab-pane>
|
|
25
|
-
</a-tabs>
|
|
26
|
-
</a-drawer>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<style scoped lang="less">
|
|
30
|
-
|
|
31
|
-
</style>
|
|
1
|
+
<script setup>
|
|
2
|
+
import AskAiBtn from './AskAiBtn.vue'
|
|
3
|
+
import { ref } from 'vue'
|
|
4
|
+
const text = ref('')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<a-drawer
|
|
9
|
+
:keyboard="false"
|
|
10
|
+
:mask-closable="false"
|
|
11
|
+
title="测试"
|
|
12
|
+
placement="right"
|
|
13
|
+
:destroy-on-close="true"
|
|
14
|
+
:bodyStyle="{height:'93%'}"
|
|
15
|
+
:visible="true"
|
|
16
|
+
width="80vw"
|
|
17
|
+
>
|
|
18
|
+
<a-tabs style="height: 89vh">
|
|
19
|
+
<template #tabBarExtraContent>
|
|
20
|
+
<AskAiBtn chatId="1111"></AskAiBtn>
|
|
21
|
+
</template>
|
|
22
|
+
<a-tab-pane key="1" tab="编辑页面">
|
|
23
|
+
<a-textarea v-model="text"></a-textarea>
|
|
24
|
+
</a-tab-pane>
|
|
25
|
+
</a-tabs>
|
|
26
|
+
</a-drawer>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<style scoped lang="less">
|
|
30
|
+
|
|
31
|
+
</style>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg class="anticon" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
3
|
-
<path
|
|
4
|
-
fill="currentColor"
|
|
5
|
-
d="M12 8a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m-8.95 5H1v-2h2.05C3.5 6.83 6.83 3.5 11 3.05V1h2v2.05c4.17.45 7.5 3.78 7.95 7.95H23v2h-2.05c-.45 4.17-3.78 7.5-7.95 7.95V23h-2v-2.05C6.83 20.5 3.5 17.17 3.05 13M12 5a7 7 0 0 0-7 7a7 7 0 0 0 7 7a7 7 0 0 0 7-7a7 7 0 0 0-7-7"></path>
|
|
6
|
-
</svg>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
export default {
|
|
11
|
-
name: 'IcMap',
|
|
12
|
-
}
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<style scoped>
|
|
16
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<svg class="anticon" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M12 8a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m-8.95 5H1v-2h2.05C3.5 6.83 6.83 3.5 11 3.05V1h2v2.05c4.17.45 7.5 3.78 7.95 7.95H23v2h-2.05c-.45 4.17-3.78 7.5-7.95 7.95V23h-2v-2.05C6.83 20.5 3.5 17.17 3.05 13M12 5a7 7 0 0 0-7 7a7 7 0 0 0 7 7a7 7 0 0 0 7-7a7 7 0 0 0-7-7"></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'IcMap',
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style scoped>
|
|
16
|
+
</style>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox/index'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'Demo',
|
|
7
|
-
components: { AddressSearchCombobox },
|
|
8
|
-
data () {
|
|
9
|
-
return {
|
|
10
|
-
visible: false,
|
|
11
|
-
searchResult: {}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
methods: {
|
|
15
|
-
addressSearchComboboxSelect (res) {
|
|
16
|
-
console.log('===', res)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<div>
|
|
24
|
-
<address-search-combobox
|
|
25
|
-
v-model="searchResult"
|
|
26
|
-
:resultKeys="{ address: 'f_address', coords: `f_address_lng_lat` }"
|
|
27
|
-
searchResultType="Object"
|
|
28
|
-
@onSelect="addressSearchComboboxSelect"
|
|
29
|
-
@onDivisionsChange="addressSearchComboboxSelect"
|
|
30
|
-
></address-search-combobox>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<style scoped lang="less">
|
|
35
|
-
|
|
36
|
-
</style>
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox/index'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: 'Demo',
|
|
7
|
+
components: { AddressSearchCombobox },
|
|
8
|
+
data () {
|
|
9
|
+
return {
|
|
10
|
+
visible: false,
|
|
11
|
+
searchResult: {}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
methods: {
|
|
15
|
+
addressSearchComboboxSelect (res) {
|
|
16
|
+
console.log('===', res)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div>
|
|
24
|
+
<address-search-combobox
|
|
25
|
+
v-model="searchResult"
|
|
26
|
+
:resultKeys="{ address: 'f_address', coords: `f_address_lng_lat` }"
|
|
27
|
+
searchResultType="Object"
|
|
28
|
+
@onSelect="addressSearchComboboxSelect"
|
|
29
|
+
@onDivisionsChange="addressSearchComboboxSelect"
|
|
30
|
+
></address-search-combobox>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<style scoped lang="less">
|
|
35
|
+
|
|
36
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg t="1722478250956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4238"
|
|
2
|
-
width="32" height="32">
|
|
3
|
-
<path
|
|
4
|
-
d="M448 512c0-35.4 28.6-64 64-64s64 28.6 64 64-28.6 64-64 64-64-28.6-64-64zM512 0c35.4 0 64 28.66 64 64v20.7C763.4 112.54 911.4 260.6 939.2 448H960c35.4 0 64 28.6 64 64s-28.6 64-64 64h-20.8c-27.8 187.4-175.8 335.4-363.2 363.2V960c0 35.4-28.6 64-64 64s-64-28.6-64-64v-20.8C260.6 911.4 112.54 763.4 84.7 576H64c-35.34 0-64-28.6-64-64s28.66-64 64-64h20.7C112.54 260.6 260.6 112.54 448 84.7V64c0-35.34 28.6-64 64-64z m-64 809.2V768c0-35.4 28.6-64 64-64s64 28.6 64 64v41.2c116.6-25 208.2-116.6 233.2-233.2H768c-35.4 0-64-28.6-64-64s28.6-64 64-64h41.2c-25-116.6-116.6-208.2-233.2-233.2V256c0 35.4-28.6 64-64 64s-64-28.6-64-64v-41.2c-116.6 25-208.2 116.6-233.2 233.2H256c35.4 0 64 28.6 64 64s-28.6 64-64 64h-41.2c25 116.6 116.6 208.2 233.2 233.2z"
|
|
5
|
-
p-id="4239" fill="#ffffff"></path>
|
|
6
|
-
</svg>
|
|
1
|
+
<svg t="1722478250956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4238"
|
|
2
|
+
width="32" height="32">
|
|
3
|
+
<path
|
|
4
|
+
d="M448 512c0-35.4 28.6-64 64-64s64 28.6 64 64-28.6 64-64 64-64-28.6-64-64zM512 0c35.4 0 64 28.66 64 64v20.7C763.4 112.54 911.4 260.6 939.2 448H960c35.4 0 64 28.6 64 64s-28.6 64-64 64h-20.8c-27.8 187.4-175.8 335.4-363.2 363.2V960c0 35.4-28.6 64-64 64s-64-28.6-64-64v-20.8C260.6 911.4 112.54 763.4 84.7 576H64c-35.34 0-64-28.6-64-64s28.66-64 64-64h20.7C112.54 260.6 260.6 112.54 448 84.7V64c0-35.34 28.6-64 64-64z m-64 809.2V768c0-35.4 28.6-64 64-64s64 28.6 64 64v41.2c116.6-25 208.2-116.6 233.2-233.2H768c-35.4 0-64-28.6-64-64s28.6-64 64-64h41.2c-25-116.6-116.6-208.2-233.2-233.2V256c0 35.4-28.6 64-64 64s-64-28.6-64-64v-41.2c-116.6 25-208.2 116.6-233.2 233.2H256c35.4 0 64 28.6 64 64s-28.6 64-64 64h-41.2c25 116.6 116.6 208.2 233.2 233.2z"
|
|
5
|
+
p-id="4239" fill="#ffffff"></path>
|
|
6
|
+
</svg>
|