|
@@ -1,101 +1,108 @@
|
|
|
<template>
|
|
|
- <HcCard actionUi="text-center">
|
|
|
+ <HcCard action-ui="text-center">
|
|
|
<template #header>
|
|
|
- <HcNewSwitch :datas="tabTab" :keys="tabKey" @change="tabChange" :round="false"/>
|
|
|
+ <HcNewSwitch :datas="tabTab" :keys="tabKey" :round="false" @change="tabChange" />
|
|
|
</template>
|
|
|
- <HcTable :isIndex="false" :column="tableColumn" :datas="tableData" :loading="tableLoading">
|
|
|
- <template #taskUser="{row}">
|
|
|
+ <HcTable :is-index="false" :column="tableColumn" :datas="tableData" :loading="tableLoading">
|
|
|
+ <template #taskUser="{ row }">
|
|
|
<el-select v-model="row.taskUser" size="small">
|
|
|
- <el-option v-for="item in department" :label="item.name" :value="item.id"/>
|
|
|
+ <el-option v-for="item in department" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
- <template #key10="{row}">
|
|
|
- <span >{{row.planStartTime?row.planStartTime:''}}</span>
|
|
|
- <span v-if="row.planEndTime">~</span>
|
|
|
- <span >{{row.planEndTime?row.planEndTime:''}}</span>
|
|
|
+ <template #key10="{ row }">
|
|
|
+ <span>{{ row.planStartTime ? row.planStartTime : '' }}</span>
|
|
|
+ <span v-if="row.planEndTime">~</span>
|
|
|
+ <span>{{ row.planEndTime ? row.planEndTime : '' }}</span>
|
|
|
</template>
|
|
|
- <template #action="{row,index}" >
|
|
|
- <el-button size="small" type="primary" @click="openPlanModalShow(row)" :disabled="row.startOrStop==1||row.startOrStop==0">开启</el-button>
|
|
|
- <el-button size="small" type="danger" @click="pausePlanModalShow(row)" :disabled="row.startOrStop==2||row.startOrStop==0">暂停</el-button>
|
|
|
+ <template #action="{ row, index }">
|
|
|
+ <el-button size="small" type="primary" :disabled="row.startOrStop == 1 || row.startOrStop == 0" @click="openPlanModalShow(row)">
|
|
|
+ 开启
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="danger" :disabled="row.startOrStop == 2 || row.startOrStop == 0" @click="pausePlanModalShow(row)">
|
|
|
+ 暂停
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</HcTable>
|
|
|
<template #action>
|
|
|
<el-button size="large" type="info" hc-btn @click="goBackClick">
|
|
|
- <HcIcon name="arrow-go-back"/>
|
|
|
+ <HcIcon name="arrow-go-back" />
|
|
|
<span>取消并返回</span>
|
|
|
</el-button>
|
|
|
<el-button size="large" type="primary" hc-btn @click="saveClick">
|
|
|
- <HcIcon name="check-double"/>
|
|
|
+ <HcIcon name="check-double" />
|
|
|
<span>提交保存</span>
|
|
|
</el-button>
|
|
|
</template>
|
|
|
|
|
|
- <!--开启计划-->
|
|
|
- <HcDialog bgColor="#ffffff" isToBody title="开启计划" widths="40rem" saveText="保存"
|
|
|
- :show="openPlanModal" @close="openPlanCloseClick" @save="openPlanSaveClick" :loading="openPlanSaveLoaing"
|
|
|
+ <!-- 开启计划 -->
|
|
|
+ <HcDialog
|
|
|
+ bg-color="#ffffff" is-to-body title="开启计划" widths="40rem" save-text="保存"
|
|
|
+ :show="openPlanModal" :loading="openPlanSaveLoaing" @close="openPlanCloseClick" @save="openPlanSaveClick"
|
|
|
>
|
|
|
- <HcListItem title="原计划起止日期:" :content="openPlan.planStartTime+'~'+openPlan.planEndTime"/>
|
|
|
- <HcListItem title="中途暂停计划起止日期:" :content="openPlan.pausePlanStartTime+'~'+openPlan.pausePlanEndTime" v-if="openPlan?.openPlanStartTime"/>
|
|
|
- <HcListItem title="中途暂停计划起止日期:" content="" v-else/>
|
|
|
- <HcListItem title="中途开启计划起止日期:" isCenter>
|
|
|
- <HcDatePicker :dates="betweenTime" @change="betweenTimeUpdate"/>
|
|
|
+ <HcListItem title="原计划起止日期:" :content="`${openPlan.planStartTime}~${openPlan.planEndTime}`" />
|
|
|
+ <HcListItem v-if="openPlan?.openPlanStartTime" title="中途暂停计划起止日期:" :content="`${openPlan.pausePlanStartTime}~${openPlan.pausePlanEndTime}`" />
|
|
|
+ <HcListItem v-else title="中途暂停计划起止日期:" content="" />
|
|
|
+ <HcListItem title="中途开启计划起止日期:" is-center>
|
|
|
+ <HcDatePicker :dates="betweenTime" @change="betweenTimeUpdate" />
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="项目原计划起止工时(天):" isCenter>
|
|
|
+ <HcListItem title="项目原计划起止工时(天):" is-center>
|
|
|
<span class="text-red text-xl">{{ openPlan?.planDays }}</span>
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="上一次计划工时(天):" isCenter>
|
|
|
+ <HcListItem title="上一次计划工时(天):" is-center>
|
|
|
<span class="text-red text-xl">{{ openPlan?.lastOpenPlanStartEndDays }}</span>
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="上一次计划截止暂停阶段起止工时(天):" isCenter>
|
|
|
+ <HcListItem title="上一次计划截止暂停阶段起止工时(天):" is-center>
|
|
|
<span class="text-red text-xl">{{ openPlan?.realWorkDays }}</span>
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="中途暂停之后开启计划起止工时(天):" isCenter>
|
|
|
+ <HcListItem title="中途暂停之后开启计划起止工时(天):" is-center>
|
|
|
<span class="text-red text-xl">{{ openPlan?.openPlanStartEndDays }}</span>
|
|
|
</HcListItem>
|
|
|
- <div class="mt-8" v-if="openPlan.isShowTips">
|
|
|
- <el-alert type="warning" title="提示:" description="该计划暂停之后开启的工时加上暂停前的工时已经超出原计划工时,是否安排不合理,请从新安排!" :closable="false"/>
|
|
|
+ <div v-if="openPlan.isShowTips" class="mt-8">
|
|
|
+ <el-alert type="warning" title="提示:" description="该计划暂停之后开启的工时加上暂停前的工时已经超出原计划工时,是否安排不合理,请从新安排!" :closable="false" />
|
|
|
</div>
|
|
|
</HcDialog>
|
|
|
|
|
|
- <!--暂停计划-->
|
|
|
- <HcDialog bgColor="#ffffff" isToBody title="暂停计划" widths="40rem" saveText="保存"
|
|
|
- :show="pausePlanModal" @close="pausePlanCloseClick" @save="pausePlanSaveClick"
|
|
|
+ <!-- 暂停计划 -->
|
|
|
+ <HcDialog
|
|
|
+ bg-color="#ffffff" is-to-body title="暂停计划" widths="40rem" save-text="保存"
|
|
|
+ :show="pausePlanModal" @close="pausePlanCloseClick" @save="pausePlanSaveClick"
|
|
|
>
|
|
|
- <HcListItem title="原计划起止日期:" :content="pausePlan.planStartTime+'~'+pausePlan.planEndTime"/>
|
|
|
- <HcListItem title="中途暂停计划日期:" isCenter>
|
|
|
- <el-date-picker type="date" class="block" value-format="YYYY-MM-DD" v-model="pausePlan.pauseTime" disabled/>
|
|
|
+ <HcListItem title="原计划起止日期:" :content="`${pausePlan.planStartTime}~${pausePlan.planEndTime}`" />
|
|
|
+ <HcListItem title="中途暂停计划日期:" is-center>
|
|
|
+ <el-date-picker v-model="pausePlan.pauseTime" type="date" class="block" value-format="YYYY-MM-DD" disabled />
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="中途开启计划起止日期:" :content="pausePlan?.openPlanStartTime+'~'+pausePlan?.openPlanEndTime" v-if="pausePlan?.openPlanStartTime"/>
|
|
|
- <HcListItem title="中途开启计划起止日期:" content="" v-else/>
|
|
|
- <HcListItem title="原计划起止工时(天):" isCenter>
|
|
|
+ <HcListItem v-if="pausePlan?.openPlanStartTime" title="中途开启计划起止日期:" :content="`${pausePlan?.openPlanStartTime}~${pausePlan?.openPlanEndTime}`" />
|
|
|
+ <HcListItem v-else title="中途开启计划起止日期:" content="" />
|
|
|
+ <HcListItem title="原计划起止工时(天):" is-center>
|
|
|
<span class="text-red text-xl">{{ pausePlan?.planDays }}</span>
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="上一次计划截止暂停阶段起止工时(天):" isCenter>
|
|
|
+ <HcListItem title="上一次计划截止暂停阶段起止工时(天):" is-center>
|
|
|
<span class="text-red text-xl">{{ pausePlan?.realWorkDays }}</span>
|
|
|
</HcListItem>
|
|
|
- <HcListItem title="中途暂停之后开启计划起止工时(天):" isCenter>
|
|
|
- <span class="text-red text-xl">{{ pausePlan?.openPlanStartEndDays }}</span>
|
|
|
+ <HcListItem title="中途暂停之后开启计划起止工时(天):" is-center>
|
|
|
+ <span class="text-red text-xl">{{ pausePlan?.openPlanStartEndDays }}</span>
|
|
|
</HcListItem>
|
|
|
</HcDialog>
|
|
|
-
|
|
|
</HcCard>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-
|
|
|
-import {useRouter,useRoute} from 'vue-router'
|
|
|
-import {onActivated, ref,watch} from "vue";
|
|
|
-import sectionApi from '~api/program/section.js';
|
|
|
-import projectApi from '~api/program/project.js';
|
|
|
-import {getArrValue,getObjValue,formValidate, arrIndex} from "js-fast-way"
|
|
|
-import { getuserList} from "~api/other";
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
+import { onActivated, ref, watch } from 'vue'
|
|
|
+import sectionApi from '~api/program/section.js'
|
|
|
+import projectApi from '~api/program/project.js'
|
|
|
+import { arrIndex, formValidate, getArrValue, getObjValue } from 'js-fast-way'
|
|
|
+import { getuserList } from '~api/other'
|
|
|
const router = useRouter()
|
|
|
const useRoutes = useRoute()
|
|
|
const dataId = ref(useRoutes?.query?.id ?? '')
|
|
|
const dataType = ref(useRoutes?.query?.type ?? '')
|
|
|
-const planDate=ref(useRoutes?.query?.month ?? '')
|
|
|
-const departmentType=ref(useRoutes?.query?.section ?? '')
|
|
|
-const deptId=ref(useRoutes?.query?.deptId ?? '')
|
|
|
+const planDate = ref(useRoutes?.query?.month ?? '')
|
|
|
+const departmentType = ref(useRoutes?.query?.section ?? '')
|
|
|
+const deptId = ref(useRoutes?.query?.deptId ?? '')
|
|
|
+const overPlan = ref(useRoutes?.query?.overPlan ?? false)//是否延期计划
|
|
|
+const costType = ref(useRoutes?.query?.costType ?? '')//门户跳转过来的部门
|
|
|
+const projectId = ref(useRoutes?.query?.projectId ?? '')//门户跳转过来的项目
|
|
|
//缓存页面被激活时
|
|
|
onActivated(() => {
|
|
|
dataId.value = useRoutes?.query?.id ?? ''
|
|
@@ -103,36 +110,62 @@ onActivated(() => {
|
|
|
planDate.value = useRoutes?.query?.month ?? ''
|
|
|
departmentType.value = useRoutes?.query?.section ?? ''
|
|
|
deptId.value = useRoutes?.query?.deptId ?? ''
|
|
|
- setTabData(departmentType.value)
|
|
|
- getDepartmentPlan()
|
|
|
+ overPlan.value = useRoutes?.query?.overPlan ?? false
|
|
|
+ costType.value = useRoutes?.query?.costType ?? ''
|
|
|
+ projectId.value = useRoutes?.query?.projectId ?? ''
|
|
|
getDepartmentuserDict()//获取部门人员字典
|
|
|
+ if (!overPlan.value) {
|
|
|
+ setTabData(departmentType.value)
|
|
|
+ getDepartmentPlan()
|
|
|
+
|
|
|
+ } else {
|
|
|
+ setTabData(costType.value)
|
|
|
+ getDepartmentTimeOutPlan()
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
})
|
|
|
+//获取延期计划
|
|
|
+const getDepartmentTimeOutPlan = async ()=>{
|
|
|
+ const { error, code, data } = await sectionApi.getDepartmentTimeOutPlan(
|
|
|
+ {
|
|
|
+ costType:costType.value,
|
|
|
+ projectId:projectId.value,
|
|
|
+ },
|
|
|
+ )
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(getArrValue(data), '详情')
|
|
|
+ tableData.value = getArrValue(data)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ tableData.value = []
|
|
|
+ }
|
|
|
+}
|
|
|
//获取详情
|
|
|
-const getDepartmentPlan=async()=>{
|
|
|
- const {error, code, data} = await sectionApi.getDepartmentPlan(
|
|
|
+const getDepartmentPlan = async ()=>{
|
|
|
+ const { error, code, data } = await sectionApi.getDepartmentPlan(
|
|
|
{
|
|
|
departmentType:departmentType.value,
|
|
|
deptId:deptId.value,
|
|
|
planDate:planDate.value,
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
)
|
|
|
if (!error && code === 200) {
|
|
|
- console.log(getArrValue(data),'详情');
|
|
|
- tableData.value=getArrValue(data)
|
|
|
+ console.log(getArrValue(data), '详情')
|
|
|
+ tableData.value = getArrValue(data)
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
- // milestoneData.value=[]
|
|
|
+ tableData.value = []
|
|
|
}
|
|
|
}
|
|
|
-const department=ref([])
|
|
|
+const department = ref([])
|
|
|
//获取部门人员列表
|
|
|
-const getDepartmentuserDict=async()=>{
|
|
|
- const {error, code, data} = await getuserList({deptId:deptId.value})
|
|
|
+const getDepartmentuserDict = async ()=>{
|
|
|
+ const { error, code, data } = await getuserList({ deptId:deptId.value })
|
|
|
if (!error && code === 200) {
|
|
|
department.value = getArrValue(data)
|
|
|
|
|
@@ -145,53 +178,50 @@ const getDepartmentuserDict=async()=>{
|
|
|
//类型tab数据和相关处理
|
|
|
const tabKey = ref('1')
|
|
|
const tabTab = ref([
|
|
|
- {key: '1', name: '市场部月度预算'},
|
|
|
- {key: '2', name: '研发部月度预算'},
|
|
|
- {key: '3', name: '实施部月度预算'},
|
|
|
- {key: '4', name: '维护部月度预算'},
|
|
|
- {key: '5', name: '人事行政(财务)部月度预算'},
|
|
|
-]);
|
|
|
-const tabChange = ({key}) => {
|
|
|
+ { key: '1', name: '市场部月度预算' },
|
|
|
+ { key: '2', name: '研发部月度预算' },
|
|
|
+ { key: '3', name: '实施部月度预算' },
|
|
|
+ { key: '4', name: '维护部月度预算' },
|
|
|
+ { key: '5', name: '人事行政(财务)部月度预算' },
|
|
|
+])
|
|
|
+const tabChange = ({ key }) => {
|
|
|
tabKey.value = key
|
|
|
}
|
|
|
//设置tab
|
|
|
-const setTabData=(key)=>{
|
|
|
- tabKey.value=key
|
|
|
- if(key=='1'){
|
|
|
- tabTab.value=[{key: '1', name: '市场部月度预算'}]
|
|
|
- }else if(key=='2'){
|
|
|
- console.log(2222222);
|
|
|
- tabTab.value=[{key: '2', name: '研发部月度预算'},]
|
|
|
- }else if(key=='3'){
|
|
|
- tabTab.value=[ {key: '3', name: '实施部月度预算'},]
|
|
|
- }else if(key=='4'){
|
|
|
- tabTab.value=[ {key: '4', name: '维护部月度预算'},]
|
|
|
- }else if(key=='5'){
|
|
|
- tabTab.value=[{key: '5', name: '人事行政(财务)部月度预算'},]
|
|
|
+const setTabData = (key)=>{
|
|
|
+ tabKey.value = key
|
|
|
+ if (key == '1') {
|
|
|
+ tabTab.value = [{ key: '1', name: '市场部月度预算' }]
|
|
|
+ } else if (key == '2') {
|
|
|
+ console.log(2222222)
|
|
|
+ tabTab.value = [{ key: '2', name: '研发部月度预算' }]
|
|
|
+ } else if (key == '3') {
|
|
|
+ tabTab.value = [ { key: '3', name: '实施部月度预算' }]
|
|
|
+ } else if (key == '4') {
|
|
|
+ tabTab.value = [ { key: '4', name: '维护部月度预算' }]
|
|
|
+ } else if (key == '5') {
|
|
|
+ tabTab.value = [{ key: '5', name: '人事行政(财务)部月度预算' }]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//获取数据
|
|
|
const tableLoading = ref(false)
|
|
|
const tableColumn = [
|
|
|
- {key: 'projectName', name: '所属项目', minWidth: '160'},
|
|
|
- {key: 'projectProcessValue', name: '项目环节', width: '160', align: 'center'},
|
|
|
- {key: 'budgetTypeValue', name: '预算类型', width: '160', align: 'center'},
|
|
|
- {key: 'taskDetailValue', name: '任务明细', width: '160', align: 'center'},
|
|
|
- {key: 'planTaskTypeValue', name: '任务类型', width: '160', align: 'center'},
|
|
|
- {key: 'planTaskDesc', name: '任务描述', minWidth: '160', isTooltip: true},
|
|
|
- {key: 'planTarget', name: '完成指标', width: '160', align: 'center'},
|
|
|
- {key: 'taskUser', name: '任务人', width: '160', align: 'center'},
|
|
|
- {key: 'key10', name: '计划起止日期', width: '220', align: 'center'},
|
|
|
- {key: 'budgetTravelExpense', name: '预计差旅费(元)', width: '180', align: 'center'},
|
|
|
- {key: 'statusValue', name: '状态', width: '100', align: 'center'},
|
|
|
- {key: 'action', name: '操作', width: '160', align: 'center', fixed: 'right'},
|
|
|
+ { key: 'projectName', name: '所属项目', minWidth: '160' },
|
|
|
+ { key: 'projectProcessValue', name: '项目环节', width: '160', align: 'center' },
|
|
|
+ { key: 'budgetTypeValue', name: '预算类型', width: '160', align: 'center' },
|
|
|
+ { key: 'taskDetailValue', name: '任务明细', width: '160', align: 'center' },
|
|
|
+ { key: 'planTaskTypeValue', name: '任务类型', width: '160', align: 'center' },
|
|
|
+ { key: 'planTaskDesc', name: '任务描述', minWidth: '160', isTooltip: true },
|
|
|
+ { key: 'planTarget', name: '完成指标', width: '160', align: 'center' },
|
|
|
+ { key: 'taskUser', name: '任务人', width: '160', align: 'center' },
|
|
|
+ { key: 'key10', name: '计划起止日期', width: '220', align: 'center' },
|
|
|
+ { key: 'budgetTravelExpense', name: '预计差旅费(元)', width: '180', align: 'center' },
|
|
|
+ { key: 'statusValue', name: '状态', width: '100', align: 'center' },
|
|
|
+ { key: 'action', name: '操作', width: '160', align: 'center', fixed: 'right' },
|
|
|
]
|
|
|
const tableData = ref([
|
|
|
- {id: 1, key1: 'xxx', key2: 'xxx', key3: 'xx', key4: 'xx', key5: 'xx', key6: 'xx', key10: '2022-07-01~2027-04-12'},
|
|
|
- {id: 2, key1: 'xxx', key2: 'xxx', key3: 'xx', key4: 'xx', key5: 'xx', key6: 'xx', key10: '2022-07-01~2027-04-12'},
|
|
|
- {id: 3, key1: 'xxx', key2: 'xxx', key3: 'xx', key4: 'xx', key5: 'xx', key6: 'xx', key10: '2022-07-01~2027-04-12'},
|
|
|
- {id: 4, key1: 'xxx', key2: 'xxx', key3: 'xx', key4: 'xx', key5: 'xx', key6: 'xx', key10: '2022-07-01~2027-04-12'},
|
|
|
+
|
|
|
])
|
|
|
|
|
|
const getTableData = () => {
|
|
@@ -205,12 +235,12 @@ const openPlanModalShow = (row) => {
|
|
|
openPlanModal.value = true
|
|
|
}
|
|
|
//获取开启计划
|
|
|
-const openPlan=ref({})
|
|
|
-const getPlanInOpen=async(id)=>{
|
|
|
- const {error, code, data} = await sectionApi.getPlanInOpen({id})
|
|
|
+const openPlan = ref({})
|
|
|
+const getPlanInOpen = async (id)=>{
|
|
|
+ const { error, code, data } = await sectionApi.getPlanInOpen({ id })
|
|
|
if (!error && code === 200) {
|
|
|
openPlan.value = getObjValue(data)
|
|
|
- betweenTime.value=[openPlan.value.openPlanStartTime,openPlan.value.openPlanEndTime]
|
|
|
+ betweenTime.value = [openPlan.value.openPlanStartTime, openPlan.value.openPlanEndTime]
|
|
|
} else {
|
|
|
openPlan.value = {}
|
|
|
|
|
@@ -219,11 +249,11 @@ const getPlanInOpen=async(id)=>{
|
|
|
const openPlanCloseClick = () => {
|
|
|
openPlanModal.value = false
|
|
|
}
|
|
|
-const openPlanSaveLoaing=ref(false)
|
|
|
-const openPlanSaveClick = async() => {
|
|
|
- openPlanSaveLoaing.value=true
|
|
|
- const {error, code, data,msg} = await sectionApi.savePlanInOpen( openPlan.value)
|
|
|
- openPlanSaveLoaing.value=false
|
|
|
+const openPlanSaveLoaing = ref(false)
|
|
|
+const openPlanSaveClick = async () => {
|
|
|
+ openPlanSaveLoaing.value = true
|
|
|
+ const { error, code, data, msg } = await sectionApi.savePlanInOpen( openPlan.value)
|
|
|
+ openPlanSaveLoaing.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
getDepartmentPlan().then()
|
|
@@ -233,13 +263,13 @@ const openPlanSaveClick = async() => {
|
|
|
|
|
|
//日期时间被选择
|
|
|
const betweenTime = ref(null)
|
|
|
-const betweenTimeUpdate =async ({arr, query}) => {
|
|
|
- arr[0]=openPlan.value.openPlanStartTime
|
|
|
- openPlan.value.openPlanEndTime=arr[1]
|
|
|
- const {error, code, data,msg} = await sectionApi.updateOpenTime( openPlan.value)
|
|
|
- openPlanSaveLoaing.value=false
|
|
|
+const betweenTimeUpdate = async ({ arr, query }) => {
|
|
|
+ arr[0] = openPlan.value.openPlanStartTime
|
|
|
+ openPlan.value.openPlanEndTime = arr[1]
|
|
|
+ const { error, code, data, msg } = await sectionApi.updateOpenTime( openPlan.value)
|
|
|
+ openPlanSaveLoaing.value = false
|
|
|
if (!error && code === 200) {
|
|
|
- openPlan.value=data
|
|
|
+ openPlan.value = data
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -252,9 +282,9 @@ const pausePlanModalShow = (row) => {
|
|
|
pausePlanModal.value = true
|
|
|
}
|
|
|
//获取暂停计划
|
|
|
-const pausePlan=ref({})
|
|
|
-const getPlanInPause=async(id)=>{
|
|
|
- const {error, code, data} = await sectionApi.getPlanInPause({id})
|
|
|
+const pausePlan = ref({})
|
|
|
+const getPlanInPause = async (id)=>{
|
|
|
+ const { error, code, data } = await sectionApi.getPlanInPause({ id })
|
|
|
if (!error && code === 200) {
|
|
|
pausePlan.value = getObjValue(data)
|
|
|
|
|
@@ -266,12 +296,12 @@ const getPlanInPause=async(id)=>{
|
|
|
const pausePlanCloseClick = () => {
|
|
|
pausePlanModal.value = false
|
|
|
}
|
|
|
-const pauseSaveLoading=ref(false)
|
|
|
-const pausePlanSaveClick = async() => {
|
|
|
- console.log(pausePlan.value,'pausePlan');
|
|
|
- pauseSaveLoading.value=true
|
|
|
- const {error, code, data,msg} = await sectionApi.savePlanInPause( pausePlan.value)
|
|
|
- pauseSaveLoading.value=false
|
|
|
+const pauseSaveLoading = ref(false)
|
|
|
+const pausePlanSaveClick = async () => {
|
|
|
+ console.log(pausePlan.value, 'pausePlan')
|
|
|
+ pauseSaveLoading.value = true
|
|
|
+ const { error, code, data, msg } = await sectionApi.savePlanInPause( pausePlan.value)
|
|
|
+ pauseSaveLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
getDepartmentPlan().then()
|
|
@@ -280,13 +310,13 @@ const pausePlanSaveClick = async() => {
|
|
|
}
|
|
|
//获取起止日期
|
|
|
|
|
|
-const getWorkDays=async(startDate,endDate)=>{
|
|
|
- const {error, code, data,msg} = await projectApi.getWorkDays( {
|
|
|
+const getWorkDays = async (startDate, endDate)=>{
|
|
|
+ const { error, code, data, msg } = await projectApi.getWorkDays( {
|
|
|
startDate,
|
|
|
- endDate
|
|
|
+ endDate,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
- if(data){
|
|
|
+ if (data) {
|
|
|
return data
|
|
|
}
|
|
|
}
|
|
@@ -296,12 +326,12 @@ const getWorkDays=async(startDate,endDate)=>{
|
|
|
const goBackClick = () => {
|
|
|
router.back()
|
|
|
}
|
|
|
-const saveLoaing=ref(false)
|
|
|
+const saveLoaing = ref(false)
|
|
|
//提交保存
|
|
|
-const saveClick = async() => {
|
|
|
- saveLoaing.value=true
|
|
|
- const {error, code, data,msg} = await sectionApi.updateDepartmentPlan( {departmentPlanList:tableData.value})
|
|
|
- saveLoaing.value=false
|
|
|
+const saveClick = async () => {
|
|
|
+ saveLoaing.value = true
|
|
|
+ const { error, code, data, msg } = await sectionApi.updateDepartmentPlan( { departmentPlanList:tableData.value })
|
|
|
+ saveLoaing.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
getDepartmentPlan().then()
|