任务管理 问题修改 6.20

master
zhc077 1 year ago
parent 0c87c1beb6
commit 1feaec98bb
  1. 67
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue

@ -23,7 +23,18 @@
<!-- <j-dict-select-tag v-model="model.typeId" placeholder="请选择任务类型"-->
<!-- dict-code="task_type,type_name,id" :disabled="model.level==null">-->
<!-- </j-dict-select-tag>-->
<j-dict-select-tag v-model="model.typeId" type="radio" style="width: 100%" dict-code="task_type,type_name,id"/>
<!-- <j-dict-select-tag v-model="model.typeId" type="radio" style="width: 100%" dict-code="task_type,type_name,id"/>-->
<el-tree
:props="typeId"
ref="treeList"
:load="this.loadData2"
check-strictly
show-checkbox
node-key='id'
@check ='changetree'
@check-change="handleCheckChange">
</el-tree>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -89,18 +100,24 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime">
<j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%"/>
<!-- <j-date placeholder="请选择发布时间" v-model="model.publishTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择开始时间" v-model="model.startTime" style="width: 100%"/>
<!-- <j-date placeholder="请选择开始时间" v-model="model.startTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="预计结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol"
prop="expectedEndTime">
<j-date placeholder="请选择预计结束时间" v-model="model.expectedEndTime" style="width: 100%"/>
<!-- <j-date placeholder="请选择预计结束时间" v-model="model.expectedEndTime" style="width: 100%"/>-->
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -221,6 +238,8 @@ export default {
// queryProjectById: "/projectx/projectx/queryById",
// queryTaskTypeById: "/taskType/taskType/queryById",
fillTaskName: "/task/task/fillTaskName",
list: "/task/task/list",
}
}
},
@ -234,6 +253,17 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
handleCheckChange(data, checked, tree) {
if (checked) {
this.currentNodeData.id = data.id
this.$refs.treeList.setCheckedNodes([data.id])
}
},
changetree(data,lst)
{
if(lst,checkedKeys.lenght==0)
this.$refs.treeList.setCheckedNodes([data.id])
},
fillTaskName() {
let that = this;
let fillTaskName = "";
@ -316,6 +346,35 @@ export default {
})
}
,
loadData2() {
// if (!this.url.list) {
// this.$message.error("url.list!");
// return
// }
// // 1
// if (arg === 1) {
// this.ipagination.current = 1;
// }
// this.loadParameter();
// var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
}
}
</script>
Loading…
Cancel
Save