|
|
@ -9,29 +9,6 @@ |
|
|
|
<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> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="任务类型" prop="taskType"> |
|
|
|
|
|
|
|
<el-select v-model="formData.taskType" placeholder="请选择任务类型" size="large"> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="dict in tagChildList" |
|
|
|
|
|
|
|
:key="dict.id" |
|
|
|
|
|
|
|
:label="dict.tagName" |
|
|
|
|
|
|
|
:value="dict.id" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="描述" prop="description" style="width: 100%; padding: 0; margin-top: 0px;" class="descClass"> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
type="textarea" |
|
|
|
|
|
|
|
v-model="formData.description" |
|
|
|
|
|
|
|
:autosize="{ |
|
|
|
|
|
|
|
minRows: 5 |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
placeholder="请输入描述" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="时间周期" prop="planTime"> |
|
|
|
<el-form-item label="时间周期" prop="planTime"> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker |
|
|
|
v-model="formData.planTime" |
|
|
|
v-model="formData.planTime" |
|
|
@ -44,8 +21,26 @@ |
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="描述" prop="description" style="width: 100%; padding: 0; margin-top: 0px;" class="descClass"> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
type="textarea" |
|
|
|
|
|
|
|
v-model="formData.description" |
|
|
|
|
|
|
|
:autosize="{ |
|
|
|
|
|
|
|
minRows: 5 |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
placeholder="请输入描述" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="任务类型" prop="taskTopType"> |
|
|
|
|
|
|
|
<el-select v-model="formData.taskTopType" placeholder="请选择任务类型" size="large" @change="selectChild"> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="dict in taskTagTopList" |
|
|
|
|
|
|
|
:key="dict.id" |
|
|
|
|
|
|
|
:label="dict.tagName" |
|
|
|
|
|
|
|
:value="dict.id" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</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 |
|
|
@ -56,13 +51,13 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item label="通知时间" prop="execCycle"> |
|
|
|
<el-form-item label="类型选项" prop="taskType"> |
|
|
|
<el-select v-model="formData.execCycle" placeholder="请选择任务选项" > |
|
|
|
<el-select v-model="formData.taskType" placeholder="请选择任务选项" :disabled="isReadonly" > |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.TASK_NOTICE_TIME)" |
|
|
|
v-for="dict in tagChildList" |
|
|
|
:key="dict.value" |
|
|
|
:key="dict.id" |
|
|
|
:label="dict.label" |
|
|
|
:label="dict.tagName" |
|
|
|
:value="dict.value" |
|
|
|
:value="dict.id" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -89,11 +84,14 @@ |
|
|
|
:value="dict.value" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
<el-input |
|
|
|
<el-select v-model="enterprise.queryParams.userId" placeholder="请选择执法人员" size="large" filterable clearable> |
|
|
|
v-model="enterprise.queryParams.enterprisesName" |
|
|
|
<el-option |
|
|
|
placeholder="请输入企业名称" size="large" |
|
|
|
v-for="dict in userList" |
|
|
|
/> |
|
|
|
:key="dict.id" |
|
|
|
|
|
|
|
:label="dict.deptName +'_'+ dict.realName" |
|
|
|
|
|
|
|
:value="dict.id" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
@ -109,7 +107,24 @@ |
|
|
|
:value="dict.tagName" |
|
|
|
:value="dict.tagName" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="enterprise.queryParams.enterprisesName" |
|
|
|
|
|
|
|
placeholder="请输入企业名称" size="large" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="enterprise.queryParams.st" |
|
|
|
|
|
|
|
placeholder="请选择生态" size="large" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="dict in stList" |
|
|
|
|
|
|
|
:key="dict.id" |
|
|
|
|
|
|
|
:label="dict.tagName" |
|
|
|
|
|
|
|
:value="dict.tagName" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</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" /> 查询 |
|
|
@ -118,15 +133,20 @@ |
|
|
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置 |
|
|
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-select v-model="enterprise.queryParams.userId" placeholder="请选择执法人员" size="large" filterable clearable> |
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="enterprise.queryParams.wr" |
|
|
|
|
|
|
|
placeholder="请选择污染程度" |
|
|
|
|
|
|
|
size="large" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="dict in userList" |
|
|
|
v-for="dict in wrList" |
|
|
|
:key="dict.id" |
|
|
|
:key="dict.id" |
|
|
|
:label="dict.deptName +'_'+ dict.realName" |
|
|
|
:label="dict.tagName" |
|
|
|
:value="dict.id" |
|
|
|
:value="dict.tagName" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
<div class="btn2"> |
|
|
|
<div class="btn2"> |
|
|
@ -234,20 +254,24 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="footer"> |
|
|
|
<div class="footer"> |
|
|
|
<el-button type="primary" @click="submitForm(false)" size="large">{{btnTitle}}</el-button> |
|
|
|
<el-button type="primary" @click="submitForm" size="large">发布任务</el-button> |
|
|
|
|
|
|
|
<el-button @click="goBack" size="large">返回列表</el-button> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
type="warning" |
|
|
|
v-if="showButton" |
|
|
|
v-if="showButton" |
|
|
|
@click="submitForm(true)" |
|
|
|
@click="submitForm" |
|
|
|
size="large" |
|
|
|
size="large" |
|
|
|
v-hasPermi="['system:enterprise-inspections:audit']" |
|
|
|
v-hasPermi="['system:enterprise-inspections:audit']" |
|
|
|
>审核通过</el-button |
|
|
|
>审核通过</el-button |
|
|
|
> |
|
|
|
> |
|
|
|
<el-button type="danger" link v-if="formData.status == 0" @click="handleDeleteTask('delete')">删除任务?</el-button> |
|
|
|
<el-button |
|
|
|
<el-button type="warning" link v-if="formData.status == 2" @click="handleDeleteTask('end')">结束任务?</el-button> |
|
|
|
type="danger" |
|
|
|
|
|
|
|
@click="submitForm" |
|
|
|
<el-button @click="goBack" size="large">返回列表</el-button> |
|
|
|
v-if="showButton" |
|
|
|
|
|
|
|
size="large" |
|
|
|
|
|
|
|
v-hasPermi="['system:enterprise-inspections:audit']" |
|
|
|
|
|
|
|
>删除</el-button |
|
|
|
|
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -265,7 +289,7 @@ import { cloneDeep } from 'lodash-es'; |
|
|
|
import { getSimpleUserZGList } from '@/api/system/user' |
|
|
|
import { getSimpleUserZGList } from '@/api/system/user' |
|
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'CreateTask'}) |
|
|
|
defineOptions({ name: 'CreateTask'}) |
|
|
|
const formData:any = ref({ |
|
|
|
const formData = ref({ |
|
|
|
id: undefined, |
|
|
|
id: undefined, |
|
|
|
title: undefined, |
|
|
|
title: undefined, |
|
|
|
description: undefined, |
|
|
|
description: undefined, |
|
|
@ -286,6 +310,7 @@ const formData:any = ref({ |
|
|
|
tags: [], |
|
|
|
tags: [], |
|
|
|
enterprises: [] as any |
|
|
|
enterprises: [] as any |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
const isReadonly = ref(true) |
|
|
|
const router = useRouter() |
|
|
|
const router = useRouter() |
|
|
|
const route = useRoute() |
|
|
|
const route = useRoute() |
|
|
|
const tagView = useTagsViewStore() |
|
|
|
const tagView = useTagsViewStore() |
|
|
@ -293,10 +318,10 @@ const formCreateRef = ref() |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const formRules = reactive({ |
|
|
|
const formRules = reactive({ |
|
|
|
title: [{ required: true, message: '任务标题不能为空', trigger: 'blur' }], |
|
|
|
title: [{ required: true, message: '任务标题不能为空', trigger: 'blur' }], |
|
|
|
execCycle: [ |
|
|
|
taskTopType: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: '任务通知时间不能为空', |
|
|
|
message: '任务类型不能为空', |
|
|
|
trigger: 'change' |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
@ -311,6 +336,8 @@ const formRules = reactive({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
const { query } = useRoute() |
|
|
|
const { query } = useRoute() |
|
|
|
const formRef = ref() // 表单 Ref` |
|
|
|
const formRef = ref() // 表单 Ref` |
|
|
|
|
|
|
|
const tagList = ref([]) |
|
|
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单 |
|
|
|
const enterprise:any = ref({ |
|
|
|
const enterprise:any = ref({ |
|
|
|
list: [] as any, |
|
|
|
list: [] as any, |
|
|
|
queryParams: reactive({ |
|
|
|
queryParams: reactive({ |
|
|
@ -332,26 +359,6 @@ const goBack = () => { |
|
|
|
router.go(-1); // 或 router.back() |
|
|
|
router.go(-1); // 或 router.back() |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleDeleteTask = async (type: string) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
if (type == 'delete') { |
|
|
|
|
|
|
|
await message.delConfirm("是否确定删除任务!", "删除任务") |
|
|
|
|
|
|
|
await TaskInfoApi.deleteTaskInfo(formData.value.id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
await message.delConfirm("是否确定结束任务", "结束任务") |
|
|
|
|
|
|
|
formData.value.status = 3 |
|
|
|
|
|
|
|
await TaskInfoApi.updateTaskInfo(formData.value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//分页 |
|
|
|
//分页 |
|
|
|
|
|
|
|
|
|
|
@ -433,10 +440,14 @@ const isAllConditionsEmpty = computed(() => { |
|
|
|
!params.enterprisesName && |
|
|
|
!params.enterprisesName && |
|
|
|
!params.qy && |
|
|
|
!params.qy && |
|
|
|
!params.hy && |
|
|
|
!params.hy && |
|
|
|
|
|
|
|
!params.st && |
|
|
|
|
|
|
|
!params.wr && |
|
|
|
!params.userId |
|
|
|
!params.userId |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
const handleQuery = () => { |
|
|
|
const handleQuery = () => { |
|
|
|
|
|
|
|
|
|
|
@ -453,7 +464,7 @@ const filterList = (list: EnterprisesVO[]) => { |
|
|
|
if (isAllConditionsEmpty.value) return enterprise_copy.value.list; // 直接返回完整列表 |
|
|
|
if (isAllConditionsEmpty.value) return enterprise_copy.value.list; // 直接返回完整列表 |
|
|
|
|
|
|
|
|
|
|
|
if (list.length > 0) { |
|
|
|
if (list.length > 0) { |
|
|
|
const { enterprisesName, qy, hy, userId } = enterprise.value.queryParams; |
|
|
|
const { enterprisesName, qy, hy, st, wr , userId } = enterprise.value.queryParams; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -461,15 +472,19 @@ const filterList = (list: EnterprisesVO[]) => { |
|
|
|
if (item.tagList) { |
|
|
|
if (item.tagList) { |
|
|
|
// 名称匹配(模糊查询) |
|
|
|
// 名称匹配(模糊查询) |
|
|
|
const nameMatch = enterprisesName ? |
|
|
|
const nameMatch = enterprisesName ? |
|
|
|
item.enterprisesName?.toLowerCase().includes(enterprisesName.toLowerCase()) : true; |
|
|
|
item.enterprisesName?.toLowerCase().includes(enterprisesName.toLowerCase()) : true; |
|
|
|
// 类型精确匹配 |
|
|
|
// 类型精确匹配 |
|
|
|
const typeMatch = qy ? item.region == qy : true; |
|
|
|
const typeMatch = qy ? item.region == qy : true; |
|
|
|
//地区精确匹配 |
|
|
|
//地区精确匹配 |
|
|
|
const hyMatch = hy ? item.tagList.includes(hy) : true |
|
|
|
const hyMatch = hy ? item.tagList.includes(hy) : true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const stMatch = st ? item.tagList.includes(st) : true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const wrMatch = wr ? item.tagList.includes(wr) : true |
|
|
|
|
|
|
|
|
|
|
|
const userIdMatch = userId ? item.userId == userId : true |
|
|
|
const userIdMatch = userId ? item.userId == userId : true |
|
|
|
|
|
|
|
|
|
|
|
return nameMatch && typeMatch && hyMatch && userIdMatch; |
|
|
|
return nameMatch && typeMatch && hyMatch && stMatch && wrMatch && userIdMatch; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -518,6 +533,10 @@ const wrList:any = ref([]) |
|
|
|
stList.value = data[1].children |
|
|
|
stList.value = data[1].children |
|
|
|
wrList.value = data[2].children |
|
|
|
wrList.value = data[2].children |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const defaultProps = { |
|
|
|
|
|
|
|
label: 'tagName', // 使用 'name' 字段作为选项的标签 |
|
|
|
|
|
|
|
children: 'children' // 如果存在子节点,则使用 'children' 字段 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 数组去重 |
|
|
|
* 数组去重 |
|
|
@ -532,26 +551,7 @@ function uniqueFunc(arr, uniId) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 提交表单 |
|
|
|
* 提交表单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
async function submitForm(isAudit) { |
|
|
|
async function submitForm() { |
|
|
|
|
|
|
|
|
|
|
|
let title:any = '' |
|
|
|
|
|
|
|
let content:any = '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (formData.value.id) { |
|
|
|
|
|
|
|
if (isAudit) { |
|
|
|
|
|
|
|
title = '审核任务' |
|
|
|
|
|
|
|
content = '是否确定审核任务?' |
|
|
|
|
|
|
|
} else{ |
|
|
|
|
|
|
|
title = '修改任务' |
|
|
|
|
|
|
|
content = '是否确定修改任务?' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
title = '发布任务' |
|
|
|
|
|
|
|
content = '是否确定发布新的任务?' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await message.delConfirm(content, title) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const validate = await unref(formRef).validate() |
|
|
|
const validate = await unref(formRef).validate() |
|
|
|
if (validate) { |
|
|
|
if (validate) { |
|
|
|
//把所有数据转成 id的数组 |
|
|
|
//把所有数据转成 id的数组 |
|
|
@ -560,7 +560,7 @@ async function submitForm(isAudit) { |
|
|
|
enterprise.value.list |
|
|
|
enterprise.value.list |
|
|
|
|
|
|
|
|
|
|
|
//任务状态默认初始值1 |
|
|
|
//任务状态默认初始值1 |
|
|
|
data.status = 0 |
|
|
|
data.status = 1 |
|
|
|
|
|
|
|
|
|
|
|
if (enterprise.value.list.length == 0) { |
|
|
|
if (enterprise.value.list.length == 0) { |
|
|
|
message.success('温馨提示:请您选择执法对象') |
|
|
|
message.success('温馨提示:请您选择执法对象') |
|
|
@ -572,9 +572,6 @@ async function submitForm(isAudit) { |
|
|
|
data.enterpriseIds = enterprise.value.list.map(i=>i.id) |
|
|
|
data.enterpriseIds = enterprise.value.list.map(i=>i.id) |
|
|
|
|
|
|
|
|
|
|
|
if (data.id) { |
|
|
|
if (data.id) { |
|
|
|
if (isAudit) { |
|
|
|
|
|
|
|
data.status = 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
TaskInfoApi.updateTaskInfo(data).then(() => { |
|
|
|
TaskInfoApi.updateTaskInfo(data).then(() => { |
|
|
|
message.success('操作成功') |
|
|
|
message.success('操作成功') |
|
|
|
tagView.delView(route) |
|
|
|
tagView.delView(route) |
|
|
@ -594,20 +591,22 @@ async function submitForm(isAudit) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//任务顶级标签列表 |
|
|
|
|
|
|
|
const taskTagTopList:any = ref([]) |
|
|
|
//任务二级标签列表 |
|
|
|
//任务二级标签列表 |
|
|
|
const tagChildList:any = ref([]) |
|
|
|
const tagChildList:any = ref([]) |
|
|
|
|
|
|
|
|
|
|
|
async function taskTopQuery() { |
|
|
|
async function taskTopQuery() { |
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
|
|
tagType: 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const data = await TagLibraryApi.childrenList(26) |
|
|
|
const data = await TagLibraryApi.getTagLibraryPage(params) |
|
|
|
tagChildList.value = data |
|
|
|
taskTagTopList.value = data |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const showButton = ref(false) |
|
|
|
const showButton = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const btnTitle = ref('发布任务') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function init() { |
|
|
|
async function init() { |
|
|
|
|
|
|
|
|
|
|
|
//执法人员列表 |
|
|
|
//执法人员列表 |
|
|
@ -619,7 +618,6 @@ async function init() { |
|
|
|
|
|
|
|
|
|
|
|
if (query.id) { |
|
|
|
if (query.id) { |
|
|
|
|
|
|
|
|
|
|
|
btnTitle.value = '修改任务' |
|
|
|
|
|
|
|
showButton.value = true |
|
|
|
showButton.value = true |
|
|
|
|
|
|
|
|
|
|
|
const res= await TaskInfoApi.getTaskInfo(query.id) |
|
|
|
const res= await TaskInfoApi.getTaskInfo(query.id) |
|
|
@ -627,12 +625,8 @@ async function init() { |
|
|
|
//查询标签 |
|
|
|
//查询标签 |
|
|
|
const tag = await TagLibraryApi.getTagLibrary(res.taskType) |
|
|
|
const tag = await TagLibraryApi.getTagLibrary(res.taskType) |
|
|
|
formData.value.taskTopType = tag.parentId |
|
|
|
formData.value.taskTopType = tag.parentId |
|
|
|
|
|
|
|
selectChild(tag.parentId) |
|
|
|
formData.value.taskType = tag.id |
|
|
|
formData.value.taskType = tag.id |
|
|
|
formData.value.taskType = tag.id |
|
|
|
|
|
|
|
if (formData.value.execCycle) { |
|
|
|
|
|
|
|
formData.value.execCycle = formData.value.execCycle.toString() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.tags = res.taskTagIdes.map((t) => t.tagId) |
|
|
|
formData.value.tags = res.taskTagIdes.map((t) => t.tagId) |
|
|
@ -645,6 +639,11 @@ async function init() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const selectChild = (value: any) => { |
|
|
|
|
|
|
|
const data = taskTagTopList.value.find(item=>item.id == value) |
|
|
|
|
|
|
|
isReadonly.value = false |
|
|
|
|
|
|
|
tagChildList.value = data.children |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getList(data) { |
|
|
|
function getList(data) { |
|
|
|
|
|
|
|
|
|
|
@ -662,7 +661,6 @@ enterprise.value.list = [...diff, ...enterprise.value.list]; |
|
|
|
|
|
|
|
|
|
|
|
getTagList() |
|
|
|
getTagList() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
init() |
|
|
|
init() |
|
|
|
}) |
|
|
|
}) |
|
|
|