@ebiz/designer-components 0.0.54 → 0.0.56

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": "@ebiz/designer-components",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  <t-icon v-if="index < approvers.length - 1" name="chevron-right" class="arrow-icon" />
29
29
  </template>
30
- <t-button theme="default" variant="text" @click="handleAddApprover">
30
+ <t-button theme="default" variant="text" @click="handleAddApprover" v-if="canEdit">
31
31
  <template #icon>
32
32
  <t-icon name="add" />
33
33
  </template>
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </div>
58
58
  </template>
59
- <t-button theme="default" variant="text" @click="handleAddCC">
59
+ <t-button theme="default" variant="text" @click="handleAddCC" v-if="canEdit">
60
60
  <template #icon>
61
61
  <t-icon name="add" />
62
62
  </template>
@@ -99,6 +99,7 @@ interface Props {
99
99
  showRootOrg?: boolean // 是否显示顶层组织
100
100
  childDeptEnable?: boolean // 是否包含子部门
101
101
  showCC?: boolean // 是否显示抄送人模块
102
+ canEdit?: boolean // 是否可以编辑审批人,抄送人
102
103
  }
103
104
 
104
105
  const props = withDefaults(defineProps<Props>(), {
@@ -109,7 +110,8 @@ const props = withDefaults(defineProps<Props>(), {
109
110
  required: true,
110
111
  showRootOrg: true,
111
112
  childDeptEnable: false,
112
- showCC: true
113
+ showCC: true,
114
+ canEdit: true
113
115
  })
114
116
 
115
117
  const emit = defineEmits(['update:approverList', 'update:ccList', 'change'])
@@ -69,7 +69,7 @@ export default {
69
69
 
70
70
  <script setup>
71
71
  import { defineProps, defineEmits, ref, onMounted, computed } from 'vue';
72
- import { dataService, EbizTableSort, EbizTdesignButton, EbizTdesignCard, EbizPageHeader } from "../../../index"
72
+ import { dataService, EbizTableSort, EbizTdesignButton, EbizTdesignCard, EbizPageHeader, EbizSForm } from "../../../index"
73
73
  import { Space as TSpace, Pagination as TPagination, Input as TInput } from 'tdesign-vue-next';
74
74
 
75
75
  const currentPage = ref(1)
@@ -196,16 +196,12 @@ const searchValue = ref('')
196
196
 
197
197
  const loadData = async () => {
198
198
 
199
- let params = {
199
+ const params = {
200
200
  keyword: searchValue.value
201
201
  }
202
- if (props.pageEnable) {
203
- params = {
204
- page: currentPage.value,
205
- pagesize: pageSize.value,
206
- }
207
- }
208
202
  const res = await dataService.fetch({
203
+ page: currentPage.value,
204
+ pagesize: pageSize.value,
209
205
  queryParams:{
210
206
  ...params, ...props.defaultParams, ...props.formData
211
207
  } }, props.apiConfig, props.fetchUrl)
@@ -355,7 +355,7 @@ const callApi = async (config = props.apiConfig) => {
355
355
  }
356
356
 
357
357
  // 调用dataService进行API请求,直接使用config
358
- const response = await dataService.fetch({ saveData: fetchParams }, config)
358
+ const response = await dataService.fetch({ detailId: fetchParams.id }, config)
359
359
 
360
360
  // 显示成功消息
361
361
  if (props.showResultMessage) {