ZaiZai 1 rok temu
rodzic
commit
4d0df2268a

+ 16 - 2
src/views/project/gist/create.vue

@@ -46,7 +46,7 @@
 
 <script setup>
 import { onMounted, ref, watch } from 'vue'
-import { deepClone, formValidate, getArrValue } from 'js-fast-way'
+import { deepClone, formValidate, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import { getDictionaryData } from '~src/utils/tools'
 import mainApi from '~api/project/gist'
 
@@ -68,7 +68,6 @@ watch(() => props.form, (data) => {
 
 //渲染完成
 onMounted(() => {
-    console.log(formInfo.value)
     getDataApi()
 })
 
@@ -76,6 +75,21 @@ onMounted(() => {
 const projectStage = ref([])
 const getDataApi = async () => {
     projectStage.value = await getDictionaryData('projectStage', true)
+    const form = getObjValue(formInfo.value)
+    if (!isNullES(form.id)) {
+        baseForm.value = {
+            id: form.id,
+            workFocusStage: form.workFocusStage,
+            targetPlan: form.targetPlan,
+        }
+        workFocusEntityList.value = [{
+            startYear: form.startYear,
+            endYear: form.endYear,
+            workPlan: form.workPlan,
+            dutyUnit: form.dutyUnit,
+        }]
+        console.log(workFocusEntityList.value)
+    }
 }
 
 //基础表单

+ 2 - 2
src/views/project/modules/gist-list.vue

@@ -4,8 +4,8 @@
             :column="tableColumn" :datas="tableData" :index-style="{ width: 60 }" is-check :check-style="{ fixed: true, width: 29 }"
             class="hc-project-list-table" @selection-change="tableCheckChange"
         >
-            <template #key2="{ row }">
-                <el-link type="primary" @click="rowNameClick(row)">{{ row.key2 }}</el-link>
+            <template #workPlan="{ row }">
+                <el-link type="primary" @click="rowNameClick(row)">{{ row.workPlan }}</el-link>
             </template>
             <template #action="{ row }">
                 <el-link v-if="isAdminAuth" type="warning" @click="completion(row)">工作完成情况</el-link>