Browse Source

优化缓存查询循环时间为1秒

master
陈裕财 2 years ago
parent
commit
0f0506ceb3
  1. 2
      src/api/mdp_pub/mdp_api_base.js
  2. 18
      src/components/mdp-ui/mdp-select-table/Index.vue
  3. 4
      src/views/xm/core/xmMenu/XmEpicFeatures.vue
  4. 11
      src/views/xm/core/xmMenu/XmMenuMng.vue
  5. 2
      src/views/xm/core/xmProduct/XmProductMng.vue
  6. 5
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  7. 5
      src/views/xm/core/xmQuestion/XmQuestionMng.vue
  8. 6
      src/views/xm/core/xmTask/XmPhase.vue

2
src/api/mdp_pub/mdp_api_base.js

@ -148,7 +148,7 @@ ajaxGetDictOptions:function(itemCode, params)
if(lock){ if(lock){
setTimeout(()=>{ setTimeout(()=>{
func(); func();
},2000)
},1000)
}else{ }else{
func(); func();
} }

18
src/components/mdp-ui/mdp-select-table/Index.vue

@ -107,7 +107,7 @@
<script> <script>
import {MdpSelectMixin } from "../../mdp-ui/mixin/MdpSelectMixin.js" import {MdpSelectMixin } from "../../mdp-ui/mixin/MdpSelectMixin.js"
var tableDataCacheMap=new Map();
const tableDataCacheMap=new Map();
export default { export default {
components: { }, components: { },
name: 'mdp-select-table', name: 'mdp-select-table',
@ -171,14 +171,7 @@
if(tableDataCacheList && tableDataCacheList.length>0){ if(tableDataCacheList && tableDataCacheList.length>0){
this.item={itemType:'4',options:tableDataCacheList} this.item={itemType:'4',options:tableDataCacheList}
}else{ }else{
var tableDatasStr=localStorage.getItem(this.codeKey)
if(tableDatasStr){
var tableDatas=JSON.parse(tableDatasStr)
this.item={itemType:'4',options:tableDatas}
this.setCacheList(tableDatas)
}else{
this.item={itemType:'4',options:[]}
}
this.item={itemType:'4',options:[]}
} }
if(this.value){ if(this.value){
var mVals=[] var mVals=[]
@ -234,8 +227,6 @@
this.$refs['tableDialog'].close(); this.$refs['tableDialog'].close();
}, },
onClose(){ onClose(){
var tableDataCacheList=this.getCacheList();
localStorage.setItem(this.codeKey,JSON.stringify(tableDataCacheList));
}, },
}, },
@ -245,11 +236,6 @@
}, },
beforeDestroy(){
var tableDataCacheList=this.getCacheList();
localStorage.setItem(this.codeKey,JSON.stringify(tableDataCacheList));
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

4
src/views/xm/core/xmMenu/XmEpicFeatures.vue

@ -11,7 +11,7 @@
width="250" width="250"
trigger="click" > trigger="click" >
<el-row> <el-row>
<el-row>
<el-row class="padding-bottom">
<div class="icon" style="background-color: rgb(255, 153, 51);"> <div class="icon" style="background-color: rgb(255, 153, 51);">
<i class="el-icon-s-promotion"></i> <i class="el-icon-s-promotion"></i>
</div> </div>
@ -33,7 +33,7 @@
</el-row> </el-row>
--> -->
<el-row>
<el-row class="padding-bottom">
<el-button @click="showImportFromMenuTemplate()" icon="el-icon-upload2">由模板快速导入需求</el-button> <el-button @click="showImportFromMenuTemplate()" icon="el-icon-upload2">由模板快速导入需求</el-button>
</el-row> </el-row>
</el-row> </el-row>

11
src/views/xm/core/xmMenu/XmMenuMng.vue

@ -193,17 +193,18 @@
<el-button @click="showAdd('2')">新建特性</el-button> <el-button @click="showAdd('2')">新建特性</el-button>
</el-row> </el-row>
--> -->
<el-row>
<el-row class="padding-bottom">
<div class="icon" style="background-color: rgb(79, 140, 255);"> <div class="icon" style="background-color: rgb(79, 140, 255);">
<i class="el-icon-document"></i> <i class="el-icon-document"></i>
</div> </div>
<el-button @click="showAdd('3')" >新建用户故事</el-button> <el-button @click="showAdd('3')" >新建用户故事</el-button>
</el-row> </el-row>
<el-row>
<el-button @click="showImportFromMenuTemplate()" icon="el-icon-upload2">由模板快速导入需求</el-button>
<el-row class="padding-bottom">
<div class="icon" style="background-color: rgb(79, 140, 255);">
<i class="el-icon-upload2"></i>
</div>
<el-button @click="showImportFromMenuTemplate()">由模板快速导入需求</el-button>
</el-row> </el-row>
</el-row> </el-row>
<el-button type="primary" v-if="!disabledMng" round slot="reference" icon="el-icon-plus"></el-button> <el-button type="primary" v-if="!disabledMng" round slot="reference" icon="el-icon-plus"></el-button>

2
src/views/xm/core/xmProduct/XmProductMng.vue

@ -277,7 +277,7 @@
<el-tag v-if="getPlanRealProgress(scope.row)>0" type="warning" effect="dark">超前{{ getPlanRealProgress(scope.row) }}%</el-tag> <el-tag v-if="getPlanRealProgress(scope.row)>0" type="warning" effect="dark">超前{{ getPlanRealProgress(scope.row) }}%</el-tag>
<el-tag v-else-if="getPlanRealProgress(scope.row)<0" type="danger" effect="dark">落后{{ 0-getPlanRealProgress(scope.row) }}%</el-tag> <el-tag v-else-if="getPlanRealProgress(scope.row)<0" type="danger" effect="dark">落后{{ 0-getPlanRealProgress(scope.row) }}%</el-tag>
<el-tag v-else-if="getProgress(p)>0" effect="dark" type="success" class="el-icon-check"> </el-tag>
<el-tag v-else-if="getProgress(scope.row)>0" effect="dark" type="success" class="el-icon-check"> </el-tag>
<el-tag v-else-if="getProgress(scope.row)==0" effect="dark" type="info">未开始 </el-tag> <el-tag v-else-if="getProgress(scope.row)==0" effect="dark" type="info">未开始 </el-tag>
</div> </div>

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

@ -81,7 +81,7 @@
<el-tab-pane label="缺陷描述" name="12" > <el-tab-pane label="缺陷描述" name="12" >
<el-form-item label="" prop="description" label-width="0px"> <el-form-item label="" prop="description" label-width="0px">
<vue-editor height="100px" v-adaptive="{bottomOffset:50}" v-if="visible && activateTabPaneName=='12'" class="rich-context" :id="'description_'+editForm.id" :branch-id="userInfo.branchId" v-model="editForm.description"></vue-editor>
<vue-editor :height="100" v-adaptive="{bottomOffset:50}" v-if="visible && activateTabPaneName=='12'" class="rich-context" :id="'description_'+editForm.id" :branch-id="userInfo.branchId" v-model="editForm.description"></vue-editor>
</el-form-item> </el-form-item>
<el-row style="float:right;" v-if="opType!=='add'"> <el-row style="float:right;" v-if="opType!=='add'">
<el-button @click.native="handleCancel">取消</el-button> <el-button @click.native="handleCancel">取消</el-button>
@ -558,8 +558,7 @@
} }
}, },
initData(){ initData(){
if(this.$refs['xmProductSelect1'])this.$refs['xmProductSelect1'].selectedProduct(null)
this.editForm=Object.assign(this.editForm,this.editFormInit)
this.editForm=Object.assign(this.editForm,this.editFormInit)
this.editForm=Object.assign(this.editForm, this.xmQuestion); this.editForm=Object.assign(this.editForm, this.xmQuestion);
if(this.opType==='add'){ if(this.opType==='add'){
this.editForm.askUserid=this.userInfo.userid this.editForm.askUserid=this.userInfo.userid

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

@ -123,10 +123,7 @@
<el-button slot="reference" icon="el-icon-more" @click="moreVisible=!moreVisible"></el-button> <el-button slot="reference" icon="el-icon-more" @click="moreVisible=!moreVisible"></el-button>
</el-popover> </el-popover>
<span style="float:right;"> <span style="float:right;">
<el-button v-if="filters.selProject && filters.selProject.id" type="primary" icon="el-icon-plus" @click="showAdd" round> </el-button>
<xm-project-select show-style="tag" v-else style="display:inline;" :auto-select="false" :link-product-id="xmProduct?xmProduct.id:null" @change2="showAddAfterProjectSelect" >
<el-button slot="reference" type="primary" icon="el-icon-plus" round> </el-button>
</xm-project-select>
<el-button type="primary" icon="el-icon-plus" @click="showAdd" round> </el-button>
<el-button @click="batchDel" type="danger" icon="el-icon-delete"></el-button> <el-button @click="batchDel" type="danger" icon="el-icon-delete"></el-button>
</span> </span>
</el-row> </el-row>

6
src/views/xm/core/xmTask/XmPhase.vue

@ -13,7 +13,7 @@
trigger="click" trigger="click"
> >
<el-row> <el-row>
<el-row>
<el-row class="padding-bottom">
<div class="icon" :style="{backgroundColor: '#E6A23C'}"> <div class="icon" :style="{backgroundColor: '#E6A23C'}">
<i :class=" 'el-icon-time' " ></i> <i :class=" 'el-icon-time' " ></i>
@ -24,7 +24,7 @@
>由史诗特性快速创建计划 (推荐)</el-button >由史诗特性快速创建计划 (推荐)</el-button
> >
</el-row> </el-row>
<el-row>
<el-row class="padding-bottom">
<div class="icon" :style="{backgroundColor: '#E6A23C'}"> <div class="icon" :style="{backgroundColor: '#E6A23C'}">
<i :class=" 'el-icon-time' " ></i> <i :class=" 'el-icon-time' " ></i>
@ -35,7 +35,7 @@
>从模板快速导入计划 </el-button >从模板快速导入计划 </el-button
> >
</el-row> </el-row>
<el-row>
<el-row class="padding-bottom">
<div class="icon" :style="{backgroundColor: '#E6A23C'}"> <div class="icon" :style="{backgroundColor: '#E6A23C'}">
<i :class=" 'el-icon-time' " ></i> <i :class=" 'el-icon-time' " ></i>

Loading…
Cancel
Save