From 746e355df3ce7b588f40e96e4f20ba35266e7190 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 22 八月 2023 11:28:42 +0800
Subject: [PATCH] 1.人员管理开发完成
---
src/views/systemSetting/encodingRules.vue | 44 +++++++++++++++++++++++---------------------
1 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/views/systemSetting/encodingRules.vue b/src/views/systemSetting/encodingRules.vue
index 7b18f23..9b0be02 100644
--- a/src/views/systemSetting/encodingRules.vue
+++ b/src/views/systemSetting/encodingRules.vue
@@ -2,7 +2,13 @@
<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">
@@ -30,9 +36,6 @@
<el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
</el-form>
- <div
- class="bodyTopFormExpand"
- />
</div>
<div class="elTableDiv">
@@ -80,11 +83,7 @@
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="鑷浣嶆暟"
@@ -97,6 +96,7 @@
sortable="custom"
/>
<el-table-column
+ v-if="$buttoncode.toString().length"
label="鎿嶄綔"
width="120"
fixed="right"
@@ -106,12 +106,16 @@
<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>
@@ -219,7 +223,6 @@
directives: { elDragDialog, waves },
data() {
return {
- mouseHoverType: 'mouseout',
isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
@@ -244,9 +247,9 @@
},
encodingPre: '', // 缂栫爜棰勮
dateType: [
- { name: '骞存湀鏃�', code: 'YMD' },
- { name: '骞存湀', code: 'YM' },
- { name: '骞�', code: 'Y' }
+ { name: '骞存湀鏃�', code: '骞存湀鏃�' },
+ { name: '骞存湀', code: '骞存湀' },
+ { name: '骞�', code: '骞�' }
],
menuOptionsAll: [],
menuOptions: [],
@@ -278,11 +281,11 @@
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')
@@ -299,6 +302,7 @@
this.getHeight()
this.getCodeMenuSelect()
+ console.log(this.$buttoncode)
},
methods: {
async getCodeMenuSelect() {
@@ -309,7 +313,6 @@
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)
@@ -407,7 +410,6 @@
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
@@ -428,7 +430,7 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 255
+ this.tableHeight = this.mainHeight - 240
this.$refs.tableDataRef.doLayout()
})
}
--
Gitblit v1.9.3