任务新增任务类型

dev
吱屋 1 year ago
parent a7e9adf02a
commit 73da99e5f0
  1. 18
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue

@ -45,11 +45,12 @@
<a-col > <a-col >
<a-form-model-item label="任务类型" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="typeId"> <a-form-model-item label="任务类型" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="typeId">
<!-- <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"/> -->
<div v-for="item in options" :key="item.id" style="margin-bottom: 10px"> <div v-for="item in options" :key="item.id">
<span style="margin-right: 10px">{{ item.type_Name }} :</span> <span style="margin-right: 10px;">{{ item.type_Name }} </span>
<a-radio-group v-model="model.typeId" :key="`children-${item.id}`"> <a-radio-group v-model="model.typeId" :key="`children-${item.id}`">
<a-radio v-for="child in item.children" :key="child.id" :value="child.id">{{ child.type_name <a-radio v-for="child in item.children" :key="child.id" :value="child.id">
}}</a-radio> <span>{{ child.type_Name }}</span>
</a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</a-form-model-item> </a-form-model-item>
@ -338,9 +339,12 @@ export default {
methods: { methods: {
tasktype() { tasktype() {
getAction(this.url.listtasktype).then((res) => { getAction(this.url.listtasktype).then((res) => {
this.options = res.result const data = res.result;
console.log(res.result, '1326454') this.options = Object.entries(data).map(([key, value]) => {
console.log(this.options, '1556666') const item = JSON.parse(key);
item.children = value;
return item;
})
}) })
}, },
popupCallback(value,row){ popupCallback(value,row){

Loading…
Cancel
Save