ci-plus 1.9.1 → 1.9.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 +4 -0
- package/package.json +1 -1
- package/src/fileRelated/uploadV5.vue +19 -7
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -44,7 +44,10 @@
|
|
|
44
44
|
</el-upload>
|
|
45
45
|
|
|
46
46
|
<div class="slot" style="display: flex; flex-direction: column; align-items: flex-end">
|
|
47
|
-
<div style="width: 100%; margin: 4px 2px" v-if="ifShowAffiliation">
|
|
47
|
+
<div style="width: 100%; margin: 4px 2px; display: flex" v-if="ifShowAffiliation">
|
|
48
|
+
<span style="line-height: 30px; color: red; margin-right: 4px" v-if="requiredAffiliation"
|
|
49
|
+
>*</span
|
|
50
|
+
>
|
|
48
51
|
<el-select-v2
|
|
49
52
|
size="small"
|
|
50
53
|
v-model="affiliationAll"
|
|
@@ -56,7 +59,10 @@
|
|
|
56
59
|
@change="changeAll"
|
|
57
60
|
/>
|
|
58
61
|
</div>
|
|
59
|
-
<div style="width: 100%; margin: 4px 2px" v-if="ifShowWarehouse">
|
|
62
|
+
<div style="width: 100%; margin: 4px 2px; display: flex" v-if="ifShowWarehouse">
|
|
63
|
+
<span style="line-height: 30px; color: red; margin-right: 4px" v-if="requiredWarehouse"
|
|
64
|
+
>*</span
|
|
65
|
+
>
|
|
60
66
|
<el-select-v2
|
|
61
67
|
size="small"
|
|
62
68
|
v-model="warehouseAll"
|
|
@@ -179,7 +185,7 @@ interface Props {
|
|
|
179
185
|
ifShowWarehouse?: boolean // 是否显示仓库
|
|
180
186
|
requiredWarehouse?: boolean // 是否必选仓库
|
|
181
187
|
ifDefaultAffiliation?: boolean // 是否默认选中归属工厂默认值true
|
|
182
|
-
|
|
188
|
+
defaultAffiliation?: { orgid: string; orgname: string } // 默认选中归属工厂的 orgid(默认值当前登陆账号的单位)
|
|
183
189
|
filePath?: UploadFile[] //UploadRawFile[] // 父组件传递的附件数据,用于显示附件列表和上传附件后传递给父组件附件数据
|
|
184
190
|
RowIndex?: number // 父组件传递的行索引,用于父组件中删除了附件找到对应的行(用于表格表单中上传附件)
|
|
185
191
|
templateName?: string //模板名称
|
|
@@ -226,8 +232,13 @@ const ifDefaultAffiliation = computed(() => {
|
|
|
226
232
|
// 获取本地缓存中当前登陆账号的公司
|
|
227
233
|
const raw = localStorage.getItem('UserData')
|
|
228
234
|
const UserData = raw ? JSON.parse(raw) : {}
|
|
229
|
-
const
|
|
230
|
-
return
|
|
235
|
+
const defaultAffiliation = computed<{ orgid: string; orgname: string }>(() => {
|
|
236
|
+
return (
|
|
237
|
+
props.defaultAffiliation || {
|
|
238
|
+
orgid: UserData?.resOrgId || '',
|
|
239
|
+
orgname: UserData?.resOrgName || ''
|
|
240
|
+
}
|
|
241
|
+
) // 默认登陆账号的单位
|
|
231
242
|
})
|
|
232
243
|
|
|
233
244
|
const emits = defineEmits<{
|
|
@@ -457,8 +468,9 @@ onMounted(async () => {
|
|
|
457
468
|
|
|
458
469
|
// 判断是否默认选中归属公司
|
|
459
470
|
if (ifDefaultAffiliation.value) {
|
|
460
|
-
affiliationAll.value =
|
|
461
|
-
datas.value.factory_affiliation_id =
|
|
471
|
+
affiliationAll.value = defaultAffiliation.value.orgid // 下拉框赋值
|
|
472
|
+
datas.value.factory_affiliation_id = defaultAffiliation.value.orgid // 赋值给表单
|
|
473
|
+
datas.value.factory_affiliation_name = defaultAffiliation.value.orgname // 赋值给表单
|
|
462
474
|
}
|
|
463
475
|
})
|
|
464
476
|
</script>
|