Browse Source

优化

master
陈裕财 4 years ago
parent
commit
01af7efe3e
  1. 1
      src/router/routes_xm.js
  2. 255
      src/views/xm/core/xmQuestion/XmQuestionCenter.vue
  3. 77
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  4. 9
      src/views/xm/core/xmQuestion/XmQuestionMng.vue
  5. 44
      src/views/xm/core/xmQuestion/XmQuestionMngMy.vue
  6. 156
      src/views/xm/core/xmQuestionHandle/XmQuestionHandleAdd.vue
  7. 151
      src/views/xm/core/xmQuestionHandle/XmQuestionHandleEdit.vue
  8. 87
      src/views/xm/core/xmQuestionHandle/XmQuestionHandleMng.vue

1
src/router/routes_xm.js

@ -54,6 +54,7 @@ export default {
{ path: 'xmQuestion/XmQuestionAdd', component: _import('xm/core/xmQuestion/XmQuestionAdd'), name: 'XmQuestionAdd', meta: { title: '新建缺陷' }},
{ path: 'xmQuestion/XmQuestionMng', component: _import('xm/core/xmQuestion/XmQuestionMng'), name: 'XmQuestionMng', meta: { title: '缺陷管理' }},
{ path: 'xmQuestion/XmQuestionMngMy', component: _import('xm/core/xmQuestion/XmQuestionMngMy'), name: 'XmQuestionMngMy', meta: { title: '我的缺陷' }},
{ path: 'xmTestCase/XmTestCaseMng', component: _import('xm/core/xmTestCase/XmTestCaseMng'), name: 'XmTestCaseMng', meta: { title: '测试设计' }},
{ path: 'xmTestCaseExec/XmTestCaseExecMng', component: _import('xm/core/xmTestCaseExec/XmTestCaseExecMng'), name: 'XmTestCaseExecMng', meta: { title: '测试执行' }},

255
src/views/xm/core/xmQuestion/XmQuestionCenter.vue

@ -1,255 +0,0 @@
<template>
<section class="page-container page-full-height padding border">
<el-row>
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询"></el-input>
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmQuestions">查询</el-button>
<el-button type="primary" @click="showAdd">+xm_question</el-button>
<el-button type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0 || load.del==true">批量删除</el-button>
</el-row>
<el-row class="page-main page-height-90">
<!--列表 XmQuestion xm_question-->
<el-table :data="xmQuestions" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column sortable type="index" width="40"></el-table-column>
<el-table-column prop="id" label="缺陷编号" min-width="80" ></el-table-column>
<el-table-column prop="name" label="缺陷标题" min-width="80" ></el-table-column>
<el-table-column prop="projectId" label="项目编号" min-width="80" ></el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="80" ></el-table-column>
<el-table-column prop="taskId" label="任务编号" min-width="80" ></el-table-column>
<el-table-column prop="taskName" label="任务名称" min-width="80" ></el-table-column>
<el-table-column prop="endTime" label="到期时间" min-width="80" ></el-table-column>
<el-table-column prop="askUserid" label="提出人编号" min-width="80" ></el-table-column>
<el-table-column prop="askUsername" label="提出人" min-width="80" ></el-table-column>
<el-table-column prop="handlerUserid" label="处理人编号" min-width="80" ></el-table-column>
<el-table-column prop="handlerUsername" label="处理人" min-width="80" ></el-table-column>
<el-table-column prop="priority" label="优先级别" min-width="80" ></el-table-column>
<el-table-column prop="solution" label="解决方案3不是缺陷,4已解决,6延后处理" min-width="80" ></el-table-column>
<el-table-column prop="description" label="缺陷描述" min-width="80" ></el-table-column>
<el-table-column prop="createUserid" label="缺陷创建人编号" min-width="80" ></el-table-column>
<el-table-column prop="createUsername" label="缺陷创建人" min-width="80" ></el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="80" ></el-table-column>
<el-table-column prop="status" label="状态,0未提交,2已领取,4已解决,5已关闭" min-width="80" ></el-table-column>
<el-table-column prop="bizProcInstId" label="当前流程实例编号" min-width="80" ></el-table-column>
<el-table-column prop="bizFlowState" label="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除" min-width="80" ></el-table-column>
<el-table-column prop="menuId" label="菜单编号" min-width="80" ></el-table-column>
<el-table-column prop="menuName" label="菜单名称" min-width="80" ></el-table-column>
<el-table-column prop="planWorkload" label="预估工时单位人时" min-width="80" ></el-table-column>
<el-table-column prop="planCostAmount" label="预估成本金额" min-width="80" ></el-table-column>
<el-table-column prop="totalActWorkload" label="实际工时" min-width="80" ></el-table-column>
<el-table-column prop="totalActCostAmount" label="实际总金额" min-width="80" ></el-table-column>
<el-table-column label="操作" width="160" fixed="right" >
<template slot-scope="scope">
<el-button @click="showEdit( scope.row,scope.$index)"></el-button>
<el-button type="danger" @click="handleDel(scope.row,scope.$index)"></el-button>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, 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>
<!--编辑 XmQuestion xm_question界面-->
<el-drawer title="编辑xm_question" :visible.sync="editFormVisible" size="50%" append-to-body :close-on-click-modal="false">
<xm-question-edit :xm-question="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></xm-question-edit>
</el-drawer>
<!--新增 XmQuestion xm_question界面-->
<el-drawer title="新增xm_question" :visible.sync="addFormVisible" size="50%" append-to-body :close-on-click-modal="false">
<xm-question-add :xm-question="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-question-add>
</el-drawer>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
//import Sticky from '@/components/Sticky' // header
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmQuestion, delXmQuestion, batchDelXmQuestion } from '@/api/xm/core/xmQuestion';
import XmQuestionAdd from './XmQuestionAdd';//
import XmQuestionEdit from './XmQuestionEdit';//
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
])
},
data() {
return {
filters: {
key: ''
},
xmQuestions: [],//
pageInfo:{//
total:0,//0>0
pageSize:10,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
},
load:{ list: false, edit: false, del: false, add: false },//...
sels: [],//
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
addFormVisible: false,//xmQuestion
//xmQuestion
addForm: {
id:'',name:'',projectId:'',projectName:'',taskId:'',taskName:'',endTime:'',askUserid:'',askUsername:'',handlerUserid:'',handlerUsername:'',priority:'',solution:'',description:'',createUserid:'',createUsername:'',createTime:'',status:'',bizProcInstId:'',bizFlowState:'',menuId:'',menuName:'',planWorkload:'',planCostAmount:'',totalActWorkload:'',totalActCostAmount:''
},
editFormVisible: false,//
//xmQuestion
editForm: {
id:'',name:'',projectId:'',projectName:'',taskId:'',taskName:'',endTime:'',askUserid:'',askUsername:'',handlerUserid:'',handlerUsername:'',priority:'',solution:'',description:'',createUserid:'',createUsername:'',createTime:'',status:'',bizProcInstId:'',bizFlowState:'',menuId:'',menuName:'',planWorkload:'',planCostAmount:'',totalActWorkload:'',totalActCostAmount:''
}
/**begin 自定义属性请在下面加 请加备注**/
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
methods: {
handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize;
this.getXmQuestions();
},
handleCurrentChange(pageNum) {
this.pageInfo.pageNum = pageNum;
this.getXmQuestions();
},
// obj.order=ascending/descending, asc/desc ; obj.prop=,
sortChange( obj ){
var dir='asc';
if(obj.order=='ascending'){
dir='asc'
}else{
dir='desc';
}
if(obj.prop=='xxx'){
this.pageInfo.orderFields=['xxx'];
this.pageInfo.orderDirs=[dir];
}
this.getXmQuestions();
},
searchXmQuestions(){
this.pageInfo.count=true;
this.getXmQuestions();
},
// XmQuestion xm_question
getXmQuestions() {
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count:this.pageInfo.count
};
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i])
}
params.orderBy= orderBys.join(",")
}
if(this.filters.key){
params.key='%'+this.filters.key+'%'
}
this.load.list = true;
listXmQuestion(params).then((res) => {
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.total = res.data.total;
this.pageInfo.count=false;
this.xmQuestions = res.data.data;
}else{
this.$message({showClose: true, message: tips.msg, type: 'error' });
}
this.load.list = false;
}).catch( err => this.load.list = false );
},
// XmQuestion xm_question
showEdit: function ( row,index ) {
this.editFormVisible = true;
this.editForm = Object.assign({}, row);
},
// XmQuestion xm_question
showAdd: function () {
this.addFormVisible = true;
//this.addForm=Object.assign({}, this.editForm);
},
afterAddSubmit(){
this.addFormVisible=false;
this.pageInfo.count=true;
this.getXmQuestions();
},
afterEditSubmit(){
this.editFormVisible=false;
},
//xmQuestion
selsChange: function (sels) {
this.sels = sels;
},
//xmQuestion
handleDel: function (row,index) {
this.$confirm('确认删除该记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.load.del=true;
let params = { id: row.id };
delXmQuestion(params).then((res) => {
this.load.del=false;
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.count=true;
this.getXmQuestions();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.del=false );
});
},
//xmQuestion
batchDel: function () {
this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.load.del=true;
batchDelXmQuestion(this.sels).then((res) => {
this.load.del=false;
var tips=res.data.tips;
if( tips.isOk ){
this.pageInfo.count=true;
this.getXmQuestions();
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false );
});
},
rowClick: function(row, event, column){
this.$emit('row-click',row, event, column);// @row-click="rowClick"
}
/**begin 自定义函数请在下面加**/
/**end 自定义函数请在上面加**/
},//end methods
components: {
'xm-question-add':XmQuestionAdd,
'xm-question-edit':XmQuestionEdit,
//
},
mounted() {
this.$nextTick(() => {
this.getXmQuestions();
});
}
}
</script>
<style scoped>
</style>

