|
@@ -18,7 +18,7 @@
|
|
|
<HcTable :isIndex="false" :column="tableColumn" :datas="tableData" :row-style="tableRowStyle" hasChildren="hasChildren1" children="childrenList">
|
|
|
<template #planTaskType="{row,index}">
|
|
|
<el-select v-model="row.planTaskType" v-if="row.isEdit">
|
|
|
- <el-option v-for="item in taskTypeList" :label="item.dictName" :value="item.dictValue"/>
|
|
|
+ <el-option v-for="item in taskTypeList" :label="item.dictName" :value="item.id"/>
|
|
|
</el-select>
|
|
|
<span v-else>{{row?.planTaskTypeValue}}</span>
|
|
|
</template>
|
|
@@ -76,12 +76,12 @@
|
|
|
@save="subplanSaveClick"
|
|
|
>
|
|
|
<template #extra>
|
|
|
- <el-button size="large" type="primary" @click="addplan()">新增</el-button>
|
|
|
+ <el-button size="large" type="primary" @click="addplan">新增</el-button>
|
|
|
</template>
|
|
|
<HcTable :isIndex="false" :column="tableSubplanColumn" :datas="tableSubplanData">
|
|
|
<template #planTaskType="{row,index}">
|
|
|
<el-select v-model="row.planTaskType" :disabled="!row.isEdit">
|
|
|
- <el-option v-for="item in taskTypeList" :label="item.dictName" :value="item.dictValue"/>
|
|
|
+ <el-option v-for="item in taskTypeList" :label="item.dictName" :value="item.id"/>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template #planTaskDesc="{row,index}">
|
|
@@ -104,6 +104,7 @@
|
|
|
<template #action="{row,index}">
|
|
|
<el-button size="small" type="success" v-if="row.isEdit" @click="getWorkDays(row)">保存</el-button>
|
|
|
<el-button size="small" type="primary" v-else @click="row.isEdit = true">编辑</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="delSubplan(row,index)">删除</el-button>
|
|
|
</template>
|
|
|
</HcTable>
|
|
|
</HcDialog>
|
|
@@ -357,7 +358,9 @@ const addplan=()=>{
|
|
|
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+const delSubplan=(row,index)=>{
|
|
|
+ tableSubplanData.value.splice(index,1)
|
|
|
+}
|
|
|
|
|
|
const relatedModal = ref(false)
|
|
|
const rePlanid=ref('')
|
|
@@ -370,6 +373,13 @@ const relatedModalShow = (row) => {
|
|
|
//保存获取工作时长
|
|
|
const getWorkDays=async(row)=>{
|
|
|
row.isEdit = false
|
|
|
+ //获取任务类型
|
|
|
+ const {planTaskType}=row
|
|
|
+ taskTypeList.value.forEach((ele)=>{
|
|
|
+ if(ele.id===planTaskType){
|
|
|
+ row.planTaskTypeValue=ele.dictName
|
|
|
+ }
|
|
|
+ })
|
|
|
if(row?.planStartTime&&row?.planEndTime){
|
|
|
const {error, code, data,msg} = await projectApi.getWorkDays( {
|
|
|
startDate:row.planStartTime,
|