Browse Source

优化需求绑定模块

master
陈裕财 3 years ago
parent
commit
fc568ca423
  1. 13
      src/views/xm/core/xmFunc/XmFuncSelect.vue
  2. 26
      src/views/xm/core/xmMenu/XmMenuEdit.vue

13
src/views/xm/core/xmFunc/XmFuncSelect.vue

@ -36,6 +36,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<template v-if="showSelect">
<el-table-column prop="name" label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" @click.stop="select(scope.row)">选择 </el-button>
</template>
</el-table-column>
</template>
</el-table> </el-table>
<el-pagination layout="total,prev,next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination> <el-pagination layout="total,prev,next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row> </el-row>
@ -67,7 +74,7 @@ export default {
components: { components: {
XmFuncEdit, XmFuncEdit,
}, },
props:['visible','xmProduct'],
props:['visible','xmProduct','showSelect'],
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
@ -286,7 +293,9 @@ export default {
this.$emit('row-click',null) this.$emit('row-click',null)
this.$refs.xmFuncTable.setCurrentRow(); this.$refs.xmFuncTable.setCurrentRow();
}, },
select(row){
this.$emit('select',row)
},
loadDatasFirstCache(){ loadDatasFirstCache(){
if(!this.xmProduct || !this.xmProduct.id){ if(!this.xmProduct || !this.xmProduct.id){

26
src/views/xm/core/xmMenu/XmMenuEdit.vue

@ -139,6 +139,14 @@
<el-row> <el-row>
<el-col :span="12">
<el-form-item label="归属模块" prop="funcName" >
{{ editForm.funcName }}
<el-button
@click="funcVisible=true"
title="设置模块" > 设置</el-button>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="排序序号" prop="seqNo" > <el-form-item label="排序序号" prop="seqNo" >
<el-input style="max-width:90%;" v-model="editForm.seqNo" title="序号 如 1.1,1.2.3,1.3.2等" placeholder="如1.0 , 1.1 , 1.1.1等" @change="editXmMenuSomeFields(editForm,'seqNo',$event)"></el-input> <el-input style="max-width:90%;" v-model="editForm.seqNo" title="序号 如 1.1,1.2.3,1.3.2等" placeholder="如1.0 , 1.1 , 1.1.1等" @change="editXmMenuSomeFields(editForm,'seqNo',$event)"></el-input>
@ -281,6 +289,9 @@
:xm-product="{id:editForm.productId,productName:editForm.productName}" :xm-product="{id:editForm.productId,productName:editForm.productName}"
></xm-epic-features-select> ></xm-epic-features-select>
</el-drawer> </el-drawer>
<el-dialog append-to-body title="模块选择" :visible.sync="funcVisible" size="40%" top="20px" :close-on-click-modal="false">
<xm-func-select :show-select="true" class="padding-left padding-right" v-if="funcVisible" @select="onFuncSelected" :xm-product="{id:editForm.productId,productName:editForm.productName}"></xm-func-select>
</el-dialog>
</section> </section>
</template> </template>
@ -299,6 +310,7 @@
import XmTestCaseMng from '@/views/xm/core/xmTestCase/XmTestCaseMng'; import XmTestCaseMng from '@/views/xm/core/xmTestCase/XmTestCaseMng';
import xmQuestionMng from "@/views/xm/core/xmQuestion/XmQuestionMng"; import xmQuestionMng from "@/views/xm/core/xmQuestion/XmQuestionMng";
import XmFuncSelect from '../xmFunc/XmFuncSelect'
import XmEpicFeaturesSelect from "../xmMenu/XmEpicFeaturesSelect"; import XmEpicFeaturesSelect from "../xmMenu/XmEpicFeaturesSelect";
import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm' import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm'
@ -420,6 +432,7 @@ import CommentArea from '../xmMenuComment/comment-area.vue';
activateTabPaneName:'4', activateTabPaneName:'4',
pmenuFormVisible:false, pmenuFormVisible:false,
parentMenuVisible:false, parentMenuVisible:false,
funcVisible:false,
/**begin 在下面加自定义属性,记得补上面的一个逗号**/ /**begin 在下面加自定义属性,记得补上面的一个逗号**/
@ -540,6 +553,9 @@ import CommentArea from '../xmMenuComment/comment-area.vue';
}else if(fieldName==='startTime'){ }else if(fieldName==='startTime'){
params.startTime=$event.startTime params.startTime=$event.startTime
params.endTime=$event.endTime params.endTime=$event.endTime
}else if(fieldName==='funcId'){
params.funcId=$event.id
params.funcName=$event.name
}else{ }else{
if(typeof $event ==='string'){ if(typeof $event ==='string'){
params[fieldName]=$event params[fieldName]=$event
@ -632,6 +648,15 @@ import CommentArea from '../xmMenuComment/comment-area.vue';
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'}) this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
}) })
}, },
onFuncSelected(row){
this.editForm.funcId=row.id
this.editForm.funcName=row.name
this.funcVisible=false;
if(this.opType!=='add'){
this.editXmMenuSomeFields(this.editForm,'funcId',row)
}
},
},//end method },//end method
components: { components: {
// 'xm-menu-edit':XmMenuEdit // 'xm-menu-edit':XmMenuEdit
@ -648,6 +673,7 @@ import CommentArea from '../xmMenuComment/comment-area.vue';
XmEpicFeaturesSelect, XmEpicFeaturesSelect,
xmQuestionMng, xmQuestionMng,
CommentArea, CommentArea,
XmFuncSelect,
}, },
mounted() { mounted() {

Loading…
Cancel
Save