|
|
|
@ -10,7 +10,22 @@ |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-model-item label="任务类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskType"> |
|
|
|
|
<j-dict-select-tag v-model="model.taskType" dictCode="task_type" @change="settask" placeholder="请选择任务类型" style="width: 100%" /> |
|
|
|
|
<j-dict-select-tag v-model="model.taskType" dictCode="task_type" placeholder="请选择任务类型" @change="leixing" style="width: 100%" /> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-model-item v-if="xiangmu" label="项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="" > |
|
|
|
|
<j-dict-select-tag v-model="project" dictCode="projectx,project_name,id" @change="setmoduledict()" placeholder="请选择项目" ></j-dict-select-tag> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-model-item v-if="mokuai" label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop=""> |
|
|
|
|
<j-dict-select-tag v-model="module" :dictCode="moduledict" placeholder="请选择模块" @change="setfunctiondict" ></j-dict-select-tag> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-model-item v-if="gongneng" label="功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop=""> |
|
|
|
|
<j-dict-select-tag v-model="functionx" :dictCode="functiondict" placeholder="请选择功能" @change="settaskdict" ></j-dict-select-tag> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
@ -44,6 +59,14 @@ |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
xiangmu:false, |
|
|
|
|
mokuai:false, |
|
|
|
|
gongneng:false, |
|
|
|
|
project:'', |
|
|
|
|
module:'', |
|
|
|
|
functionx:'', |
|
|
|
|
moduledict:"a,a,a", |
|
|
|
|
functiondict:"a,a,a", |
|
|
|
|
taskdict:"a,a,a", |
|
|
|
|
model:{ |
|
|
|
|
taskId:'', |
|
|
|
@ -85,17 +108,68 @@ |
|
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
settask() { |
|
|
|
|
if(this.model.taskType == '0'){ |
|
|
|
|
this.taskdict="projectx,project_name,id" |
|
|
|
|
}else if(this.model.taskType == '1'){ |
|
|
|
|
this.taskdict="modulex,module_name,id" |
|
|
|
|
}else if(this.model.taskType == '2'){ |
|
|
|
|
this.taskdict="functionx,function_name,id" |
|
|
|
|
}else if(this.model.taskType == '3'){ |
|
|
|
|
this.taskdict="rulex,rule_code,id" |
|
|
|
|
}else { this.taskdict=""} |
|
|
|
|
this.model.taskId=''; |
|
|
|
|
leixing(){ |
|
|
|
|
// 项目0 模块1 功能2 规则3 |
|
|
|
|
// 如果显示类型选择的是项目,则不需要一步一步选择。如果类型选择的是模块,则需要先选择项目,再选择,所以要让模块显示出来,同样功能,规则也如此。。。。。。 |
|
|
|
|
if (this.model.taskType == '0'){ |
|
|
|
|
// 重置项目,模块,功能 |
|
|
|
|
this.xiangmu = false; |
|
|
|
|
this.mokuai = false; |
|
|
|
|
this.gongneng = false; |
|
|
|
|
this.taskdict = "projectx,project_name,id" |
|
|
|
|
}if (this.model.taskType == '1'){ |
|
|
|
|
// 重置模块,功能 |
|
|
|
|
this.mokuai = false; |
|
|
|
|
this.gongneng = false; |
|
|
|
|
// 重置任务字典 |
|
|
|
|
this.taskdict='a,a,a'; |
|
|
|
|
|
|
|
|
|
this.xiangmu = true; |
|
|
|
|
}if (this.model.taskType == '2'){ |
|
|
|
|
// 重置功能 |
|
|
|
|
this.gongneng = false; |
|
|
|
|
// 重置任务字典 |
|
|
|
|
this.taskdict='a,a,a'; |
|
|
|
|
|
|
|
|
|
this.xiangmu = true; |
|
|
|
|
this.mokuai = true; |
|
|
|
|
}if (this.model.taskType == '3'){ |
|
|
|
|
// 重置任务字典 |
|
|
|
|
this.taskdict='a,a,a'; |
|
|
|
|
|
|
|
|
|
this.xiangmu = true; |
|
|
|
|
this.mokuai = true; |
|
|
|
|
this.gongneng = true; |
|
|
|
|
} |
|
|
|
|
// 把后续下拉框内容放空 |
|
|
|
|
this.project = ''; |
|
|
|
|
this.module = ''; |
|
|
|
|
this.functionx = ''; |
|
|
|
|
this.model.taskId = ''; |
|
|
|
|
}, |
|
|
|
|
popupCallback(value,row){ |
|
|
|
|
this.model = Object.assign(this.model, row); |
|
|
|
|
}, |
|
|
|
|
setmoduledict(){ |
|
|
|
|
this.moduledict = "modulex,module_name,id,project_id="+this.project |
|
|
|
|
if (this.model.taskType == '1'){ |
|
|
|
|
this.taskdict = "modulex,module_name,id,project_id="+this.project |
|
|
|
|
} |
|
|
|
|
this.module = ''; |
|
|
|
|
this.functionx = ''; |
|
|
|
|
this.model.taskId = ''; |
|
|
|
|
}, |
|
|
|
|
setfunctiondict(){ |
|
|
|
|
this.functiondict = "functionx,function_name,id,module_id="+this.module |
|
|
|
|
if (this.model.taskType == '2'){ |
|
|
|
|
this.taskdict = "functionx,function_name,id,module_id="+this.module |
|
|
|
|
} |
|
|
|
|
this.functionx = ''; |
|
|
|
|
this.model.taskId = ''; |
|
|
|
|
}, |
|
|
|
|
settaskdict(){ |
|
|
|
|
this.taskdict = "rulex,rule_code,id,function_id="+this.functionx; |
|
|
|
|
this.model.taskId = ''; |
|
|
|
|
}, |
|
|
|
|
add () { |
|
|
|
|
this.edit(this.modelDefault); |
|
|
|
|