1.模块联动项目、功能联动模块、规则联动功能,且与任务层级联动,即任务层级选择哪一级,模块、功能、规则显示到哪一级。

3.发布时间默认当前时间
4.模块文本框后新增添加按钮,点击弹出新增模块界面,可以直接新增模块。
5.功能文本框后新增添加按钮,点击弹出新增功能界面,可以直接新增功能。
6.规则文本框后新增添加按钮,点击弹出新增规则界面,可以直接新增规则。
dev
chengyufei 1 year ago
parent bf2d2cf700
commit ab15bf85cf
  1. 86
      ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue

@ -16,13 +16,13 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24"> <!-- <a-col :span="24">-->
<a-form-model-item label="上级任务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId"> <!-- <a-form-model-item label="上级任务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId">-->
<j-dict-select-tag v-model="model.upperId" placeholder="请选择所属上级任务" <!-- <j-dict-select-tag v-model="model.upperId" placeholder="请选择所属上级任务"-->
dict-code="task,task_name,id" style="width: 100%"> <!-- :dict-code="task" style="width: 100%">-->
</j-dict-select-tag> <!-- </j-dict-select-tag>-->
</a-form-model-item> <!-- </a-form-model-item>-->
</a-col> --> <!-- </a-col>-->
<a-col :span="24" style="display: none;"> <a-col :span="24" style="display: none;">
<a-form-model-item label="上级任务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId"> <a-form-model-item label="上级任务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upperId">
<a-input v-model="model.upperId" placeholder="请选择所属上级任务"></a-input> <a-input v-model="model.upperId" placeholder="请选择所属上级任务"></a-input>
@ -76,23 +76,27 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId"> <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">
<!-- <a-input v-model="model.moduleId" placeholder="请输入模块" ></a-input>--> <!-- <a-input v-model="model.moduleId" placeholder="请输入模块" modulex,module_name,id></a-input>-->
<j-dict-select-tag v-model="model.moduleId" placeholder="请选择模块" dict-code="modulex,module_name,id" style="width: 100%"> <j-dict-select-tag v-model="model.moduleId" placeholder="请选择模块" :dict-code="this.modulex"
</j-dict-select-tag> style="width: 100%" @change="fillModuleName()"></j-dict-select-tag>
<a-button @click="handleAdd3" type="primary" icon="plus">新增模块</a-button>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionId"> <a-form-model-item label="功能" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="functionId">
<!-- <a-input v-model="model.functionId" placeholder="请输入功能id" ></a-input>--> <!-- <a-input v-model="model.functionId" placeholder="请输入功能id" functionx,function_name,id></a-input>-->
<j-dict-select-tag v-model="model.functionId" placeholder="请选择功能" <j-dict-select-tag v-model="model.functionId" placeholder="请选择功能"
dict-code="functionx,function_name,id" :dict-code="functionx"
style="width: 100%"></j-dict-select-tag> style="width: 100%" @change="fillFunctionName()"></j-dict-select-tag>
<a-button @click="handleAdd1" type="primary" icon="plus">新增功能</a-button>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="规则" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleId"> <a-form-model-item label="规则" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruleId">
<!-- <a-input v-model="model.ruleId" placeholder="请输入规则id" ></a-input>--> <!-- <a-input v-model="model.ruleId" placeholder="请输入规则id" rulex,rule_no,id></a-input>-->
<j-dict-select-tag v-model="model.ruleId" placeholder="请选择规则" dict-code="rulex,rule_no,id" style="width: 100%"></j-dict-select-tag> <j-dict-select-tag v-model="model.ruleId" placeholder="请选择规则" :dict-code="rulex"
style="width: 100%"></j-dict-select-tag>
<a-button @click="handleAdd2" type="primary" icon="plus">新增规则</a-button>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -125,7 +129,7 @@
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="发布时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="publishTime"> <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.publishTime" style="width: 100%"/> <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.startTime" style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -166,6 +170,9 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>
<modulex-modal ref="modalForm3" @ok="modalFormOk"></modulex-modal>
<functionx-modal ref="modalForm1" @ok="modalFormOk"></functionx-modal>
<rulex-modal ref="modalForm2" @ok="modalFormOk"></rulex-modal>
</a-spin> </a-spin>
</template> </template>
@ -176,12 +183,23 @@ import {httpAction, getAction} from '@api/manage'
import {validateDuplicateValue} from '@/utils/util' import {validateDuplicateValue} from '@/utils/util'
import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell"; import JVxeDateCell from "@comp/jeecg/JVxeTable/components/cells/JVxeDateCell";
import JMultiSelectTag from "@/components/dict/JMultiSelectTag" import JMultiSelectTag from "@/components/dict/JMultiSelectTag"
import TaskModal from "@views/task/modules/TaskModal.vue";
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {mixinDevice} from "@/utils/mixin";
import modulexModal from "@views/modulex/modules/ModulexModal.vue";
import FunctionxModal from "@views/functionx/modules/FunctionxModal__Style#Drawer.vue";
import RulexModal from "@views/rulex/modules/RulexModal__Style#Drawer.vue";
export default { export default {
name: 'TaskForm', name: 'TaskForm',
mixins: [JeecgListMixin, mixinDevice],
components: { components: {
RulexModal,
FunctionxModal,
modulexModal,
TaskModal,
JVxeDateCell, JVxeDateCell,
JMultiSelectTag JMultiSelectTag,
}, },
props: { props: {
// //
@ -193,6 +211,12 @@ export default {
}, },
data() { data() {
return { return {
modulex: "modulex,module_name,id",
functionx: "functionx,function_name,id",
rulex: "rulex,rule_no,id",
task: "task,task_name,id",
value: new Date(),
model: { model: {
workLevel: 2, workLevel: 2,
workStatus: 0, workStatus: 0,
@ -318,6 +342,8 @@ export default {
} }
, ,
fillTaskName() { fillTaskName() {
this.modulex = "modulex,module_name,id,project_id='"+this.model.projectId+"'";
let that = this; let that = this;
let fillTaskName = ""; let fillTaskName = "";
let param = { let param = {
@ -343,7 +369,31 @@ export default {
} }
} }
, ,
fillLevelName(){
this.task = "task,task_name,id,level='"+this.model.level+"'";
}
,
handleAdd3: function () {
this.$refs.modalForm3.add();
this.$refs.modalForm3.title = "新增";
this.$refs.modalForm3.disableSubmit = false;
},
handleAdd1: function () {
this.$refs.modalForm1.add();
this.$refs.modalForm1.title = "新增";
this.$refs.modalForm1.disableSubmit = false;
},
handleAdd2: function () {
this.$refs.modalForm2.add();
this.$refs.modalForm2.title = "新增";
this.$refs.modalForm2.disableSubmit = false;
},
fillModuleName() {
this.functionx = "functionx,function_name,id,module_id='"+this.model.moduleId+"'";
},
fillFunctionName(){
this.rulex = "rulex,rule_no,id,function_id='"+this.model.functionId+"'";
},
// //
getProjectNum() { getProjectNum() {
const projectTime = new Date() // const projectTime = new Date() //

Loading…
Cancel
Save