vue2-client 1.9.132 → 1.9.134

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.9.132",
3
+ "version": "1.9.134",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -55,7 +55,7 @@
55
55
  v-else-if="attr.numberInput && !readOnly"
56
56
  v-model="form[attr.model]"
57
57
  :whitespace="true"
58
- @input="attr.dataChangeFunc && debouncedDataChangeFunc()"
58
+ @change="attr.dataChangeFunc && debouncedDataChangeFunc()"
59
59
  :disabled="disabled && !readOnly"
60
60
  style="width:100%"
61
61
  @blur="mode !== '查询' && attr.inputOnBlurFunc && emitFunc(attr.inputOnBlurFunc,attr)"
@@ -1,3 +1,3 @@
1
- import XReport from './XReport'
2
-
3
- export default XReport
1
+ import XReport from './XReport'
2
+
3
+ export default XReport
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div id="test">
3
- <div>
3
+ <a-card :bordered="false">
4
4
  <XReport
5
5
  ref="main"
6
6
  :use-oss-for-img="false"
7
- :config-name="configName"
7
+ config-name="templateManageView2"
8
8
  server-name="af-his"
9
9
  :show-img-in-cell="true"
10
10
  :display-only="true"
@@ -12,7 +12,7 @@
12
12
  :show-save-button="false"
13
13
  :no-padding="true"
14
14
  :dont-format="true"/>
15
- </div>
15
+ </a-card>
16
16
  </div>
17
17
  </template>
18
18
 
@@ -20,31 +20,22 @@
20
20
  import XReport from './XReport'
21
21
  import XAddReport from '../XAddReport/XAddReport.vue'
22
22
  // eslint-disable-next-line no-unused-vars
23
+ import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
23
24
 
