| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <div class="bodyTopButtonGroup"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | </div> |
| | | |
| | |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="编码名称" style=" display: flex;"> |
| | | <el-form-item label="菜单名称" style=" display: flex;"> |
| | | <el-input v-model="form.rightname" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="固定字符" style=" display: flex;"> |
| | |
| | | </el-form-item> |
| | | |
| | | </div> |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"> |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <div |
| | | class="bodySearchReset" |
| | | :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}" |
| | | > |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="getEncodingRules">查询</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseout'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"--> |
| | | <!-- @mouseenter="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | <!-- <svg-icon--> |
| | | <!-- v-show="mouseHoverType==='mouseenter'"--> |
| | | <!-- style="cursor: pointer"--> |
| | | <!-- :icon-class="!isExpandForm?'doubleDown':'doubleUp'"--> |
| | | <!-- @click="isExpandForm=!isExpandForm"--> |
| | | <!-- @mouseout="mouseHoverType=$event.type"--> |
| | | <!-- />--> |
| | | </div> |
| | | /> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <!-- :row-class-name="tableRowClassName"--> |
| | | |
| | | <el-table |
| | | ref="tableDataRef" |
| | |
| | | :data="tableData" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | border |
| | | row-class-name="custom-row" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | |
| | | @sort-change="sortChange" |
| | | > |
| | | <el-table-column |
| | | prop="RowNum" |
| | | prop="rowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="org_code" |
| | | label="编码" |
| | | prop="menucode" |
| | | label="菜单编码" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="org_name" |
| | | label="编码名称" |
| | | prop="menuname" |
| | | label="菜单名称" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="description" |
| | | label="类型" |
| | | prop="type" |
| | | label="菜单类型" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="parentorg_name" |
| | | prop="prefix" |
| | | label="固定字符" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_user" |
| | | prop="filingdate" |
| | | label="编码格式" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ dateType.find(i=>i.code===row.filingdate).name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="incbit" |
| | | label="自增位数" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | prop="value" |
| | | label="流水号" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="编辑" placement="top"> |
| | | <i class="el-icon-edit-outline" @click="edit('edit',row)" /> |
| | | <i |
| | | class="el-icon-edit-outline" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | | <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/basicSettings' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { validateCode } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { LoginMenu } from '@/api/user' |
| | | import { CodeMenuSelect, EncodingRules, SaveEncodingRules } from '@/api/systemSetting' |
| | | import { CodeMenuSelect, DeleteEncodingRules, EncodingRules, SaveEncodingRules } from '@/api/systemSetting' |
| | | import arrayToTree from 'array-to-tree' |
| | | |
| | | export default { |
| | |
| | | childrenProperty: 'children' |
| | | }) |
| | | this.menuOptions = this.menuOptionsAll.filter(i => i.type === this.dialogForm.type) |
| | | console.log(this.menuOptions, 2) |
| | | // console.log(this.menuOptions, 2) |
| | | }, |
| | | radioChange() { |
| | | this.menuOptions = this.menuOptionsAll.filter(i => i.type === this.dialogForm.type) |
| | |
| | | this.form.prop = prop |
| | | this.getEncodingRules() |
| | | }, |
| | | // 查询 |
| | | search() { |
| | | this.getEncodingRules() |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.rightname = '' |
| | | this.form.prefix = '' |
| | | this.getEncodingRules() |
| | | }, |
| | | |
| | | // 新增按钮 |
| | | add(operation) { |
| | | this.operation = operation |
| | |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | this.dialogForm.type = row.type |
| | | |
| | | let parentCode = '' |
| | | this.menuOptions.forEach(item => { |
| | | if (item.children && item.children.length) { |
| | | item.children.forEach(it => { |
| | | if (it.menucode === row.menucode) { |
| | | parentCode = it.parent_id |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.$refs.cascader.checkedValue = [parentCode, row.menucode] |
| | | this.dialogForm.rightcode = row.menucode |
| | | this.dialogForm.incbit = row.incbit |
| | | this.dialogForm.filingdate = row.filingdate |
| | | this.dialogForm.prefix = row.prefix |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | DeleteEncodingRules({ menucode: row.menucode }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | this.$notify.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消删除') |
| | | this.$notify.info('已取消删除') |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const rightcode = this.$refs.cascader.checkedValue[ this.$refs.cascader.checkedValue.length - 1] |
| | | // console.log(this.$refs.cascader.checkedValue, 1) |
| | | const rightcode = this.$refs.cascader.checkedValue[this.$refs.cascader.checkedValue.length - 1] |
| | | this.dialogForm.rightcode = rightcode |
| | | this.dialogForm.rightname = this.menuOptions[this.menuOptions.findIndex(i => i.menucode === this.$refs.cascader.checkedValue[0])].children.find(i => i.menucode === rightcode).menuname |
| | | |
| | |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |
| | | // tableRowClassName({ row, rowIndex }) { |
| | | // return 'custom-row' |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!--公共页面样式--> |
| | | <!--<style lang="scss" scoped>--> |
| | | <!--$main_color: #42b983;--> |
| | | <!--::v-deep .el-button--text{--> |
| | | <!-- font-size: 14px ;--> |
| | | <!-- cursor: pointer ;--> |
| | | <!--}--> |
| | | <!--.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{--> |
| | | <!-- color: $main_color;--> |
| | | <!-- cursor: pointer;--> |
| | | <!--}--> |
| | | <!--.el-icon-edit-outline{--> |
| | | <!-- margin-right: 15px;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-button--primary, .el-button--default, .el-button--info {--> |
| | | <!-- height: 34px;--> |
| | | <!-- display: flex;--> |
| | | <!-- align-items: center;--> |
| | | <!-- padding: 0 15px;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-button--primary {--> |
| | | <!-- //background-color: $main_color !important;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-button--default {--> |
| | | <!-- background-color: #f8f8fa;--> |
| | | <!-- border: none;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-input__inner {--> |
| | | <!-- height: 34px;--> |
| | | <!-- line-height: 34px;--> |
| | | <!-- //color: #a7a7a7;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-dialog__body {--> |
| | | <!-- padding: 20px 100px !important;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .dialogVisibleRoles .el-dialog__body {--> |
| | | <!-- padding: 20px 20px !important;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .importPickerClass .el-dialog__body {--> |
| | | <!-- padding: 20px 20px !important;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-dialog__footer {--> |
| | | <!-- display: flex;--> |
| | | <!-- justify-content: flex-end;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-table .caret-wrapper {--> |
| | | <!-- transform: scale(0.8);--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .cell {--> |
| | | <!-- display: flex;--> |
| | | <!-- align-items: center;--> |
| | | <!-- justify-content: space-between;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-table::before {--> |
| | | <!-- height: 0;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-table__body-wrapper {--> |
| | | <!-- background-color: #f8f8fa;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-table__body .el-table__row.hover-row td{--> |
| | | <!-- background-color: #eaecef ;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-form--inline .el-form-item__label {--> |
| | | <!-- color: #a7a7a7;--> |
| | | <!--}--> |
| | | |
| | | <!--.body ::v-deep .el-divider {--> |
| | | <!-- border: 1px solid #eee;--> |
| | | <!-- width: 99%;--> |
| | | <!-- margin: 10px auto;--> |
| | | <!--}--> |
| | | |
| | | <!--.body ::v-deep .el-form-item {--> |
| | | <!-- margin-bottom: 0;--> |
| | | <!--}--> |
| | | |
| | | <!--.userDialogVisible ::v-deep .el-form-item {--> |
| | | <!-- margin-bottom: 0;--> |
| | | <!--}--> |
| | | |
| | | <!--::v-deep .el-select__caret{--> |
| | | <!-- display: flex;--> |
| | | <!-- align-items: center;--> |
| | | <!-- justify-content: center;--> |
| | | <!--}--> |
| | | |
| | | <!--.tableFixed{--> |
| | | <!-- ::v-deep .el-table__fixed-right{--> |
| | | <!-- height: 100% !important;--> |
| | | <!-- }--> |
| | | <!-- ::v-deep .el-table__fixed{--> |
| | | <!-- height: 100% !important;--> |
| | | <!-- }--> |
| | | <!--}--> |
| | | <!--</style>--> |
| | | <!--<style>--> |
| | | |
| | | <!--.el-table .custom-row {--> |
| | | <!-- background: #f8f8fa;--> |
| | | <!--}--> |
| | | <!--</style>--> |