|
@@ -18,7 +18,7 @@
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
- <div class="hc-exctab-exceltab-add-excel-middle">
|
|
|
|
|
|
+ <div v-if="wbsMiddle" class="hc-exctab-exceltab-add-excel-middle">
|
|
<el-row :gutter="14" class="h-full">
|
|
<el-row :gutter="14" class="h-full">
|
|
<el-col :span="12" class="h-full">
|
|
<el-col :span="12" class="h-full">
|
|
<div class="left-card h-full">
|
|
<div class="left-card h-full">
|
|
@@ -94,12 +94,22 @@ const wbsMiddle = ref(false)
|
|
const excelTypeData = ref([])
|
|
const excelTypeData = ref([])
|
|
const getInfoData = async () => {
|
|
const getInfoData = async () => {
|
|
const data = getObjValue(dataInfo.value)
|
|
const data = getObjValue(dataInfo.value)
|
|
- console.log(data)
|
|
|
|
- if (data.fileType === 3) {
|
|
|
|
- wbsMiddle.value = false
|
|
|
|
|
|
+ if (props.type === '新增') {
|
|
|
|
+ if (data.fileType === 3) {
|
|
|
|
+ wbsMiddle.value = false
|
|
|
|
+ } else {
|
|
|
|
+ wbsMiddle.value = true
|
|
|
|
+ getWbsTypeList().then() //wbs模板名称
|
|
|
|
+ }
|
|
|
|
+ formModel.value = { parentId: data.id }
|
|
} else {
|
|
} else {
|
|
- wbsMiddle.value = true
|
|
|
|
- getWbsTypeList().then() //wbs模板名称
|
|
|
|
|
|
+ if (data.fileType !== 3 && data.hasChildren) {
|
|
|
|
+ wbsMiddle.value = false
|
|
|
|
+ } else {
|
|
|
|
+ wbsMiddle.value = true
|
|
|
|
+ getWbsTypeList().then() //wbs模板名称
|
|
|
|
+ }
|
|
|
|
+ getDetailExcel(data.id).then()
|
|
}
|
|
}
|
|
//获取清表类型
|
|
//获取清表类型
|
|
const types = await getDictionaryData('sys_excltab_type', true)
|
|
const types = await getDictionaryData('sys_excltab_type', true)
|
|
@@ -107,11 +117,15 @@ const getInfoData = async () => {
|
|
item.value = Number(item.value)
|
|
item.value = Number(item.value)
|
|
})
|
|
})
|
|
excelTypeData.value = types
|
|
excelTypeData.value = types
|
|
- //处理表单默认数据
|
|
|
|
- if (props.type === '新增') {
|
|
|
|
- formModel.value = { parentId: data.id }
|
|
|
|
- } else {
|
|
|
|
- formModel.value = { id: data.id }
|
|
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//获取详情
|
|
|
|
+const getDetailExcel = async (id) => {
|
|
|
|
+ const { data } = await mainApi.detailExcel(id)
|
|
|
|
+ formModel.value = {
|
|
|
|
+ id: data.id,
|
|
|
|
+ nodeName: data.name, //清表名称
|
|
|
|
+ tabType: data.tabType, //清表类型
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|