ci-plus 1.9.1 → 1.9.2

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 CHANGED
@@ -1,6 +1,8 @@
1
1
  ## 历史更新
2
2
 
3
3
  ```js
4
+ 1.9.2
5
+ 1、优化uploadV5.vue组件
4
6
  1.9.1
5
7
  1、优化uploadV5.vue组件
6
8
  1.9.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ci-plus",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "ci组件库",
5
5
  "main": "./index.ts",
6
6
  "scripts": {
@@ -179,7 +179,7 @@ interface Props {
179
179
  ifShowWarehouse?: boolean // 是否显示仓库
180
180
  requiredWarehouse?: boolean // 是否必选仓库
181
181
  ifDefaultAffiliation?: boolean // 是否默认选中归属工厂默认值true
182
- defaultAffiliationOrgid?: string // 默认选中归属工厂的 orgid(默认值当前登陆账号的单位)
182
+ defaultAffiliation?: { orgid: string; orgname: string } // 默认选中归属工厂的 orgid(默认值当前登陆账号的单位)
183
183
  filePath?: UploadFile[] //UploadRawFile[] // 父组件传递的附件数据,用于显示附件列表和上传附件后传递给父组件附件数据
184
184
  RowIndex?: number // 父组件传递的行索引,用于父组件中删除了附件找到对应的行(用于表格表单中上传附件)
185
185
  templateName?: string //模板名称
@@ -226,8 +226,13 @@ const ifDefaultAffiliation = computed(() => {
226
226
  // 获取本地缓存中当前登陆账号的公司
227
227
  const raw = localStorage.getItem('UserData')
228
228
  const UserData = raw ? JSON.parse(raw) : {}
229
- const defaultAffiliationOrgid = computed(() => {
230
- return props.defaultAffiliationOrgid || UserData?.resOrgId // 默认登陆账号的单位
229
+ const defaultAffiliation = computed<{ orgid: string; orgname: string }>(() => {
230
+ return (
231
+ props.defaultAffiliation || {
232
+ orgid: UserData?.resOrgId || '',
233
+ orgname: UserData?.resOrgName || ''
234
+ }
235
+ ) // 默认登陆账号的单位
231
236
  })
232
237
 
233
238
  const emits = defineEmits<{
@@ -457,8 +462,9 @@ onMounted(async () => {
457
462
 
458
463
  // 判断是否默认选中归属公司
459
464
  if (ifDefaultAffiliation.value) {
460
- affiliationAll.value = defaultAffiliationOrgid.value
461
- datas.value.factory_affiliation_id = defaultAffiliationOrgid.value
465
+ affiliationAll.value = defaultAffiliation.value.orgid // 下拉框赋值
466
+ datas.value.factory_affiliation_id = defaultAffiliation.value.orgid // 赋值给表单
467
+ datas.value.factory_affiliation_name = defaultAffiliation.value.orgname // 赋值给表单
462
468
  }
463
469
  })
464
470
  </script>