cnhis-design-vue 3.2.9-release.3 → 3.2.9-release.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as t,ref as n,watch as l,createVNode as s,createTextVNode as a,mergeProps as o,isVNode as r}from"vue";import{NAvatar as i,NSpin as u,NButton as c,NSpace as d}from"naive-ui";import{InjectionAIChat as p}from"../types/index.js";import m from"../../../../shared/assets/img/ai__avatar.png.js";import{isArray as v,isFunction as f}from"lodash";import"../../../../shared/utils/index.js";import"@vueuse/core";import"date-fns";import"
|
1
|
+
import{defineComponent as e,inject as t,ref as n,watch as l,createVNode as s,createTextVNode as a,mergeProps as o,isVNode as r}from"vue";import{NAvatar as i,NSpin as u,NButton as c,NSpace as d}from"naive-ui";import{InjectionAIChat as p}from"../types/index.js";import m from"../../../../shared/assets/img/ai__avatar.png.js";import{isArray as v,isFunction as f}from"lodash-es";import"../../../../shared/utils/index.js";import"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useScrollLoading as g}from"../../../../shared/hooks/useScrollLoading.js";function h(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!r(e)}var b=e({name:"ChatMain",inheritAttrs:!1,props:{},emits:[],setup(e,{attrs:r,slots:b,emit:y}){const{userAvatar:k,queryData:C,state:S,queryRecord:j,defaultShortcutList:x,hideInput:z=!1}=t(p),w=n(null),E=n([]),M=n(!1),T={page:0,hasMore:!0};async function A(e=!1){if(!T.hasMore)return;T.page++,1==T.page&&(E.value=[]);const{records:t,rows:n}=await j.value({page:T.page});v(n)&&E.value.length<=+t&&(E.value=T.page>1?[...E.value,...n]:n,E.value.length>=+t&&(e&&(M.value=!0),T.hasMore=!1,console.log("没有更多消息了")))}function _(e,t){const{contents:n=[],buttonType:l=""}=e,r=n[t].content.replace(/\\n|\n|\r\n/g,"<br>").split("<br>").filter((e=>!!e)).map(((e,t,n)=>[e,t===n.length-1?null:s("br",null,null)])),i=l&&0===t?[s("br",null,null),s(c,o({style:"margin-top: 5px",secondary:!0,class:"gradient",disabled:e.disabled},e.link?{tag:"a",href:e.link,target:"_blank"}:{},{onClick:()=>function(e){E.value.forEach((e=>e.buttonType&&(e.disabled=!0))),e.link||(S.beingSent=!0,S.sendContent="确定")}(e)}),{default:()=>[a("确定")]})]:null;return[r,i]}function q({role:e=""}){return"user"===e}function H(){let e;return s("div",{class:"message-item"},[s(i,{round:!0,size:40,src:m},null),s("div",{class:"content fillet-10 default"},[s("h2",null,[a("Hi,我是你的AI助理")]),s("p",null,[a("我汇集了医生站/护士站各项智能服务,可以向我进行提问哦 ~ "),s("br",null,null),a("你的反馈助我成长,期待我们一起探索未来!下次可以在首页和应用页找到我~")]),v(x.value)&&x.value.length>0?[s("p",{style:"margin: 5px 0 5px"},[a("你可以试着问我:")]),s(d,{"wrap-item":!1},h(e=x.value.map((e=>s(c,{size:"large",secondary:!0,onClick:()=>S.sendContent=e,disabled:S.beingSent},h(e)?e:{default:()=>[e]}))))?e:{default:()=>[e]})]:null])])}return g(w,(()=>{A()}),z.value?"bottom":"top"),A(!0),l((()=>S.beingSent),(async e=>{if(e){E.value.unshift({contents:[{role:"user",content:S.sendContent}]}),E.value.forEach((e=>e.buttonType&&(e.disabled=!0)));const e=await C.value({content:S.sendContent,contentType:"text"});v(null==e?void 0:e.contents)&&E.value.unshift(e),S.beingSent=!1,S.sendContent=""}})),()=>s("section",{class:"chat-main",ref:w,style:{"flex-direction":z.value?"column":"column-reverse"}},[[S.beingSent?s("div",{class:"message-item"},[s(i,{round:!0,size:40,src:m},null),s("div",{class:"content fillet-10 loading"},[s(u,{size:22,stroke:"#4170EE"},null),s("span",null,[a("正在加载中,请稍等...")])])]):null,E.value.map((e=>e.contents.map(((t,n)=>s("div",{class:"message-item"},[s(i,{round:!0,size:40,src:q(t)?k.value:m},null),s("div",{class:["content",q(t)?"fillet-8 mine":"fillet-10"]},[f(t.render)?t.render():_(e,n)])]))))),M.value?H():null]])}});export{b as default};
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",s="3.2.9-release.
|
1
|
+
var e="@cnhis-design-vue/shared",s="3.2.9-release.4",i="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.9-release.4",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,i as main,e as name,n as peerDependencies,s as version};
|
package/package.json
CHANGED
@@ -1,76 +1,76 @@
|
|
1
|
-
{
|
2
|
-
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.2.9-release.
|
4
|
-
"license": "ISC",
|
5
|
-
"module": "./es/components/index.js",
|
6
|
-
"main": "./es/components/index.js",
|
7
|
-
"types": "./es/components/index.d.ts",
|
8
|
-
"sideEffects": [
|
9
|
-
"es/components/**/style/*",
|
10
|
-
"es/components/*(.css,.less)"
|
11
|
-
],
|
12
|
-
"files": [
|
13
|
-
"es",
|
14
|
-
"README.md"
|
15
|
-
],
|
16
|
-
"peerDependencies": {
|
17
|
-
"@fullcalendar/core": "^6.1.10",
|
18
|
-
"@fullcalendar/interaction": "^6.1.10",
|
19
|
-
"@fullcalendar/resource": "^6.1.10",
|
20
|
-
"@fullcalendar/resource-timegrid": "^6.1.10",
|
21
|
-
"@fullcalendar/scrollgrid": "^6.1.10",
|
22
|
-
"@fullcalendar/vue3": "^6.1.10",
|
23
|
-
"naive-ui": "^2.34.0",
|
24
|
-
"vue": "^3.2.0",
|
25
|
-
"vxe-table": "^4.2.5"
|
26
|
-
},
|
27
|
-
"dependencies": {
|
28
|
-
"@formily/core": "2.1.9",
|
29
|
-
"@formily/path": "2.1.9",
|
30
|
-
"@formily/reactive": "2.1.9",
|
31
|
-
"@formily/vue": "2.1.9",
|
32
|
-
"@vicons/ionicons5": "^0.12.0",
|
33
|
-
"@vueuse/core": "^8.6.0",
|
34
|
-
"@vueuse/shared": "^8.6.0",
|
35
|
-
"@wangeditor/editor": "^5.1.1",
|
36
|
-
"@wangeditor/editor-for-vue": "^5.1.11",
|
37
|
-
"axios": "^0.27.2",
|
38
|
-
"bpmn-js": "^9.2.2",
|
39
|
-
"bpmnlint-utils": "^1.0.2",
|
40
|
-
"date-fns": "^2.30.0",
|
41
|
-
"diagram-js": "^8.7.1",
|
42
|
-
"ids": "^1.0.0",
|
43
|
-
"inherits": "^2.0.4",
|
44
|
-
"lodash": "^4.17.21",
|
45
|
-
"lodash-es": "^4.17.21",
|
46
|
-
"lodash-unified": "^1.0.2",
|
47
|
-
"min-dash": "^3.8.1",
|
48
|
-
"min-dom": "^3.2.1",
|
49
|
-
"moment": "^2.29.1",
|
50
|
-
"naive-ui": "^2.34.0",
|
51
|
-
"recorder-core": "^1.2.23070100",
|
52
|
-
"socket.io-client": "^4.7.3",
|
53
|
-
"sockjs-client": "^1.6.1",
|
54
|
-
"sortablejs": "^1.15.0",
|
55
|
-
"spark-md5": "^3.0.2",
|
56
|
-
"stompjs": "^2.3.3",
|
57
|
-
"tiny-svg": "^2.2.4",
|
58
|
-
"trtc-sdk-v5": "^5.5.2",
|
59
|
-
"v-viewer": "^3.0.10",
|
60
|
-
"video.js": "^7.19.2",
|
61
|
-
"videojs-contrib-hls": "^5.15.0",
|
62
|
-
"viewerjs": "^1.10.5",
|
63
|
-
"vue": "^3.2.0",
|
64
|
-
"vue-simple-uploader": "^1.0.0-beta.5",
|
65
|
-
"xe-utils": "^3.5.4"
|
66
|
-
},
|
67
|
-
"browserslist": [
|
68
|
-
"defaults",
|
69
|
-
"not ie < 8",
|
70
|
-
"last 2 versions",
|
71
|
-
"> 1%",
|
72
|
-
"iOS 7",
|
73
|
-
"last 3 iOS versions"
|
74
|
-
],
|
75
|
-
"gitHead": "
|
76
|
-
}
|
1
|
+
{
|
2
|
+
"name": "cnhis-design-vue",
|
3
|
+
"version": "3.2.9-release.4",
|
4
|
+
"license": "ISC",
|
5
|
+
"module": "./es/components/index.js",
|
6
|
+
"main": "./es/components/index.js",
|
7
|
+
"types": "./es/components/index.d.ts",
|
8
|
+
"sideEffects": [
|
9
|
+
"es/components/**/style/*",
|
10
|
+
"es/components/*(.css,.less)"
|
11
|
+
],
|
12
|
+
"files": [
|
13
|
+
"es",
|
14
|
+
"README.md"
|
15
|
+
],
|
16
|
+
"peerDependencies": {
|
17
|
+
"@fullcalendar/core": "^6.1.10",
|
18
|
+
"@fullcalendar/interaction": "^6.1.10",
|
19
|
+
"@fullcalendar/resource": "^6.1.10",
|
20
|
+
"@fullcalendar/resource-timegrid": "^6.1.10",
|
21
|
+
"@fullcalendar/scrollgrid": "^6.1.10",
|
22
|
+
"@fullcalendar/vue3": "^6.1.10",
|
23
|
+
"naive-ui": "^2.34.0",
|
24
|
+
"vue": "^3.2.0",
|
25
|
+
"vxe-table": "^4.2.5"
|
26
|
+
},
|
27
|
+
"dependencies": {
|
28
|
+
"@formily/core": "2.1.9",
|
29
|
+
"@formily/path": "2.1.9",
|
30
|
+
"@formily/reactive": "2.1.9",
|
31
|
+
"@formily/vue": "2.1.9",
|
32
|
+
"@vicons/ionicons5": "^0.12.0",
|
33
|
+
"@vueuse/core": "^8.6.0",
|
34
|
+
"@vueuse/shared": "^8.6.0",
|
35
|
+
"@wangeditor/editor": "^5.1.1",
|
36
|
+
"@wangeditor/editor-for-vue": "^5.1.11",
|
37
|
+
"axios": "^0.27.2",
|
38
|
+
"bpmn-js": "^9.2.2",
|
39
|
+
"bpmnlint-utils": "^1.0.2",
|
40
|
+
"date-fns": "^2.30.0",
|
41
|
+
"diagram-js": "^8.7.1",
|
42
|
+
"ids": "^1.0.0",
|
43
|
+
"inherits": "^2.0.4",
|
44
|
+
"lodash": "^4.17.21",
|
45
|
+
"lodash-es": "^4.17.21",
|
46
|
+
"lodash-unified": "^1.0.2",
|
47
|
+
"min-dash": "^3.8.1",
|
48
|
+
"min-dom": "^3.2.1",
|
49
|
+
"moment": "^2.29.1",
|
50
|
+
"naive-ui": "^2.34.0",
|
51
|
+
"recorder-core": "^1.2.23070100",
|
52
|
+
"socket.io-client": "^4.7.3",
|
53
|
+
"sockjs-client": "^1.6.1",
|
54
|
+
"sortablejs": "^1.15.0",
|
55
|
+
"spark-md5": "^3.0.2",
|
56
|
+
"stompjs": "^2.3.3",
|
57
|
+
"tiny-svg": "^2.2.4",
|
58
|
+
"trtc-sdk-v5": "^5.5.2",
|
59
|
+
"v-viewer": "^3.0.10",
|
60
|
+
"video.js": "^7.19.2",
|
61
|
+
"videojs-contrib-hls": "^5.15.0",
|
62
|
+
"viewerjs": "^1.10.5",
|
63
|
+
"vue": "^3.2.0",
|
64
|
+
"vue-simple-uploader": "^1.0.0-beta.5",
|
65
|
+
"xe-utils": "^3.5.4"
|
66
|
+
},
|
67
|
+
"browserslist": [
|
68
|
+
"defaults",
|
69
|
+
"not ie < 8",
|
70
|
+
"last 2 versions",
|
71
|
+
"> 1%",
|
72
|
+
"iOS 7",
|
73
|
+
"last 3 iOS versions"
|
74
|
+
],
|
75
|
+
"gitHead": "8608bbfc8f8273af160171d5f3b105559efd3463"
|
76
|
+
}
|