|
@@ -1,10 +1,13 @@
|
|
|
<template>
|
|
|
<div class="edb-detail-data-wrap">
|
|
|
<div class="handle-list">
|
|
|
- <span class="editsty" @click="$emit('handle',{item:edbInfo.Detail,type:'edit'})"><!-- 编辑 -->{{$t('Table.edit_btn')}}</span>
|
|
|
- <span class="editsty" @click="$emit('handle',{item:edbInfo.Detail,type:'addToBase'})"><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
|
|
|
+ <span class="editsty" @click="$emit('handle',{item:edbInfo.Detail,type:'edit'})" v-if="hasEditAuth"><!-- 编辑 -->{{$t('Table.edit_btn')}}</span>
|
|
|
+
|
|
|
+ <span class="editsty" @click="$emit('handle',{item:edbInfo.Detail,type:'addToBase'})" v-if="edbInfo.Detail&&edbInfo.Detail.IsJoinEdb===0&&permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_add')"><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
|
|
|
+
|
|
|
<span class="editsty" @click="$emit('handle',{item:edbInfo.Detail,type:'logs'})"><!-- 操作日志 -->{{$t('ManualEntryPage.opera_logs')}}</span>
|
|
|
- <span class="deletesty" @click="$emit('handle',{item:edbInfo.Detail,type:'del'})"><!-- 删除 -->{{$t('Table.delete_btn')}}</span>
|
|
|
+
|
|
|
+ <span class="deletesty" @click="$emit('handle',{item:edbInfo.Detail,type:'del'})" v-if="edbInfo.Detail&&edbInfo.Detail.IsJoinEdb===0&&permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_del')"><!-- 删除 -->{{$t('Table.delete_btn')}}</span>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
@@ -89,6 +92,7 @@
|
|
|
:editable="false"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
:readonly="readonly"
|
|
|
+ :disabled="!hasEditAuth"
|
|
|
@mousedown.native="e=> { readonly = e.button===2?true:false }"
|
|
|
prefix-icon="none"
|
|
|
@input="handleTimeChange(rindex, item)"
|
|
@@ -111,6 +115,7 @@
|
|
|
v-model="item.Close"
|
|
|
:data-rindex="rindex"
|
|
|
:data-cindex="1"
|
|
|
+ :disabled="!hasEditAuth"
|
|
|
/>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -218,6 +223,10 @@ export default {
|
|
|
console.log(this.startIndex,this.endIndex)
|
|
|
console.log(this.dataList.slice(this.startIndex,this.endIndex))
|
|
|
return this.dataList.slice(this.startIndex,this.endIndex)
|
|
|
+ },
|
|
|
+
|
|
|
+ hasEditAuth() {
|
|
|
+ return this.permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_edit')
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -276,7 +285,9 @@ export default {
|
|
|
this.tableData = [res.Data.Detail]
|
|
|
|
|
|
this.dataList = res.Data.Detail.DataList||[];
|
|
|
- this.dataList.length && this.handleLoadData()
|
|
|
+ this.dataList.length && this.$nextTick(() => {
|
|
|
+ this.handleLoadData()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/* 滚动加载位置数据 */
|
|
@@ -332,6 +343,8 @@ export default {
|
|
|
|
|
|
// 日期获取焦点存放日期
|
|
|
handleTimeFocus(index, e) {
|
|
|
+ if(!this.hasEditAuth) return
|
|
|
+
|
|
|
this.tempTime = e.timeVal;
|
|
|
this.rightMouseMenu.rindex = index;
|
|
|
this.rightMouseMenu.cindex = 0;
|
|
@@ -341,6 +354,8 @@ export default {
|
|
|
handleInputFocus(e, rindex, cindex) {
|
|
|
console.log(e, rindex, cindex)
|
|
|
|
|
|
+ if(!this.hasEditAuth) return
|
|
|
+
|
|
|
this.rightMouseMenu.rindex = rindex;
|
|
|
this.rightMouseMenu.cindex = cindex;
|
|
|
this.temInputVal = _.cloneDeep(e)
|
|
@@ -445,6 +460,8 @@ export default {
|
|
|
|
|
|
/* 右键 */
|
|
|
handleRightClick(e) {
|
|
|
+ if(!this.hasEditAuth) return
|
|
|
+
|
|
|
let dom = $('.right-lick-menu')[0];
|
|
|
if(e.clientY > window.innerHeight/2) {
|
|
|
dom.style.left = e.clientX-3 + 'px';
|
|
@@ -646,6 +663,11 @@ export default {
|
|
|
border: none;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
+ .el-input.is-disabled .el-input__inner {
|
|
|
+ background-color: #fff;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|