diff --git a/src/views/xm/rpt/CompsCard.vue b/src/views/xm/rpt/CompsCard.vue
index 876bf119..f6b19aca 100644
--- a/src/views/xm/rpt/CompsCard.vue
+++ b/src/views/xm/rpt/CompsCard.vue
@@ -200,7 +200,7 @@ export default {
this.$message.error("还没制作报告,请先制作报告")
return;
}
- this.xmRptData.rptName=this.xmRptConfig.name
+ this.xmRptData.rptName=this.xmRptConfig.name+"-"+util.getDate()
this.createRptDataVisible=true
},
diff --git a/src/views/xm/rpt/CompsSet.vue b/src/views/xm/rpt/CompsSet.vue
index c2b84b73..6c3a0582 100644
--- a/src/views/xm/rpt/CompsSet.vue
+++ b/src/views/xm/rpt/CompsSet.vue
@@ -186,6 +186,7 @@ export default {
},
mounted(){
+ store.dispatch("toggleSideBar",false)
//this.comps.forEach(k=>k.id=k.id?k.id:k.compId)
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el)
if(this.category){
@@ -200,11 +201,11 @@ export default {
}else if(this.xmProduct && this.xmProduct.id){
this.filters.category="产品级"
}else{
- this.filters.category="企业级"
- store.dispatch("toggleSideBar",false)
+ this.filters.category="企业级"
}
}
}
+
}
diff --git a/src/views/xm/rpt/his/rptDataSelect.vue b/src/views/xm/rpt/his/rptDataSelect.vue
index d65edee7..a4f4c343 100644
--- a/src/views/xm/rpt/his/rptDataSelect.vue
+++ b/src/views/xm/rpt/his/rptDataSelect.vue
@@ -29,7 +29,7 @@
- 选择
+ 选择
@@ -42,7 +42,7 @@
import util from '@/common/js/util';//全局公共库
import config from '@/common/config';//全局公共库
-import { initDicts,listXmRptData, delXmRptData, batchDelXmRptData,editSomeFieldsXmRptData } from '@/api/xm/core/xmRptData';
+import { initDicts,listXmRptData } from '@/api/xm/core/xmRptData';
import { mapGetters } from 'vuex'
export default {
@@ -168,96 +168,11 @@ export default {
}
this.load.list = false;
}).catch( err => this.load.list = false );
- },
-
- //显示编辑界面 XmRptData xm_rpt_data
- showEdit: function ( row,index ) {
- this.editFormVisible = true;
- this.editForm = Object.assign({}, row);
- },
- //显示新增界面 XmRptData xm_rpt_data
- showAdd: function () {
- this.addFormVisible = true;
- //this.addForm=Object.assign({}, this.editForm);
- },
- afterAddSubmit(){
- this.addFormVisible=false;
- this.pageInfo.count=true;
- this.getXmRptDatas();
- },
- afterEditSubmit(){
- this.editFormVisible=false;
- },
+ },
//选择行xmRptData
selsChange: function (sels) {
this.sels = sels;
- },
- //删除xmRptData
- handleDel: function (row,index) {
- this.$confirm('确认删除该记录吗?', '提示', {
- type: 'warning'
- }).then(() => {
- this.load.del=true;
- let params = { id:row.id };
- delXmRptData(params).then((res) => {
- this.load.del=false;
- var tips=res.data.tips;
- if(tips.isOk){
- this.searchXmRptDatas();
- }
- this.$notify({ position:'bottom-left', showClose:true, message: tips.msg, type: tips.isOk?'success':'error' });
- }).catch( err => this.load.del=false );
- });
- },
- //批量删除xmRptData
- batchDel: function () {
- if(this.sels.length<=0){
- return;
- }
- var params=this.sels.map(i=>{
- return { id:i.id}
- })
- this.$confirm('确认删除选中记录吗?', '提示', {
- type: 'warning'
- }).then(() => {
- this.load.del=true;
- batchDelXmRptData(params).then((res) => {
- this.load.del=false;
- var tips=res.data.tips;
- if( tips.isOk ){
- this.searchXmRptDatas();
- }
- this.$notify({ position:'bottom-left',showClose:true, message: tips.msg, type: tips.isOk?'success':'error'});
- }).catch( err => this.load.del=false );
- });
- },
- editSomeFields(row,fieldName,$event){
- let params={};
- if(this.sels.length>0){
- if(!this.sels.some(k=> k.id==row.id)){
- this.$notify({position:'bottom-left',showClose:true,message:'请编辑选中的行',type:'warning'})
- Object.assign(this.editForm,this.editFormBak)
- return;
- }
- params['ids']=this.sels.map(i=>i.id)
- }else{
- params['ids']=[row].map(i=>i.id)
- }
- params[fieldName]=$event
- var func = editSomeFieldsXmRptData
- func(params).then(res=>{
- let tips = res.data.tips;
- if(tips.isOk){
- if(this.sels.length>0){
- this.searchXmRptDatas();
- }
- this.editFormBak=[...this.editForm]
- }else{
- Object.assign(this.editForm,this.editFormBak)
- this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
- }
- }).catch((e)=>Object.assign(this.editForm,this.editFormBak))
- },
+ },
rowClick: function(row, event, column){
this.editForm=row
this.editFormBak={...row};
@@ -267,6 +182,14 @@ export default {
},
+ toRptDetail(row){
+ this.$router.push({
+ name:'rptHisDetail',
+ query:{
+ id:row.id
+ }
+ })
+ },
},//end methods
mounted() {
this.$nextTick(() => {
diff --git a/src/views/xm/rpt/index.vue b/src/views/xm/rpt/index.vue
index 833ba731..9d683cd6 100644
--- a/src/views/xm/rpt/index.vue
+++ b/src/views/xm/rpt/index.vue
@@ -6,13 +6,11 @@
-