doway-coms 2.0.4 → 2.0.6

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": "doway-coms",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -50,6 +50,7 @@ export default {
50
50
  },
51
51
  methods: {
52
52
  showPreview(url, data, isReplace, method, modalInfo) {
53
+ // modalInfo = {type: '', info: {}}
53
54
  this.$refs.printModal.maximize()
54
55
  this.isShow = true
55
56
  if (!modalInfo) {
@@ -76,7 +77,7 @@ export default {
76
77
  formExport.appendChild(companyids)
77
78
  }
78
79
  if (modalInfo && modalInfo.type == 'templateName') {
79
- // 添加公司id数据
80
+ // 添加模板数据
80
81
  const templateData = document.createElement('input')
81
82
  templateData.type = 'hidden'
82
83
  templateData.name = 'templateName'
@@ -92,9 +93,11 @@ export default {
92
93
  })
93
94
  } else {
94
95
  let ids = JSON.stringify(data)
95
- if (companyId) {
96
- this.url = url + '?token=' + this.$store.getters.token + '&ids=' + ids + '&companyId=' + companyId
97
- } else {
96
+ if ((modalInfo !== null) && modalInfo.type == 'company') { // 公司
97
+ this.url = url + '?token=' + this.$store.getters.token + '&ids=' + ids + '&companyId=' + modalInfo.info
98
+ } else if ((modalInfo !== null) && modalInfo.type == 'templateName') { // 模板
99
+ this.url = url + '?token=' + this.$store.getters.token + '&ids=' + ids + '&templateName=' + modalInfo.info
100
+ } else { // 其它
98
101
  this.url = url + '?token=' + this.$store.getters.token + '&ids=' + ids
99
102
  }
100
103
  }