| | |
| | | </el-collapse> |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8" style="margin-top: 10px;"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit(OperationType = 1)" |
| | | id="btn-Add">新增</el-button> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-share" size="mini" :disabled="single" |
| | | @click="handleEdit(row = rowForm, OperationType = 2)">权限</el-button> |
| | | </el-col> --> |
| | | @click="openQuery = true">权限</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除 |
| | | </el-button> |
| | |
| | | <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" /> |
| | | </el-dialog> |
| | | <!-- 编辑 --> |
| | | <el-dialog title="新增/b编辑用户" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close"> |
| | | <edit :OperationType=OperationType :linterid=this.rowForm.HEmpID :HSouceBillType=this.rowForm.HSourceBillType |
| | | :copyType="copyType" @editCloseGy="editGyClose" v-if="editShow" /> |
| | | <el-dialog title="新增/编辑用户" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close"> |
| | | <edit :OperationType=OperationType :linterid=this.rowForm.用户编码 :HSouceBillType=this.rowForm.HSourceBillType |
| | | :copyType="copyType" @editClose="editClose" v-if="editShow" /> |
| | | </el-dialog> |
| | | <el-dialog title="用户权限" :visible.sync="openQuery" width="1480px" append-to-body class="xsckdBox"> |
| | | <Query /> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | |
| | | <script> |
| | | import axios from 'axios' |
| | | import RowSettings from '@/views/component/rowSettings' |
| | | import Edit from '@/views/basic/production/gySourceEdit.vue' |
| | | import Edit from '@/views/system/user/xtUserListEdit.vue' |
| | | import Query from '@/views/system/user/xtUserRightQuery.vue' |
| | | |
| | | |
| | | export default { |
| | | name: 'XtUserList', |
| | | components: { RowSettings, Edit }, |
| | | components: { RowSettings, Edit, Query }, |
| | | props: { |
| | | openPage: { type: String, }, |
| | | }, |
| | | data() { |
| | | return { |
| | | openQuery: false, |
| | | activeSeach: '', |
| | | HModName: 'Xt_UserList', |
| | | editShow: false, |
| | |
| | | if (data1.code == 1) { |
| | | this.total = data1.data.length; |
| | | for (var i = 1; i < this.btList.length; i++) { |
| | | this.btResList.push({ ColmCols: this.btList[i].field}) |
| | | this.btResList.push({ ColmCols: this.btList[i].field }) |
| | | } |
| | | var col = []; |
| | | col = this.btList |
| | |
| | | this.tableData = this.getPage(this.page, this.allTableData)//无分页接口分页 |
| | | this.tableShow = true |
| | | this.loading = false |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | // this.rowForm = {} |
| | | this.ids = selection.map(item => item.HEmpID) |
| | | this.ids = selection.map(item => item.用户编码) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | if (!this.single) { |
| | |
| | | }) |
| | | }, |
| | | //关闭编辑页面 |
| | | editGyClose(val) { |
| | | editClose(val) { |
| | | this.editShow = false |
| | | this.openEdit = false |
| | | this.multiple = true, |
| | | this.getList() |
| | | this.multiple = true |
| | | this.getList() |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete() { |
| | | this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => { |
| | | var HCzybm = this.rowForm.用户编码.toString(); |
| | | axios.get(this.baseURL + "/Xt_User/DeltetUser", { |
| | | params: { "HCzybm": HCzybm } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.getList() |
| | | this.$modal.msgSuccess("删除成功") |
| | | } else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | var HCzybm = this.rowForm.用户编码.toString(); |
| | | axios.get(this.baseURL + "/Xt_User/DeltetUser", { |
| | | params: { "HCzybm": HCzybm } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.getList() |
| | | this.$modal.msgSuccess("删除成功") |
| | | } else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }).catch(() => { }) |
| | | }, |
| | | //导出 |
| | |
| | | const wb = this.$XLSX.utils.book_new(); // 创建一个新的工作簿 |
| | | this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 将工作表添加到工作簿中,并命名为"Sheet1" |
| | | this.$XLSX.writeFile(wb, `xtUsetList_${new Date().getTime()}.xlsx`); // 导出文件 |
| | | }, |
| | | }, |
| | | getPage(page, list) { |
| | | let sindex = (parseInt(page) - 1) * this.pageSize |
| | | let eindex = parseInt(page) * this.pageSize |
| | | let newList = list.slice(sindex, eindex) |
| | | console.log(newList) |
| | | return newList |
| | | }, |
| | | currentPage(val) { |
| | | console.log(val) |
| | | this.page = val.page |
| | | setTimeout(() => { |
| | | this.tableData = this.getPage(this.page, this.allTableData) |