闪电 3 周之前
父節點
當前提交
18b206706f

+ 14 - 16
apps/web-ele/src/views/oilstation/emergency/index.vue

3
 
3
 
4
 import type { VxeGridProps } from '#/adapter/vxe-table';
4
 import type { VxeGridProps } from '#/adapter/vxe-table';
5
 
5
 
6
-import { ref } from 'vue';
7
-
8
 import { Page, useVbenDrawer } from '@vben/common-ui';
6
 import { Page, useVbenDrawer } from '@vben/common-ui';
9
 
7
 
10
-import { ElMessageBox, ElMessage } from 'element-plus';
8
+import { ElMessage, ElMessageBox } from 'element-plus';
11
 
9
 
12
 import { useVbenVxeGrid } from '#/adapter/vxe-table';
10
 import { useVbenVxeGrid } from '#/adapter/vxe-table';
11
+import {
12
+  deleteEmergencyMaterial,
13
+  emergencyMaterialList,
14
+} from '#/api/oilstation/emergency/emergency';
13
 
15
 
14
 import { queryFormSchema, tableColumns } from './emergency-data';
16
 import { queryFormSchema, tableColumns } from './emergency-data';
15
 import EmergencyDrawerComp from './emergency-drawer.vue';
17
 import EmergencyDrawerComp from './emergency-drawer.vue';
16
-import { emergencyMaterialList, deleteEmergencyMaterial } from '#/api/oilstation/emergency/emergency';
17
 
18
 
18
 const formOptions: VbenFormProps = {
19
 const formOptions: VbenFormProps = {
19
   commonConfig: {
20
   commonConfig: {
45
             pageNum: page.currentPage,
46
             pageNum: page.currentPage,
46
             pageSize: page.pageSize,
47
             pageSize: page.pageSize,
47
           };
48
           };
48
-          
49
+
49
           // 调用API获取数据
50
           // 调用API获取数据
50
           const response = await emergencyMaterialList(params);
51
           const response = await emergencyMaterialList(params);
51
-          console.log('查询应急防护列表响应:', response)
52
+          console.log('查询应急防护列表响应:', response);
52
           const data = response || {};
53
           const data = response || {};
53
-          return { 
54
-            items: data.rows|| [], 
55
-            total: data.total || 0 
54
+          return {
55
+            items: data.rows || [],
56
+            total: data.total || 0,
56
           };
57
           };
57
         } catch (error) {
58
         } catch (error) {
58
           console.error('查询应急防护列表失败:', error);
59
           console.error('查询应急防护列表失败:', error);
139
             :disabled="
140
             :disabled="
140
               !(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)
141
               !(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)
141
             "
142
             "
143
+            v-access:code="['oilstation:emergency:remove']"
142
             @click="deleteHandle"
144
             @click="deleteHandle"
143
           >
145
           >
144
             批量删除
146
             批量删除
146
           <ElButton
148
           <ElButton
147
             type="primary"
149
             type="primary"
148
             @click="openDrawer"
150
             @click="openDrawer"
151
+            v-access:code="['oilstation:emergency:add']"
149
           >
152
           >
150
             新增应急防护
153
             新增应急防护
151
           </ElButton>
154
           </ElButton>
157
             size="small"
160
             size="small"
158
             type="primary"
161
             type="primary"
159
             plain
162
             plain
163
+            v-access:code="['oilstation:emergency:edit']"
160
             @click="handleEdit(row)"
164
             @click="handleEdit(row)"
161
           >
165
           >
162
             编辑
166
             编辑
163
           </ElButton>
167
           </ElButton>
164
           <ElPopconfirm title="确认删除" @confirm="confirmEvent(row)">
168
           <ElPopconfirm title="确认删除" @confirm="confirmEvent(row)">
165
             <template #reference>
169
             <template #reference>
166
-              <ElButton
167
-                size="small"
168
-                type="danger"
169
-                plain
170
-              >
171
-                删除
172
-              </ElButton>
170
+              <ElButton size="small" type="danger" plain> 删除 </ElButton>
173
             </template>
171
             </template>
174
           </ElPopconfirm>
172
           </ElPopconfirm>
175
         </ElSpace>
173
         </ElSpace>

+ 37 - 6
apps/web-ele/src/views/oilstation/filter/index.vue

161
     <BasicTable table-title="过滤器档案列表">
161
     <BasicTable table-title="过滤器档案列表">
162
       <template #toolbar-tools>
162
       <template #toolbar-tools>
163
         <ElSpace>
163
         <ElSpace>
164
-          <ElButton type="primary" @click="handleAdd"> 新增过滤器
165
-</ElButton>
166
-          <ElButton type="primary" @click="exportHandle"> 导出 </ElButton>
167
-          <ElButton type="primary" @click="handleImport"> 导入 </ElButton>
164
+          <ElButton
165
+            type="primary"
166
+            v-access:code="['oilstation:filter:add']"
167
+            @click="handleAdd"
168
+          >
169
+            新增过滤器
170
+          </ElButton>
171
+          <ElButton
172
+            type="primary"
173
+            v-access:code="['oilstation:filter:export']"
174
+            @click="exportHandle"
175
+          >
176
+            导出
177
+          </ElButton>
178
+          <ElButton
179
+            type="primary"
180
+            v-access:code="['oilstation:filter:import']"
181
+            @click="handleImport"
182
+          >
183
+            导入
184
+          </ElButton>
168
           <ElButton
185
           <ElButton
169
             type="danger"
186
             type="danger"
187
+            v-access:code="['oilstation:filter:remove']"
170
             :disabled="
188
             :disabled="
171
               !(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)
189
               !(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)
172
             "
190
             "
178
       </template>
196
       </template>
179
       <template #action="{ row }">
197
       <template #action="{ row }">
180
         <ElSpace>
198
         <ElSpace>
181
-          <ElButton size="small" type="primary" plain @click="handleEdit(row)">
199
+          <ElButton
200
+            size="small"
201
+            type="primary"
202
+            plain
203
+            @click="handleEdit(row)"
204
+            v-access:code="['oilstation:filter:edit']"
205
+          >
182
             查看
206
             查看
183
           </ElButton>
207
           </ElButton>
184
           <ElPopconfirm title="确认删除" @confirm="handleDelete(row)">
208
           <ElPopconfirm title="确认删除" @confirm="handleDelete(row)">
185
             <template #reference>
209
             <template #reference>
186
-              <ElButton size="small" type="danger" plain> 删除 </ElButton>
210
+              <ElButton
211
+                size="small"
212
+                type="danger"
213
+                v-access:code="['oilstation:filter:remove']"
214
+                plain
215
+              >
216
+                删除
217
+              </ElButton>
187
             </template>
218
             </template>
188
           </ElPopconfirm>
219
           </ElPopconfirm>
189
         </ElSpace>
220
         </ElSpace>

+ 0 - 1
apps/web-ele/src/views/schedule/detail/drawer/groupLog/index.vue

289
 };
289
 };
