|
|
|
@ -5,19 +5,18 @@ |
|
|
|
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg" ></icon-svg> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-form :inline="true" :model="queryData" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="searchList()" type="primary">{{buttons.search}}</el-button> |
|
|
|
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}} |
|
|
|
</el-button> |
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button> |
|
|
|
<el-button @click="addOrUpdateHandle(0)" type="primary">{{ buttons.add}}</el-button> |
|
|
|
<el-form v-show="searchShow" :inline="true" :model="queryData" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item label="工厂编辑"> |
|
|
|
<el-input filterable v-model="queryData.key" clearable> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="getDataList()" type="primary">{{buttons.search}}</el-button> |
|
|
|
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}} |
|
|
|
</el-button> |
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button> |
|
|
|
<el-button @click="addOrUpdateHandle(0)" type="primary">{{ buttons.add}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:data="dataList" |
|
|
|
@ -63,6 +62,10 @@ |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<!-- 设置查询条件 --> |
|
|
|
<search v-if="searchVisible" v-on:childByValue="childByValue" ref="search" @refreshDataList="getDataList" ></search> |
|
|
|
<!-- 设置列 --> |
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
|
|
@ -71,6 +74,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import column from "../common/column"; |
|
|
|
import search from "../common/search"; |
|
|
|
import { |
|
|
|
searchSysLanguageParam, |
|
|
|
searchFunctionButtonList, |
|
|
|
@ -85,9 +89,10 @@ import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFa |
|
|
|
import AddOrUpdate from './tblbasedata-add-or-update' |
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
|
|
data () { |
|
|
|
return { |
|
|
|
searchVisible: false, |
|
|
|
searchShow: false, |
|
|
|
queryData:{ |
|
|
|
key: '' |
|
|
|
}, |
|
|
|
@ -269,7 +274,7 @@ import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFa |
|
|
|
delete: '删除', |
|
|
|
deleteList: '批量删除', |
|
|
|
cz: '操作', |
|
|
|
search: '查询', |
|
|
|
search: '搜索', |
|
|
|
download: '导出', |
|
|
|
settingTable: '设置列表', |
|
|
|
defaultTable: '设置默认配置' |
|
|
|
@ -353,12 +358,12 @@ import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFa |
|
|
|
dataListLoading: false, |
|
|
|
dataListSelections: [], |
|
|
|
addOrUpdateVisible: false, |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
AddOrUpdate, |
|
|
|
column |
|
|
|
column, |
|
|
|
search |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(()=>{ |
|
|
|
@ -369,7 +374,33 @@ import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFa |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
childByValue(childValue) { |
|
|
|
// childValue就是子组件传过来的值 |
|
|
|
console.log(childValue) |
|
|
|
}, |
|
|
|
// 打开搜索页面 |
|
|
|
searchList() { |
|
|
|
this.searchVisible = true; |
|
|
|
let queryTable = { |
|
|
|
userId: this.userId, |
|
|
|
functionId: this.functionId, |
|
|
|
tableId: this.tableId, |
|
|
|
languageCode: this.languageCode |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.search.init(queryTable); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// searchShows |
|
|
|
searchShows(){ |
|
|
|
|
|
|
|
if (this.searchShow){ |
|
|
|
this.searchShow = false; |
|
|
|
}else { |
|
|
|
this.searchShow = true; |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 添加 |
|
|
|
addOrUpdateBase(){ |
|
|
|
|
|
|
|
@ -440,7 +471,6 @@ import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFa |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取button的词典 |
|
|
|
getFunctionButtonList() { |
|
|
|
let queryButton = { |
|
|
|
@ -509,14 +539,6 @@ import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFa |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
saveTableDefaultList(this.columnList1).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.showDefault = false |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getFunctionButtonList(); |
|
|
|
this.getColumnList() |
|
|
|
}, |
|
|
|
|