闪电 3 周之前
父节点
当前提交
18b206706f

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

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

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

@@ -161,12 +161,30 @@ async function exportHandle() {
161 161
     <BasicTable table-title="过滤器档案列表">
162 162
       <template #toolbar-tools>
163 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 185
           <ElButton
169 186
             type="danger"
187
+            v-access:code="['oilstation:filter:remove']"
170 188
             :disabled="
171 189
               !(basicTableApi?.grid?.getCheckboxRecords?.()?.length > 0)
172 190
             "
@@ -178,12 +196,25 @@ async function exportHandle() {
178 196
       </template>
179 197
       <template #action="{ row }">
180 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 207
           </ElButton>
184 208
           <ElPopconfirm title="确认删除" @confirm="handleDelete(row)">
185 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 218
             </template>
188 219
           </ElPopconfirm>
189 220
         </ElSpace>

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

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

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

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

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

@@ -63,13 +63,13 @@ export const tableColumns: VxeGridProps['columns'] = [
63 63
     },
64 64
   },
65 65
   {
66
-    field: 'type',
66
+    field: 'typeName',
67 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 75
     field: 'status',