|
|
|
@ -1,5 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
<div class="hello"> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div> |
|
|
|
@ -39,6 +40,7 @@ |
|
|
|
</el-form> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
|
|
|
|
<el-table |
|
|
|
id="commmon" |
|
|
|
:height="height" |
|
|
|
@ -70,12 +72,14 @@ |
|
|
|
width="150" |
|
|
|
:label="buttons.cz"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="addOrUpdateLanguageList(scope.row.functionId)">{{ buttons.settingLanguageList }} |
|
|
|
<a type="text" size="small" |
|
|
|
@click="addOrUpdateLanguageList(scope.row.functionId)">{{ buttons.settingLanguageList }} |
|
|
|
</a> |
|
|
|
| |
|
|
|
<a type="text" size="small" @click="addOrUpdateLanguage(scope.row)">{{ buttons.settingLanguage }}</a> |
|
|
|
<a type="text" size="small" @click="addOrUpdateLanguage(scope.row)">{{ buttons.settingLanguage }}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
@ -93,11 +97,14 @@ |
|
|
|
<!-- 语言组件 --> |
|
|
|
<commonLanguageBase ref="commonLanguageAdd" v-drag></commonLanguageBase> |
|
|
|
<commonLanguageList ref="commonLanguageList" v-drag></commonLanguageList> |
|
|
|
<context-button v-if="menuVisible" @foo="foo" ref="contextbutton" @handleOne="handleOne" @handleTwo="handleTwo" |
|
|
|
@handleThree="handleThree"></context-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import column from "../../common/column"; |
|
|
|
import contextButton from '../../common/right_click_menu' |
|
|
|
import commonLanguageBase from "./common-language-base"; |
|
|
|
import commonLanguageList from "./common-language-list"; |
|
|
|
import { |
|
|
|
@ -126,10 +133,12 @@ export default { |
|
|
|
components: { |
|
|
|
column, |
|
|
|
commonLanguageBase, |
|
|
|
commonLanguageList |
|
|
|
commonLanguageList, |
|
|
|
contextButton |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
menuVisible: false, |
|
|
|
listShow: false, |
|
|
|
// table高度 |
|
|
|
height: 450, |
|
|
|
@ -530,7 +539,7 @@ export default { |
|
|
|
// }, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.heigquerySysLanguagePackht = window.innerHeight - 180; |
|
|
|
this.height = window.innerHeight - 180; |
|
|
|
}) |
|
|
|
}, |
|
|
|
activated() { |
|
|
|
@ -538,6 +547,30 @@ export default { |
|
|
|
//this.getLanguageList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
rowContextmenu(row, column, event) { |
|
|
|
this.menuVisible = false |
|
|
|
this.menuVisible = true |
|
|
|
// 阻止右键默认行为 |
|
|
|
event.preventDefault() |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.contextbutton.init(row, column, event) |
|
|
|
}) |
|
|
|
}, |
|
|
|
foo() { // 取消鼠标监听事件 菜单栏 |
|
|
|
this.menuVisible = false |
|
|
|
document.removeEventListener('click', this.foo) |
|
|
|
}, |
|
|
|
handleOne() { |
|
|
|
console.log('点击菜单一') |
|
|
|
}, |
|
|
|
|
|
|
|
handleTwo() { |
|
|
|
console.log('点击菜单二') |
|
|
|
}, |
|
|
|
handleThree() { |
|
|
|
console.log('点击菜单三') |
|
|
|
}, |
|
|
|
|
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk() { |
|
|
|
let userFavorite = { |
|
|
|
@ -658,13 +691,13 @@ export default { |
|
|
|
// 删除所有的该页面下保存的数据 |
|
|
|
if (this.userColumnList) { |
|
|
|
//删除 user自定义的数据 |
|
|
|
await removerUser(this.queryTable) |
|
|
|
await removerUser(this.queryTable) |
|
|
|
} |
|
|
|
// 删除默认配置 |
|
|
|
await removerDefault(this.queryTable) |
|
|
|
// 保存页面 table属性 |
|
|
|
let sumColumnList = this.columnList.concat(this.columnList1); |
|
|
|
sumColumnList = sumColumnList.map(item=> { |
|
|
|
sumColumnList = sumColumnList.map(item => { |
|
|
|
return item = { |
|
|
|
tableId: item.tableId, |
|
|
|
tableName: item.tableName, |
|
|
|
@ -685,9 +718,9 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
// 保存页面 button label title 属性 |
|
|
|
let buttons = this.buttonList.map( item => { |
|
|
|
let buttons = this.buttonList.map(item => { |
|
|
|
return item = { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
languageValue: item.languageValue, |
|
|
|
|