duy 2 years ago
parent
commit
c8812b2bc3
2 changed files with 8 additions and 3 deletions
  1. 4 2
      src/views/program/project/form.vue
  2. 4 1
      src/views/project/cost/form.vue

+ 4 - 2
src/views/program/project/form.vue

@@ -27,7 +27,7 @@
                 </el-radio-group>
             </div>
         </template>
-        <HcTable :is-index="false" :column="tableColumn" :datas="tableData" :row-style="tableRowStyle" has-children="hasChildren1" children="childrenList">
+        <HcTable :is-index="false" :column="tableColumn" :datas="tableData" :row-style="tableRowStyle" has-children="hasChildren1" children="childrenList" :loading="tableLoading">
             <template #projectProcessValue="{ row }">
                 <template v-if="row.taskFinishedStatus === 1">
                     <el-popover placement="top-start" title="" :width="200" :hide-after="0" :content="row?.outMoneyTips">
@@ -373,7 +373,9 @@ const buildData = ref([])
 const supervisorUnitData = ref([])
 //获取详情
 const getPlanByProjectId = async ()=>{
+    tableLoading.value = true
     const { error, code, data } = await projectApi.getPlanByProjectId({ id: dataId.value })
+    tableLoading.value = false
     if (!error && code === 200) {
         const res = getObjValue(data)
         console.log(res, '详情')
@@ -486,7 +488,7 @@ const tableColumn = [
     { key: 'action', name: '操作', width: '280', align: 'center', fixed: 'right' },
 ]
 const tableData = ref([])
-
+const tableLoading = ref(false)
 //表格行样式
 const tableRowStyle = ({ row }) => {
     if (row.taskFinishedStatus === 1) {

+ 4 - 1
src/views/project/cost/form.vue

@@ -50,7 +50,7 @@
                     <HcNewSwitch :datas="tabTab" :keys="tabKey" :round="false" @change="tabChange" />
                 </template>
               
-                <HcTable :is-index="false" :column="tableColumn" :datas="tableData">
+                <HcTable :is-index="false" :column="tableColumn" :datas="tableData" :loading="tableLoaing">
                     <template #deptId="{ row }">  
                         <el-select v-model="row.deptId" block placeholder="请选择" :disabled="!row.isEdit">
                             <el-option v-for="item in departMent" :key="item.id" :label="item.deptName" :value="item.id" />
@@ -289,9 +289,12 @@ const getdepartmentListData = async () => {
 const constructUnitData = ref([])
 const bulidUnitData = ref([])
 const supervisorUnitData = ref([])
+const tableLoaing = ref(false)
 //获取详情
 const getBudgetStatsById = async ()=>{
+    tableLoaing.value = true
     const { error, code, data } = await costApi.getBudgetStatsById({ id: dataId.value })
+    tableLoaing.value = false
     if (!error && code === 200) {
         formBaseModel.value = getObjValue(data)
         tableData.value = formBaseModel.value?.constructUnit || [{}]