ZaiZai 1 年之前
父節點
當前提交
f8d460c988
共有 2 個文件被更改,包括 40 次插入5 次删除
  1. 8 0
      src/api/modules/exctab/exceltab.js
  2. 32 5
      src/views/exctab/modules/add-excel.vue

+ 8 - 0
src/api/modules/exctab/exceltab.js

@@ -54,4 +54,12 @@ export default {
             params: { id },
         })
     },
+    //清表编辑 wbs 下拉框选择
+    async getWbsTypeList(form) {
+        return HcApi({
+            url: '/api/blade-manager/exceltab/getWbsTypeList',
+            method: 'get',
+            params: form,
+        })
+    },
 }

+ 32 - 5
src/views/exctab/modules/add-excel.vue

@@ -1,5 +1,5 @@
 <template>
-    <hc-dialog v-model="isShow" :title="type" widths="800px" :padding="false" @close="dialogClose">
+    <hc-dialog v-model="isShow" ui="hc-exctab-exceltab-add-excel" :title="type" widths="800px" :padding="false" @close="dialogClose">
         111
         <template #footer>
             <el-button hc-btn @click="dialogClose">取消</el-button>
@@ -9,8 +9,10 @@
 </template>
 
 <script setup>
+import { getArrValue, getObjValue } from 'js-fast-way'
 import { ref, watch } from 'vue'
 import mainApi from '~api/exctab/exceltab'
+import { getDictionaryData } from '~uti/tools'
 
 const props = defineProps({
     info: {
@@ -43,8 +45,30 @@ watch(isShow, (val) => {
 })
 
 //处理数据
-const getInfoData = () => {
-    console.log(dataInfo.value)
+const wbsMiddle = ref(false)
+const excelTypeData = ref([])
+const getInfoData = async () => {
+    const data = getObjValue(dataInfo.value)
+    console.log(data)
+    if (data.fileType === 3) {
+        wbsMiddle.value = false
+    } else {
+        wbsMiddle.value = true
+        getWbsTypeList().then() //wbs模板名称
+    }
+    //获取清表类型
+    const types = await getDictionaryData('sys_excltab_type', true)
+    types.forEach(item => {
+        item.value = Number(item.value)
+    })
+    excelTypeData.value = types
+}
+
+//清表编辑 wbs 下拉框选择
+const wbsModel = ref([])
+const getWbsTypeList = async () => {
+    const { data } = await mainApi.getWbsTypeList({ wbstype: 2 })
+    wbsModel.value = getArrValue(data)
 }
 
 //提交
@@ -59,6 +83,9 @@ const dialogClose = () => {
 }
 </script>
 
-<style scoped lang="scss">
-
+<style lang="scss">
+.el-overlay-dialog .el-dialog.hc-new-dialog.hc-exctab-exceltab-add-excel .el-dialog__body{
+    height: 660px;
+    padding: 12px 0;
+}
 </style>