Browse Source

fix:调整权限

master
白凤吉 2 weeks ago
parent
commit
da23abf3b4
  1. 2
      src/components/formula/FormulaConfig.vue
  2. 8
      src/stores/auditStore.ts
  3. 6
      src/views/audit/index.vue

2
src/components/formula/FormulaConfig.vue

@ -528,7 +528,7 @@ const isDisabled = computed(() => {
<el-button v-if="type === 'setting'" class="config-btn" @click="handleResetDefault"> <el-button v-if="type === 'setting'" class="config-btn" @click="handleResetDefault">
恢复默认值 恢复默认值
</el-button> </el-button>
<el-button type="primary" class="config-btn" @click="handleSubmit">
<el-button v-if="!isDisabled" type="primary" class="config-btn" @click="handleSubmit">
确定 确定
</el-button> </el-button>
</div> </div>

8
src/stores/auditStore.ts

@ -5,13 +5,13 @@ import { defineStore } from 'pinia'
export const useAuditStore = defineStore('audit', () => { export const useAuditStore = defineStore('audit', () => {
// 设置菜单配置 // 设置菜单配置
const auditMenus = [{ const auditMenus = [{
name: '操作记录',
code: 'operationRecord',
roleType: 'admin',
}, {
name: '消毒记录', name: '消毒记录',
code: 'history', code: 'history',
roleType: 'admin,maintainer', roleType: 'admin,maintainer',
}, {
name: '操作记录',
code: 'operationRecord',
roleType: 'admin',
}] }]
const historyList: Record<string, string>[] = [] const historyList: Record<string, string>[] = []
return { return {

6
src/views/audit/index.vue

@ -33,9 +33,9 @@ const selectItem = (menuCode: string) => {
</div> </div>
</div> </div>
<div class="setting-right"> <div class="setting-right">
<OperationRecord v-if="selectedMenuCode === 'operationRecord'" />
<div v-if="selectedMenuCode === 'history'">
<History />
<History v-if="selectedMenuCode === 'history'" />
<div v-if="selectedMenuCode === 'operationRecord'">
<OperationRecord />
</div> </div>
</div> </div>
</main> </main>

Loading…
Cancel
Save