cnhis-design-vue 3.2.3-beta.2 → 3.2.3-beta.3
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/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/calendar/index.d.ts +2 -11
- package/es/components/calendar/src/Calendar.vue.d.ts +1 -11
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.d.ts +7 -0
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -0
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.d.ts +10 -0
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -0
- package/es/components/fabric-chart/src/interface.d.ts +4 -3
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
- package/es/components/node_modules/naive-ui/node_modules/date-fns/docs/logo.svg +26 -0
- package/es/components/node_modules/naive-ui/node_modules/date-fns/docs/logotype.svg +1 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_168.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_169.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_170.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_171.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_172.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_173.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_174.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_175.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_176.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_177.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_178.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_179.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_180.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_181.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_182.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_183.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_184.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_185.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_186.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_187.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_188.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_189.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_190.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_191.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_192.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_193.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_194.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_195.png.js +1 -1
- package/es/shared/assets/img/emoji/emotion_196.png.js +1 -1
- package/es/shared/assets/img/failure.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/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{defineComponent as t,ref as e,withDirectives as n,openBlock as s,createElementBlock as i,normalizeStyle as a,unref as o,createElementVNode as l,createVNode as
|
|
1
|
+
import{defineComponent as t,ref as e,withDirectives as n,openBlock as s,createElementBlock as i,normalizeStyle as a,unref as o,createElementVNode as l,createVNode as r,withCtx as c,createCommentVNode as u,Fragment as d,renderList as p,createBlock as f,createTextVNode as g,toDisplayString as m,vShow as h}from"vue";import{NPopover as v,NTooltip as y,NUpload as M,NUploadTrigger as k,NButton as T}from"naive-ui";import{format as x}from"date-fns";import{useState as C}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import{images as E,alt as I}from"../utils/emoji.js";import{MESSAGE_TYPE as w}from"../constants/index.js";import{uploadFileApi as _}from"../api/index.js";const S={class:"tool-box"},j=l("span",null,[l("i",{class:"chat--iconfont chat--icon-face"})],-1),L={class:"emoji-box"},F=l("span",null,"默认表情",-1),K={class:"list-box"},D=["onClick"],H=["src"],J=[l("i",{class:"chat--iconfont chat--icon-good"},null,-1)],N=["onClick"],O=[l("i",{class:"chat--iconfont chat--icon-image"},null,-1)],A=["onClick"],G=[l("i",{class:"chat--iconfont chat--icon-folder"},null,-1)],X={class:"btn-box"},z=l("span",{class:"tip"},"Enter 发送, Shift + Enter 换行",-1);var B=t({__name:"ChatFooter",setup(t){const B=e(),R=e(""),{state:U,stompClient:q}=C(),{setCurrentSessionItem:P}=b(U);function Q(t){["Enter"].includes(t.key)&&(function(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}(t)||(t.preventDefault(),Y()))}function V(){var t,e;R.value=(null==(e=null==(t=B.value)?void 0:t.innerText)?void 0:e.trim())||""}async function W(t,e){console.log(W,t);const{file:n,name:s}=t.file,i=new FormData;i.append("sender",U.userInfo.id),i.append("file",n);const a=await _(i);if(!a)return console.log("上传失败");Z({chatMessageType:e,msg:e===w.FILE?s:a,url:a})}function Y(){if(!(R.value.length>2e3))return R.value?void Z({msg:R.value}):console.log("请输入内容");console.log("请控制在2000字以内")}async function Z(t){const{chatMessageType:e=w.TEXT,msg:n,url:s}=t,i={msg:n,chatMessageType:e};e===w.FILE&&(i.fileUrl=s),[w.TEXT,w.BLEND].includes(e)&&(B.value.innerHTML="",R.value="");const a=x(new Date,"yyyy-MM-dd HH:mm:ss");U.currentMsg={content:i,sender:U.userInfo.id,id:"",sendTime:a,sending:!0,fail:!1},U.isAppendMsg=!0,P({lastMessageSendTime:a,lastMessage:i.msg,sortTime:a,chatMessageType:i.chatMessageType}),U.isChangeSession=!0;try{q.value.send("/app/chat/send",{},JSON.stringify({chatType:"SINGLE",content:i,receiver:U.currentSessionItem.receiver})),U.currentMsg={...U.currentMsg,fail:!1}}catch(t){U.currentMsg={...U.currentMsg,fail:!0}}finally{U.currentMsg={...U.currentMsg,sending:!1}}}return(t,e)=>n((s(),i("section",{class:"chat-footer",style:a({cursor:o(U).id?"default":"not-allowed"})},[l("div",S,[r(o(v),{placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show"},{trigger:c((()=>[j])),default:c((()=>[l("div",L,[u(' <span>最近使用</span>\r\n\t\t\t\t\t<div class="list-box">\r\n\t\t\t\t\t\t<template v-for="(img, index) in images" :key="index">\r\n\t\t\t\t\t\t\t<i>\r\n\t\t\t\t\t\t\t\t<img :src="img" />\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</div> '),F,l("div",K,[(s(!0),i(d,null,p(o(E),((t,e)=>(s(),i(d,{key:e},[e>0?(s(),f(o(y),{key:0,"show-arrow":!1,trigger:"hover"},{trigger:c((()=>[l("i",{onClick:()=>Z({chatMessageType:o(w).EMOJI,msg:e})},[l("img",{src:t},null,8,H)],8,D)])),default:c((()=>[g(" "+m(o(I)[e-1]||"微笑"),1)])),_:2},1024)):u("v-if",!0)],64)))),128))])])])),_:1}),l("span",{onClick:e[0]||(e[0]=()=>Z({chatMessageType:o(w).EMOJI,msg:0}))},J),r(o(M),{abstract:"",multiple:"",accept:"image/*",onChange:e[1]||(e[1]=t=>W(t,o(w).IMAGE))},{default:c((()=>[r(o(k),{abstract:""},{default:c((({handleClick:t})=>[l("span",{onClick:t},O,8,N)])),_:1})])),_:1}),r(o(M),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:e[2]||(e[2]=t=>W(t,o(w).FILE))},{default:c((()=>[r(o(k),{abstract:""},{default:c((({handleClick:t})=>[l("span",{onClick:t},G,8,A)])),_:1})])),_:1})]),n(l("div",{ref_key:"inputRef",ref:B,class:"input-box",contenteditable:"",onKeydown:Q,onInput:V},null,544),[[h,o(U).id]]),l("div",X,[z,r(o(T),{type:"primary",round:"",disabled:!R.value,onClick:Y},{default:c((()=>[g("发送")])),_:1},8,["disabled"])])],4)),[[h,o(U).id]])}});export{B as default};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="date-fns" />
|
|
2
|
+
/// <reference types="../../components/node_modules/naive-ui/node_modules/date-fns/typings" />
|
|
2
3
|
import { SFCWithInstall } from '../../shared/types';
|
|
3
4
|
export * from './src/types';
|
|
4
5
|
declare const Calendar: SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -228,17 +229,7 @@ declare const Calendar: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
228
229
|
NIcon: any;
|
|
229
230
|
ChevronBackOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
230
231
|
ChevronForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
231
|
-
FullCalendar:
|
|
232
|
-
options: import("vue").PropType<import("@fullcalendar/core/internal-common").a>;
|
|
233
|
-
}, unknown, {
|
|
234
|
-
renderId: number;
|
|
235
|
-
customRenderingMap: Map<string, import("@fullcalendar/core/internal-common").eF<any>>;
|
|
236
|
-
}, {}, {
|
|
237
|
-
getApi(): import("@fullcalendar/core").Calendar;
|
|
238
|
-
buildOptions(suppliedOptions: import("@fullcalendar/core/internal-common").a | undefined): import("@fullcalendar/core/internal-common").a;
|
|
239
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
240
|
-
options: import("vue").PropType<import("@fullcalendar/core/internal-common").a>;
|
|
241
|
-
}>>, {}>;
|
|
232
|
+
FullCalendar: any;
|
|
242
233
|
isSameDay: typeof import("date-fns").isSameDay;
|
|
243
234
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange")[], "select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
244
235
|
showDateNavigation: {
|
|
@@ -221,17 +221,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
221
221
|
NIcon: any;
|
|
222
222
|
ChevronBackOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
223
223
|
ChevronForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
224
|
-
FullCalendar:
|
|
225
|
-
options: PropType<import("@fullcalendar/core/internal-common").a>;
|
|
226
|
-
}, unknown, {
|
|
227
|
-
renderId: number;
|
|
228
|
-
customRenderingMap: Map<string, import("@fullcalendar/core/internal-common").eF<any>>;
|
|
229
|
-
}, {}, {
|
|
230
|
-
getApi(): import("@fullcalendar/core").Calendar;
|
|
231
|
-
buildOptions(suppliedOptions: import("@fullcalendar/core/internal-common").a | undefined): import("@fullcalendar/core/internal-common").a;
|
|
232
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
233
|
-
options: PropType<import("@fullcalendar/core/internal-common").a>;
|
|
234
|
-
}>>, {}>;
|
|
224
|
+
FullCalendar: any;
|
|
235
225
|
isSameDay: typeof isSameDay;
|
|
236
226
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange")[], "select" | "eventClick" | "eventDrag" | "eventResize" | "dateChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
237
227
|
showDateNavigation: {
|
|
@@ -699,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
699
699
|
handleInitConditions: () => Promise<void>;
|
|
700
700
|
validate: () => Promise<unknown>;
|
|
701
701
|
saveAdd: () => void;
|
|
702
|
+
/**
|
|
703
|
+
* 改变展示方式
|
|
704
|
+
*/
|
|
702
705
|
cancelSaveAdd: () => void;
|
|
703
706
|
checkActionList: () => boolean;
|
|
704
707
|
NSpin: any;
|
|
@@ -1447,9 +1450,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1447
1450
|
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
|
|
1448
1451
|
};
|
|
1449
1452
|
NSelect: any;
|
|
1450
|
-
/**
|
|
1451
|
-
* 改变展示方式
|
|
1452
|
-
*/
|
|
1453
1453
|
NPopover: any;
|
|
1454
1454
|
CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
1455
1455
|
updateUnchangedValue: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,reactive as t,computed as
|
|
1
|
+
import{defineComponent as e,ref as r,reactive as t,computed as s,onMounted as o,onBeforeUnmount as a,openBlock as i,createElementBlock as l,normalizeStyle as n,unref as u,createElementVNode as p,Fragment as c,createVNode as h,mergeProps as m,createCommentVNode as d}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import w from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import{useBirthProcessChart as g}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as C}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";import{useElectrocardiogramChart as j}from"./hooks/electrocardiogram/useElectrocardiogramChart.js";import{useNewBirthProcessChart as y}from"./hooks/newBirthProcess/useNewBirthProcessChart.js";var P=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent","click:grid","eventClick"],setup(e,{expose:P,emit:x}){const I=e,b=r(null),M=r(),R=t({show:!1,point:{x:0,y:0},list:[]}),B=t({show:!1,point:{x:0,y:0},list:[],target:null}),A=s((()=>{var e;return null==(e=M.value)?void 0:e.wrapperEl})),E=s((()=>({width:`${I.data.width||800}px`,height:`${I.data.height||500}px`}))),{propItems:S,redrawPoints:T,select:_,clickMenu:F,useMeasureRuler:G,useCaliper:$,useCaliperRuler:q,updatePolyline:D,getGridInfo:H}=function(){const e=[M,I,x,b,R,B];switch(I.type){case"birthProcess":return g(...e);case"surgicalAnesthesia":return k(...e);case"electrocardiogram":return j(...e);case"newBirthProcess":return y(...e);default:return C(...e)}}();return o((()=>{M.value=new f.Canvas(b.value,{width:S.canvasWidth,height:S.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{var e,r,t,s;null==(r=null==(e=M.value)?void 0:e.off)||r.call(e),null==(s=null==(t=M.value)?void 0:t.clear)||s.call(t)})),P({redrawPoints:T,select:_,canvas:M,useMeasureRuler:G,useCaliper:$,useCaliperRuler:q,updatePolyline:D,getGridInfo:H}),(e,r)=>(i(),l("div",{class:"c-fabric-chart",style:n(u(E))},[p("canvas",{ref_key:"canvasRef",ref:b},null,512),u(A)?(i(),l(c,{key:0},[h(v,m({propItems:u(S)},R),null,16,["propItems"]),h(u(w),m({propItems:u(S)},B,{show:B.show,"onUpdate:show":r[0]||(r[0]=e=>B.show=e),onClickMenu:u(F)}),null,16,["propItems","show","onClickMenu"])],64)):d("v-if",!0)],4))}});export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as s,defaultStyle as l,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}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 w}from"lodash-es";import"../temperature/useShadow.js";import{format as x}from"date-fns";import"naive-ui";import"@vueuse/core";function b(b,j,P,C,E){const{computedX:S,computedY:G,getXValue:T,getYValue:L}=c(j),{getEqualXTypes:Y,handleAddPrevent:M,isGridLimit:A,setPrevAndNextPoint:X,getPointEventProps:I}=h(b,P,j),{xAxis:H,grid:W,originX:N,originY:O,xCellWidth:V,endY:D,startTime:R,leftAddAreaWidth:$,leftScales:B,rightScales:F,yCellHeight:q,endX:z,scaleValues:J,canvasWidth:K,borderStyle:Q,rightAddAreaWidth:U,event:Z,originYCervix:_,other:tt,canvasHeight:et}=j,ot=k(J),nt=new Set;function it(){ot.filter((t=>t.show)).forEach(((t,s)=>{var l;const a=[],u=[],c=[];null==(l=t.data)||l.forEach(((l,d)=>{!function(l,d,f){let p,h;const{pointAttr:g={},lineAttr:m={},title:v="",key:y,type:k="circle",childbirthStyle:w={}}=t,x=t.data[f+1],j=ut(x,t);if(l&&j&&!d.breakpoint)h=e([...l,...j],{...m});else if(l&&!j&&!d.breakpoint){const o=ut(x,t);h=o?e([...l,...o],{...m}):null}let E,S;if(d.childbirth){const t=l[1]+q;E=o([l[0],l[1],t],w),c.push(E),S=n([l[0]+V/2,t-q/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(S)}const G=u[f-1],Y={origin:{data:d,title:v,key:y||"",dataIndex:s,index:f},leftLine:G,rightLine:h,arrowGroup:E,arrowGroupText:S,...g,...I()};l&&(G||(Y.leftLine=null),p=r(k,{left:l[0],top:l[1],...Y}));u.push(h),p&&(!function(t){Z.hovered&&(t.on("mouseover",(()=>{at(t,"hover")})),t.on("mouseout",(()=>{C.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{lt(t),function(t){var e,o,n,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(o=t.rightLine)||o.setCoords().set({x1:t.left,y1:t.top}),null==(n=t.arrowGroup)||n.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+V/2,top:t.top+q/2})}(t),Z.hovered&&at(t)})),t.on("mouseup",(e=>{if(C.show=!1,1===e.button){const{key:e}=t.origin,o={...t.origin,data:{...t.origin.data,time:T(t.left),value:L(e,t.top)}};b.value.discardActiveObject(),P("change",o),rt(o,"change")}}))}(p),a.push(p),nt.add(p))}(ut(l,t),l,d)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));X(t),Promise.all(c).then((o=>{b.value.add(...e,...t,...o),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function rt(t,e="add"){const{dataIndex:o,data:n,index:i,key:r}=t,s=ot.find((t=>t.key===r));switch(e){case"remove":s.data.splice(i,1);break;case"change":s.data[i]=n;break;default:{const t=g(n.time,s.data);s.data.splice(t,0,n);break}}st()}function st(){var t;nt.size&&(null==(t=b.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.arrowGroup)&&e.push(null==t?void 0:t.arrowGroup),(null==t?void 0:t.arrowGroupText)&&e.push(null==t?void 0:t.arrowGroupText)})),e}([...nt]))),nt.clear(),it()}function lt(t){const e=t.prevPoint?t.prevPoint.left:N,o=t.nextPoint?t.nextPoint.left:z;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<_&&t.set("top",_),t.top<O&&t.set("top",O),t.top>D&&t.set("top",D),t.left<e&&t.set("left",e),t.left>o&&t.set("left",o)}function at(t,e="moving"){const{title:o,key:n,data:i}=t.origin;C.point={x:t.left,y:t.top},C.list=[`${o} ${"hover"===e?i.value:L(n,t.top)}`,`时间 ${T(t.left).slice(-5)}`],C.show=!0}function ut(t,e){if(m(t)&&function(t){const e=R+864e5,o=v(t);return o>=R&&o<=e}(t.time)){const o=S(t.time),n=G(e.key,e.range,t.value);return[o,n<O?O:n>D?D:n]}}function ct(t,e){return t+1>e[1]?e[0]:t+1}return u(b,j),function(){const e=new t.Rect({...Q,width:K-$-U-1,height:D-1,left:$,top:0,fill:"transparent"});b.value.add(e)}(),function(){function e(e,o="left"){let r="left"===o?$:z;e.forEach(((e,o)=>{const{range:s,spaceValue:u,width:c,title:h,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=e,j=[],P=[],C=r+c/2,E=y(s,u),S=E.length
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as s,defaultStyle as l,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}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 w}from"lodash-es";import"../temperature/useShadow.js";import{format as x}from"date-fns";import"naive-ui";import"@vueuse/core";function b(b,j,P,C,E){const{computedX:S,computedY:G,getXValue:T,getYValue:L}=c(j),{getEqualXTypes:Y,handleAddPrevent:M,isGridLimit:A,setPrevAndNextPoint:X,getPointEventProps:I}=h(b,P,j),{xAxis:H,grid:W,originX:N,originY:O,xCellWidth:V,endY:D,startTime:R,leftAddAreaWidth:$,leftScales:B,rightScales:F,yCellHeight:q,endX:z,scaleValues:J,canvasWidth:K,borderStyle:Q,rightAddAreaWidth:U,event:Z,originYCervix:_,other:tt,canvasHeight:et}=j,ot=k(J),nt=new Set;function it(){ot.filter((t=>t.show)).forEach(((t,s)=>{var l;const a=[],u=[],c=[];null==(l=t.data)||l.forEach(((l,d)=>{!function(l,d,f){let p,h;const{pointAttr:g={},lineAttr:m={},title:v="",key:y,type:k="circle",childbirthStyle:w={}}=t,x=t.data[f+1],j=ut(x,t);if(l&&j&&!d.breakpoint)h=e([...l,...j],{...m});else if(l&&!j&&!d.breakpoint){const o=ut(x,t);h=o?e([...l,...o],{...m}):null}let E,S;if(d.childbirth){const t=l[1]+q;E=o([l[0],l[1],t],w),c.push(E),S=n([l[0]+V/2,t-q/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(S)}const G=u[f-1],Y={origin:{data:d,title:v,key:y||"",dataIndex:s,index:f},leftLine:G,rightLine:h,arrowGroup:E,arrowGroupText:S,...g,...I()};l&&(G||(Y.leftLine=null),p=r(k,{left:l[0],top:l[1],...Y}));u.push(h),p&&(!function(t){Z.hovered&&(t.on("mouseover",(()=>{at(t,"hover")})),t.on("mouseout",(()=>{C.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{lt(t),function(t){var e,o,n,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(o=t.rightLine)||o.setCoords().set({x1:t.left,y1:t.top}),null==(n=t.arrowGroup)||n.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+V/2,top:t.top+q/2})}(t),Z.hovered&&at(t)})),t.on("mouseup",(e=>{if(C.show=!1,1===e.button){const{key:e}=t.origin,o={...t.origin,data:{...t.origin.data,time:T(t.left),value:L(e,t.top)}};b.value.discardActiveObject(),P("change",o),rt(o,"change")}}))}(p),a.push(p),nt.add(p))}(ut(l,t),l,d)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));X(t),Promise.all(c).then((o=>{b.value.add(...e,...t,...o),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function rt(t,e="add"){const{dataIndex:o,data:n,index:i,key:r}=t,s=ot.find((t=>t.key===r));switch(e){case"remove":s.data.splice(i,1);break;case"change":s.data[i]=n;break;default:{const t=g(n.time,s.data);s.data.splice(t,0,n);break}}st()}function st(){var t;nt.size&&(null==(t=b.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.arrowGroup)&&e.push(null==t?void 0:t.arrowGroup),(null==t?void 0:t.arrowGroupText)&&e.push(null==t?void 0:t.arrowGroupText)})),e}([...nt]))),nt.clear(),it()}function lt(t){const e=t.prevPoint?t.prevPoint.left:N,o=t.nextPoint?t.nextPoint.left:z;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<_&&t.set("top",_),t.top<O&&t.set("top",O),t.top>D&&t.set("top",D),t.left<e&&t.set("left",e),t.left>o&&t.set("left",o)}function at(t,e="moving"){const{title:o,key:n,data:i}=t.origin;C.point={x:t.left,y:t.top},C.list=[`${o} ${"hover"===e?i.value:L(n,t.top)}`,`时间 ${T(t.left).slice(-5)}`],C.show=!0}function ut(t,e){if(m(t)&&function(t){const e=R+864e5,o=v(t);return o>=R&&o<=e}(t.time)){const o=S(t.time),n=G(e.key,e.range,t.value);return[o,n<O?O:n>D?D:n]}}function ct(t,e){return t+1>e[1]?e[0]:t+1}return u(b,j),function(){const e=new t.Rect({...Q,width:K-$-U-1,height:D-1,left:$,top:0,fill:"transparent"});b.value.add(e)}(),function(){function e(e,o="left"){let r="left"===o?$:z;e.forEach(((e,o)=>{const{range:s,spaceValue:u,width:c,title:h,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=e,j=[],P=[],C=r+c/2,E=y(s,u),S=E.length,{lineXMain:G,lineXSub:T,textLeft:L}=d(v,r,c);E.forEach(((t,o)=>{const n=D-o*q*k,i=0===o?D-8:o!==E.length-1||O||_&&"FHR"!==m?n:O+8;!w||(0===o||o===S-1)&&!x||j.push(f(String(t),e,L,i)),P.push(...p(e,o,G,T,n,q,O,S))}));const Y=new t.Rect({...a,strokeWidth:.5,width:c,height:D,left:C,top:D/2}),M=n([C,O>0?O-q/2:q/2],{value:String(h),...i,...g}),A=new t.Group([...P,...j,Y,...M?[M]:[]],{objectCaching:!1,...l});b.value.add(A),A.sendToBack(),r+=c}))}e(B),e(F,"right")}(),function(){const{show:e,startTime:o,range:r=[0,23],position:s="top",style:a}=H.time,{show:u,range:c=[0,23],position:d,style:f}=H.processTime;if(e||u){const p=[],h=[],g=[],m=[],v=N+V/2,y=q/2;for(let t=0;t<W.mainXCell;t++){if(e){const e=0===t?+o.slice(11,13):ct(w(p),r);p.push(e);const l="top"===s?O-y:D+y;g.push(n([v+t*V,l],{value:String(e),...i,...a||{}}))}if(u){const e=0===t?c[0]:w(h)+1;h.push(e);const o="top"===d?y:et-y;m.push(n([v+t*V,o],{value:String(e),...i,...f||{}}))}}const k=new t.Group([...g,...m],{objectCaching:!1,...l});b.value.add(k),b.value.sendToBack(k)}}(),function(){var t;const o=Object.values(tt),n=[],i={},r=ot.find((t=>"cervix"===t.key&&t.show)),s=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function l(t,e){const{key:o,range:n}=r||{},i=G(o,n,10),s=[0,e],l=[-e/t,0],a=[(D-i-e)/t,D-i],u=[z-N,t*(z-N)+e];let c=[],d=[];function f([o,n]){return Math.abs(n-t*o-e)<=1}function p([t,e]){const[o,n]=[...h([t,e])];return o>=N&&o<=z&&n>=i&&n<=D}function h([t,e]){return[N+t,D-e]}return f(s)&&p(s)&&(c=h(s)),f(l)&&p(l)&&(c=h(l)),f(a)&&p(a)&&(d=h(a)),f(u)&&p(u)&&(d=h(u)),[...c,...d]}o.forEach((t=>{if(!t.show)return;const{key:o}=t;switch(o){case"fetalPresentation":{const{range:i,show:r}=ot.find((t=>t.key===o));if(r){const r=G(o,i,0);n.push(e([N,r,z,r],{...t}))}break}case"alert":if(s){const{key:o,range:a}=r||{},u=216e5,c={time:x(new Date(v(s.time)+u),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[S(s.time)-N,D-G(o,a,s.value)],[p,h]=[S(c.time)-N,D-G(o,a,c.value)],g=(h-f)/(p-d),m=f-d*g,y=l(g,m);y.length>0&&(n.push(e(y,{...t})),Object.assign(i,{k:g,b:m}))}break;case"handling":if(s){const{k:o,b:r}=i,a=144e5,u=l(o,r-(S(x(new Date(v(s.time)+a),"yyyy-MM-dd HH:mm"))-S(s.time))*o);u.length>0&&n.push(e(u,{...t}))}}})),b.value.add(...n)}(),it(),function(){function t(t,e){const o=ot.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:o,key:t.key},pointer:e}}j.event.evented&&b.value.on("mouse:up",(e=>{if(3===e.button){const{x:o=0,y:n=0}=e.pointer||{};o>=N&&o<=z&&n>=O&&n<=D&&(E.point={x:o,y:n},E.show=!0,e.target?(E.target=e.target,E.list=["删除节点"],[...nt].forEach((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&E.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(E.target=null,E.list=["新增节点"],ot.filter((t=>t.show)).forEach((i=>{if(!Y([...nt],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<_)return;E.list.push(t(i,e.pointer))}})),1===E.list.length&&(E.show=!1,M("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=K-U/2;function e(t,e){if(!t.length)return;let n=O;const i=[];t.forEach((t=>{const o=t.title.split("").join("\n"),r=J.findIndex((e=>e.key===t.key)),{text:l,icon:a}=s(o,t,{text:{originY:"top",left:e,top:n},icon:{left:e,topY:n,originY:"top",origin:{type:t.type,dataIndex:r},...j.event}},"vertical");var u;n+=l.height+a.height+15,(u=a).on("moving",(()=>{u.set("originY","center"),A(u)?(lt(u),at(u)):C.show=!1})),u.on("mouseup:before",(t=>{if(C.show=!1,0===t.e.button&&A(u))if(Y([...nt],u.left,"key").includes(u.origin.key))M("repeat");else{const t={data:{time:T(u.left),value:L(u.origin.key,u.top)},...u.origin};P("add",t),rt(t)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(u)})),i.push(l,a)})),o(i),b.value.add(...i)}function o(t){const e=w(t),o=(D-O)/2,n=(e.height+e.top-O)/2;t.forEach((t=>{const e=t.top+o-n;t.set({top:e,originTop:e})}))}e(B,$/2),e(F,t)}(),{clickMenu:function({item:t,target:e}){const o={...t.origin};"remove"===t.mode?(P("remove",o),rt(o,"remove")):(Object.assign(o,{data:{time:T(t.pointer.x),value:L(t.origin.key,t.pointer.y)}}),P("add",o),rt(o))},redrawPoints:st}}export{b as useBirthProcess};
|
|
@@ -8,3 +8,4 @@ export * from './birthProcess/useBirthProcessChart';
|
|
|
8
8
|
export * from './temperature/useTemperatureChart';
|
|
9
9
|
export * from './surgicalAnesthesia/useSurgicalAnesthesiaChart';
|
|
10
10
|
export * from './electrocardiogram/useElectrocardiogramChart';
|
|
11
|
+
export * from './newBirthProcess/useNewBirthProcessChart';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{defaultBorderStyle,defaultLineStyle,defaultRectStyle,defaultStyle,defaultTextStyle,drawArrow,drawLine,drawPoint,drawText,drawTextAndIconGroup,drawTextGroup}from"./useDraw.js";export{useGrid}from"./useGrid.js";export{useBirthProcessCumputedPoint,useCumputedPoint,useElectrocardiogramCumputedPoint}from"./useCumputedPoint.js";export{bus,useCanvasEvent}from"./useEvent.js";export{drawScaleLine,drawScaleNumber,getScaleInfo}from"./useScaleColumn.js";export{useCommon}from"./useCommon.js";export{useBirthProcessChart}from"./birthProcess/useBirthProcessChart.js";export{useTemperatureChart}from"./temperature/useTemperatureChart.js";export{useSurgicalAnesthesiaChart}from"./surgicalAnesthesia/useSurgicalAnesthesiaChart.js";export{useElectrocardiogramChart}from"./electrocardiogram/useElectrocardiogramChart.js";
|
|
1
|
+
export{defaultBorderStyle,defaultLineStyle,defaultRectStyle,defaultStyle,defaultTextStyle,drawArrow,drawLine,drawPoint,drawText,drawTextAndIconGroup,drawTextGroup}from"./useDraw.js";export{useGrid}from"./useGrid.js";export{useBirthProcessCumputedPoint,useCumputedPoint,useElectrocardiogramCumputedPoint}from"./useCumputedPoint.js";export{bus,useCanvasEvent}from"./useEvent.js";export{drawScaleLine,drawScaleNumber,getScaleInfo}from"./useScaleColumn.js";export{useCommon}from"./useCommon.js";export{useBirthProcessChart}from"./birthProcess/useBirthProcessChart.js";export{useTemperatureChart}from"./temperature/useTemperatureChart.js";export{useSurgicalAnesthesiaChart}from"./surgicalAnesthesia/useSurgicalAnesthesiaChart.js";export{useElectrocardiogramChart}from"./electrocardiogram/useElectrocardiogramChart.js";export{useNewBirthProcessChart}from"./newBirthProcess/useNewBirthProcessChart.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
|
+
import { AnyObject } from '../../../../../shared/types';
|
|
4
|
+
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
|
5
|
+
export declare function useNewBirthProcess(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
|
6
|
+
redrawPoints: () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultTextStyle as n,defaultStyle as i,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as s,drawScaleNumber as u,drawScaleLine as a}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as f,getTime as h,getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as p,last as m}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function v(v,g,y,b,w){const{computedX:x,computedY:S,getXValue:j,getYValue:k}=l(g),{getEqualXTypes:E,handleAddPrevent:L,isGridLimit:P,setPrevAndNextPoint:C,getPointEventProps:X}=c(v,y,g),{xAxis:G,grid:T,originX:A,originY:N,xCellWidth:V,endY:Y,startTime:M,leftScales:$,rightScales:B,yCellHeight:H,endX:W,scaleValues:q,canvasWidth:z,borderStyle:D,event:F,other:I,canvasHeight:R}=g,J=p(q),K=new Set;function O(){J.filter((t=>t.show)).forEach(((t,r)=>{var l;const s=[],u=[],a=[];null==(l=t.data)||l.forEach(((l,c)=>{!function(l,c,f){let h,d;const{pointAttr:p={},lineAttr:m={},title:v="",key:g,type:y="circle",childbirthStyle:w={}}=t,x=t.data[f+1],S=U(x,t);if(l&&S&&!c.breakpoint)d=Q([...l,...S],m);else if(l&&!S&&!c.breakpoint){const e=U(x,t);d=e?Q([...l,...e],m):null}if(c.childbirth){const t=l[0]+V,i=l[1]+H/2,o=Q([l[0],l[1],t,i],m);a.push(o);const r=e([t,i],{value:String(c.childbirth),...n,...w,backgroundColor:"#fff"});a.push(r)}const E=u[f-1],L={origin:{data:c,title:v,key:g||"",dataIndex:r,index:f},leftLine:E,rightLine:d,...p,...X(),...i};l&&(E||(L.leftLine=null),h=o(y,{left:l[0],top:l[1],...L}));u.push(d),h&&(!function(t){F.hovered&&(t.on("mouseover",(()=>{!function(t,e="moving"){const{title:n,key:i,data:o}=t.origin;b.point={x:t.left,y:t.top},b.list=[`${n} ${"hover"===e?o.value:k(i,t.top)}`,`时间 ${j(t.left).slice(-5)}`],b.show=!0}(t,"hover")})),t.on("mouseout",(()=>{b.show=!1})))}(h),s.push(h),K.add(h))}(U(l,t),l,c)})),Promise.all(s).then((t=>{const e=u.filter((t=>t));C(t),Promise.all(a).then((n=>{v.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function Q([e,n,o,r],l){return new t.Polyline([{x:e,y:n},{x:o,y:n},{x:o,y:r}],{...l,fill:"transparent",...i})}function U(t,e){if(f(t)&&function(t){const e=M+864e5,n=h(t);return n>=M&&n<=e}(t.time)){const n=x(t.time),i=S(e.key,e.range,t.value);return[n,i<N?N:i>Y?Y:i]}}function Z(t,e,n=1){return t+n>e[1]?e[0]:t+n}return r(v,g),function(){const e=new t.Rect({...D,width:W-A,height:Y-N,left:A,top:N,fill:"transparent"});v.value.add(e)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:W;o.forEach(((o,r)=>{const{range:f,spaceValue:h,width:p,title:m,titleStyle:g,unit:y,key:b,position:w="center",spaceGridNumber:x=1,showNumber:S,showMaxMinNumber:j}=o,k=[],E=[],L=d(f,h),P=L.length,{lineXMain:C,lineXSub:X,textLeft:G}=s(w,c,p);L.forEach(((t,e)=>{const n=Y-e*H*x;!S||(0===e||e===P-1)&&!j||k.push(u(String(t),o,G,n)),E.push(...a(o,e,C,X,n,H,N,P))}));const T=e([c+l,N+(Y-N)/2],{value:String(m+"("+y+")"),...n,originX:"left",angle:-90,...g}),A=new t.Group([...E,...k,...T?[T]:[]],{objectCaching:!1,...i});v.value.add(A),A.sendToBack(),c+=p}))}o($),o(B,"right")}(),function(){const{show:o,startTime:r,range:l=[0,20],position:s="top",style:u,spaceGridNumber:a=2,spaceValue:c=2}=G.time;if(o){const f=[],h=[],d=[],p=H/2;for(let t=0,i=T.mainXCell/2;t<i+1;t++)if(o){const i=0===t?+r.slice(11,13):Z(m(f),l,c);f.push(i);const o="top"===s?N-p:Y+p;h.push(e([A+t*V*a,o],{value:String(i),...n,...u||{}}))}const g=new t.Group([...h,...d],{objectCaching:!1,...i});v.value.add(g),v.value.sendToBack(g)}}(),function(){const{alertLineList:t=[]}=I;t.length<1||t.forEach((t=>{const{style:n,data:i=[]}=t;if(i.length<1)return;const o=[],r=J.find((t=>"cervix"===t.key));i.forEach(((t,l)=>{const s=U(t,r),u=U(i[l+1],r);s&&!u&&o.push(e([s[0],N-10],{value:i[0].value+(r.unit||"cm"),fill:n.stroke||"#000"})),s&&u&&o.push(Q([...s,...u],n))})),v.value.add(...o)}))}(),O(),{redrawPoints:function(){var t;K.size&&(null==(t=v.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)})),e}([...K]))),K.clear(),O()}}}export{v as useNewBirthProcess};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
|
+
import { AnyObject } from '../../../../../shared/types';
|
|
4
|
+
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
|
5
|
+
export declare function useNewBirthProcessChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
|
6
|
+
propItems: any;
|
|
7
|
+
redrawPoints: Ref<any>;
|
|
8
|
+
select: Ref<any>;
|
|
9
|
+
clickMenu: Ref<any>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as e,computed as t,reactive as a,watch as l}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as i}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{useNewBirthProcess as u}from"./useNewBirthProcess.js";function s(s,o,d,n,v,c){const h=e(),m=e(),p=e(),g=t((()=>o.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),x=t((()=>o.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),w=t((()=>{var e;return null==(e=g.value)?void 0:e.reduce(((e,t)=>e+=t.width),0)})),f=t((()=>{var e;const{width:t}=o.data;return t-((null==(e=x.value)?void 0:e.reduce(((e,t)=>e+=t.width),0))||10)})),b=t((()=>o.data.grid.mainXCell||20)),j=t((()=>o.data.grid.mainYCell||8)),y=t((()=>(f.value-w.value)/b.value)),S=t((()=>{var e;const{xAxis:t,height:a,other:l}=o.data,r=Object.values(t).reduce(((e,t)=>(t.show&&e++,e)),0),i=(null!=(e=null==l?void 0:l.alertLineList.length)?e:0)>0;return a/(j.value+r+(i?1:0))})),A=t((()=>{var e;const{xAxis:t,other:a}=o.data,l=Object.values(t).reduce(((e,t)=>(t.show&&"top"===t.position&&e++,e)),0),r=(null!=(e=null==a?void 0:a.alertLineList.length)?e:0)>0;return S.value*(l||r?1:0)})),C=t((()=>{const{xAxis:e,height:t}=o.data,a=Object.values(e).reduce(((e,t)=>(t.show&&"bottom"===t.position&&e++,e)),0);return t-S.value*a})),V=t((()=>i(o.data.xAxis.time.startTime))),X=t((()=>36e5/y.value)),Y=t((()=>{const{scaleValues:e}=o.data,t=e.find((e=>"cervix"===e.key));return S.value/((null==t?void 0:t.spaceValue)||1)})),L=t((()=>{var e;return(null==(e=o.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),N=a({canvasWidth:o.data.width,canvasHeight:o.data.height,borderStyle:{...r,...o.data.borderStyle||{}},selectionStyle:o.data.selectionStyle||{},grid:o.data.grid,other:o.data.other,originX:w.value,endX:f.value,originY:A.value,endY:C.value,xCellWidth:y.value,yCellHeight:S.value,gridXNumber:b.value,gridYNumber:j.value,xAxis:o.data.xAxis,leftScales:g.value,rightScales:x.value,startTime:V.value,timeXCell:X.value,cervixYCell:Y.value,scaleValues:o.data.scaleValues,event:L.value});return l((()=>s.value),(e=>{e&&function(){const{redrawPoints:e}=u(s,N,d,v);m.value=e}()}),{immediate:!0}),{propItems:N,redrawPoints:m,select:h,clickMenu:p}}export{s as useNewBirthProcessChart};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import { fabric } from '../../../shared/utils/fabricjs';
|
|
3
3
|
import { AnyObject } from '../../../shared/types';
|
|
4
|
-
export declare type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | undefined;
|
|
4
|
+
export declare type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | 'newBirthProcess' | undefined;
|
|
5
|
+
export declare type ILineCoordinate = [number, number, number, number];
|
|
5
6
|
interface IEvent {
|
|
6
7
|
selectable: boolean;
|
|
7
8
|
evented: boolean;
|
|
@@ -31,7 +32,7 @@ interface IGrid {
|
|
|
31
32
|
subSecondXCell: number;
|
|
32
33
|
mainYCell: number;
|
|
33
34
|
subYCell: number;
|
|
34
|
-
surplusCell:
|
|
35
|
+
surplusCell: ILineCoordinate;
|
|
35
36
|
mainLineStyle?: ImainLineStyle;
|
|
36
37
|
subLineStyle?: fabric.ILineOptions;
|
|
37
38
|
subSecondLineStyle?: fabric.ILineOptions;
|
|
@@ -79,7 +80,7 @@ export interface IPropItems {
|
|
|
79
80
|
itemList: Array<any>;
|
|
80
81
|
getRightInfo: AnyObject;
|
|
81
82
|
config: AnyObject;
|
|
82
|
-
surplusCell:
|
|
83
|
+
surplusCell: ILineCoordinate;
|
|
83
84
|
}
|
|
84
85
|
export interface IPoint {
|
|
85
86
|
time: string;
|
|
@@ -457,9 +457,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
457
457
|
requiredDisable: boolean;
|
|
458
458
|
hide: boolean;
|
|
459
459
|
}>;
|
|
460
|
+
isHighlightRow: boolean;
|
|
460
461
|
idx: number;
|
|
461
462
|
isHighlight: boolean;
|
|
462
|
-
isHighlightRow: boolean;
|
|
463
463
|
}>;
|
|
464
464
|
EditDialog: import("vue").DefineComponent<{
|
|
465
465
|
visible: {
|
|
@@ -575,9 +575,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
575
575
|
requiredDisable: boolean;
|
|
576
576
|
hide: boolean;
|
|
577
577
|
}>;
|
|
578
|
+
isHighlightRow: boolean;
|
|
578
579
|
idx: number;
|
|
579
580
|
isHighlight: boolean;
|
|
580
|
-
isHighlightRow: boolean;
|
|
581
581
|
}>;
|
|
582
582
|
isArray: {
|
|
583
583
|
(value?: any): value is any[];
|
|
@@ -282,8 +282,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
282
282
|
requiredDisable: boolean;
|
|
283
283
|
hide: boolean;
|
|
284
284
|
}>;
|
|
285
|
+
isHighlightRow: boolean;
|
|
285
286
|
idx: number;
|
|
286
287
|
isHighlight: boolean;
|
|
287
|
-
isHighlightRow: boolean;
|
|
288
288
|
}>;
|
|
289
289
|
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg width="32px" height="26px" viewBox="0 0 32 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<!-- Generator: Sketch 3.7.1 (28215) - http://www.bohemiancoding.com/sketch -->
|
|
4
|
+
<title>Slice 1</title>
|
|
5
|
+
<desc>Created with Sketch.</desc>
|
|
6
|
+
<defs></defs>
|
|
7
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
8
|
+
<g id="date-fns-mini-logo" fill="#770C56">
|
|
9
|
+
<g id="Page-1">
|
|
10
|
+
<g id="logo">
|
|
11
|
+
<g id="Page-1">
|
|
12
|
+
<g id="Solid-logo">
|
|
13
|
+
<g id="White-logo">
|
|
14
|
+
<path d="M0.0773377951,12.9617647 C0.0773377951,10.4657522 0.541359926,8.11201106 1.46941811,5.90047059 C2.39747629,3.68893013 3.73386003,1.72977324 5.47860941,0.0229411764 L8.98665179,0.0229411764 C5.34866372,3.58342956 3.52969697,7.89632761 3.52969697,12.9617647 C3.52969697,18.0272018 5.34866372,22.3400999 8.98665179,25.9005883 L5.47860941,25.9005883 C3.73386003,24.1937561 2.39747629,22.2345993 1.46941811,20.0230588 C0.541359926,17.8115184 0.0773377951,15.4577772 0.0773377951,12.9617647 L0.0773377951,12.9617647 L0.0773377951,12.9617647 L0.0773377951,12.9617647 Z M31.4378137,12.9617647 C31.4378137,15.4577772 30.9737916,17.8115184 30.0457334,20.0230588 C29.1176752,22.2345993 27.7812915,24.1937561 26.0365421,25.9005883 L22.5284998,25.9005883 C26.1664878,22.3400999 27.9854545,18.0272018 27.9854545,12.9617647 C27.9854545,7.89632761 26.1664878,3.58342956 22.5284998,0.0229411764 L26.0365421,0.0229411764 C27.7812915,1.72977324 29.1176752,3.68893013 30.0457334,5.90047059 C30.9737916,8.11201106 31.4378137,10.4657522 31.4378137,12.9617647 L31.4378137,12.9617647 L31.4378137,12.9617647 L31.4378137,12.9617647 Z" id="Parans"></path>
|
|
15
|
+
<g id="Hands" transform="translate(12.954081, 1.720588)">
|
|
16
|
+
<rect id="Hand" x="0" y="0" width="2.32013386" height="13.1911764"></rect>
|
|
17
|
+
<polygon id="Hand" points="2.3189551 13.1499342 0.815087916 11.6629302 10.2484366 2.3353599 11.7523038 3.82236388 2.3189551 13.1499342"></polygon>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 176 33"><g fill="#770C56" fill-rule="evenodd"><path d="M.1 16.5A22.7 22.7 0 017.1 0h4.4a22 22 0 00-7 16.5 22 22 0 007 16.4H7A22.5 22.5 0 01.1 16.5zm40.2 0a22.7 22.7 0 01-7 16.4H29a22 22 0 007-16.4 22 22 0 00-7-16.5h4.5a22.5 22.5 0 016.9 16.5z" fill-rule="nonzero"/><path d="M16.6 2.2h3v16.7h-3z"/><path d="M19.6 18.9l-2-2L29.7 5.2l2 2zM53.4 17.5c0 2 .5 3.8 1.4 5.2.8 1.4 2.2 2 4.2 2 1.5 0 2.7-.6 3.7-1.9 1-1.3 1.4-3.1 1.4-5.5 0-2.5-.5-4.3-1.5-5.5a4.7 4.7 0 00-3.7-1.7c-1.6 0-3 .6-4 1.8-1 1.3-1.5 3.1-1.5 5.6zm5-10.3c1.4 0 2.7.3 3.7 1 .5.3 1.2 1 2 1.9V.3h3v26.6h-2.9v-2.7a7 7 0 01-2.7 2.6c-1 .5-2.2.8-3.5.8-2.2 0-4-.9-5.6-2.7a10.6 10.6 0 01-2.4-7.2c0-2.9.7-5.3 2.2-7.4a7 7 0 016.1-3zm15.1 14.6c0 1 .4 1.7 1 2.2.8.5 1.6.8 2.5.8 1.2 0 2.3-.3 3.3-.8a4.5 4.5 0 002.7-4.3V17l-1.5.6-1.8.4-2 .2c-1.2.2-2 .4-2.7.8-1 .5-1.5 1.4-1.5 2.7zm8-6.6c.7-.1 1.2-.4 1.4-1 .2-.2.2-.7.2-1.2 0-1.1-.4-1.9-1.1-2.4-.8-.5-2-.8-3.4-.8-1.7 0-3 .5-3.6 1.4-.4.5-.7 1.3-.8 2.3h-3c0-2.4.8-4 2.3-5 1.5-1 3.2-1.4 5.1-1.4 2.3 0 4.2.4 5.6 1.3 1.4.9 2.1 2.2 2.1 4v11.2c0 .3 0 .6.2.8.1.2.4.3.9.3a5 5 0 001 0V27a9 9 0 01-1.1.3h-1c-1.2 0-2-.4-2.5-1.2-.3-.4-.5-1-.6-1.7a8.8 8.8 0 01-7 3.2c-1.7 0-3.2-.6-4.3-1.7a5.4 5.4 0 01-1.8-4c0-1.9.6-3.2 1.7-4.2a8 8 0 014.4-1.9l5.2-.6zm9.9-13h3.3v5.4h3v2.6h-3V23c0 .6.2 1 .7 1.3l1.2.2a15.2 15.2 0 001.2 0v2.5l-1.2.3h-1.3c-1.5 0-2.6-.4-3.1-1.1-.6-.8-.8-1.8-.8-3V10.1h-2.6V7.6h2.6V2.2zm16.8 5a8.8 8.8 0 016.9 3.4c.7 1 1 2.1 1.3 3.4.2 1 .3 2.3.3 4.3h-14.2c0 2 .5 3.5 1.4 4.7.9 1.2 2.2 1.8 4 1.8a5.2 5.2 0 005.3-4h3.2c0 .8-.3 1.6-.8 2.4a7.6 7.6 0 01-5.3 4c-.8.3-1.7.4-2.6.4-2.4 0-4.5-.9-6.2-2.6a10.2 10.2 0 01-2.5-7.4c0-3 .9-5.6 2.6-7.6 1.6-1.9 3.8-2.9 6.6-2.9zm5.2 8.5a8.4 8.4 0 00-1-3.4c-.9-1.5-2.3-2.3-4.4-2.3a5 5 0 00-3.8 1.6c-1 1-1.5 2.4-1.6 4.1h10.8zm5.5-.8h9.1v3.4h-9v-3.4zM132 4.6c0-1.3.3-2.3.7-3 .8-1 2.2-1.6 4.4-1.6a11.4 11.4 0 011.4 0v3a26.4 26.4 0 00-1.2 0c-1 0-1.5.2-1.7.7-.2.6-.3 1.9-.3 4h3.2v2.5h-3.3V27H132V10.2h-2.7V7.7h2.7v-3zm8.6 3h3v2.7c1-1.1 2-2 3-2.4 1-.5 2.1-.8 3.4-.8 2.7 0 4.6 1 5.6 3 .5 1 .8 2.5.8 4.4V27H153V14.7c0-1.2-.2-2.1-.6-2.8-.5-1.2-1.6-1.8-3.1-1.8a4.9 4.9 0 00-4.2 1.8c-.6.6-1 1.3-1.1 2-.2.6-.3 1.6-.3 2.9v10.1h-3.2V7.6zm21.6 13.2c0 1.1.4 2 .8 2.5.8 1 2.3 1.6 4.3 1.6 1.2 0 2.2-.2 3.2-.8.9-.5 1.3-1.3 1.3-2.4a2 2 0 00-1-1.9c-.5-.3-1.5-.6-2.9-1l-2.5-.6c-1.7-.4-3-.8-3.7-1.3a4.1 4.1 0 01-2-3.7c0-1.8.6-3.3 1.9-4.4 1.3-1.2 3-1.7 5.3-1.7 3 0 5 .8 6.3 2.5.8 1.1 1.2 2.3 1.2 3.5h-3c-.1-.7-.4-1.4-.9-2-.7-.8-2-1.3-3.8-1.3-1.3 0-2.2.3-2.8.8-.7.4-1 1-1 1.8 0 .9.4 1.5 1.3 2 .4.3 1.2.6 2.1.8l2.1.6c2.4.5 4 1 4.7 1.6 1.3.8 2 2.1 2 4a6 6 0 01-2 4.4c-1.3 1.2-3.3 1.9-6 1.9-2.9 0-5-.7-6.1-2a7.4 7.4 0 01-2-4.9h3.2z"/></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
|
1
|
+
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as r,createCommentVNode as d,withDirectives as o,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let r=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(r.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;r=r.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}r.push(e)}else{const t=r.findIndex((t=>t.labelId==e.labelId));-1!=t&&r.splice(t,1)}_.labelSelectedEdit=[...r],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[r(W)?(n(),s("div",A,O)):d("v-if",!0),o(c("div",K,[c("div",j,[d(" 表单内嵌打开标签组件的样式 "),d(' <div v-if="explicit" class="explicit-continer">\r\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\r\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\r\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\r\n\t\t\t\t\t\t\t\t<span slot="tab">\r\n\t\t\t\t\t\t\t\t\t{{ i }}\r\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\r\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\r\n\t\t\t\t\t\t\t\t\t\t<labelClassify\r\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\r\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\r\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</n-tab-pane>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</n-tabs>\r\n\t\t\t\t</div> '),d("\r\n\t\t\t\t\t普通标签样式\r\n\t\t\t\t\tv-else\r\n\t\t\t\t\texplicit\r\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(r(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(r(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),d(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:r(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!r(W)]])],512))}});export{B as default};
|
|
@@ -95,6 +95,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
95
|
};
|
|
96
96
|
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
97
97
|
actionType: "check" | "uncheck";
|
|
98
|
+
/**
|
|
99
|
+
* 取消勾选树节点
|
|
100
|
+
* baseKeys:基准值
|
|
101
|
+
* currentTree:当前树节点
|
|
102
|
+
* value:树节点的key值
|
|
103
|
+
*/
|
|
98
104
|
value: string | number;
|
|
99
105
|
}) => void>>;
|
|
100
106
|
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|