diff --git a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js index 7c0764e..f329e1b 100644 --- a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js +++ b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js @@ -108,6 +108,34 @@ export const JeecgListMixin = { this.loading = false; }) }, + loadDatawdxq(arg) { + if (!this.url.wdxqlist) { + this.$message.error("请设置url.list属性!") + return + } + //加载数据 若传入参数1则加载第一页的内容 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//查询条件 + this.loading = true; + getAction(this.url.wdxqlist, 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:适配不分页的数据列表------------ + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false; + }) + }, initDictConfig() { console.log("--这是一个假的方法!") }, @@ -156,6 +184,9 @@ export const JeecgListMixin = { searchQuery() { this.loadData(1); }, + searchQuerywdxq() { + this.loadDatawdxq(1); + }, superQuery() { this.$refs.superQueryModal.show(); }, diff --git a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue index eab2b01..d6d69e5 100644 --- a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue +++ b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue @@ -40,7 +40,7 @@
新增 - 模板 + 按模板新增 导出 @@ -282,6 +282,7 @@ title: '规则管理', align:"center", dataIndex: 'action1', + fixed:"right", width:147, scopedSlots: { customRender: 'action1' } }, diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue index c887df3..032d826 100644 --- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue +++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue @@ -6,10 +6,43 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -57,6 +90,8 @@ 实体 + + 字段 @@ -119,7 +154,8 @@ - + + @@ -134,11 +170,15 @@ import {getAction} from "@api/manage"; import BugxModal from "@views/modulex/modules/BugxModal"; import store from "@/store"; import {filterObj} from "@/utils/util"; +import FieldxList from "@views/fieldx/FieldxList.vue"; +import TablexList from "@views/tablex/TablexList.vue"; export default { name: 'ModulexList', mixins: [JeecgListMixin, mixinDevice], components: { + TablexList, + FieldxList, BugxModal, ModulexModal }, @@ -357,6 +397,22 @@ export default { } }) }, + viewVid(record) { + // console.log(record) + let s = null; + getAction('/tablex/tablex/list', {moduleId: record.id}).then((res) =>{ + s=res.result.records + console.log(s) + if (s[0]==null){ + this.$message.error("该模块无实体"); + }else{ + this.$refs.FieldxList.showModal(); + this.$refs.FieldxList.edit(s[0]); + this.$refs.FieldxList.disableSubmit = false; + } + }) + + }, bugfankui: function (record) { this.$refs.BugxModal.add(record.id); this.$refs.BugxModal.title = "BUG反馈"; @@ -415,10 +471,13 @@ export default { }) }, tablexManage(record) { - this.$router.push({ - path: '/src/views/tablex/TablexList', - query: {moduleid: record.id,project:this.$route.query.project} - }) + this.$refs.TablexList.showModal(); + this.$refs.TablexList.edit(record); + this.$refs.TablexList.disableSubmit = false; + // this.$router.push({ + // path: '/src/views/tablex/TablexList', + // query: {moduleid: record.id,project:this.$route.query.project} + // }) }, initDictConfig() { }, @@ -496,7 +555,8 @@ export default { param.pageNo = this.ipagination.current; param.pageSize = this.ipagination.pageSize; //param.id=this.id; - param.projectId = this.$route.query.project; + //!!!!!!! + // param.projectId = this.$route.query.project; // console.log('paaaaaaaaaaaaaaaaaaaaa') return filterObj(param); }, diff --git a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue index d128c25..83eb3de 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue @@ -41,7 +41,6 @@ -
@@ -100,12 +99,12 @@ - 编辑 + 编辑 详情 - + 删除 @@ -229,6 +228,7 @@ importExcelUrl: "requirementitem/requirementItem/importExcel", qrxq:"/requirementitem/requirementItem/qrxq", checkqx:"/requirementtype/requirementType/checkqx", + wdxqlist:"/requirementitem/requirementItem/wdxqlist", }, dictOptions:{}, @@ -244,9 +244,19 @@ }, }, methods: { + checkqx(record){ + getAction(this.url.checkqx,{createBy:record.createBy}).then((res)=>{ + if (res.success) { + this.$refs.modalForm.edit(record); + this.$refs.modalForm.title = "编辑"; + this.$refs.modalForm.disableSubmit = false; + }else{ + this.$message.warning(res.message); + } + }); + }, wdxq(){ - this.queryParam.createBy = 'admin'; - this.searchQuery(); + this.searchQuerywdxq(); }, qrxq(id){ getAction(this.url.qrxq,{id:id}).then((res)=>{ diff --git a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue index ce0ef74..3e06c82 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/modules/RequirementItemForm.vue @@ -5,7 +5,7 @@ - + @@ -15,12 +15,12 @@ - + - + @@ -103,7 +103,7 @@ ],*/ requirementCode: [ { required: true, message: '请输入需求编码!'}, - { validator: (rule, value, callback) => validateDuplicateValue('requirement_item', 'requirement_code', value, this.model.id, callback)}, +/* { validator: (rule, value, callback) => validateDuplicateValue('requirement_item', 'requirement_code', value, this.model.id, callback)},*/ ], requirementName: [ { required: true, message: '请输入中文名称!'}, @@ -112,7 +112,9 @@ url: { add: "/requirementitem/requirementItem/add", edit: "/requirementitem/requirementItem/edit", - queryById: "/requirementitem/requirementItem/queryById" + queryById: "/requirementitem/requirementItem/queryById", + checkname:"/requirementitem/requirementItem/checkname", + requirementcode:"/requirementitem/requirementItem/requirementcode", } } }, @@ -125,6 +127,23 @@ //备份model原始值 }, methods: { + getxqbm(){ + if(this.model.upperId===undefined||this.model.upperId===null){ + this.model.upperId = ""; + } + if(this.model.projectId===undefined||this.model.projectId===null){ + this.model.projectId = ""; + } + if(this.model.projectId!==""){ + getAction(this.url.requirementcode,{projectId:this.model.projectId,upperId:this.model.upperId}).then((res)=>{ + if (res.success) { + this.$set(this.model, 'requirementCode', res.result); + }else{ + this.$message.warning(res.message); + } + }); + } + }, add (num,record) { this.num = num; this.model = Object.assign({}, record); @@ -133,8 +152,10 @@ if(record===''){ this.disablecol = false; }else{ + this.getxqbm(); this.disablecol = true; } + this.model.id = ""; this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.edit(this.modelDefault); }, @@ -155,30 +176,42 @@ this.visible = true; }, submitForm () { + if(this.model.id === undefined){ + this.model.id = ""; + } + if(this.model.upperId === undefined){ + this.model.upperId = ""; + } const that = this; // 触发表单验证 this.$refs.form.validate(valid => { if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; - } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); + getAction(this.url.checkname,{projectid:this.model.projectId,requirementName:this.model.requirementName,id:this.model.id,upperId:this.model.upperId}).then((res)=>{ + if (res.success) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) }else{ - that.$message.warning(res.message); + this.$message.warning(res.message); } - }).finally(() => { - that.confirmLoading = false; - }) + }); } }) diff --git a/ant-design-vue-jeecg/src/views/tablex/TablexList.vue b/ant-design-vue-jeecg/src/views/tablex/TablexList.vue index 1b96b26..6d36fe1 100644 --- a/ant-design-vue-jeecg/src/views/tablex/TablexList.vue +++ b/ant-design-vue-jeecg/src/views/tablex/TablexList.vue @@ -1,59 +1,66 @@ - + + + @@ -110,7 +117,7 @@ - +