77
src/views/xm/core/xmQuestion/XmQuestionEdit.vue

@ -1,7 +1,7 @@
<template>
<section class="page-container padding border">
<el-row class="padding">
<font class="font">{{editForm.name}}</font>
<font class="font">{{editForm.name}}</font><el-button type="text" icon="el-icon-search" @click="flowInfoVisible=true">日志</el-button>
</el-row>
<el-row class="padding-bottom">
<el-tooltip content="项目"><el-tag type="warning">{{selProject.name}} </el-tag></el-tooltip>
@ -67,29 +67,7 @@
</div>
</el-col>
<font v-else></font>
</el-form-item>
<el-form-item label="流转信息">
<el-button v-if="flowInfoVisible==false" @click="showFlowInfo" >查询流转信息</el-button>
<el-button v-else @click="flowInfoVisible=false" >隐藏流转信息</el-button>
<el-col :span="24" style="padding">
<!--列表 XmQuestionHandle xm_question_handle-->
<el-table v-show="flowInfoVisible" :data="xmQuestionHandles" show-header=false highlight-current-row v-loading="load.list" border style="width: 100%;">
<el-table-column prop="receiptMessage" min-width="200" >
<template slot-scope="scope">
<el-row>
{{scope.$index+1}}&nbsp;&nbsp;&nbsp;<el-tag>{{scope.row.handlerUsername}}</el-tag> <el-tag> {{scope.row.targetUsername}} </el-tag><span style="font-size:8px;">{{scope.row.receiptTime}}</span>
</el-row>
<el-row>
<div class="rich-context" v-html="scope.row.receiptMessage"></div>
</el-row>
</template>
</el-table-column>
</el-table>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item v-if="!flowInfoVisible" label="上次处理意见" prop="lremark">
<el-col v-if="editForm.lremark" :span="24" >
<div class="wf-main-context-box" >
@ -136,14 +114,19 @@
<el-button v-if="editForm.bugStatus=='resolved'" v-loading="load.edit" type="primary" @click.native="handleQuestion('active')" :disabled="load.edit==true">重新激活</el-button>
<el-button v-if="editForm.bugStatus=='closed'" v-loading="load.edit" type="primary" @click.native="handleQuestion('active')" :disabled="load.edit==true">重新激活</el-button>
</el-row>
<!--新增 XmQuestion xm_question界面-->
<el-dialog title="流转日志" :visible.sync="flowInfoVisible" width="60%" append-to-body :close-on-click-modal="false">
<xm-question-handle-mng :bug="editForm" :visible="flowInfoVisible"></xm-question-handle-mng>
</el-dialog>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { listOption } from '@/api/mdp/meta/itemOption';//
import { editXmQuestion } from '@/api/xm/core/xmQuestion';
import { listXmQuestionHandle } from '@/api/xm/core/xmQuestionHandle';
import { editXmQuestion } from '@/api/xm/core/xmQuestion';
import { mapGetters } from 'vuex';
import AttachmentUpload from "@/views/mdp/arc/archiveAttachment/AttachmentUpload"; //
import {sn} from '@/common/js/sequence';
@ -152,6 +135,7 @@
import VueEditor from '@/components/Tinymce/index';
import XmTaskList from '../xmTask/XmTaskList';
import xmMenuSelect from '../xmMenu/XmMenuSelect';
import XmQuestionHandleMng from '../xmQuestionHandle/XmQuestionHandleMng';//
export default {
computed: {
@ -232,10 +216,14 @@
},
//XmQuestion xm_question @submit="afterAddSubmit"
editSubmit: function (tardgetBugStatus) {
this.$refs.editForm.validate((valid) => {
console.log(this.editForm.handlerUserid);
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
//
if(tardgetBugStatus=='resolved'){
this.editForm.handlerUserid=this.editForm.createUserid
this.editForm.handlerUsername=this.editForm.createUsername;
}
this.load.edit=true
let params = Object.assign({}, this.editForm);
params.tardgetBugStatus=tardgetBugStatus;
@ -316,6 +304,7 @@
this.selectUserVisible=false
},
handleQuestion:function(tardgetBugStatus){
var oldBugStatus=this.editForm.bugStatus;
if(tardgetBugStatus=="closed"){
if( !this.roles.some(i=>i.roleid=='testAdmin') && !this.roles.some(i=>i.roleid=='tester') && !this.roles.some(i=>i.roleid=='testTeamAdmin') ){
@ -323,11 +312,6 @@
return ;
}
}
//
if(tardgetBugStatus=='resolved'){
this.editForm.handlerUserid=this.editForm.createUserid
this.editForm.handlerUsername=this.editForm.createUsername;
}
this.editSubmit(tardgetBugStatus);
},
formatterOption: function(row,column,cellValue, index){
@ -356,21 +340,7 @@
return cellValue;
}
},
getXmQuestionHandle:function(){
var params={
questionId:this.editForm.id
}
this.load.list=true
listXmQuestionHandle(params).then(res=>{
this.load.list=false
var tips = res.data.tips;
if(tips.isOk){
this.xmQuestionHandles=res.data.data;
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.list=false);
},
},
showSelectTask:function(){
if(this.selProject==null){
this.$message({showClose: true, message: "请先选项目", type: 'error' });
@ -391,15 +361,10 @@
this.editForm.handlerUsername=this.editForm.createUsername
this.editForm.handlerUserid=this.editForm.createUserid
},
sendToAsk(){
sendToAsk(){
this.editForm.handlerUsername=this.editForm.askUsername
this.editForm.handlerUserid=this.editForm.askUserid
},
showFlowInfo:function(){
this.flowInfoVisible=true;
this.getXmQuestionHandle();
},
},
/**end 在上面加自定义方法**/
showSelectMenu:function(){
@ -421,7 +386,7 @@
},//end method
components: {
// 'xm-question-edit':XmQuestionEdit
'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect
'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,
},
mounted() {
console.log("question_add");

9
src/views/xm/core/xmQuestion/XmQuestionMng.vue

@ -232,7 +232,7 @@
'userInfo','roles'
]),
},
props: ["selProject",'qtype','xmTestCaseExec','xmTestCase','xmIteration','xmProduct'],
props: ["selProject",'qtype','xmTestCaseExec','xmTestCase','xmIteration','xmProduct','queryScene'],
watch:{
selProject:function(selProject){
this.filters.selProject=this.selProject
@ -945,8 +945,11 @@
if(this.xmProduct){
this.filters.product=this.xmProduct
}
this.filters.handlerUserid=this.userInfo.userid;
this.filters.handlerUsername=this.userInfo.username;
if(this.queryScene=='my'){
this.filters.handlerUserid=this.userInfo.userid;
this.filters.handlerUsername=this.userInfo.username;
}
this.$nextTick(() => {
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=70/1000 * window.innerHeight;

44
src/views/xm/core/xmQuestion/XmQuestionMngMy.vue

@ -0,0 +1,44 @@
<template>
<xm-question-mng :query-scene="'my'"></xm-question-mng>
</template>
<script>
import util from '@/common/js/util';//
import config from '@/common/config';//
import XmQuestionMng from './XmQuestionMng';//
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
},
data() {
return {
}
},//end data
methods: {
},//end methods
components: {
XmQuestionMng
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

156
src/views/xm/core/xmQuestionHandle/XmQuestionHandleAdd.vue

@ -1,156 +0,0 @@
<template>
<section class="page-container page-full-height padding border">
<el-row>
<!--新增界面 XmQuestionHandle xm_question_handle-->
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
<el-form-item label="主键" prop="id">
<el-input v-model="addForm.id" placeholder="主键" ></el-input>
</el-form-item>
<el-form-item label="处理人编号" prop="handlerUserid">
<el-input v-model="addForm.handlerUserid" placeholder="处理人编号" ></el-input>
</el-form-item>
<el-form-item label="处理人" prop="handlerUsername">
<el-input v-model="addForm.handlerUsername" placeholder="处理人" ></el-input>
</el-form-item>
<el-form-item label="解决方案:" prop="handleSolution">
<el-input v-model="addForm.handleSolution" placeholder="解决方案:" ></el-input>
</el-form-item>
<el-form-item label="回执信息" prop="receiptMessage">
<el-input v-model="addForm.receiptMessage" placeholder="回执信息" ></el-input>
</el-form-item>
<el-form-item label="回执时间" prop="receiptTime">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.receiptTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="create创建(active激活)–confirm确认(confirmed已确认)–solve解决(resolved已解决)–close关闭(closed已关闭)" prop="handleStatus">
<el-input v-model="addForm.handleStatus" placeholder="create创建(active激活)–confirm确认(confirmed已确认)–solve解决(resolved已解决)–close关闭(closed已关闭)" ></el-input>
</el-form-item>
<el-form-item label="当前流程实例编号" prop="bizProcInstId">
<el-input v-model="addForm.bizProcInstId" placeholder="当前流程实例编号" ></el-input>
</el-form-item>
<el-form-item label="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除" prop="bizFlowState">
<el-input v-model="addForm.bizFlowState" placeholder="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除" ></el-input>
</el-form-item>
<el-form-item label="缺陷编号" prop="questionId">
<el-input v-model="addForm.questionId" placeholder="缺陷编号" ></el-input>
</el-form-item>
<el-form-item label="最后更新日期" prop="lastUpdateTime">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.lastUpdateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.createTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="实际工时" prop="actWorkload">
<el-input v-model="addForm.actWorkload" placeholder="实际工时"></el-input>
</el-form-item>
<el-form-item label="实际金额" prop="actCostAmount">
<el-input v-model="addForm.actCostAmount" placeholder="实际金额"></el-input>
</el-form-item>
<el-form-item label="链接地址列表逗号分隔" prop="urls">
<el-input v-model="addForm.urls" placeholder="链接地址列表逗号分隔" ></el-input>
</el-form-item>
<el-form-item label="指派给谁" prop="targetUserid">
<el-input v-model="addForm.targetUserid" placeholder="指派给谁" ></el-input>
</el-form-item>
<el-form-item label="指派给谁" prop="targetUsername">
<el-input v-model="addForm.targetUsername" placeholder="指派给谁" ></el-input>
</el-form-item>
<el-form-item>
<el-col :span="24" :offset="8">
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.add" type="primary" @click.native="addSubmit" :disabled="load.add==true">提交</el-button>
</el-col>
</el-form-item>
</el-form>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { addXmQuestionHandle } from '@/api/xm/core/xmQuestionHandle';
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
])
},
props:['xmQuestionHandle','visible'],
watch: {
'xmQuestionHandle':function( xmQuestionHandle ) {
this.addForm = xmQuestionHandle;
},
'visible':function(visible) {
if(visible==true){
//
}
}
},
data() {
return {
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
addFormRules: {
id: [
//{ required: true, message: '', trigger: 'blur' }
]
},
// xm_question_handle
addForm: {
id:'',handlerUserid:'',handlerUsername:'',handleSolution:'',receiptMessage:'',receiptTime:'',handleStatus:'',bizProcInstId:'',bizFlowState:'',questionId:'',lastUpdateTime:'',createTime:'',actWorkload:'',actCostAmount:'',urls:'',targetUserid:'',targetUsername:''
}
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
/**end 在上面加自定义属性**/
}//end return
},//end data
methods: {
// @cancel="addFormVisible=false"
handleCancel:function(){
this.$refs['addForm'].resetFields();
this.$emit('cancel');
},
//XmQuestionHandle xm_question_handle @submit="afterAddSubmit"
addSubmit: function () {
this.$refs.addForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.load.add=true
let params = Object.assign({}, this.addForm);
addXmQuestionHandle(params).then((res) => {
this.load.add=false
var tips=res.data.tips;
if(tips.isOk){
this.$refs['addForm'].resetFields();
this.$emit('submit');// @submit="afterAddSubmit"
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.add=false);
});
}
});
}
/**begin 在下面加自定义方法,记得补上面的一个逗号**/
/**end 在上面加自定义方法**/
},//end method
components: {
// 'xm-question-handle-edit':XmQuestionHandleEdit
},
mounted() {
this.addForm=Object.assign(this.addForm, this.xmQuestionHandle);
/**在下面写其它函数***/
}//end mounted
}
</script>
<style scoped>
</style>

