tangning vor 2 Jahren
Ursprung
Commit
95868fd719

+ 1 - 0
src/store/modules/permission.ts

@@ -105,6 +105,7 @@ export const usePermissionStore = defineStore({
     async changePermissionCode() {
       const codeList = await getPermCode();
       const permsList = codeList.map(ele => ele.perms)
+      console.log('setPermCodeList',permsList)
       this.setPermCodeList(permsList);
     },
     async buildRoutesAction(): Promise<AppRouteRecordRaw[]> {

+ 6 - 5
src/views/operate/caseList.vue

@@ -10,7 +10,7 @@
     <div class="desc-wrap-BasicTable">
       <BasicTable @register="registerTable">
         <template #toolbar>
-          <a-button type="primary" @click="openModal(true, {language})" v-if="getCheckPerm('news-add')">
+          <a-button type="primary" @click="openModal(true, {language})" v-if="getCheckPerm('case-add')">
             新增案例</a-button
           >
         </template>
@@ -21,25 +21,25 @@
               {
                 label: '撤回',
                 //icon: 'icon-park-outline:folder-withdrawal-one',
-                ifShow: getCheckPerm('news-withdraw') && record.isPublic == 1,
+                ifShow: getCheckPerm('case-withdraw') && record.isPublic == 1,
                 onClick: handleWithdraw.bind(null, record),
               },
               {
                 label: '发布',
                 //icon: 'arcticons:efa-publish',
-                ifShow: getCheckPerm('news-publish') && record.isPublic == 0,
+                ifShow: getCheckPerm('case-publish') && record.isPublic == 0,
                 onClick: handlePublish.bind(null, record),
               },
               {
                 label: '编辑',
                 //icon: 'ep:edit',
-                ifShow: getCheckPerm('news-edit') && record.isPublic == 0,
+                ifShow: getCheckPerm('case-edit') && record.isPublic == 0,
                 onClick: handleEdit.bind(null, record),
               },
               {
                 label: '删除',
                 //icon: 'ic:outline-delete-outline',
-                ifShow: getCheckPerm('news-delete'),
+                ifShow: getCheckPerm('case-delete'),
                 popConfirm: {
                   title: '是否确认删除',
                   confirm: handleDelete.bind(null, record),
@@ -162,6 +162,7 @@ export default defineComponent({
       {
         title: '是否显示',
         dataIndex: 'isShow',
+        ifShow: getCheckPerm('case-display'),
         width: 80,
         customRender: ({ record }) => {
           if (!Reflect.has(record, 'pendingStatus')) {

+ 2 - 0
src/views/operate/newsList.vue

@@ -150,6 +150,7 @@ export default defineComponent({
       {
         title: '是否显示',
         dataIndex: 'display',
+        ifShow: getCheckPerm('news-display'),
         width: 80,
         customRender: ({ record }) => {
           if (!Reflect.has(record, 'pendingStatus')) {
@@ -175,6 +176,7 @@ export default defineComponent({
       {
         title: '置顶',
         dataIndex: 'isTop',
+        ifShow: getCheckPerm('news-top'),
         width: 80,
         customRender: ({ record }) => {
           if (!Reflect.has(record, 'pendingStatus')) {

+ 9 - 2
src/views/operate/recruitList.vue

@@ -2,7 +2,7 @@
   <div>
     <BasicTable @register="registerTable" @editEnd="editEnd">
       <template #toolbar>
-        <a-button type="primary" @click="openModal(true)"> 新增职位</a-button>
+        <a-button type="primary" v-if="getCheckPerm('recruit-add')" @click="openModal(true)"> 新增职位</a-button>
       </template>
         <template #action="{ record }">
           <TableAction
@@ -11,10 +11,11 @@
               {
                 label: '编辑',
                 //icon: 'ep:edit',
-                ifShow:record.isPush == 0,
+                ifShow:getCheckPerm('recruit-edit') && record.isPush == 0,
                 onClick: handleEdit.bind(null, record),
               },{
                 label: '删除',
+                ifShow:getCheckPerm('recruit-delete'),
                 //icon: 'ic:outline-delete-outline',
                 popConfirm: {
                   title: '是否确认删除',
@@ -40,6 +41,7 @@
   import { useMessage } from '/@/hooks/web/useMessage';
   import { Switch } from 'ant-design-vue';
   import addRecruitModal from './components/recruit/addModal.vue'
+  import { usePermissionStore } from '/@/store/modules/permission';
   export default defineComponent({
     components: { 
       BasicTable, 
@@ -53,6 +55,8 @@
     setup() {
       const { t } = useI18n();
       const { createMessage } = useMessage();
+      const permissionStore = usePermissionStore();
+      const { getCheckPerm } = permissionStore;
       const [register, { openModal }] = useModal();
       const columns: BasicColumn[] = [
         
@@ -107,6 +111,7 @@
           title: '状态',
           dataIndex: 'isPush',
           width: 80,
+          ifShow: getCheckPerm('recruit-publish'),
           customRender: ({ record }) => {
             if (!Reflect.has(record, 'pendingStatus')) {
               record.pendingStatus = false;
@@ -131,6 +136,7 @@
         {
           title: '置顶',
           dataIndex: 'isTop',
+          ifShow: getCheckPerm('recruit-top'),
           width: 80,
           customRender: ({ record }) => {
             if (!Reflect.has(record, 'pendingStatus')) {
@@ -246,6 +252,7 @@
         register,
         openModal,
         editEnd,
+        getCheckPerm,
       };
     },
   });

+ 1 - 1
src/views/statistics/components/orderEchart.vue

@@ -34,7 +34,7 @@
   function expor(val){
     // emit('expor',val)
     let hader = ['时间', ...nameList.value]
-    console.log('数量',hader)
+    console.log('数量',hader,val)
     let fields  = {
       'time':'日期',
       '1':hader[1],

+ 4 - 0
src/views/system/role/role.data.ts

@@ -5,11 +5,14 @@ import { Switch } from 'ant-design-vue';
 import { Time } from '/@/components/Time';
 import { getAllRoleList } from '/@/api/sys/system'
 import { saveRoleApi } from '/@/api/sys/system';
+import { usePermissionStore } from '/@/store/modules/permission';
   // import { ListAllCompanyApi } from '/@/api/corporation/list';
 import { useMessage } from '/@/hooks/web/useMessage';
 import { useI18n } from '/@/hooks/web/useI18n';
   const { t } = useI18n();
   const { createMessage } = useMessage();
+  const permissionStore = usePermissionStore();
+  const { getCheckPerm } = permissionStore;
 
 export const columns: BasicColumn[] = [
   // {
@@ -55,6 +58,7 @@ export const columns: BasicColumn[] = [
     title: '状态',
     dataIndex: 'status',
     width: 80,
+    ifShow:getCheckPerm('role-enable'),
     customRender: ({ record }) => {
       if (!Reflect.has(record, 'pendingStatus')) {
         record.pendingStatus = false;