| | |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button |
| | | v-waves |
| | | :style="{visibility:$buttoncode.includes('Add')?'':'hidden'}" |
| | | type="primary" |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="add('add')" |
| | | >新增</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | 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 |
| | | v-if="$buttoncode.toString().length" |
| | | label="操作" |
| | | width="120" |
| | | fixed="right" |
| | |
| | | <el-tooltip class="item" effect="dark" content="编辑" placement="top"> |
| | | <i |
| | | class="el-icon-edit-outline" |
| | | :style="{color:$store.state.settings.theme}" |
| | | :style="{color:$store.state.settings.theme,display:$buttoncode.includes('Update')?'':'none'}" |
| | | @click="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" /> |
| | | <i |
| | | class="el-icon-delete" |
| | | :style="{color:$store.state.settings.theme,display:$buttoncode.includes('Delete')?'':'none'}" |
| | | @click="del(row)" |
| | | /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | |
| | | }, |
| | | encodingPre: '', // 编码预览 |
| | | dateType: [ |
| | | { name: '年月日', code: 'YMD' }, |
| | | { name: '年月', code: 'YM' }, |
| | | { name: '年', code: 'Y' } |
| | | { name: '年月日', code: '年月日' }, |
| | | { name: '年月', code: '年月' }, |
| | | { name: '年', code: '年' } |
| | | ], |
| | | menuOptionsAll: [], |
| | | menuOptions: [], |
| | |
| | | handler(newValue, oldValue) { |
| | | const date = new Date() |
| | | let newDate = '' |
| | | if (newValue.filingdate === 'YMD') { |
| | | if (newValue.filingdate === '年月日') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') + '' + (date.getDate() + '').padStart(2, '0') |
| | | } else if (newValue.filingdate === 'YM') { |
| | | } else if (newValue.filingdate === '年月') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') |
| | | } else if (newValue.filingdate === 'Y') { |
| | | } else if (newValue.filingdate === '年') { |
| | | newDate = date.getFullYear().toString().substring(2, 4) + '' |
| | | } |
| | | this.encodingPre = newValue.prefix + '' + newDate + '' + (1 + '').padStart(newValue.incbit, '0') |
| | |
| | | this.getHeight() |
| | | |
| | | this.getCodeMenuSelect() |
| | | console.log(this.$buttoncode) |
| | | }, |
| | | methods: { |
| | | async getCodeMenuSelect() { |
| | |
| | | childrenProperty: 'children' |
| | | }) |
| | | this.menuOptions = this.menuOptionsAll.filter(i => i.type === this.dialogForm.type) |
| | | // console.log(this.menuOptions, 2) |
| | | }, |
| | | radioChange() { |
| | | this.menuOptions = this.menuOptionsAll.filter(i => i.type === this.dialogForm.type) |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | // 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 |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.tableHeight = this.mainHeight - 245 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |