Browse Source

修改任务BUG

master
zy 2 months ago
parent
commit
60ab1da4da
  1. 16
      src/views/task/create.vue

16
src/views/task/create.vue

@ -19,11 +19,11 @@
<el-form-item label="类型" prop="taskType"> <el-form-item label="类型" prop="taskType">
<el-tree-select <el-tree-select
v-model="formData.taskType" v-model="formData.taskType"
:data="typeList" :data="tagList"
:props="defaultProps" :props="defaultProps"
check-strictly check-strictly
node-key="id" node-key="id"
placeholder="请选择归属部门" placeholder="请选择任务类型"
/> />
</el-form-item> </el-form-item>
@ -315,18 +315,23 @@ const resetQuery = () => {
handleQuery() handleQuery()
} }
//
typeList.value = handleTree(await DeptApi.getSimpleDeptList())
/** /**
* 获取标签列表 * 获取标签列表
*/ */
function getTagList() { function getTagList() {
TagLibraryApi.getTagLibraryPage({}).then((res) => { TagLibraryApi.getTagLibraryPage({tagType:2}).then((res) => {
tagList.value = res tagList.value = res
}) })
} }
const defaultProps = {
label: 'tagName', // 使 'name'
children: 'children', // 使 'children'
};
/** /**
* 获取企业列表 * 获取企业列表
*/ */
@ -407,6 +412,7 @@ async function submitForm() {
const validate = await unref(formRef).validate() const validate = await unref(formRef).validate()
if (validate) { if (validate) {
const data = JSON.parse(JSON.stringify(formData.value)) const data = JSON.parse(JSON.stringify(formData.value))
data.status=1;
data.enterpriseIds = formData.value.enterprises.map((i) => i.id) data.enterpriseIds = formData.value.enterprises.map((i) => i.id)
if(data.enterpriseIds.length==0){ if(data.enterpriseIds.length==0){
message.success("温馨提示:请您选择执法对象") message.success("温馨提示:请您选择执法对象")

Loading…
Cancel
Save