24
25
  export default {
25
26
  name: 'XReportDemo',
26
27
  components: {
27
28
  XReport, XAddReport
28
29
  },
29
- provide () {
30
- return {
31
- getSelectedId: () => 10,
32
- }
33
- },
34
30
  mounted () {
35
- // this.$refs.main.openDialog('surgerySchedCover', -1, {})
36
- },
37
- beforeCreate () {
38
- this.$store.commit('account/setUser', {
39
- id: '374870707835895810'
40
- })
31
+ // this.$refs.xAddReport.init({
32
+ // configName: 'skinTestExecuActionCover',
33
+ // selectedId: '11111',
34
+ // mixinData: {}
35
+ // })
41
36
  },
42
37
  data () {
43
38
  return {
44
- configName: 'medicalRecordCover'
45
- // configName: 'physicianOrderEntryCover'
46
- // configName: 'threeHealthCenterCover'
47
- // configName: 'medOrderManaActCover'
48
39
  }
49
40
  },
50
41
  methods: {
@@ -141,6 +141,11 @@ export default {
141
141
  this.editorRef.loadUrl(fileUrl).then(() => {
142
142
  if (bindObject) {
143
143
  this.editorRef.setBindObject(bindObject)
144
+ if (bindObject.template) {
145
+ for (const key of Object.keys(bindObject.template)) {
146
+ this.editorRef.bindDataList(key, bindObject.template[key])
147
+ }
148
+ }
144
149
  }
145
150
  this.changeMode()
146
151
  this.fileUrl = fileUrl
@@ -1,50 +1,50 @@
1
- <template>
2
- <div>
3
- <a-list v-show="!loading" size="small" :data-source="data">
4
- <a-list-item slot="renderItem" slot-scope="item">
5
- <div>
6
- <p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
7
- <p>{{ item.date }}</p>
8
- </div>
9
- <a class="delete_item">
10
- <a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
11
- </a>
12
- </a-list-item>
13
- </a-list>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import { indexedDB } from '@vue2-client/utils/indexedDB'
19
-
20
- export default {
21
- name: 'FavoriteList',
22
- data () {
23
- return {
24
- data: [],
25
- loading: false
26
- }
27
- },
28
- mounted () {
29
- this.loadData()
30
- },
31
- methods: {
32
- loadData () {
33
- indexedDB.getAll((data) => {
34
- const realData = data.filter(item => item.data && item.data.uuid)
35
- .map(item => item.data)
36
- this.data = realData
37
- })
38
- }
39
- }
40
- }
41
- </script>
42
- <style lang="less" scoped>
43
- .delete_item {
44
- margin-left: 8px;
45
- color: #333;
46
- }
47
- p {
48
- margin: 0
49
- }
50
- </style>
1
+ <template>
2
+ <div>
3
+ <a-list v-show="!loading" size="small" :data-source="data">
4
+ <a-list-item slot="renderItem" slot-scope="item">
5
+ <div>
6
+ <p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
7
+ <p>{{ item.date }}</p>
8
+ </div>
9
+ <a class="delete_item">
10
+ <a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
11
+ </a>
12
+ </a-list-item>
13
+ </a-list>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
19
+
20
+ export default {
21
+ name: 'FavoriteList',
22
+ data () {
23
+ return {
24
+ data: [],
25
+ loading: false
26
+ }
27
+ },
28
+ mounted () {
29
+ this.loadData()
30
+ },
31
+ methods: {
32
+ loadData () {
33
+ indexedDB.getAll((data) => {
34
+ const realData = data.filter(item => item.data && item.data.uuid)
35
+ .map(item => item.data)
36
+ this.data = realData
37
+ })
38
+ }
39
+ }
40
+ }
41
+ </script>
42
+ <style lang="less" scoped>
43
+ .delete_item {
44
+ margin-left: 8px;
45
+ color: #333;
46
+ }
47
+ p {
48
+ margin: 0
49
+ }
50
+ </style>
@@ -83,13 +83,13 @@ routerResource.example = {
83
83
  {
84
84
  path: 'default',
85
85
  name: '示例页面',
86
- component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
86
+ // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
87
87
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
88
88
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
89
89
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
90
90
  // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
91
91
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
92
- // component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
92
+ component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
93
93
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
94
94
  // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
95
95
  // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
@@ -1,18 +1,18 @@
1
- import { post } from '@vue2-client/services/api/restTools'
2
-
3
- const entityApi = {
4
- // 根据ID查询数据
5
- getById: (entityName, id, data = {}, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
6
- return post(`/api/${serviceName}/entity/query/${entityName}/${id}`, data)
7
- },
8
- // 根据ID集合查询所有数据
9
- findAllByIds: (entityName, data, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
10
- return post(`/api/${serviceName}/entity/query/${entityName}`, data)
11
- },
12
- // 查询实体的总数量
13
- getCount: (entityName, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
14
- return post(`/api/${serviceName}/entity/queryCount/${entityName}`, {})
15
- }
16
- }
17
-
18
- export { entityApi }
1
+ import { post } from '@vue2-client/services/api/restTools'
2
+
3
+ const entityApi = {
4
+ // 根据ID查询数据
5
+ getById: (entityName, id, data = {}, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
6
+ return post(`/api/${serviceName}/entity/query/${entityName}/${id}`, data)
7
+ },
8
+ // 根据ID集合查询所有数据
9
+ findAllByIds: (entityName, data, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
10
+ return post(`/api/${serviceName}/entity/query/${entityName}`, data)
11
+ },
12
+ // 查询实体的总数量
13
+ getCount: (entityName, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
14
+ return post(`/api/${serviceName}/entity/queryCount/${entityName}`, {})
15
+ }
16
+ }
17
+
18
+ export { entityApi }
@@ -1,31 +1,31 @@
1
- /**
2
- * @description: createWaterMark.js 加水印功能
3
- */
4
- let waterMarkDOM
5
-
6
- const clearWaterMark = () => {
7
- if (waterMarkDOM) waterMarkDOM.remove()
8
- }
9
- /**
10
- * @description: 创建水印
11
- * @param waterMarkName 水印内容
12
- */
13
- export default function createWaterMark (waterMarkName) {
14
- clearWaterMark()
15
- if (!waterMarkName) {
16
- return
17
- }
18
- const width = window.parseInt(document.body.clientWidth)
19
- const canvasWidth = width / window.parseInt(width / 320)
20
- const fontFamily = window.getComputedStyle(document.body)['font-family']
21
- const fragment = document.createDocumentFragment()
22
- waterMarkDOM = document.createElement('div')
23
- waterMarkDOM.className = 'water-mark-wrap'
24
- let spanStr = ''
25
- for (let i = 0; i < 100; i++) {
26
- spanStr += `<span class="water-word" style=width:${canvasWidth}px;height:200px;font: ${fontFamily}>${waterMarkName}</span>`
27
- }
28
- waterMarkDOM.innerHTML = spanStr
29
- fragment.appendChild(waterMarkDOM)
30
- document.body.appendChild(fragment)
31
- }
1
+ /**
2
+ * @description: createWaterMark.js 加水印功能
3
+ */
4
+ let waterMarkDOM
5
+
6
+ const clearWaterMark = () => {
7
+ if (waterMarkDOM) waterMarkDOM.remove()
8
+ }
9
+ /**
10
+ * @description: 创建水印
11
+ * @param waterMarkName 水印内容
12
+ */
13
+ export default function createWaterMark (waterMarkName) {
14
+ clearWaterMark()
15
+ if (!waterMarkName) {
16
+ return
17
+ }
18
+ const width = window.parseInt(document.body.clientWidth)
19
+ const canvasWidth = width / window.parseInt(width / 320)
20
+ const fontFamily = window.getComputedStyle(document.body)['font-family']
21
+ const fragment = document.createDocumentFragment()
22
+ waterMarkDOM = document.createElement('div')
23
+ waterMarkDOM.className = 'water-mark-wrap'
24
+ let spanStr = ''
25
+ for (let i = 0; i < 100; i++) {
26
+ spanStr += `<span class="water-word" style=width:${canvasWidth}px;height:200px;font: ${fontFamily}>${waterMarkName}</span>`
27
+ }
28
+ waterMarkDOM.innerHTML = spanStr
29
+ fragment.appendChild(waterMarkDOM)
30
+ document.body.appendChild(fragment)
31
+ }
@@ -1,81 +0,0 @@
1
- <template>
2
- <a-form :model="invoiceData" ref="invoiceForm" label-col="{ span: 4 }" wrapper-col="{ span: 14 }">
3
- <!-- 卖方信息 -->
4
- <a-form-item label="卖方信息">
5
- <a-input v-model="invoiceData.seller" placeholder="请输入卖方信息"></a-input>
6
- </a-form-item>
7
-
8
- <!-- 买方信息 -->
9
- <a-form-item label="买方信息">
10
- <a-input v-model="invoiceData.buyer" placeholder="请输入买方信息"></a-input>
11
- </a-form-item>
12
-
13
- <!-- 项目明细 -->
14
- <a-form-item label="项目明细">
15
- <div v-for="(item, index) in invoiceData.items" :key="index" class="item-row">
16
- <a-input v-model="item.name" placeholder="项目名称" style="width: 20%; margin-right: 10px;"></a-input>
17
- <a-input v-model="item.quantity" placeholder="数量" style="width: 15%; margin-right: 10px;"></a-input>
18
- <a-input v-model="item.price" placeholder="单价" style="width: 20%; margin-right: 10px;"></a-input>
19
- <a-input v-model="item.tax" placeholder="税额" style="width: 20%;"></a-input>
20
- </div>
21
- <a-button type="dashed" @click="addItem" style="margin-top: 10px;">添加项目</a-button>
22
- </a-form-item>
23
-
24
- <!-- 合计金额 -->
25
- <a-form-item label="合计金额">
26
- <a-input v-model="invoiceData.total" placeholder="合计金额"></a-input>
27
- </a-form-item>
28
-
29
- <!-- 备注 -->
30
- <a-form-item label="备注">
31
- <a-input v-model="invoiceData.remarks" placeholder="请输入备注"></a-input>
32
- </a-form-item>
33
- <!-- 操作按钮 -->
34
- <a-form-item wrapper-col="{ span: 14, offset: 4 }">
35
- <a-button type="primary" @click="submitInvoice">开票</a-button>
36
- <a-button style="margin-left: 8px;" @click="saveDraft">保存草稿</a-button>
37
- </a-form-item>
38
- </a-form>
39
- </template>
40
-
41
- <script>
42
- export default {
43
- name: 'InvoiceComponent',
44
- data () {
45
- return {
46
- // 发票数据模型
47
- invoiceData: {
48
- seller: '', // 卖方信息
49
- buyer: '', // 买方信息
50
- items: [ // 项目明细
51
- { name: '', quantity: '', price: '', tax: '' }
52
- ],
53
- total: '', // 合计金额
54
- remarks: '' // 备注
55
- }
56
- }
57
- },
58
- methods: {
59
- // 添加项目明细
60
- addItem () {
61
- this.invoiceData.items.push({ name: '', quantity: '', price: '', tax: '' })
62
- },
63
- // 提交发票
64
- submitInvoice () {
65
- console.log('开票数据: ', this.invoiceData)
66
- // 在此处执行发票提交的逻辑
67
- },
68
- // 保存草稿
69
- saveDraft () {
70
- console.log('保存草稿: ', this.invoiceData)
71
- // 在此处执行保存草稿的逻辑
72
- }
73
- }
74
- }
75
- </script>
76
-
77
- <style scoped>
78
- .item-row {
79
- margin-bottom: 10px;
80
- }
81
- </style>