cnhis-design-vue 3.2.10 → 3.2.11-release.0
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/README.md +87 -87
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +3 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
# 安装
|
2
|
-
|
3
|
-
```shell
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
5
|
-
# or
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
-
```
|
8
|
-
|
9
|
-
## 1.全局引入
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
// main.ts
|
13
|
-
import { createApp } from 'vue';
|
14
|
-
import App from './App.vue';
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
-
import cui from 'cnhis-design-vue';
|
17
|
-
|
18
|
-
const app = createApp(App);
|
19
|
-
app.use(cui).mount('#app');
|
20
|
-
```
|
21
|
-
|
22
|
-
## 2. 按需引入
|
23
|
-
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
-
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
-
|
28
|
-
```shell
|
29
|
-
# 安装自动导入样式的插件
|
30
|
-
npm i -d vite-plugin-style-import
|
31
|
-
```
|
32
|
-
|
33
|
-
```typescript
|
34
|
-
// vite.config.ts
|
35
|
-
import { defineConfig } from 'vite';
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
-
|
38
|
-
export default defineConfig({
|
39
|
-
plugins: [
|
40
|
-
// ...otherPlugins
|
41
|
-
createStyleImportPlugin({
|
42
|
-
libs: [
|
43
|
-
{
|
44
|
-
libraryName: 'cnhis-design-vue',
|
45
|
-
esModule: true,
|
46
|
-
ensureStyleFile: true,
|
47
|
-
resolveStyle: name => {
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
]
|
52
|
-
})
|
53
|
-
]
|
54
|
-
});
|
55
|
-
```
|
56
|
-
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
-
|
59
|
-
```typescript
|
60
|
-
// main.ts
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
62
|
-
```
|
63
|
-
|
64
|
-
## 3.FAQ
|
65
|
-
|
66
|
-
### 3.1 项目打包后样式丢失
|
67
|
-
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
-
|
70
|
-
```typescript
|
71
|
-
// vite.config.ts
|
72
|
-
import { defineConfig } from 'vite';
|
73
|
-
|
74
|
-
export default defineConfig({
|
75
|
-
build: {
|
76
|
-
rollupOptions: {
|
77
|
-
// ..otherOptions
|
78
|
-
output: {
|
79
|
-
dir: './dist',
|
80
|
-
manualChunks: {
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
});
|
87
|
-
```
|
1
|
+
# 安装
|
2
|
+
|
3
|
+
```shell
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
5
|
+
# or
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
+
```
|
8
|
+
|
9
|
+
## 1.全局引入
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
// main.ts
|
13
|
+
import { createApp } from 'vue';
|
14
|
+
import App from './App.vue';
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
+
import cui from 'cnhis-design-vue';
|
17
|
+
|
18
|
+
const app = createApp(App);
|
19
|
+
app.use(cui).mount('#app');
|
20
|
+
```
|
21
|
+
|
22
|
+
## 2. 按需引入
|
23
|
+
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
+
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
+
|
28
|
+
```shell
|
29
|
+
# 安装自动导入样式的插件
|
30
|
+
npm i -d vite-plugin-style-import
|
31
|
+
```
|
32
|
+
|
33
|
+
```typescript
|
34
|
+
// vite.config.ts
|
35
|
+
import { defineConfig } from 'vite';
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
+
|
38
|
+
export default defineConfig({
|
39
|
+
plugins: [
|
40
|
+
// ...otherPlugins
|
41
|
+
createStyleImportPlugin({
|
42
|
+
libs: [
|
43
|
+
{
|
44
|
+
libraryName: 'cnhis-design-vue',
|
45
|
+
esModule: true,
|
46
|
+
ensureStyleFile: true,
|
47
|
+
resolveStyle: name => {
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
]
|
52
|
+
})
|
53
|
+
]
|
54
|
+
});
|
55
|
+
```
|
56
|
+
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
+
|
59
|
+
```typescript
|
60
|
+
// main.ts
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
62
|
+
```
|
63
|
+
|
64
|
+
## 3.FAQ
|
65
|
+
|
66
|
+
### 3.1 项目打包后样式丢失
|
67
|
+
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
+
|
70
|
+
```typescript
|
71
|
+
// vite.config.ts
|
72
|
+
import { defineConfig } from 'vite';
|
73
|
+
|
74
|
+
export default defineConfig({
|
75
|
+
build: {
|
76
|
+
rollupOptions: {
|
77
|
+
// ..otherOptions
|
78
|
+
output: {
|
79
|
+
dir: './dist',
|
80
|
+
manualChunks: {
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
```
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as n,drawPoint as i,defaultStyle as o,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as h,drawScaleLine as f}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as m,getTime as v,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as k,last as b,range as x}from"lodash-es";import"../temperature/useShadow.js";import"@vueuse/shared";import{format as w}from"date-fns";import"naive-ui";import"@vueuse/core";function S(S,C,j,P,I){const{computedX:E,computedY:T,getXValue:X,getYValue:A}=u(C),{getEqualXTypes:L,handleAddPrevent:Y,isGridLimit:M,setPrevAndNextPoint:H,getPointEventProps:z}=p(S,j,C),{xAxis:G,grid:W,originX:D,originY:N,xCellWidth:O,endY:R,startTime:V,leftAddAreaWidth:B,leftScales:F,rightScales:$,yCellHeight:q,endX:J,scaleValues:K,canvasWidth:Q,borderStyle:U,rightAddAreaWidth:Z,event:_,originYCervix:tt,other:et,canvasHeight:nt,scalebarBorder:it}=C,ot=k(K),rt=new Set;function lt(){ot.filter((({showData:t=!0})=>t)).forEach(((t,s)=>{var a;const c=[],u=[],d=[];null==(a=t.data)||a.forEach(((a,h)=>{!function(a,h,f){let p,g;const{pointAttr:m={},lineAttr:v={},title:y="",key:k,type:b="circle",childbirthStyle:x={}}=t,w=t.data[f+1],C=dt(w,t);if(a&&C&&!h.breakpoint)g=e([...a,...C],{...v});else if(a&&!C&&!h.breakpoint){const n=dt(w,t);g=n?e([...a,...n],{...v}):null}let I,E;if(h.childbirth){const{type:t="arrow",style:e={}}=x;if("arrow"===t){const t=a[1]+q;I=n([a[0],a[1],t],e)}else I=i(t,{left:a[0],top:a[1],...e,...o,hoverCursor:"default"});E=r([a[0]+O/2,a[1]+q/2],{value:String(h.childbirth),...l,originX:"left",originY:"center",fill:e.stroke||e.fill,fontSize:e.fontSize||l.fontSize}),I&&d.push(I),d.push(E)}const T=u[f-1],L={origin:{data:h,title:y,key:k||"",dataIndex:s,index:f},leftLine:T,rightLine:g,childbirthIcon:I,childbirthText:E,...m,...z()};a&&(T||(L.leftLine=null),p=i(b,{left:a[0],top:a[1],...L}));u.push(g),p&&(!function(t){_.hovered&&(t.on("mouseover",(()=>{ut(t,"hover")})),t.on("mouseout",(()=>{P.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{ct(t),function(t){var e,n,i,o;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(n=t.rightLine)||n.setCoords().set({x1:t.left,y1:t.top}),null==(i=t.childbirthIcon)||i.setCoords().set({left:t.left,top:t.top}),null==(o=t.childbirthText)||o.setCoords().set({left:t.left+O/2,top:t.top+q/2})}(t),_.hovered&&ut(t)})),t.on("mouseup",(e=>{if(P.show=!1,1===e.button){const{key:e}=t.origin,n={...t.origin,data:{...t.origin.data,time:X(t.left),value:A(e,t.top)}};S.value.discardActiveObject(),j("change",n),st(n,"change")}}))}(p),c.push(p),rt.add(p))}(dt(a,t),a,h)})),Promise.all(c).then((t=>{const e=u.filter((t=>t));H(t),Promise.all(d).then((n=>{S.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront();const{childbirthIcon:e}=t;e&&Reflect.has(e,"zIndex")&&e.zIndex>0&&e.bringToFront()}))}))}))}))}function st(t,e="add"){const{dataIndex:n,data:i,index:o,key:r}=t,l=ot.find((t=>t.key===r));switch(e){case"remove":l.data.splice(o,1);break;case"change":l.data[o]=i;break;default:{const t=g(i.time,l.data);l.data.splice(t,0,i);break}}at()}function at(){var t;rt.size&&(null==(t=S.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine),(null==t?void 0:t.childbirthIcon)&&e.push(null==t?void 0:t.childbirthIcon),(null==t?void 0:t.childbirthText)&&e.push(null==t?void 0:t.childbirthText)})),e}([...rt]))),rt.clear(),lt()}function ct(t){const e=t.prevPoint?t.prevPoint.left:D,n=t.nextPoint?t.nextPoint.left:J;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<tt&&t.set("top",tt),t.top<N&&t.set("top",N),t.top>R&&t.set("top",R),t.left<e&&t.set("left",e),t.left>n&&t.set("left",n)}function ut(t,e="moving"){const{title:n,key:i,data:o}=t.origin;P.point={x:t.left,y:t.top},P.list=[`${n} ${"hover"===e?o.value:A(i,t.top)}`,`时间 ${X(t.left).slice(-5)}`],P.show=!0}function dt(t,e){if(m(t)&&function(t){const e=V+864e5,n=v(t);return n>=V&&n<=e}(t.time)){const n=E(t.time),i=T(e.key,e.range,t.value);return[n,i<N?N:i>R?R:i]}}function ht(t,e){return t+1>e[1]?e[0]:t+1}return c(S,C),function(){const e=it?{width:Q-B-Z-1,left:B}:{width:J-D,left:D},n=new t.Rect({...U,height:R-1,top:0,fill:"transparent",...e});S.value.add(n)}(),function(){function e(e,n="left"){let i="left"===n?B:J;e.forEach(((e,n)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:b,showMaxMinNumber:x}=e,w=[],C=[],j=i+u/2,P=y(s,c),I=P.length,{lineXMain:E,lineXSub:T,textLeft:X}=d(v,i,u);P.forEach(((t,n)=>{const i=R-n*q*k,o=0===n?R-8:n!==P.length-1||N||tt&&"FHR"!==m?i:N+8;!b||(0===n||n===I-1)&&!x||w.push(h(String(t),e,X,o)),C.push(...f(e,n,E,T,i,q,N,I,1))}));const A=[],L=it?new t.Rect({...a,strokeWidth:.5,width:u,height:R,left:j,top:R/2}):null;L&&A.push(L);const Y=r([j,N>0?N-q/2:q/2],{value:String(p),...l,...g});Y&&A.push(Y);const M=new t.Group([...C,...w,...A],{objectCaching:!1,...o});S.value.add(M),M.sendToBack(),i+=u}))}e(F),e($,"right")}(),function(){const{show:e,startTime:n,range:i=[0,23],position:s="top",style:a}=G.time,{show:c,range:u=[0,23],position:d,style:h={}}=G.processTime;if(e||c){const f=[],p=x(u[0],u[1]+1),g=[],m=[],v=q/2;for(let t=0;t<W.mainXCell;t++){if(e){const{textAlign:e="center"}=a,o=D+("center"===e?O/2:0),c=0===t&&"center"!==e?o+5:o,u=0===t?+n.slice(11,13):ht(b(f),i);f.push(u);const d="top"===s?N-v:R+v;g.push(r([c+t*O,d],{value:String(u),...l,...a})),t===W.mainXCell-1&&"center"!==e&&g.push(r([J-1,d],{value:String(ht(b(f),i)),...l,...a,originX:"center"!==e?"right":"center"}))}if(c&&t<=p.length){const{textAlign:e="center"}=h,n=D+("center"===e?O/2:0),i=0===t&&"center"!==e?n+5:n,o="top"===d?v:nt-v;m.push(r([i+t*O,o],{value:String(p[t]),...l,...h})),t===W.mainXCell-1&&"center"!==e&&m.push(r([J-1,o],{value:String(b(p)),...l,...a,originX:"center"!==e?"right":"center"}))}}const y=new t.Group([...g,...m],{objectCaching:!1,...o});S.value.add(y),S.value.sendToBack(y)}}(),function(){var t;const n=Object.values(et),i=[],o={},r=ot.find((t=>"cervix"===t.key&&t.show)),l=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function s(t,e){const{key:n,range:i}=r||{},o=T(n,i,10),l=[0,e],s=[-e/t,0],a=[(R-o-e)/t,R-o],c=[J-D,t*(J-D)+e];let u=[],d=[];function h([n,i]){return Math.abs(i-t*n-e)<=1}function f([t,e]){const[n,i]=[...p([t,e])];return n>=D&&n<=J&&i>=o&&i<=R}function p([t,e]){return[D+t,R-e]}return h(l)&&f(l)&&(u=p(l)),h(s)&&f(s)&&(u=p(s)),h(a)&&f(a)&&(d=p(a)),h(c)&&f(c)&&(d=p(c)),[...u,...d]}n.forEach((t=>{if(!t.show)return;const{key:n}=t;switch(n){case"fetalPresentation":{const{range:o,show:r}=ot.find((t=>t.key===n));if(r){const r=T(n,o,0);i.push(e([D,r,J,r],{...t}))}break}case"alert":if(l){const{key:n,range:a}=r||{},c=216e5,u={time:w(new Date(v(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[d,h]=[E(l.time)-D,R-T(n,a,l.value)],[f,p]=[E(u.time)-D,R-T(n,a,u.value)],g=(p-h)/(f-d),m=h-d*g,y=s(g,m);y.length>0&&(i.push(e(y,{...t})),Object.assign(o,{k:g,b:m}))}break;case"handling":if(l){const{k:n,b:r}=o,a=144e5,c=s(n,r-(E(w(new Date(v(l.time)+a),"yyyy-MM-dd HH:mm"))-E(l.time))*n);c.length>0&&i.push(e(c,{...t}))}}})),S.value.add(...i)}(),lt(),function(){function t(t,e){const n=ot.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:n,key:t.key},pointer:e}}C.event.evented&&S.value.on("mouse:up",(e=>{if(3===e.button){const{x:n=0,y:i=0}=e.pointer||{};n>=D&&n<=J&&i>=N&&i<=R&&(I.point={x:n,y:i},I.show=!0,e.target?(I.target=e.target,I.list=["删除节点"],[...rt].forEach((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&I.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(I.target=null,I.list=["新增节点"],ot.filter((t=>t.show)).forEach((o=>{if(!L([...rt],n,"key").includes(o.key)){if(["cervix","fetalPresentation"].includes(o.key)&&i<tt)return;I.list.push(t(o,e.pointer))}})),1===I.list.length&&(I.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=Q-Z/2;function e(t,e){if(!t.length)return;let i=N;const o=[];t.forEach((t=>{const n=t.title.split("").join("\n"),r=K.findIndex((e=>e.key===t.key)),{text:l,icon:a}=s(n,t,{text:{originY:"top",left:e,top:i},icon:{left:e,topY:i,originY:"top",origin:{type:t.type,dataIndex:r},...C.event}},"vertical");var c;i+=l.height+a.height+15,(c=a).on("moving",(()=>{c.set("originY","center"),M(c)?(ct(c),ut(c)):P.show=!1})),c.on("mouseup:before",(t=>{if(P.show=!1,0===t.e.button&&M(c))if(L([...rt],c.left,"key").includes(c.origin.key))Y("repeat");else{const t={data:{time:X(c.left),value:A(c.origin.key,c.top)},...c.origin};j("add",t),st(t)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(c)})),o.push(l,a)})),n(o),S.value.add(...o)}function n(t){const e=b(t),n=(R-N)/2,i=(e.height+e.top-N)/2;t.forEach((t=>{const e=t.top+n-i;t.set({top:e,originTop:e})}))}e(F,B/2),e($,t)}(),{clickMenu:function({item:t,target:e}){const n={...t.origin};"remove"===t.mode?(j("remove",n),st(n,"remove")):(Object.assign(n,{data:{time:X(t.pointer.x),value:A(t.origin.key,t.pointer.y)}}),j("add",n),st(n))},redrawPoints:at}}export{S as useBirthProcess};
|
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as
|
1
|
+
import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as u}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useBirthProcess as i}from"./useBirthProcess.js";function s(s,d,n,o,v,c){const h=e({select:null,redrawPoints:null,clickMenu:null}),m=a((()=>d.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"left"===e&&a)))),f=a((()=>d.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"right"===e&&a)))),p=a((()=>{var e;return(null==(e=f.value)?void 0:e.length)?30:0})),g=a((()=>{var e;return 30+(null==(e=m.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),w=a((()=>{var e;const{width:a}=d.data,t=null==(e=f.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-p.value-t})),x=a((()=>d.data.grid.mainXCell)),b=a((()=>{const e=d.data.grid.mainYCell||14;return d.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),y=a((()=>(w.value-g.value)/x.value)),V=a((()=>{const{xAxis:e,height:a}=d.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(b.value+t)})),j=a((()=>{const{xAxis:e}=d.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return V.value*a})),A=a((()=>{var e;const{scaleValues:a}=d.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!j.value)return j.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return k.value-l*r*V.value})),k=a((()=>{const{xAxis:e,height:a}=d.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-V.value*t})),C=a((()=>u(d.data.xAxis.time.startTime))),Y=a((()=>36e5/y.value)),S=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"cervix"===e.key));return V.value/((null==a?void 0:a.spaceValue)||1)})),H=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"FHR"===e.key));return V.value/((null==a?void 0:a.spaceValue)||10)})),P=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"fetalPresentation"===e.key));return V.value/((null==a?void 0:a.spaceValue)||1)})),R=a((()=>{var e;return(null==(e=d.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),X=e({canvasWidth:d.data.width,canvasHeight:d.data.height,borderStyle:{...r,...d.data.borderStyle||{}},selectionStyle:d.data.selectionStyle||{},grid:d.data.grid,other:d.data.other,originX:g.value,endX:w.value,originY:j.value,endY:k.value,xCellWidth:y.value,yCellHeight:V.value,gridXNumber:x.value,gridYNumber:b.value,xAxis:d.data.xAxis,leftScales:m.value,rightScales:f.value,leftAddAreaWidth:30,rightAddAreaWidth:p.value,startTime:C.value,timeXCell:Y.value,cervixYCell:S.value,FHRYCell:H.value,fetalPresentationYCell:P.value,scaleValues:d.data.scaleValues,event:R.value,originYCervix:A.value,scalebarBorder:!Reflect.has(d.data,"scalebarBorder")||d.data.scalebarBorder});return t((()=>s.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=i(s,X,n,v,c);h.redrawPoints=a,h.clickMenu=e}()}),{immediate:!0}),{propItems:X,...l(h)}}export{s as useBirthProcessChart};
|
package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,ref as t,computed as a,unref as r,onMounted as i,nextTick as o,onBeforeUnmount as l,watch as n,toRefs as u}from"vue";import{useDialog as s}from"naive-ui";import{defaultBorderStyle as d}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as c}from"date-fns";import{getChildrenSize as p}from"../../utils/index.js";import{cloneDeep as m,range as v,flatten as h}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as f}from"../../constants/index.js";import"@vueuse/shared";import"@vueuse/core";import{useTop as g}from"./useTop.js";import{useLeft as w}from"./useLeft.js";import{useCenter as y}from"./useCenter.js";import{useOther as b}from"./useOther.js";function x(x,j,C,Y,H,S,T){var D;const M=s(),k=e({redrawPoints:null,clickMenu:null}),A=t();let P=null;const X=p((null==(D=j.data.top)?void 0:D.treeData)||[]),G=a((()=>j.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),N=a((()=>{var e;return null!=(e=j.data.left.width)?e:0})),V=a((()=>{const{grid:e}=j.data;return e.mainXCell*e.subXCell})),L=a((()=>{const{grid:e}=j.data;return e.mainYCell*e.subYCell})),O=a((()=>{const{show:e=!0,tree:t={}}=j.data.top;if(!e)return 0;const{rowNumber:a=X}=t;return X<a?a:X})),E=a((()=>j.data.top.tree.cellHeight)),W=a((()=>E.value*O.value)),I=a((()=>ne(oe("drug")||"top"))),F=a((()=>I.value+W.value)),q=a((()=>{var e;return Date.parse((null==(e=j.data.xAxis)?void 0:e.startTime)||c(new Date,"yyyy-MM-dd HH:mm:ss"))})),z=a((()=>{const e=m(j.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=v(V.value/t+1).map((r=>0===r?e.startTime:c(new Date(q.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:N.value}})),B=function(){const{show:e=!0,tree:t={}}=j.data.top;if(!e)return[];const a=m(j.data.top.treeData);let r=0;const{cellWidth:i,cellHeight:o}=j.data.top.tree,{rowNumber:l=X}=t;X<l&&a.push(...v(l-X).map((()=>({}))));return function e(t,a=0){t.forEach((t=>{var l;const n={top:r*o+I.value,left:a*i,width:i,height:o};if(r++,null==(l=t.children)?void 0:l.length){r--;const i=p(t.children);n.height=i*o,e(t.children,a+1)}else n.width=N.value-n.left;Object.assign(t,n)}))}(a),a}(),J=a((()=>ne(oe("xAxis")||"center"))),K=a((()=>{var e;const{width:t,right:a}=j.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),Q=a((()=>ne(oe("intraoperatively")||"bottom"))),R=a((()=>{var e;const{show:t
|
1
|
+
import{reactive as e,ref as t,computed as a,unref as r,onMounted as i,nextTick as o,onBeforeUnmount as l,watch as n,toRefs as u}from"vue";import{useDialog as s}from"naive-ui";import{defaultBorderStyle as d}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as c}from"date-fns";import{getChildrenSize as p}from"../../utils/index.js";import{cloneDeep as m,range as v,flatten as h}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as f}from"../../constants/index.js";import"@vueuse/shared";import"@vueuse/core";import{useTop as g}from"./useTop.js";import{useLeft as w}from"./useLeft.js";import{useCenter as y}from"./useCenter.js";import{useOther as b}from"./useOther.js";function x(x,j,C,Y,H,S,T){var D;const M=s(),k=e({redrawPoints:null,clickMenu:null}),A=t();let P=null;const X=p((null==(D=j.data.top)?void 0:D.treeData)||[]),G=a((()=>j.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),N=a((()=>{var e;return null!=(e=j.data.left.width)?e:0})),V=a((()=>{const{grid:e}=j.data;return e.mainXCell*e.subXCell})),L=a((()=>{const{grid:e}=j.data;return e.mainYCell*e.subYCell})),O=a((()=>{const{show:e=!0,tree:t={}}=j.data.top;if(!e)return 0;const{rowNumber:a=X}=t;return X<a?a:X})),E=a((()=>j.data.top.tree.cellHeight)),W=a((()=>E.value*O.value)),I=a((()=>ne(oe("drug")||"top"))),F=a((()=>I.value+W.value)),q=a((()=>{var e;return Date.parse((null==(e=j.data.xAxis)?void 0:e.startTime)||c(new Date,"yyyy-MM-dd HH:mm:ss"))})),z=a((()=>{const e=m(j.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=v(V.value/t+1).map((r=>0===r?e.startTime:c(new Date(q.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:N.value}})),B=function(){const{show:e=!0,tree:t={}}=j.data.top;if(!e)return[];const a=m(j.data.top.treeData);let r=0;const{cellWidth:i,cellHeight:o}=j.data.top.tree,{rowNumber:l=X}=t;X<l&&a.push(...v(l-X).map((()=>({}))));return function e(t,a=0){t.forEach((t=>{var l;const n={top:r*o+I.value,left:a*i,width:i,height:o};if(r++,null==(l=t.children)?void 0:l.length){r--;const i=p(t.children);n.height=i*o,e(t.children,a+1)}else n.width=N.value-n.left;Object.assign(t,n)}))}(a),a}(),J=a((()=>ne(oe("xAxis")||"center"))),K=a((()=>{var e;const{width:t,right:a}=j.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),Q=a((()=>ne(oe("intraoperatively")||"bottom"))),R=a((()=>{var e;const{show:t,height:a}=(null==(e=j.data.other)?void 0:e.mark)||{};return t&&a?a:0})),U=a((()=>Q.value+(j.data.height-W.value-z.value.height-R.value))),Z=a((()=>(K.value-N.value)/V.value)),$=a((()=>(U.value-Q.value)/L.value)),_=a((()=>z.value.spaceTimeStamp/Z.value)),ee=a((()=>{const{scaleValues:e}=j.data;return h(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),te=a((()=>ue("pulse"))),ae=a((()=>ue("temperature"))),re=a((()=>{var e;return(null==(e=j.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),ie=e({canvasWidth:j.data.width,canvasHeight:j.data.height,borderStyle:{...d,...j.data.borderStyle},pointSelectionStyle:j.data.pointSelectionStyle||{},grid:j.data.grid,top:j.data.top,left:j.data.left,other:j.data.other,topGridYNumber:r(O),topGridYCellHeight:r(E),topGridOriginY:r(I),topGridEndY:r(F),treeData:B,xAxis:r(z),originYXAxis:r(J),startTime:r(q),timeXCell:r(_),gridXNumber:r(V),gridYNumber:r(L),xCellWidth:r(Z),yCellHeight:r($),originX:r(N),endX:r(K),originY:r(Q),endY:r(U),markHeight:r(R),itemList:r(ee),scaleValues:j.data.scaleValues,pulseYCell:r(te),temperatureYCell:r(ae),event:r(re),dialog:M});function oe(e){let t="";return Object.entries(G.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function le(e){const t=G.value[e],a=z.value.height;switch(t){case"drug":return W.value;case"xAxis":return a;default:return j.data.height-W.value-a}}function ne(e){switch(e){case"top":return 0;case"center":return le("top");default:return le("top")+le("center")}}function ue(e){const{scaleValues:t}=j.data,a=t.find((t=>t.type===e));return $.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await o(),g(x,ie,C,H);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:n,showDialog:u,removeCurrentSelection:s,pauseFlickerPoint:d}=y(x,ie,C,H,S,T);A.value=d,w(x,ie,C,H,a,r,i,l);const{clickMenu:c}=b(x,ie,C,H,S,a,n,u,s);k.redrawPoints=e,k.clickMenu=e=>{const{item:a}=e;a.type&&f.map((e=>e.type)).includes(a.type)?c(e):t(e)}})),l((()=>{A.value()})),T&&n((()=>null==H?void 0:H.point),(()=>{H.movable?(H.show=!0,P&&clearTimeout(P),P=setTimeout((()=>{H.show=!1,H.movable=!1}),3e3)):P&&clearTimeout(P)}),{deep:!0}),{propItems:ie,...u(k)}}export{x as useSurgicalAnesthesiaChart};
|
@@ -598,7 +598,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
598
598
|
formRef: import("vue").Ref<any>;
|
599
599
|
conditionRef: import("vue").Ref<any>;
|
600
600
|
filterVisible: import("vue").Ref<boolean>;
|
601
|
-
title: import("vue").ComputedRef<"复制" | "
|
601
|
+
title: import("vue").ComputedRef<"复制" | "新增" | "修改" | "过滤条件">;
|
602
602
|
model: {
|
603
603
|
name: string;
|
604
604
|
color: string;
|
@@ -60,7 +60,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
60
|
formRef: import("vue").Ref<any>;
|
61
61
|
conditionRef: import("vue").Ref<any>;
|
62
62
|
filterVisible: import("vue").Ref<boolean>;
|
63
|
-
title: import("vue").ComputedRef<"复制" | "
|
63
|
+
title: import("vue").ComputedRef<"复制" | "新增" | "修改" | "过滤条件">;
|
64
64
|
model: {
|
65
65
|
name: string;
|
66
66
|
color: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as f,createBlock as g,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as k,NAvatar as _,NImage as x,NIcon as I,NSpace as C,NButtonGroup as w,NTooltip as S}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as L}from"../api/index.js";import{useState as b}from"../hooks/useState.js";import{useSession as A}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as H,simplifyMessage as D,getAVTime as R,downloadFile as N}from"../utils/index.js";import{first as O,last as P,toString as q}from"lodash-es";import B from"./PersonProfile.vue.js";import J from"./MessageTemplate.vue.js";import{emojis as W}from"../utils/emoji.js";import U from"./ContextMenu.js";import X from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as F,VideocamOutline as G,DocumentSharp as K,ChatbubbleEllipsesOutline as Y,EllipsisHorizontal as $,ArrowDownSharp as Q}from"@vicons/ionicons5";import{useScrollLoading as V}from"../../../../shared/hooks/useScrollLoading.js";const Z={key:0,class:"tip-text"},ee={key:1,class:"tip-text"},te={key:2,class:"message-box"},ne={key:0,class:"content-box"},se={class:"name-box"},oe=["data-time"],ie=["onContextmenu"],re={key:0,class:"reference-content"},ae=["innerHTML"],ce=["src"],le=["innerHTML"],ue=["innerHTML"],me={style:{"margin-left":"8px"}},pe={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:fe,setMsgList:ge,relayMessage:ve}=b(),{setCurrentSessionItem:ye,isGroupChat:he}=A(fe),Te=t(),Me=t(!1),ke=t({left:0,top:0}),_e=t(),xe=t(),Ie={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":he.value?"1px":"-20px","--c-tip-gap":he.value?"10px":"0px"})));function we({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(I,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Q,onClick:()=>o&&N(o,"img")},null),default:()=>"下载"}),e.close]}async function Se(){try{if(!Ie.hasMore)return;Ie.page++;const e=await E({sessionKey:fe.currentSessionItem.sessionKey,page:Ie.page,lastSendTime:Ie.lastSendTime});if(!Array.isArray(e)||0===e.length)return Ie.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=O(e).id;Ie.lastSendTime=P(e).sendTime,ge(Ie.page>1?[...fe.msgList,...e]:e),1===Ie.page&&fe.currentSessionItem.unreadNum&&(await L({chatType:fe.currentSessionItem.chatType,messageIdSet:[t],receiver:fe.userInfo.id,sender:fe.currentSessionItem.receiver}),ye({unreadNum:0}))}catch(e){console.log(e)}}async function je(e,t){_e.value=t,async function(e){var t,n,s,o,i,r;Me.value=!0,await T();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=Te.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,f=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,g=5,v={};a<=m+l/2?v.left=a-m+g+"px":v.right=m+l-a-g+"px";c-p<d/2?v.top=f+g+"px":p+u-c<=d/2?v.bottom=Math.abs(f)+g+"px":v.top=f+c-p-d/2+"px";ke.value=v}(e)}function Ee(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function Le(e){const{chatMessageType:t}=e.content;return e.sender===fe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[z.TEXT,z.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=q(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ae(e){const{chatMessageType:t,msg:n=""}=e.content,s=q(n).match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function ze(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function He(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=fe.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Re(e){fe.currentReferenceMsg=e,fe.currentReferenceMsg.content.referenceContent=null,Object.assign(fe.currentReferenceMsg,{chatType:fe.currentSessionItem.chatType,receiver:fe.currentSessionItem.receiver,receiverAvatar:fe.currentSessionItem.avatar,receiverName:fe.currentSessionItem.name})}function Ne(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=xe.value)||n.click()):Re(t)}function Oe(e,t){const n=fe.msgList.find((e=>e.id===_e.value));ve({checkedIds:e,remark:t,content:n.content})}return V(de,(()=>{Se()}),"top",(()=>{Me.value=!1})),s((()=>fe.id),(e=>{e&&(fe.currentReferenceMsg=null,Object.assign(Ie,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Se())}),{immediate:!0}),s((()=>fe.isAppendMsg),(e=>{e&&(ge([fe.currentMsg,...fe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),fe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(fe).id}]),ref_key:"chatMainRef",ref:de,style:c(a(Ce))},[l(a(M),{"show-toolbar-tooltip":"","render-toolbar":we},{default:u((()=>[(o(!0),i(m,null,p(a(fe).msgList,((e,t)=>(o(),i(m,{key:e.id},[Ee(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(fe).userInfo.id}])},[De(e,t)?(o(),i("p",Z,d(e.__sendTime),1)):f("v-if",!0),ze(e,"system")||"WITHDRAWN"===e.status?(o(),i(m,{key:1},[ze(e,"system")?(o(),g(J,{key:0,data:e},null,8,["data"])):f("v-if",!0),"WITHDRAWN"===e.status?(o(),i("p",ee,[v("span",null,d(e.sender==a(fe).userInfo.id?"你":e.senderName)+"撤回了一条消息",1),Le(e)?(o(),g(a(k),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){fe.currentReEditMsg=e}(e)},{default:u((()=>[y(" 重新编辑 ")])),_:2},1032,["onClick"])):f("v-if",!0)])):f("v-if",!0)],64)):(o(),i("div",te,[l(B,{"user-id":e.sender,placement:e.sender==a(fe).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(_),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",ne,[v("div",se,[v("span",{class:"name","data-time":e.__time},d(a(he)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":He(e.content),"audio-video":a(H)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:h((t=>je(t,e.id)),["prevent"])},[be(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",re,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,ae)])):f("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(W).findEmoji(e.__content)},null,10,ce)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):f("v-if",!0),Ae(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,ue)):f("v-if",!0),ze(e,"template")?(o(),g(J,{key:2,data:e},null,8,["data"])):f("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),g(a(x),{key:3,width:"240",src:e.__content},null,8,["src"])):f("v-if",!0),a(H)(e.content)?(o(),i(m,{key:4},[l(a(I),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(F):a(G)},null,8,["class","component"]),v("span",me,d(a(R)(e.__content)),1)],64)):f("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),g(a(C),{key:5,"wrap-item":!1},{default:u((()=>[l(a(I),{class:"icon-file",size:"40",component:a(K)},null,8,["component"]),l(a(C),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",pe,d(e.__size),1)])),_:2},1024)])),_:2},1024)):f("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(H)(e.content)?f("v-if",!0):(o(),i(m,{key:0},[f(' <n-button quaternary size="tiny">\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(k),{quaternary:"",size:"tiny",onClick:()=>Re(e)},{icon:u((()=>[l(a(I),{size:"17",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(k),{quaternary:"",size:"tiny",onClick:t=>je(t,e.id)},{icon:u((()=>[l(a(I),{size:"14",component:a($)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,ie)])):f("v-if",!0)]))],2)):f("v-if",!0)],64)))),128))])),_:1}),l(a(U),{ref_key:"contextmenuRef",ref:Te,show:Me.value,"onUpdate:show":t[0]||(t[0]=e=>Me.value=e),position:ke.value,"msg-id":_e.value,onSelect:Ne},null,8,["show","position","msg-id"]),l(X,{title:"转发消息",mode:"relay",onComfirm:Oe},{trigger:u((()=>[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:xe},"转发",512)])),_:1})],6))}});export{de as default};
|
1
|
+
import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as f,createBlock as g,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as k,NAvatar as _,NImage as x,NIcon as I,NSpace as C,NButtonGroup as w,NTooltip as S}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as L}from"../api/index.js";import{useState as b}from"../hooks/useState.js";import{useSession as A}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as H,simplifyMessage as D,getAVTime as R,downloadFile as N}from"../utils/index.js";import{first as O,last as P,toString as q}from"lodash-es";import B from"./PersonProfile.vue.js";import J from"./MessageTemplate.vue.js";import{emojis as W}from"../utils/emoji.js";import U from"./ContextMenu.js";import X from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as F,VideocamOutline as G,DocumentSharp as K,ChatbubbleEllipsesOutline as Y,EllipsisHorizontal as $,ArrowDownSharp as Q}from"@vicons/ionicons5";import{useScrollLoading as V}from"../../../../shared/hooks/useScrollLoading.js";const Z={key:0,class:"tip-text"},ee={key:1,class:"tip-text"},te={key:2,class:"message-box"},ne={key:0,class:"content-box"},se={class:"name-box"},oe=["data-time"],ie=["onContextmenu"],re={key:0,class:"reference-content"},ae=["innerHTML"],ce=["src"],le=["innerHTML"],ue=["innerHTML"],me={style:{"margin-left":"8px"}},pe={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:fe,setMsgList:ge,relayMessage:ve}=b(),{setCurrentSessionItem:ye,isGroupChat:he}=A(fe),Te=t(),Me=t(!1),ke=t({left:0,top:0}),_e=t(),xe=t(),Ie={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":he.value?"1px":"-20px","--c-tip-gap":he.value?"10px":"0px"})));function we({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(I,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Q,onClick:()=>o&&N(o,"img")},null),default:()=>"下载"}),e.close]}async function Se(){try{if(!Ie.hasMore)return;Ie.page++;const e=await E({sessionKey:fe.currentSessionItem.sessionKey,page:Ie.page,lastSendTime:Ie.lastSendTime});if(!Array.isArray(e)||0===e.length)return Ie.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=O(e).id;Ie.lastSendTime=P(e).sendTime,ge(Ie.page>1?[...fe.msgList,...e]:e),1===Ie.page&&fe.currentSessionItem.unreadNum&&(await L({chatType:fe.currentSessionItem.chatType,messageIdSet:[t],receiver:fe.userInfo.id,sender:fe.currentSessionItem.receiver}),ye({unreadNum:0}))}catch(e){console.log(e)}}async function je(e,t){_e.value=t,async function(e){var t,n,s,o,i,r;Me.value=!0,await T();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=Te.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,f=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,g=5,v={};a<=m+l/2?v.left=a-m+g+"px":v.right=m+l-a-g+"px";c-p<d/2?v.top=f+g+"px":p+u-c<=d/2?v.bottom=Math.abs(f)+g+"px":v.top=f+c-p-d/2+"px";ke.value=v}(e)}function Ee(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function Le(e){const{chatMessageType:t}=e.content;return e.sender===fe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[z.TEXT,z.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=q(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ae(e){const{chatMessageType:t,msg:n=""}=e.content,s=q(n).match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function ze(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function He(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=fe.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Re(e){fe.currentReferenceMsg=e,fe.currentReferenceMsg.content.referenceContent=null,Object.assign(fe.currentReferenceMsg,{chatType:fe.currentSessionItem.chatType,receiver:fe.currentSessionItem.receiver,receiverAvatar:fe.currentSessionItem.avatar,receiverName:fe.currentSessionItem.name})}function Ne(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=xe.value)||n.click()):Re(t)}function Oe(e,t){const n=fe.msgList.find((e=>e.id===_e.value));ve({checkedIds:e,remark:t,content:n.content})}return V(de,(()=>{Se()}),"top",(()=>{Me.value=!1})),s((()=>fe.id),(e=>{e&&(fe.currentReferenceMsg=null,Object.assign(Ie,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Se())}),{immediate:!0}),s((()=>fe.isAppendMsg),(e=>{e&&(ge([fe.currentMsg,...fe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),fe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(fe).id}]),ref_key:"chatMainRef",ref:de,style:c(a(Ce))},[l(a(M),{"show-toolbar-tooltip":"","render-toolbar":we},{default:u((()=>[(o(!0),i(m,null,p(a(fe).msgList,((e,t)=>(o(),i(m,{key:e.id},[Ee(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(fe).userInfo.id}])},[De(e,t)?(o(),i("p",Z,d(e.__sendTime),1)):f("v-if",!0),ze(e,"system")||"WITHDRAWN"===e.status?(o(),i(m,{key:1},[ze(e,"system")?(o(),g(J,{key:0,data:e},null,8,["data"])):f("v-if",!0),"WITHDRAWN"===e.status?(o(),i("p",ee,[v("span",null,d(e.sender==a(fe).userInfo.id?"你":e.senderName)+"撤回了一条消息",1),Le(e)?(o(),g(a(k),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){fe.currentReEditMsg=e}(e)},{default:u((()=>[y(" 重新编辑 ")])),_:2},1032,["onClick"])):f("v-if",!0)])):f("v-if",!0)],64)):(o(),i("div",te,[l(B,{"user-id":e.sender,placement:e.sender==a(fe).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(_),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",ne,[v("div",se,[v("span",{class:"name","data-time":e.__time},d(a(he)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":He(e.content),"audio-video":a(H)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:h((t=>je(t,e.id)),["prevent"])},[be(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",re,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,ae)])):f("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(W).findEmoji(e.__content)},null,10,ce)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):f("v-if",!0),Ae(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,ue)):f("v-if",!0),ze(e,"template")?(o(),g(J,{key:2,data:e},null,8,["data"])):f("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),g(a(x),{key:3,width:"240",src:e.__content},null,8,["src"])):f("v-if",!0),a(H)(e.content)?(o(),i(m,{key:4},[l(a(I),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(F):a(G)},null,8,["class","component"]),v("span",me,d(a(R)(e.__content)),1)],64)):f("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),g(a(C),{key:5,"wrap-item":!1},{default:u((()=>[l(a(I),{class:"icon-file",size:"40",component:a(K)},null,8,["component"]),l(a(C),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",pe,d(e.__size),1)])),_:2},1024)])),_:2},1024)):f("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(H)(e.content)?f("v-if",!0):(o(),i(m,{key:0},[f(' <n-button quaternary size="tiny">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(k),{quaternary:"",size:"tiny",onClick:()=>Re(e)},{icon:u((()=>[l(a(I),{size:"17",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(k),{quaternary:"",size:"tiny",onClick:t=>je(t,e.id)},{icon:u((()=>[l(a(I),{size:"14",component:a($)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,ie)])):f("v-if",!0)]))],2)):f("v-if",!0)],64)))),128))])),_:1}),l(a(U),{ref_key:"contextmenuRef",ref:Te,show:Me.value,"onUpdate:show":t[0]||(t[0]=e=>Me.value=e),position:ke.value,"msg-id":_e.value,onSelect:Ne},null,8,["show","position","msg-id"]),l(X,{title:"转发消息",mode:"relay",onComfirm:Oe},{trigger:u((()=>[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:xe},"转发",512)])),_:1})],6))}});export{de as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as a,computed as o,openBlock as l,createBlock as
|
1
|
+
import{defineComponent as t,ref as e,reactive as a,computed as o,openBlock as l,createBlock as r,unref as n,withCtx as s,renderSlot as i,createElementBlock as c,Fragment as u,withDirectives as d,createElementVNode as p,createVNode as m,createCommentVNode as v,toDisplayString as f,createTextVNode as g,renderList as y,vShow as k}from"vue";import{NPopover as h,NAvatar as b,NButton as w,NIcon as j}from"naive-ui";import{ChatbubbleEllipses as C,EyeOffOutline as I,EyeOutline as _,Close as x}from"@vicons/ionicons5";import{useState as z}from"../hooks/useState.js";import{useSession as N}from"../hooks/useSession.js";import{CHAT_TYPE as S}from"../constants/index.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import"../../../../shared/utils/index.js";import{openSessionApi as $,getUserDetailApi as D}from"../api/index.js";const E={class:"person-profile-main"},L={class:"left"},P={class:"profile"},q={class:"profile__text"},B={class:"right"},G={class:"right__content"},O={class:"label"},T={class:"content"};var U=t({__name:"PersonProfile",props:{userId:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:U}){const A=t,{state:F}=z(),{openSession:H}=N(F),J=e(!1),K=e(!1),M=e(!1),Q=a({}),R=[{label:"机构",value:"",key:"orgName"},{label:"姓名",value:"",key:"name"},{label:"归属科室",value:"",key:"deptName"},{label:"业务科室",value:"",key:"businessDeptNames"},{label:"手机号",value:"",key:"phone"},{label:"岗位",value:"",key:"post"},{label:"工号",value:"",key:"jobId"},{label:"性别",value:"",key:"orgName"}],V=o((()=>(Q.id&&R.forEach((t=>{const{key:e}=t;t.value=Q[e]})),R)));async function W(){J.value=!1;let t=F.sessionList.find((t=>t.receiver===A.userId));if(!t)try{t=await $({chatType:S.SINGLE,receiver:A.userId,sender:F.userInfo.id})}catch(t){console.log("error :>> ",t)}t&&H(t),U("close")}async function X(t){if(!t)return;const e=await D({userId:A.userId});(null==e?void 0:e.id)?Object.assign(Q,e):Q.id=""}function Y(t){const{key:e,value:a}=t;return"phone"!==e||M.value?a:(a||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return(e,a)=>(l(),r(n(h),{raw:"",class:"person-profile-wrapper",show:J.value,"onUpdate:show":[a[3]||(a[3]=t=>J.value=t),X],trigger:t.disabled?"manual":"click","show-arrow":!1,to:"body",shift:""},{trigger:s((()=>[i(e.$slots,"trigger")])),default:s((()=>[Q.id?(l(),c(u,{key:0},[d(p("div",E,[p("div",L,[p("div",P,[m(n(b),{src:Q.avatar,bordered:"",round:"",size:100,onClickCapture:a[0]||(a[0]=t=>K.value=!0)},null,8,["src"]),v(' <n-upload abstract accept="image/*" @change="onChange">\r\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\r\n\t\t\t\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t\t\t\tcircle\r\n\t\t\t\t\t\t\t\t\tsecondary\r\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\r\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\r\n\t\t\t\t\t\t\t\t\t@click="handleClick"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\r\n\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t\t</n-upload-trigger>\r\n\t\t\t\t\t\t</n-upload> '),p("div",q,[p("h4",null,f(Q.name),1),p("p",null,f(Q.orgName),1)]),m(n(w),{strong:"",secondary:"",onClick:W},{default:s((()=>[m(n(j),{size:"13",color:"#666666",component:n(C),style:{"margin-right":"6px"}},null,8,["component"]),g(" 发消息 ")])),_:1})])]),p("div",B,[p("div",G,[(l(!0),c(u,null,y(n(V),((t,e)=>(l(),c("div",{class:"info-item",key:e},[p("span",O,f(t.label),1),p("div",T,[p("span",null,f(Y(t)),1),"phone"===t.key&&Y(t)?(l(),r(n(j),{key:0,size:"16",color:"#666666",component:M.value?n(I):n(_),style:{"margin-left":"10px"},onClick:a[1]||(a[1]=t=>M.value=!M.value)},null,8,["component"])):v("v-if",!0)])])))),128))])])],512),[[k,!K.value]]),d(p("div",{class:"large-avatar",onClick:a[2]||(a[2]=t=>K.value=!1)},[m(n(w),{circle:"",size:"small",secondary:""},{icon:s((()=>[m(n(j),{size:24,component:n(x),color:"#fff"},null,8,["component"])])),_:1}),m(n(b),{size:310,round:"",src:Q.avatar},null,8,["src"])],512),[[k,K.value]])],64)):v("v-if",!0)])),_:3},8,["show","trigger"]))}});export{U as default};
|
@@ -55,6 +55,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
55
55
|
isShow: import("vue").Ref<boolean>;
|
56
56
|
timePickerRef: import("vue").Ref<any>;
|
57
57
|
inputValue: import("vue").Ref<any>;
|
58
|
+
newValue: string | undefined;
|
58
59
|
inputProps: import("vue").ComputedRef<{
|
59
60
|
style: string;
|
60
61
|
} | {
|
@@ -65,11 +66,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
65
66
|
valueFormat: any;
|
66
67
|
timeConfig: AnyObject;
|
67
68
|
clickShortcutOption: (item: string) => void;
|
68
|
-
|
69
|
+
saveValue: (value: string | null) => void;
|
69
70
|
isDisabled: (value: string) => boolean;
|
70
71
|
onChange: () => void;
|
71
72
|
onKeydown: (event: KeyboardEvent) => void;
|
72
73
|
formatTime: (time: string) => string;
|
74
|
+
updateFormattedValue: () => void;
|
73
75
|
NInput: any;
|
74
76
|
NPopover: any;
|
75
77
|
NSpace: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as t,inject as l,ref as a,computed as r,reactive as o,watch as u,nextTick as n,
|
1
|
+
import{defineComponent as e,useAttrs as t,inject as l,ref as a,computed as r,reactive as o,watch as u,nextTick as n,onBeforeUnmount as i,openBlock as m,createBlock as d,unref as v,withCtx as c,createVNode as s,mergeProps as f,isRef as p,createElementBlock as h,Fragment as b,renderList as y,createTextVNode as g,toDisplayString as w,createCommentVNode as k}from"vue";import{noop as _}from"lodash-es";import{NPopover as V,NInput as F,NSpace as S,NScrollbar as $,NButton as H}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as C,isValid as O,format as j,getHours as E,getMinutes as A,getSeconds as I}from"date-fns";var P=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object},row:{type:Object},rowIndex:{type:Number},shortcutOptions:{type:Array,default:()=>[]},ignoreGlobEmit:{type:Boolean,default:!1}},emits:["update:formattedValue","click"],setup(e,{emit:P}){const R=e,U=t(),{emitFormChangeWithParams:q=_}=R.ignoreGlobEmit?{}:x({...R,$table:l("$xetable")}),G=a(null),M=a(!1),N=a(),W=a();let z=R.formattedValue;const B=r((()=>W.value&&X(W.value)?{style:"text-decoration: line-through"}:{})),K=r({get(){if(!W.value)return null;const e=C(W.value,L.valueFormat,new Date);return O(e)?j(e,L.valueFormat):R.formattedValue?ee(R.formattedValue):null},set(e){Q(e)}}),{placeholder:T="请选择",valueFormat:J="HH:mm"}=U,L=o({...U,placeholder:T,valueFormat:J,format:J});function Q(e){if(W.value=e||"",e&&X(e))return;R.formattedValue!==e&&(z=e)}function X(e){var t,l,a;const r=C(e,L.format,new Date),o=E(r),u=A(r),n=I(r),i=null==(t=L.isHourDisabled)?void 0:t.call(L,o),m=null==(l=L.isMinuteDisabled)?void 0:l.call(L,u,o),d=null==(a=L.isSecondDisabled)?void 0:a.call(L,n,u,o);return i||m||d}function Y(){[L.valueFormat.replace(/[^\w]/g,""),L.valueFormat].some((e=>{const t=C(W.value,e,new Date);if(!W.value||O(t)){return Q(W.value?j(t,L.valueFormat):null),!0}return!1}))}function Z(e){var t;const{key:l}=e;"Enter"===l&&(null==(t=G.value)||t.blur(),M.value=!1)}function ee(e){var t;const l=L.valueFormat.match(/\W/)[0]||":",a=e.split(l).map(Number),r=`${a[0].toString().padStart(2,"0")}${l}${a[1].toString().padStart(2,"0")}`;return"HH:mm"===L.valueFormat?r:"HH:mm:ss"===L.valueFormat?`${r}${l}${(null!=(t=a[2])?t:0).toString().padStart(2,"0")}`:e}function te(){z&&X(z)||R.formattedValue!==z&&(P("update:formattedValue",z),q({oldValue:R.formattedValue}))}return u((()=>R.formattedValue),(e=>{if(!e)return"";W.value=ee(e)}),{immediate:!0}),u((()=>M.value),(async e=>{var t,l,a,r,o;e?(z=K.value,await n(),null==(o=null==(r=null==(a=null==(l=null==(t=N.value)?void 0:t.$timePicker)?void 0:l.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||o.forEach((e=>{var t,l;return null==(l=null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,".n-time-picker-col__item--active"))?void 0:l.scrollIntoView()}))):te()})),i((()=>{te()})),(t,l)=>(m(),d(v(V),{show:M.value,"onUpdate:show":l[3]||(l[3]=e=>M.value=e),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},{trigger:c((()=>[s(v(F),{ref_key:"formRef",ref:G,clearable:"",placeholder:v(T),value:W.value,"onUpdate:value":l[0]||(l[0]=e=>W.value=e),valueModifiers:{trim:!0},"input-props":v(B),onChange:Y,onKeydown:Z},null,8,["placeholder","value","input-props"])])),default:c((()=>[s(v(S),null,{default:c((()=>[s(v(D),f({ref_key:"timePickerRef",ref:N,show:""},v(L),{class:"iho-table__time-picker",to:!1,"formatted-value":v(K),"onUpdate:formatted-value":l[1]||(l[1]=e=>p(K)?K.value=e:null),onConfirm:l[2]||(l[2]=()=>M.value=!1)}),null,16,["formatted-value"]),s(v($),{class:"iho-table__scrollbar"},{default:c((()=>[e.shortcutOptions.length?(m(),d(v(S),{key:0,vertical:"",wrap:!1},{default:c((()=>[(m(!0),h(b,null,y(e.shortcutOptions,(e=>(m(),d(v(H),{size:"tiny",key:e,disabled:X(e),onClick:t=>function(e){Q(ee(e)),M.value=!1}(e)},{default:c((()=>[g(w(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{P as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{traverse as e,findAncestor as n,getStringWidth as t}from"../../../../../../shared/utils/index.js";import{isString as r,isNumber as i,constant as o,isFunction as a,noop as l,range as d,property as u}from"lodash-es";import{IhoTableRenderHelper as c}from"../../../utils/index.js";import{VERTICAL_CELL_TYPE as f}from"./constants.js";function s(e){var n;return!!(null==(n=e.verticalConfig)?void 0:n.enable)}function h(e){return!!r(e)&&e.startsWith("header_")}function p(e){return!!r(e)&&e.startsWith("body_")}function _(e){var n;return r(e)?+(null!=(n=e.split("_")[1])?n:-1):-1}function m(n,t){const r=[];return e(n,((
|
1
|
+
import{traverse as e,findAncestor as n,getStringWidth as t}from"../../../../../../shared/utils/index.js";import{isString as r,isNumber as i,constant as o,isFunction as a,noop as l,range as d,property as u}from"lodash-es";import{IhoTableRenderHelper as c}from"../../../utils/index.js";import{VERTICAL_CELL_TYPE as f}from"./constants.js";function s(e){var n;return!!(null==(n=e.verticalConfig)?void 0:n.enable)}function h(e){return!!r(e)&&e.startsWith("header_")}function p(e){return!!r(e)&&e.startsWith("body_")}function _(e){var n;return r(e)?+(null!=(n=e.split("_")[1])?n:-1):-1}function m(n,t){const r=[];return e(n,((n,i,o)=>{n.parent=o,n.children||(!function(n,t){if(!n.parent)return n[`header_${t}`]=n.title,void d(t+1).forEach((e=>{n[`header_${e}_colspan`]=e===t?t+1:0,n[`header_${e}_rowspan`]=e===t?1:0}));let r=0,i=n;const o=[n];for(;i.parent;)r++,i=i.parent,o.unshift(i);d(t+1).forEach((i=>{var a,l;const d=o[i];if(!d)return n[`header_${i}`]="",n[`header_${i}_colspan`]=0,void(n[`header_${i}_rowspan`]=0);n[`header_${i}`]=null!=(l=null==(a=o[i])?void 0:a.title)?l:"",n[`header_${i}_colspan`]=i<r?1:t-r+1,n[`header_${i}_rowspan`]=function(n){if(!n.children)return 1;let t=0;return e(n.children,(e=>{e.children||t++})),t}(d)}))}(n,t),r.push(n))})),r.forEach(((e,n)=>{const i=r[n-1];i&&Object.entries(e).forEach((([n,r])=>{n.match(/^header_(\d+)$/)&&r===i[n]&&r&&n!==`header_${t}`&&(e[`${n}_colspan`]=0,e[`${n}_rowspan`]=0)}))})),r}function g({row:e,column:n}){var t,r;return h(n.field)?{rowspan:null!=(t=e[n.field+"_rowspan"])?t:1,colspan:null!=(r=e[n.field+"_colspan"])?r:1}:{colspan:1,rowspan:1}}const x=({cell:e}={})=>{const n=e&&e.querySelector("input,.n-input__input-el,.n-input__textarea-el");return n&&n.click(),n};function $(n,r){let i=120;return e(r,((e,r,o,a)=>{a===n&&(i=Math.max(i,t(e.title||"")+20+(c.hasTitlePrefix(e)?20:0)))})),Math.ceil(i)}function w(e,n,t){const r=T(t);let u=r.getTableConfig("verticalConfig.headerWidth");u="auto"===u?$:i(u)?o(u):a(u)?u:$;let c=r.getTableConfig("verticalConfig.bodyWidth");c=i(c)?o(c):a(c)?c:l;let s=r.getTableConfig("verticalConfig.bodyMinWidth");return s=i(s)?o(s):a(s)?s:o(120),[...d(n+1).map((e=>({field:`header_${e}`,title:`header_${e}`,width:u(e,t.originalFieldList),fixed:"left",editRender:{name:f,props:{},enable:!1}}))),...e.map(((e,n)=>({field:`body_${n}`,title:`body_${n}`,minWidth:s(n),width:c(n),editRender:{name:f,props:{},enable:!0,autofocus:x}})))]}function v(e){const t=n(e.target,(e=>"TD"===e.tagName||"TH"===e.tagName));if(!t)return;const r=t.className.match(/(body|header)_(\d+)/);if(!r)return;const[i,o,a]=r;return{fieldKey:i,type:o,sequence:+a}}function y(e){return u("originalField")(e)}function b(e,n){return u(`originalData.${n}`)(e)}function I(e,n){const t=_(n.field),r=y(e);return{row:b(e,t),rowIndex:t,$rowIndex:t,column:r,fixed:r.fixed,type:r.type}}function C(n){const t=[];return e(n,(e=>{"left"===e.fixed&&t.push(e)})),t}function T(e){return{getOriginDataByColumn(n){const{originalData:t=[]}=e;return t[_(n.field)]},getTableConfig:n=>u(n)(e.originalTableConfig)}}function D(e,n){return new Proxy({},{get(t,r){var i;if("originalField"===r)return e;if("originalData"===r)return a(n)?n():n;if(h(r))return e[r];if(p(r)){const t=_(r);return"seq"===e.type?t+1:null==(i=n[t])?void 0:i[e.field]}return t[r]},set(t,r,i){if(!h(r)){const t=_(r);t>=0&&n[t]&&(n[t][e.field]=i)}return!0}})}function W({$columnIndex:e,$rowIndex:n,column:t,columnIndex:r,row:i,rowIndex:o,type:a,_columnIndex:l,_rowIndex:d},u){var c;if(t){const f=a;if(a=h(t.field)?"header":"body",i){const s=_(t.field);t=y(i),i="header"===a?void 0:b(i,s),l=r=e="header"===f?n||0:((null==(c=u.fixedLeftVerticalData)?void 0:c.length)||0)+(n||0),d=o=n="header"===a?-1:s}}return{column:t,row:i,_columnIndex:l,_rowIndex:d,columnIndex:r,rowIndex:o,$columnIndex:e,$rowIndex:n,type:a}}x.toString=()=>"input,.n-input__input-el";export{W as basicParamsConvert,m as bindHeaderInfoAndFlatten,D as createDataProxy,w as createVerticalFieldList,T as createVerticalStateHandler,C as findFixedLeftFields,_ as getHeaderDepthByField,I as getOriginBasePayload,y as getOriginFieldFromRowData,b as getOriginRowFromRowData,g as getSpanInfo,v as getVerticalInfoFromEvent,p as isVerticalBody,h as isVerticalHeader,s as isVerticalTable};
|
@@ -1 +1 @@
|
|
1
|
-
.iho-table{height:100%;position:relative}.iho-table .vxe-header--column{font-weight:400;text-shadow:0 0 1px}.iho-table .vxe-body--column.col--drag{cursor:move}.iho-table .vxe-table.size--mini{font-size:14px}.iho-table .vxe-table.size--mini .vxe-body--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-footer--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-header--column:not(.col--ellipsis){padding:4px 0}.iho-table .vxe-table.size--mini .vxe-sort--asc-btn{top:-2px}.iho-table .vxe-table.size--mini .vxe-sort--desc-btn{bottom:0}.iho-table__headerWrapper{display:inline-flex;flex-wrap:nowrap}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table .vxe-table--header-wrapper,.iho-table .vxe-table.vxe-table--render-default{color:#212121}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b2b2b2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table--empty-content{height:100%;width:100%}.iho-table .vxe-table--empty-content>div,.iho-table .vxe-tree-cell{height:100%}.iho-table .vxe-table--header{background-color:#f2f2f2}.iho-table .vxe-table--header .checkbox-cell--disable{border:2px solid #c0c4cc;border-radius:50%;box-sizing:border-box;cursor:not-allowed;display:inline-block;height:18px;left:-2px;position:relative;top:3px;width:18px}.iho-table .vxe-table--header .checkbox-cell--disable:before{background-color:#c0c4cc;content:"";height:16px;left:50%;position:absolute;top:-2px;transform:translate(-60%) rotate(-45deg);width:2px}.iho-table .vxe-footer--row .vxe-footer--column>.vxe-cell .vxe-cell--item{height:30px;line-height:30px}.iho-table .vxe-table--render-default .vxe-body--column.col--selected{box-shadow:inset 0 0 0 2px var(--c-primary-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--hover,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--stripe{background-color:var(--c-hover-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--stripe{background-color:var(--c-stripe-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--radio{background-color:var(--c-primary-color-opacity2);text-shadow:0 0 1px}.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--radio{background-color:var(--c-primary-color-opacity3);text-shadow:0 0 1px}.iho-table .vxe-body--expanded-column,.iho-table .vxe-table--border-line{border-color:var(--c-border-color)!important}.iho-table .vxe-table--footer-wrapper{border-top-color:var(--c-border-color)!important}.iho-table .border--default .vxe-body--column,.iho-table .border--default .vxe-footer--column,.iho-table .border--default .vxe-header--column,.iho-table .border--inner .vxe-body--column,.iho-table .border--inner .vxe-footer--column,.iho-table .border--inner .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--full .vxe-body--column,.iho-table .border--full .vxe-footer--column,.iho-table .border--full .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color)),linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--default .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--full .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--inner .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--outer .vxe-header--row:last-child .vxe-header--gutter{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .vxe-table--header-border-line{border-bottom-color:var(--c-border-color)!important}.iho-table .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .is--filter-active .vxe-cell--filter .vxe-filter--btn{color:var(--c-primary-color)}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterIcon.is-active{color:var(--c-primary-color)}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;margin:8px 12px;width:240px}.iho-table__filterCheckAllWrapper{display:flex;justify-content:space-between}.iho-table__filterCheckAllWrapper>div{flex:1}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:var(--c-primary-color)}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05);overflow-x:hidden}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;padding:0 8px}.iho-table__filterListItem:hover{background:var(--c-primary-color-opacity2)}.iho-table__filterListItem .n-checkbox,.iho-table__filterListItem .n-radio{width:100%}.iho-table__filterListItem>*{padding:5px 0}.iho-table__filterListItemContent{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:190px}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table__time-picker{position:unset}.iho-table__time-picker .n-input{display:none}.iho-table__time-picker .v-binder-follower-container{height:auto;position:unset}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content{position:unset;transform:none!important}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content .n-time-picker-panel{box-shadow:none}.iho-table__scrollbar{margin:8px 8px 8px 0;max-height:255px}.iho-table .variable-height .vxe-cell,.iho-table .variable-height .vxe-cell--tree-node,.iho-table .variable-height .vxe-tree-cell{line-height:1.3;max-height:fit-content!important;white-space:break-spaces!important}.iho-table__selectMenu .n-scrollbar-rail__scrollbar{display:none!important}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar,.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{display:unset!important;height:6px;width:6px}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{background:#bfbfbf;border-radius:4px}.iho-table__selectMenu .v-vl-items{min-width:100%;width:max-content}.iho-table__selectOption .n-base-select-option__content{overflow:visible!important;text-overflow:unset!important;word-break:keep-all!important}.iho-table__selectOptionWrapper{align-items:center;display:flex}.iho-select-menu-width{width:var(--iho-select-menu-width)!important}.iho-table .is--checked.vxe-checkbox,.iho-table .is--checked.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--checked.vxe-custom--option,.iho-table .is--checked.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--checked.vxe-export--panel-column-option,.iho-table .is--checked.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--checked.vxe-table--filter-option,.iho-table .is--checked.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-checkbox,.iho-table .is--indeterminate.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-custom--option,.iho-table .is--indeterminate.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-export--panel-column-option,.iho-table .is--indeterminate.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-table--filter-option,.iho-table .is--indeterminate.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-custom--option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-export--panel-column-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table .vxe-sort--asc-btn.sort--active,.iho-table .vxe-table .vxe-sort--desc-btn.sort--active,.iho-table .vxe-table--filter-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .vxe-cell--checkbox:not(.is--disabled):hover .vxe-checkbox--icon{color:var(--c-primary-color)}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}@font-face{font-family:iho-table-iconfont;src:url(iconfont.ttf) format("truetype")}.iho-table .iho-table--iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iho-table-iconfont!important;font-size:15px;font-style:normal}.iho-table .iho-table-icon-filter{display:inline-block;font-size:17px;transform:translateY(-1px);vertical-align:middle}.iho-table .iho-table-icon-filter:before{content:"\c2001"}.iho-table .iho-table-icon-date-filter{display:inline-block;transform:translateY(-1px)}.iho-table .iho-table-icon-date-filter:before{content:"\c2002"}.iho-table .row--custom{background-color:var(--row-background-color)}.iho-table__colorAndIcon{background-color:var(--color-and-icon-background-color-type);color:var(--color-and-icon-color-type)}.iho-table__htmlRender *{display:inline!important}.iho-table__ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iho-table .vxe-grid[vertical] .vxe-table--header-wrapper.body--wrapper{background:transparent}.iho-table .vxe-grid[vertical] .vxe-cell{min-height:var(--iho-table-vertical-table-min-height,unset)}.iho-table__pagerScrollWrapper{background:#fff;height:30px;overflow:auto;position:absolute;right:1px;width:9px;z-index:3000}.iho-table__pagerScrollWrapper::-webkit-scrollbar{background-color:transparent;height:8px;width:8px}.iho-table__pagerScrollWrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b2b2b2;border:2px dashed transparent;border-radius:5px}.iho-table__pagerScrollWrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table--fixed-left,.iho-table--fixed-right{position:sticky!important;width:calc(var(--iho-table-fixed-width)*1px);z-index:5}.iho-table--fixed-left.vxe-header--column .vxe-resizable.is--line:before,.iho-table--fixed-right.vxe-header--column .vxe-resizable.is--line:before{width:2px}.iho-table--fixed-left{left:calc(var(--iho-table-fixed-left)*1px + 1px)}.iho-table--fixed-right.vxe-header--column{right:calc(var(--iho-table-fixed-right)*1px + var(--c-scrollbar-width))}.iho-table--fixed-right.vxe-body--column{right:calc(var(--iho-table-fixed-right)*1px)}.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-left.vxe-body--column,.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-right.vxe-body--column{background-color:#fff}.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-left.vxe-header--column,.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-right.vxe-header--column{background-color:var(--c-head-bg-color)}.iho-table tr.row--hover .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--hover.row--stripe .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--stripe .iho-table--fixed-right.vxe-body--column{background-color:var(--c-hover-color)}.iho-table tr.row--stripe .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--stripe .iho-table--fixed-right.vxe-body--column{background-color:var(--c-stripe-color)}.iho-table tr.row--checked .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--checked .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--current .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--current .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--radio .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--radio .iho-table--fixed-right.vxe-body--column{background-color:var(--c-primary-color-opacity2)}.iho-table tr.row--hover.row--checked .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--checked .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--hover.row--current .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--current .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--hover.row--radio .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--radio .iho-table--fixed-right.vxe-body--column{background-color:var(--c-primary-color-opacity3)}.iho-table__fixedLeftBorderLeft{border-left:1px solid var(--c-border-color);height:calc(100% - 8px);left:0;overflow:hidden;position:absolute;width:0;z-index:5}.iho-table__fixedLeftShadow{height:calc(100% - 8px);position:absolute;top:0;width:3px;z-index:5}.iho-table__fixedLeftShadow.scrolling--middle{box-shadow:4px 3px 4px 0 rgba(0,0,0,.12)}.iho-table__fixedLeftBorderTop{background:var(--c-border-color);height:1px;left:0;position:absolute;top:0;z-index:6}.iho-table__fixedRightBorderLeft{border-left:1px solid var(--c-border-color);height:calc(100% - 8px);overflow:hidden;position:absolute;top:0;width:3px;z-index:5}.iho-table__fixedRightBorderLeft.scrolling--middle{box-shadow:-4px 3px 4px 0 rgba(0,0,0,.12)}.iho-table__fixedRightBorderTop{background:var(--c-border-color);height:1px;position:absolute;right:0;top:0;z-index:6}.iho-table__fixedRightBorderTop:after{background:var(--c-head-bg-color);content:"";height:var(--c-header-height);position:absolute;right:1px;top:1px;width:calc(var(--c-scrollbar-width) - 1px)}
|
1
|
+
.iho-table{height:100%;position:relative}.iho-table .vxe-header--column{font-weight:400;text-shadow:0 0 1px}.iho-table .vxe-body--column.col--drag{cursor:move}.iho-table .vxe-table.size--mini{font-size:14px}.iho-table .vxe-table.size--mini .vxe-body--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-footer--column:not(.col--ellipsis),.iho-table .vxe-table.size--mini .vxe-header--column:not(.col--ellipsis){padding:4px 0}.iho-table .vxe-table.size--mini .vxe-sort--asc-btn{top:-2px}.iho-table .vxe-table.size--mini .vxe-sort--desc-btn{bottom:0}.iho-table__headerWrapper{display:inline-flex;flex-wrap:nowrap}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table .vxe-table--header-wrapper,.iho-table .vxe-table.vxe-table--render-default{color:#212121}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b2b2b2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .vxe-table--empty-content{height:100%;width:100%}.iho-table .vxe-table--empty-content>div,.iho-table .vxe-tree-cell{height:100%}.iho-table .vxe-table--header{background-color:var(--c-head-bg-color)}.iho-table .vxe-table--header .checkbox-cell--disable{border:2px solid #c0c4cc;border-radius:50%;box-sizing:border-box;cursor:not-allowed;display:inline-block;height:18px;left:-2px;position:relative;top:3px;width:18px}.iho-table .vxe-table--header .checkbox-cell--disable:before{background-color:#c0c4cc;content:"";height:16px;left:50%;position:absolute;top:-2px;transform:translate(-60%) rotate(-45deg);width:2px}.iho-table .vxe-footer--row .vxe-footer--column>.vxe-cell .vxe-cell--item{height:30px;line-height:30px}.iho-table .vxe-table--render-default .vxe-body--column.col--selected{box-shadow:inset 0 0 0 2px var(--c-primary-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--hover,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--stripe{background-color:var(--c-hover-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--stripe{background-color:var(--c-stripe-color)}.iho-table .vxe-table--render-default .vxe-body--row.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--radio{background-color:var(--c-primary-color-opacity2);text-shadow:0 0 1px}.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--checked,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--current,.iho-table .vxe-table--render-default .vxe-body--row.row--hover.row--radio{background-color:var(--c-primary-color-opacity3);text-shadow:0 0 1px}.iho-table .vxe-body--expanded-column,.iho-table .vxe-table--border-line{border-color:var(--c-border-color)!important}.iho-table .vxe-table--footer-wrapper{border-top-color:var(--c-border-color)!important}.iho-table .border--default .vxe-body--column,.iho-table .border--default .vxe-footer--column,.iho-table .border--default .vxe-header--column,.iho-table .border--inner .vxe-body--column,.iho-table .border--inner .vxe-footer--column,.iho-table .border--inner .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--full .vxe-body--column,.iho-table .border--full .vxe-footer--column,.iho-table .border--full .vxe-header--column{background-image:linear-gradient(var(--c-border-color),var(--c-border-color)),linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .border--default .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--full .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--inner .vxe-header--row:last-child .vxe-header--gutter,.iho-table .border--outer .vxe-header--row:last-child .vxe-header--gutter{background-image:linear-gradient(var(--c-border-color),var(--c-border-color))!important}.iho-table .vxe-table--header-border-line{border-bottom-color:var(--c-border-color)!important}.iho-table .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)!important}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .is--filter-active .vxe-cell--filter .vxe-filter--btn{color:var(--c-primary-color)}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterIcon.is-active{color:var(--c-primary-color)}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;margin:8px 12px;width:240px}.iho-table__filterCheckAllWrapper{display:flex;justify-content:space-between}.iho-table__filterCheckAllWrapper>div{flex:1}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:var(--c-primary-color)}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05);overflow-x:hidden}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;padding:0 8px}.iho-table__filterListItem:hover{background:var(--c-primary-color-opacity2)}.iho-table__filterListItem .n-checkbox,.iho-table__filterListItem .n-radio{width:100%}.iho-table__filterListItem>*{padding:5px 0}.iho-table__filterListItemContent{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:190px}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table__time-picker{position:unset}.iho-table__time-picker .n-input{display:none}.iho-table__time-picker .v-binder-follower-container{height:auto;position:unset}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content{position:unset;transform:none!important}.iho-table__time-picker .v-binder-follower-container .v-binder-follower-content .n-time-picker-panel{box-shadow:none}.iho-table__scrollbar{margin:8px 8px 8px 0;max-height:255px}.iho-table .variable-height .vxe-cell,.iho-table .variable-height .vxe-cell--tree-node,.iho-table .variable-height .vxe-tree-cell{line-height:1.3;max-height:fit-content!important;white-space:break-spaces!important}.iho-table__selectMenu .n-scrollbar-rail__scrollbar{display:none!important}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar,.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{display:unset!important;height:6px;width:6px}.iho-table__selectMenu .n-virtual-list::-webkit-scrollbar-thumb{background:#bfbfbf;border-radius:4px}.iho-table__selectMenu .v-vl-items{min-width:100%;width:max-content}.iho-table__selectOption .n-base-select-option__content{overflow:visible!important;text-overflow:unset!important;word-break:keep-all!important}.iho-table__selectOptionWrapper{align-items:center;display:flex}.iho-select-menu-width{width:var(--iho-select-menu-width)!important}.iho-table .is--checked.vxe-checkbox,.iho-table .is--checked.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--checked.vxe-custom--option,.iho-table .is--checked.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--checked.vxe-export--panel-column-option,.iho-table .is--checked.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--checked.vxe-table--filter-option,.iho-table .is--checked.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-checkbox,.iho-table .is--indeterminate.vxe-checkbox .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-custom--option,.iho-table .is--indeterminate.vxe-custom--option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-export--panel-column-option,.iho-table .is--indeterminate.vxe-export--panel-column-option .vxe-checkbox--icon,.iho-table .is--indeterminate.vxe-table--filter-option,.iho-table .is--indeterminate.vxe-table--filter-option .vxe-checkbox--icon,.iho-table .vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-custom--option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-export--panel-column-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table .vxe-sort--asc-btn.sort--active,.iho-table .vxe-table .vxe-sort--desc-btn.sort--active,.iho-table .vxe-table--filter-option:not(.is--disabled):hover .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--checked.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,.iho-table .vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon,.iho-table .vxe-table--render-default .vxe-cell--checkbox:not(.is--disabled):hover .vxe-checkbox--icon{color:var(--c-primary-color)}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}@font-face{font-family:iho-table-iconfont;src:url(iconfont.ttf) format("truetype")}.iho-table .iho-table--iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iho-table-iconfont!important;font-size:15px;font-style:normal}.iho-table .iho-table-icon-filter{display:inline-block;font-size:17px;transform:translateY(-1px);vertical-align:middle}.iho-table .iho-table-icon-filter:before{content:"\c2001"}.iho-table .iho-table-icon-date-filter{display:inline-block;transform:translateY(-1px)}.iho-table .iho-table-icon-date-filter:before{content:"\c2002"}.iho-table .row--custom{background-color:var(--row-background-color)}.iho-table__colorAndIcon{background-color:var(--color-and-icon-background-color-type);color:var(--color-and-icon-color-type)}.iho-table__htmlRender *{display:inline!important}.iho-table__ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iho-table .vxe-grid[vertical] .vxe-table--header-wrapper.body--wrapper{background:transparent}.iho-table .vxe-grid[vertical] .vxe-cell{min-height:var(--iho-table-vertical-table-min-height,unset)}.iho-table__pagerScrollWrapper{background:#fff;height:30px;overflow:auto;position:absolute;right:1px;width:9px;z-index:3000}.iho-table__pagerScrollWrapper::-webkit-scrollbar{background-color:transparent;height:8px;width:8px}.iho-table__pagerScrollWrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b2b2b2;border:2px dashed transparent;border-radius:5px}.iho-table__pagerScrollWrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table--fixed-left,.iho-table--fixed-right{position:sticky!important;width:calc(var(--iho-table-fixed-width)*1px);z-index:5}.iho-table--fixed-left.vxe-header--column .vxe-resizable.is--line:before,.iho-table--fixed-right.vxe-header--column .vxe-resizable.is--line:before{width:2px}.iho-table--fixed-left{left:calc(var(--iho-table-fixed-left)*1px + 1px)}.iho-table--fixed-right.vxe-header--column{right:calc(var(--iho-table-fixed-right)*1px + var(--c-scrollbar-width))}.iho-table--fixed-right.vxe-body--column{right:calc(var(--iho-table-fixed-right)*1px)}.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-left.vxe-body--column,.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-right.vxe-body--column{background-color:#fff}.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-left.vxe-header--column,.iho-table tr:not(.row--current,.row--hover,.row--checked,.row--radio) .iho-table--fixed-right.vxe-header--column{background-color:var(--c-head-bg-color)}.iho-table tr.row--hover .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--hover.row--stripe .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--stripe .iho-table--fixed-right.vxe-body--column{background-color:var(--c-hover-color)}.iho-table tr.row--stripe .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--stripe .iho-table--fixed-right.vxe-body--column{background-color:var(--c-stripe-color)}.iho-table tr.row--checked .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--checked .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--current .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--current .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--radio .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--radio .iho-table--fixed-right.vxe-body--column{background-color:var(--c-primary-color-opacity2)}.iho-table tr.row--hover.row--checked .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--checked .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--hover.row--current .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--current .iho-table--fixed-right.vxe-body--column,.iho-table tr.row--hover.row--radio .iho-table--fixed-left.vxe-body--column,.iho-table tr.row--hover.row--radio .iho-table--fixed-right.vxe-body--column{background-color:var(--c-primary-color-opacity3)}.iho-table__fixedLeftBorderLeft{border-left:1px solid var(--c-border-color);height:calc(100% - 8px);left:0;overflow:hidden;position:absolute;width:0;z-index:5}.iho-table__fixedLeftShadow{height:calc(100% - 8px);position:absolute;top:0;width:3px;z-index:5}.iho-table__fixedLeftShadow.scrolling--middle{box-shadow:4px 3px 4px 0 rgba(0,0,0,.12)}.iho-table__fixedLeftBorderTop{background:var(--c-border-color);height:1px;left:0;position:absolute;top:0;z-index:6}.iho-table__fixedRightBorderLeft{border-left:1px solid var(--c-border-color);height:calc(100% - 8px);overflow:hidden;position:absolute;top:0;width:3px;z-index:5}.iho-table__fixedRightBorderLeft.scrolling--middle{box-shadow:-4px 3px 4px 0 rgba(0,0,0,.12)}.iho-table__fixedRightBorderTop{background:var(--c-border-color);height:1px;position:absolute;right:0;top:0;z-index:6}.iho-table__fixedRightBorderTop:after{background:var(--c-head-bg-color);content:"";height:var(--c-header-height);position:absolute;right:1px;top:1px;width:calc(var(--c-scrollbar-width) - 1px)}
|