290
 
290
 
291
 onMounted(async () => {
291
 onMounted(async () => {
292
-  console.log('gridOptions', gridOptions);
293
   await init();
292
   await init();
294
   // gridOptions.columns = await tableColumns();
293
   // gridOptions.columns = await tableColumns();
295
 });
294
 });

+ 13 - 2
apps/web-ele/src/views/schedule/detail/index.vue

1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import { defineComponent, h, onMounted, ref } from 'vue';
2
+import { computed, defineComponent, h, onMounted, ref } from 'vue';
3
 import { useRoute } from 'vue-router';
3
 import { useRoute } from 'vue-router';
4
 
4
 
5
 // @ts-ignore
5
 // @ts-ignore
6
 import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
6
 import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
7
 // @ts-ignore
7
 // @ts-ignore
8
 import { useTabs } from '@vben/hooks';
8
 import { useTabs } from '@vben/hooks';
9
+import { useUserStore } from '@vben/stores';
9
 
10
 
10
 import dayjs from 'dayjs';
11
 import dayjs from 'dayjs';
11
 import {
12
 import {
96
   WeeklyReportDrawer,
97
   WeeklyReportDrawer,
97
 } from './drawer';
98
 } from './drawer';
98
 
99
 
100
+const userStore = useUserStore();
101
+
99
 const { refreshTab } = useTabs();
102
 const { refreshTab } = useTabs();
100
 
103
 
101
 const route = useRoute();
104
 const route = useRoute();
242
   fileNames: [],
245
   fileNames: [],
243
 });
246
 });
244
 
247
 
248
+const oneSelf = computed(() => {
249
+  return taskInfo.value.executorId === Number(userStore.userInfo?.userId);
250
+});
251
+
245
 const init = async () => {
252
 const init = async () => {
246
   const res = await getTaskDetail(taskId.value);
253
   const res = await getTaskDetail(taskId.value);
247
   taskInfo.value = res;
254
   taskInfo.value = res;
582
         <div class="flex items-center space-x-4">
589
         <div class="flex items-center space-x-4">
583
           <ElButton
590
           <ElButton
584
             v-if="
591
             v-if="
592
+              oneSelf &&
585
               [1].includes(taskInfo.status) &&
593
               [1].includes(taskInfo.status) &&
586
               !mobileTaskTypes.includes(taskInfo.formType)
594
               !mobileTaskTypes.includes(taskInfo.formType)
587
             "
595
             "
592
           </ElButton>
600
           </ElButton>
593
           <ElButton
601
           <ElButton
594
             type="primary"
602
             type="primary"
595
-            v-if="[1].includes(taskInfo.status) && taskInfo.isLicensable"
603
+            v-if="
604
+              oneSelf && [1].includes(taskInfo.status) && taskInfo.isLicensable
605
+            "
596
             @click="handleTransferTask"
606
             @click="handleTransferTask"
597
           >
607
           >
598
             转交任务
608
             转交任务
599
           </ElButton>
609
           </ElButton>
600
           <ElButton
610
           <ElButton
601
             v-if="
611
             v-if="
612
+              oneSelf &&
602
               [1].includes(taskInfo.status) &&
613
               [1].includes(taskInfo.status) &&
603
               (taskInfo.level < 2 || !taskInfo.taskTemplate?.isMust)
614
               (taskInfo.level < 2 || !taskInfo.taskTemplate?.isMust)
604
             "
615
             "

+ 6 - 6
apps/web-ele/src/views/system/post/config-data.ts

63
     },
63
     },
64
   },
64
   },
65
   {
65
   {
66
-    field: 'type',
66
+    field: 'typeName',
67
     title: '岗位类型',
67
     title: '岗位类型',
68
-    formatter: (params: { cellValue: string; column: any; row: any }) => {
69
-      const options = getPostTypeOptions();
70
-      const option = options.find((item) => item.value === params.cellValue);
71
-      return option ? option.label : params.cellValue;
72
-    },
68
+    // formatter: (params: { cellValue: string; column: any; row: any }) => {
69
+    //   const options = getPostTypeOptions();
70
+    //   const option = options.find((item) => item.value === params.cellValue);
71
+    //   return option ? option.label : params.cellValue;
72
+    // },
73
   },
73
   },
74
   {
74
   {
75
     field: 'status',
75
     field: 'status',