151
src/views/xm/core/xmQuestionHandle/XmQuestionHandleEdit.vue

@ -1,151 +0,0 @@
<template>
<section class="page-container page-full-height padding border">
<el-row>
<!--编辑界面 XmQuestionHandle xm_question_handle-->
<el-form :model="editForm" label-width="120px" :rules="editFormRules" ref="editForm">
<el-form-item label="主键" prop="id">
<el-input v-model="editForm.id" placeholder="主键"></el-input>
</el-form-item>
<el-form-item label="处理人编号" prop="handlerUserid">
<el-input v-model="editForm.handlerUserid" placeholder="处理人编号"></el-input>
</el-form-item>
<el-form-item label="处理人" prop="handlerUsername">
<el-input v-model="editForm.handlerUsername" placeholder="处理人"></el-input>
</el-form-item>
<el-form-item label="解决方案:" prop="handleSolution">
<el-input v-model="editForm.handleSolution" placeholder="解决方案:"></el-input>
</el-form-item>
<el-form-item label="回执信息" prop="receiptMessage">
<el-input v-model="editForm.receiptMessage" placeholder="回执信息"></el-input>
</el-form-item>
<el-form-item label="回执时间" prop="receiptTime">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.receiptTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="create创建(active激活)–confirm确认(confirmed已确认)–solve解决(resolved已解决)–close关闭(closed已关闭)" prop="handleStatus">
<el-input v-model="editForm.handleStatus" placeholder="create创建(active激活)–confirm确认(confirmed已确认)–solve解决(resolved已解决)–close关闭(closed已关闭)"></el-input>
</el-form-item>
<el-form-item label="当前流程实例编号" prop="bizProcInstId">
<el-input v-model="editForm.bizProcInstId" placeholder="当前流程实例编号"></el-input>
</el-form-item>
<el-form-item label="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除" prop="bizFlowState">
<el-input v-model="editForm.bizFlowState" placeholder="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除"></el-input>
</el-form-item>
<el-form-item label="缺陷编号" prop="questionId">
<el-input v-model="editForm.questionId" placeholder="缺陷编号"></el-input>
</el-form-item>
<el-form-item label="最后更新日期" prop="lastUpdateTime">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.lastUpdateTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.createTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="实际工时" prop="actWorkload">
<el-input v-model="editForm.actWorkload" placeholder="实际工时"></el-input>
</el-form-item>
<el-form-item label="实际金额" prop="actCostAmount">
<el-input v-model="editForm.actCostAmount" placeholder="实际金额"></el-input>
</el-form-item>
<el-form-item label="链接地址列表逗号分隔" prop="urls">
<el-input v-model="editForm.urls" placeholder="链接地址列表逗号分隔"></el-input>
</el-form-item>
<el-form-item label="指派给谁" prop="targetUserid">
<el-input v-model="editForm.targetUserid" placeholder="指派给谁"></el-input>
</el-form-item>
<el-form-item label="指派给谁" prop="targetUsername">
<el-input v-model="editForm.targetUsername" placeholder="指派给谁"></el-input>
</el-form-item>
<el-form-item>
<el-col :span="24" :offset="8">
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.edit" type="primary" @click.native="editSubmit" :disabled="load.edit==true">提交</el-button>
</el-col>
</el-form-item>
</el-form>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { editXmQuestionHandle } from '@/api/xm/core/xmQuestionHandle';
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
])
},
props:['xmQuestionHandle','visible'],
watch: {
'xmQuestionHandle':function( xmQuestionHandle ) {
this.editForm = xmQuestionHandle;
},
'visible':function(visible) {
if(visible==true){
//
}
}
},
data() {
return {
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
editFormRules: {
id: [
//{ required: true, message: '', trigger: 'blur' }
]
},
// XmQuestionHandle xm_question_handle
editForm: {
id:'',handlerUserid:'',handlerUsername:'',handleSolution:'',receiptMessage:'',receiptTime:'',handleStatus:'',bizProcInstId:'',bizFlowState:'',questionId:'',lastUpdateTime:'',createTime:'',actWorkload:'',actCostAmount:'',urls:'',targetUserid:'',targetUsername:''
}
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
/**end 在上面加自定义属性**/
}//end return
},//end data
methods: {
// @cancel="editFormVisible=false"
handleCancel:function(){
this.$refs['editForm'].resetFields();
this.$emit('cancel');
},
//XmQuestionHandle xm_question_handle@submit="afterEditSubmit"
editSubmit: function () {
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.load.edit=true
let params = Object.assign({}, this.editForm);
editXmQuestionHandle(params).then((res) => {
this.load.edit=false
var tips=res.data.tips;
if(tips.isOk){
this.$refs['editForm'].resetFields();
this.$emit('submit');// @submit="afterEditSubmit"
}
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err =>this.load.edit=false);
});
}
});
}
/**begin 在下面加自定义方法,记得补上面的一个逗号**/
/**end 在上面加自定义方法**/
},//end method
components: {
// 'xm-question-handle-edit':XmQuestionHandleEdit
},
mounted() {
this.editForm=Object.assign(this.editForm, this.xmQuestionHandle);
}
}
</script>
<style scoped>
</style>

