md
This commit is contained in:
parent
6fc19855d6
commit
6965af1d76
@ -97,6 +97,8 @@
|
||||
<div @mouseenter="initKeyDownEvent" @mouseleave="removeKeyDownEvent">
|
||||
<div class="flex-auto">
|
||||
<orig-table ref="table" :key="refreshKeyId" tabindex="0" :config="config" v-dragSelect class="xd-tb-wrapper" />
|
||||
|
||||
<!-- <orig-table ref="table" :key="refreshKeyId" tabindex="0" :config="config" v-dragSelect class="xd-tb-wrapper" /> -->
|
||||
</div>
|
||||
<!-- 统计数据 v-dragColumn-->
|
||||
|
||||
@ -175,8 +177,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认此模板" prop="blDefault">
|
||||
<el-radio-group v-model="form.blDefault">
|
||||
<el-radio :label="1" value="1">是</el-radio>
|
||||
<el-radio :label="0" value="0">否</el-radio>
|
||||
<el-radio :label="'1'" value="1">是</el-radio>
|
||||
<el-radio :label="'0'" value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -622,7 +624,15 @@ export default {
|
||||
storageList: [],
|
||||
openTbShowTplDlg:false,
|
||||
curentTbShowTpl:null,
|
||||
form:{},
|
||||
form:{
|
||||
id: null,
|
||||
tplCode: null,
|
||||
tplName: null,
|
||||
tplType: null,
|
||||
tagId: null,
|
||||
blDefault: null,
|
||||
tplData: null,
|
||||
},
|
||||
rules: {
|
||||
tplName: [
|
||||
{ required: true, message: "模版名称必填", trigger: "blur" }
|
||||
@ -740,11 +750,21 @@ export default {
|
||||
// // console.log("===>changeTbShowTpl==111->",tplItem);
|
||||
this.form=Object.assign({},tplItem);
|
||||
if(this.form.tplData){
|
||||
console.time('计时器111');
|
||||
let tplColList=JSON.parse(this.form.tplData);
|
||||
console.timeEnd('计时器111');
|
||||
// 保存模版数据到本地
|
||||
console.time('计时器222');
|
||||
this.storeTplToLocal(tplColList);
|
||||
console.timeEnd('计时器222');
|
||||
|
||||
console.time('计时器333');
|
||||
this.initStorage();
|
||||
console.timeEnd('计时器333');
|
||||
|
||||
console.time('计时器6666');
|
||||
this.updateTable();
|
||||
console.timeEnd('计时器6666');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@ -1257,15 +1277,19 @@ export default {
|
||||
this.config.listeners = this.$listeners;
|
||||
|
||||
// 通过key值触发表格刷新,避免拖拽由于数组长度一致导致diff算法无法识别
|
||||
// this.config.key = Math.random() + ''
|
||||
console.time('计时器9999');
|
||||
this.config.key = Math.random() + ''
|
||||
// 控制下表格重新刷新
|
||||
this.getInstance()?.doLayout()
|
||||
|
||||
// this.getInstance()?.doLayout()
|
||||
|
||||
if(this.showCustomizeTpl){
|
||||
this.storeTplToLocal(this.storageList);
|
||||
}else{
|
||||
// 清除本地缓存
|
||||
// window.localStorage.removeItem('tableStorage')
|
||||
}
|
||||
console.timeEnd('计时器9999');
|
||||
},
|
||||
storeTplToLocal(tplColList){
|
||||
const storage = window.localStorage.getItem('tableStorage') ? JSON.parse(window.localStorage.getItem('tableStorage')) : {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user