|
|
@ -3,9 +3,9 @@ |
|
|
|
<div class="wrapper"> |
|
|
|
<div class="wrapper"> |
|
|
|
<div class="title">基本信息</div> |
|
|
|
<div class="title">基本信息</div> |
|
|
|
<div class="box"> |
|
|
|
<div class="box"> |
|
|
|
|
|
|
|
|
|
|
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="auto" class="formClass" size="large"> |
|
|
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="auto" class="formClass" size="large"> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="任务标题" prop="title"> |
|
|
|
<el-form-item label="任务标题" prop="title"> |
|
|
|
<el-input v-model="formData.title" placeholder="请输入任务标题" /> |
|
|
|
<el-input v-model="formData.title" placeholder="请输入任务标题" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -20,7 +20,7 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="描述" prop="description" style="width: 100%; padding: 0; margin-top: 0px;" class="descClass"> |
|
|
|
<el-form-item label="描述" prop="description" style="width: 100%; padding: 0; margin-top: 0px;" class="descClass"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
type="textarea" |
|
|
@ -45,7 +45,7 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="执行周期" prop="execCycle" v-if="formData.taskType == 2"> |
|
|
|
<!-- <el-form-item label="执行周期" prop="execCycle" v-if="formData.taskType == 2"> |
|
|
|
<el-select v-model="formData.execCycle" placeholder="请选择执行周期"> |
|
|
|
<el-select v-model="formData.execCycle" placeholder="请选择执行周期"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
@ -66,10 +66,39 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="上传文件" prop="execCycle"> |
|
|
|
|
|
|
|
<el-upload |
|
|
|
|
|
|
|
ref="upload" |
|
|
|
|
|
|
|
class="upload-demo" |
|
|
|
|
|
|
|
:limit="3" |
|
|
|
|
|
|
|
:auto-upload="true" |
|
|
|
|
|
|
|
:on-change="handleFileChange" |
|
|
|
|
|
|
|
:on-remove="handleFileRemove" |
|
|
|
|
|
|
|
:file-list="fileList" |
|
|
|
|
|
|
|
:action="fileAction" |
|
|
|
|
|
|
|
:headers="{ Authorization: 'Bearer ' + getAccessToken() }" |
|
|
|
|
|
|
|
:on-success="handleUploadSuccess" |
|
|
|
|
|
|
|
:on-error="handleUploadError" |
|
|
|
|
|
|
|
accept=".doc,.docx,.pdf,.xls,.xlsx" |
|
|
|
|
|
|
|
:before-upload="beforeUpload" |
|
|
|
|
|
|
|
:on-preview="handlePreview" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #trigger> |
|
|
|
|
|
|
|
<el-button type="primary">上传文件</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template #tip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-upload> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="wrapper-down"> |
|
|
|
<div class="wrapper-down"> |
|
|
@ -88,9 +117,9 @@ |
|
|
|
:value="dict.id" |
|
|
|
:value="dict.id" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
@ -106,8 +135,8 @@ |
|
|
|
:value="dict.value" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="btn"> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary" plain size="large" @click="handleQuery"> |
|
|
|
<el-button type="primary" plain size="large" @click="handleQuery"> |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> 查询 |
|
|
|
<Icon icon="ep:search" class="mr-5px" /> 查询 |
|
|
@ -117,7 +146,7 @@ |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
|
|
|
|
|
|
|
|
<el-select |
|
|
|
<el-select |
|
|
@ -135,7 +164,7 @@ |
|
|
|
:value="dict.tagName" |
|
|
|
:value="dict.tagName" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
<div class="btn2"> |
|
|
|
<div class="btn2"> |
|
|
|
<el-button @click="insertEnterprise" type="primary" size="large"> |
|
|
|
<el-button @click="insertEnterprise" type="primary" size="large"> |
|
|
|
<el-icon><Sort /></el-icon> 筛选企业 |
|
|
|
<el-icon><Sort /></el-icon> 筛选企业 |
|
|
@ -223,11 +252,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="footer"> |
|
|
|
<div class="footer"> |
|
|
|
|
|
|
|
<el-button type="danger" link v-if="formData.status < 2" @click="handleDeleteTask">删除任务?</el-button> |
|
|
|
<el-button type="primary" @click="submitForm" size="large" v-if="!formData.status || formData.status == 0 || formData.status == 1" >{{btnTitle}}</el-button> |
|
|
|
<el-button type="primary" @click="submitForm" size="large" v-if="!formData.status || formData.status == 0 || formData.status == 1" >{{btnTitle}}</el-button> |
|
|
|
<el-button type="danger" link v-if="formData.status == 0" @click="handleDeleteTask">删除任务?</el-button> |
|
|
|
|
|
|
|
<el-button @click="goBack" size="large">返回列表</el-button> |
|
|
|
<el-button @click="goBack" size="large">返回列表</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<CreateEnterprise ref="formCreateRef" @success="getList" /> |
|
|
|
<CreateEnterprise ref="formCreateRef" @success="getList" /> |
|
|
@ -241,6 +270,10 @@ import { useTagsViewStore } from '@/store/modules/tagsView' |
|
|
|
import CreateEnterprise from './createEnterprise.vue' |
|
|
|
import CreateEnterprise from './createEnterprise.vue' |
|
|
|
import { cloneDeep } from 'lodash-es'; |
|
|
|
import { cloneDeep } from 'lodash-es'; |
|
|
|
import { getSimpleUserZGList } from '@/api/system/user' |
|
|
|
import { getSimpleUserZGList } from '@/api/system/user' |
|
|
|
|
|
|
|
// import { UploadFile } from '@/components/UploadFile' |
|
|
|
|
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
import { deleteFile } from '@/api/system/fileinfo' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'CreateTask'}) |
|
|
|
defineOptions({ name: 'CreateTask'}) |
|
|
|
const formData:any = ref({ |
|
|
|
const formData:any = ref({ |
|
|
@ -261,6 +294,7 @@ const formData:any = ref({ |
|
|
|
taskStep: undefined, |
|
|
|
taskStep: undefined, |
|
|
|
taskTotal: undefined, |
|
|
|
taskTotal: undefined, |
|
|
|
planTime: [] as any, |
|
|
|
planTime: [] as any, |
|
|
|
|
|
|
|
fileIds: [], |
|
|
|
tags: [], |
|
|
|
tags: [], |
|
|
|
enterprises: [] as any |
|
|
|
enterprises: [] as any |
|
|
|
}) |
|
|
|
}) |
|
|
@ -289,6 +323,52 @@ const formRules = reactive({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
const { query } = useRoute() |
|
|
|
const { query } = useRoute() |
|
|
|
const formRef = ref() // 表单 Ref` |
|
|
|
const formRef = ref() // 表单 Ref` |
|
|
|
|
|
|
|
const fileList:any = ref([]) |
|
|
|
|
|
|
|
const fileAction = ref(import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/infra/file/upload') |
|
|
|
|
|
|
|
// 文件选择变化 |
|
|
|
|
|
|
|
const beforeUpload = (file) => { |
|
|
|
|
|
|
|
const isLt10M = file.size / 1024 / 1024 < 10 |
|
|
|
|
|
|
|
if (!isLt10M) { |
|
|
|
|
|
|
|
message.error('文件大小不能超过10MB') |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleFileChange = (file, fileList) => { |
|
|
|
|
|
|
|
fileList.value = fileList |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 文件移除 |
|
|
|
|
|
|
|
const handleFileRemove = async (file, fileList) => { |
|
|
|
|
|
|
|
// fileList.value = fileList |
|
|
|
|
|
|
|
console.log(file) |
|
|
|
|
|
|
|
await message.delConfirm('是否确定删除文件?', '删除文件') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (file.id) { |
|
|
|
|
|
|
|
await deleteFile(file.id) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message.success('删除成功') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 上传成功 |
|
|
|
|
|
|
|
const handleUploadSuccess = (response, file, fileList) => { |
|
|
|
|
|
|
|
console.log(response.data) |
|
|
|
|
|
|
|
formData.value.fileIds.push(response.data.id) |
|
|
|
|
|
|
|
message.success('文件上传成功') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 上传失败 |
|
|
|
|
|
|
|
const handlePreview = (file) => { |
|
|
|
|
|
|
|
window.open(file.url) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleUploadError = (error, file, fileList) => { |
|
|
|
|
|
|
|
message.error('文件上传失败') |
|
|
|
|
|
|
|
} |
|
|
|
const enterprise:any = ref({ |
|
|
|
const enterprise:any = ref({ |
|
|
|
list: [] as any, |
|
|
|
list: [] as any, |
|
|
|
queryParams: reactive({ |
|
|
|
queryParams: reactive({ |
|
|
@ -314,14 +394,14 @@ const handleDeleteTask = async () => { |
|
|
|
|
|
|
|
|
|
|
|
await message.delConfirm("是否确定删除任务!", "删除任务") |
|
|
|
await message.delConfirm("是否确定删除任务!", "删除任务") |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
await TaskInfoApi.deleteTaskInfo(formData.value.id) |
|
|
|
await TaskInfoApi.deleteTaskInfo(formData.value.id) |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
message.success('操作成功') |
|
|
|
message.success('操作成功') |
|
|
|
tagView.delView(route) |
|
|
|
tagView.delView(route) |
|
|
|
router.go(-1) |
|
|
|
router.go(-1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -329,7 +409,7 @@ const handleDeleteTask = async () => { |
|
|
|
|
|
|
|
|
|
|
|
const paginatedData = computed(() => { |
|
|
|
const paginatedData = computed(() => { |
|
|
|
const start = (enterprise.value.queryParams.pageNo -1) * enterprise.value.queryParams.pageSize |
|
|
|
const start = (enterprise.value.queryParams.pageNo -1) * enterprise.value.queryParams.pageSize |
|
|
|
const end = enterprise.value.queryParams.pageNo * enterprise.value.queryParams.pageSize |
|
|
|
const end = enterprise.value.queryParams.pageNo * enterprise.value.queryParams.pageSize |
|
|
|
return enterprise.value.list.slice(start, end); // 动态计算分页数据:ml-citation{ref="1,4" data="citationList"} |
|
|
|
return enterprise.value.list.slice(start, end); // 动态计算分页数据:ml-citation{ref="1,4" data="citationList"} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -353,12 +433,12 @@ const handleDelete = async (id: number) => { |
|
|
|
// 删除的二次确认 |
|
|
|
// 删除的二次确认 |
|
|
|
await message.delConfirm() |
|
|
|
await message.delConfirm() |
|
|
|
// 找到目标索引 |
|
|
|
// 找到目标索引 |
|
|
|
deleteHandle(id) |
|
|
|
deleteHandle(id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const deleteHandle = (id: number) => { |
|
|
|
const deleteHandle = (id: number) => { |
|
|
|
const targetIndex = enterprise.value.list.findIndex(item => item.id === id); |
|
|
|
const targetIndex = enterprise.value.list.findIndex(item => item.id === id); |
|
|
|
|
|
|
|
|
|
|
|
if (targetIndex === -1) return; |
|
|
|
if (targetIndex === -1) return; |
|
|
|
|
|
|
|
|
|
|
|
// 删除元素(触发响应式更新) |
|
|
|
// 删除元素(触发响应式更新) |
|
|
@ -371,13 +451,13 @@ const deleteHandle = (id: number) => { |
|
|
|
// 可选:自动调整分页页码(如果当前页数据被删空) |
|
|
|
// 可选:自动调整分页页码(如果当前页数据被删空) |
|
|
|
const { pageNo, pageSize } = enterprise.value.queryParams; |
|
|
|
const { pageNo, pageSize } = enterprise.value.queryParams; |
|
|
|
const itemsOnCurrentPage = enterprise.value.list.slice( |
|
|
|
const itemsOnCurrentPage = enterprise.value.list.slice( |
|
|
|
(pageNo - 1) * pageSize, |
|
|
|
(pageNo - 1) * pageSize, |
|
|
|
pageNo * pageSize |
|
|
|
pageNo * pageSize |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if (itemsOnCurrentPage.length === 0 && pageNo > 1) { |
|
|
|
if (itemsOnCurrentPage.length === 0 && pageNo > 1) { |
|
|
|
enterprise.value.queryParams.pageNo = pageNo - 1; |
|
|
|
enterprise.value.queryParams.pageNo = pageNo - 1; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const enterprise_copy = ref({ |
|
|
|
const enterprise_copy = ref({ |
|
|
@ -411,11 +491,11 @@ const isAllConditionsEmpty = computed(() => { |
|
|
|
|
|
|
|
|
|
|
|
const isTagMatched2 = (hy: string[], tagList?: string[] | null) => { |
|
|
|
const isTagMatched2 = (hy: string[], tagList?: string[] | null) => { |
|
|
|
// 情况1:无筛选条件 => 直接通过 |
|
|
|
// 情况1:无筛选条件 => 直接通过 |
|
|
|
if (!hy?.length) return true; |
|
|
|
if (!hy?.length) return true; |
|
|
|
|
|
|
|
|
|
|
|
// 情况2:目标数据无效 => 拒绝 |
|
|
|
// 情况2:目标数据无效 => 拒绝 |
|
|
|
if (!Array.isArray(tagList) || tagList.length === 0) return false; |
|
|
|
if (!Array.isArray(tagList) || tagList.length === 0) return false; |
|
|
|
|
|
|
|
|
|
|
|
// 情况3:正常筛选 |
|
|
|
// 情况3:正常筛选 |
|
|
|
return hy.some(tag => tagList.includes(tag)); |
|
|
|
return hy.some(tag => tagList.includes(tag)); |
|
|
|
}; |
|
|
|
}; |
|
|
@ -439,28 +519,28 @@ const filterList = (list: EnterprisesVO[]) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 2. 解构查询参数(带默认值避免undefined) |
|
|
|
// 2. 解构查询参数(带默认值避免undefined) |
|
|
|
const { |
|
|
|
const { |
|
|
|
enterprisesName = '', |
|
|
|
enterprisesName = '', |
|
|
|
qy = null, |
|
|
|
qy = null, |
|
|
|
hy = [], |
|
|
|
hy = [], |
|
|
|
userId = null |
|
|
|
userId = null |
|
|
|
} = enterprise.value.queryParams || {}; |
|
|
|
} = enterprise.value.queryParams || {}; |
|
|
|
|
|
|
|
|
|
|
|
// 3. 使用语义化变量名过滤 |
|
|
|
// 3. 使用语义化变量名过滤 |
|
|
|
return list.filter(item => { |
|
|
|
return list.filter(item => { |
|
|
|
const isNameMatched = enterprisesName |
|
|
|
const isNameMatched = enterprisesName |
|
|
|
? item.enterprisesName?.toLowerCase().includes(enterprisesName.toLowerCase()) |
|
|
|
? item.enterprisesName?.toLowerCase().includes(enterprisesName.toLowerCase()) |
|
|
|
: true; |
|
|
|
: true; |
|
|
|
|
|
|
|
|
|
|
|
const isRegionMatched = qy |
|
|
|
const isRegionMatched = qy |
|
|
|
? item.region === qy |
|
|
|
? item.region === qy |
|
|
|
: true; |
|
|
|
: true; |
|
|
|
|
|
|
|
|
|
|
|
const isTagMatched = isTagMatched2(hy, item.tagList); |
|
|
|
const isTagMatched = isTagMatched2(hy, item.tagList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isUserMatched = userId |
|
|
|
const isUserMatched = userId |
|
|
|
? item.userId === userId |
|
|
|
? item.userId === userId |
|
|
|
: true; |
|
|
|
: true; |
|
|
|
|
|
|
|
|
|
|
|
return isNameMatched && isRegionMatched && isTagMatched && isUserMatched; |
|
|
|
return isNameMatched && isRegionMatched && isTagMatched && isUserMatched; |
|
|
@ -504,9 +584,9 @@ const hyList:any = ref([]) |
|
|
|
async function getTagList() { |
|
|
|
async function getTagList() { |
|
|
|
const codeList = 'hy' |
|
|
|
const codeList = 'hy' |
|
|
|
const data = await TagLibraryApi.tagLibraryList(codeList) |
|
|
|
const data = await TagLibraryApi.tagLibraryList(codeList) |
|
|
|
|
|
|
|
|
|
|
|
hyList.value = data[0].children |
|
|
|
hyList.value = data[0].children |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -524,9 +604,12 @@ function uniqueFunc(arr, uniId) { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
async function submitForm() { |
|
|
|
async function submitForm() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const validate = await unref(formRef).validate() |
|
|
|
|
|
|
|
|
|
|
|
let title:any = '' |
|
|
|
let title:any = '' |
|
|
|
let content:any = '' |
|
|
|
let content:any = '' |
|
|
|
|
|
|
|
|
|
|
|
if (formData.value.id) { |
|
|
|
if (formData.value.id) { |
|
|
|
title = '修改任务' |
|
|
|
title = '修改任务' |
|
|
|
content = '是否确定修改任务?' |
|
|
|
content = '是否确定修改任务?' |
|
|
@ -536,12 +619,13 @@ async function submitForm() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await message.delConfirm(content, title) |
|
|
|
await message.delConfirm(content, title) |
|
|
|
|
|
|
|
|
|
|
|
const validate = await unref(formRef).validate() |
|
|
|
|
|
|
|
if (validate) { |
|
|
|
if (validate) { |
|
|
|
//把所有数据转成 id的数组 |
|
|
|
//把所有数据转成 id的数组 |
|
|
|
const data = JSON.parse(JSON.stringify(formData.value)) |
|
|
|
const data = JSON.parse(JSON.stringify(formData.value)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enterprise.value.list |
|
|
|
enterprise.value.list |
|
|
|
|
|
|
|
|
|
|
|
//任务状态默认初始值1 |
|
|
|
//任务状态默认初始值1 |
|
|
@ -573,7 +657,7 @@ async function submitForm() { |
|
|
|
message.success('温馨提示:该任务已经执行,无法再进行修改') |
|
|
|
message.success('温馨提示:该任务已经执行,无法再进行修改') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -600,11 +684,13 @@ async function init() { |
|
|
|
taskTopQuery() |
|
|
|
taskTopQuery() |
|
|
|
|
|
|
|
|
|
|
|
if (query.id) { |
|
|
|
if (query.id) { |
|
|
|
|
|
|
|
|
|
|
|
btnTitle.value = '修改任务' |
|
|
|
btnTitle.value = '修改任务' |
|
|
|
showButton.value = true |
|
|
|
showButton.value = true |
|
|
|
|
|
|
|
|
|
|
|
const res= await TaskInfoApi.getTaskInfo(query.id) |
|
|
|
const res= await TaskInfoApi.getTaskInfo(query.id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formData.value = res |
|
|
|
formData.value = res |
|
|
|
//查询标签 |
|
|
|
//查询标签 |
|
|
|
const tag = await TagLibraryApi.getTagLibrary(res.taskType) |
|
|
|
const tag = await TagLibraryApi.getTagLibrary(res.taskType) |
|
|
@ -615,12 +701,23 @@ async function init() { |
|
|
|
formData.value.execCycle = formData.value.execCycle.toString() |
|
|
|
formData.value.execCycle = formData.value.execCycle.toString() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fileList.value = (res.fileList || []).map(item => ({ |
|
|
|
|
|
|
|
name: item.name, |
|
|
|
|
|
|
|
url: item.url, |
|
|
|
|
|
|
|
id: item.id, |
|
|
|
|
|
|
|
status: 'success' |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
formData.value.planTime = [formData.value.startDate, formData.value.endDate] |
|
|
|
formData.value.planTime = [formData.value.startDate, formData.value.endDate] |
|
|
|
formData.value.enterprises = res.enterpriseIdes |
|
|
|
formData.value.enterprises = res.enterpriseIdes |
|
|
|
|
|
|
|
formData.value.fileIds = (res.fileList || []).map(i =>i.id) |
|
|
|
|
|
|
|
// formData.value.fileList = res.fileList.map(i =>i.name) |
|
|
|
formData.value.tags = res.taskTagIdes.map((t) => t.tagId) |
|
|
|
formData.value.tags = res.taskTagIdes.map((t) => t.tagId) |
|
|
|
enterprise.value.list = res.enterpriseIdes |
|
|
|
enterprise.value.list = res.enterpriseIdes |
|
|
|
enterprise.value.total = res.enterpriseIdes.length |
|
|
|
enterprise.value.total = res.enterpriseIdes.length |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//深拷贝一份 |
|
|
|
//深拷贝一份 |
|
|
|
enterprise_copy.value = cloneDeep(enterprise.value); |
|
|
|
enterprise_copy.value = cloneDeep(enterprise.value); |
|
|
|
|
|
|
|
|
|
|
@ -692,7 +789,7 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -729,7 +826,7 @@ onMounted(() => { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: flex-end; |
|
|
|
align-items: flex-end; |
|
|
|
justify-content: center; |
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|