87
src/views/xm/core/xmQuestionHandle/XmQuestionHandleMng.vue

@ -1,51 +1,36 @@
<template>
<section class="page-container page-full-height padding border">
<el-row>
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询"></el-input>
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmQuestionHandles">查询</el-button>
<el-button type="primary" @click="showAdd">+xm_question_handle</el-button>
<el-button type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0 || load.del==true">批量删除</el-button>
</el-row>
<el-row class="page-main page-height-90">
<section class="page-container padding border">
<el-row class="page-main">
<!--列表 XmQuestionHandle xm_question_handle-->
<el-table :data="xmQuestionHandles" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column sortable type="index" width="40"></el-table-column>
<el-table-column prop="id" label="主键" min-width="80" ></el-table-column>
<el-table-column prop="handlerUserid" label="处理人编号" min-width="80" ></el-table-column>
<el-table-column prop="handlerUsername" label="处理人" min-width="80" ></el-table-column>
<el-table-column prop="handleSolution" label="解决方案:" min-width="80" ></el-table-column>
<el-table-column prop="receiptMessage" label="回执信息" min-width="80" ></el-table-column>
<el-table-column prop="receiptTime" label="回执时间" min-width="80" ></el-table-column>
<el-table-column prop="handleStatus" label="create创建(active激活)–confirm确认(confirmed已确认)–solve解决(resolved已解决)–close关闭(closed已关闭)" min-width="80" ></el-table-column>
<el-table-column prop="bizProcInstId" label="当前流程实例编号" min-width="80" ></el-table-column>
<el-table-column prop="bizFlowState" label="当前流程状态0初始1审批中2审批通过3审批不通过4流程取消或者删除" min-width="80" ></el-table-column>
<el-table-column prop="questionId" label="缺陷编号" min-width="80" ></el-table-column>
<el-table-column prop="lastUpdateTime" label="最后更新日期" min-width="80" ></el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="80" ></el-table-column>
<el-table-column prop="actWorkload" label="实际工时" min-width="80" ></el-table-column>
<el-table-column prop="actCostAmount" label="实际金额" min-width="80" ></el-table-column>
<el-table-column prop="urls" label="链接地址列表逗号分隔" min-width="80" ></el-table-column>
<el-table-column prop="targetUserid" label="指派给谁" min-width="80" ></el-table-column>
<el-table-column prop="targetUsername" label="指派给谁" min-width="80" ></el-table-column>
<el-table-column label="操作" width="160" fixed="right" >
<el-table-column sortable type="index" width="60"></el-table-column>
<el-table-column prop="handlerUsername" label="指派" min-width="80" >
<template slot-scope="scope">
<el-button @click="showEdit( scope.row,scope.$index)"></el-button>
<el-button type="danger" @click="handleDel(scope.row,scope.$index)"></el-button>
<div v-if="scope.row.targetUserid==scope.row.handlerUserid">
{{scope.row.handlerUsername}}&nbsp;&nbsp;提交\保存
</div>
<div v-if="scope.row.targetUserid!=scope.row.handlerUserid">
{{scope.row.handlerUsername}}&nbsp;&nbsp;指派给&nbsp;&nbsp;{{scope.row.targetUsername}}
</div>
</template>
</el-table-column>
</el-table>
<el-table-column prop="receiptMessage" label="处理意见" min-width="80" ></el-table-column>
<el-table-column prop="receiptTime" label="时间" min-width="80" ></el-table-column>
<el-table-column prop="handleStatus" label="状态" min-width="80" >
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.bugStatus=='create' ">创建</el-tag>
<el-tag type="primary" v-else-if="scope.row.bugStatus=='active'">已激活</el-tag>
<el-tag type="warning" v-else-if="scope.row.bugStatus=='confirm'">确认</el-tag>
<el-tag type="warning" v-else-if="scope.row.bugStatus=='confirmed'">已确认</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='solve'">解决</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='resolved'">已解决</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='close'">关闭</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='closed'">已关闭</el-tag>
<el-tag v-else>{{scope.row.bugStatus}}</el-tag>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, 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>
<!--编辑 XmQuestionHandle xm_question_handle界面-->
<el-drawer title="编辑xm_question_handle" :visible.sync="editFormVisible" size="50%" append-to-body :close-on-click-modal="false">
<xm-question-handle-edit :xm-question-handle="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></xm-question-handle-edit>
</el-drawer>
<!--新增 XmQuestionHandle xm_question_handle界面-->
<el-drawer title="新增xm_question_handle" :visible.sync="addFormVisible" size="50%" append-to-body :close-on-click-modal="false">
<xm-question-handle-add :xm-question-handle="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-question-handle-add>
</el-drawer>
</el-row>
</section>
</template>
@ -55,16 +40,23 @@
//import Sticky from '@/components/Sticky' // header
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmQuestionHandle, delXmQuestionHandle, batchDelXmQuestionHandle } from '@/api/xm/core/xmQuestionHandle';
import XmQuestionHandleAdd from './XmQuestionHandleAdd';//
import XmQuestionHandleEdit from './XmQuestionHandleEdit';//
import { mapGetters } from 'vuex'
export default {
props:["bug","visible"],
computed: {
...mapGetters([
'userInfo','roles'
])
},
watch:{
visible(val){
if(val){
this.searchXmQuestionHandles();
}
}
},
data() {
return {
filters: {
@ -76,8 +68,8 @@
pageSize:10,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
orderFields:['last_update_time'],// ['sex','student_id']
orderDirs:['desc']// asc,desc ['asc','desc']
},
load:{ list: false, edit: false, del: false, add: false },//...
sels: [],//
@ -146,6 +138,9 @@
}else{
//params.xxx=xxxxx
}
if(this.bug){
params.questionId=this.bug.id
}
this.load.list = true;
listXmQuestionHandle(params).then((res) => {
var tips=res.data.tips;
@ -228,8 +223,6 @@
},//end methods
components: {
'xm-question-handle-add':XmQuestionHandleAdd,
'xm-question-handle-edit':XmQuestionHandleEdit,
//
},

Loading…
Cancel
Save