zhangjie 1 year ago
parent
commit
96f61ed222

+ 7 - 1
src/layout/index.vue

@@ -78,6 +78,7 @@ import { useUserStore, useWorkStore, useAppStore } from '@/store';
 import { useRouter, useRoute } from 'vue-router';
 import LeftMenu from './left-menu.vue';
 import { moduleMap } from '@/router/asyncRoutes';
+import { MessagePlugin } from 'tdesign-vue-next';
 
 const router = useRouter();
 const route = useRoute();
@@ -87,7 +88,12 @@ const appStore = useAppStore();
 
 const moduleChange = (name) => {
   userStore.setCurPageModule(name);
-  router.push({ name });
+  const menu = userStore.moduleMenus.find((item) => !item.disabled);
+  if (!menu) {
+    MessagePlugin.error('权限配置错误!');
+    return;
+  }
+  router.push({ name: menu.name });
 };
 const setModuleByPath = () => {
   let firstPath = route.path.split('/')[1];

+ 0 - 2
src/router/modules/myWorkbenches.js

@@ -1,7 +1,6 @@
 export default {
   name: 'MyWorkbenches',
   path: '/my-workbenches',
-  redirect: '/my-workbenches/workbenches',
   meta: {
     title: '工作台',
     sort: 0,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'Workbenches',
       path: '/my-workbenches/workbenches',
-      redirect: '/my-workbenches/workbenches/message-reminder',
       meta: {
         title: '工作台',
         sort: 1,

+ 0 - 2
src/router/modules/projectQuality.js

@@ -1,7 +1,6 @@
 export default {
   name: 'ProjectQuality',
   path: '/project-quality',
-  redirect: '/project-quality/project-quality-manage',
   meta: {
     title: '项目质量',
     sort: 6,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'ProjectQualityManage',
       path: '/project-quality/project-quality-manage',
-      redirect: '/project-quality/project-quality-manage/issues-feedback',
       meta: {
         title: '项目质量管理',
         sort: 1,

+ 0 - 3
src/router/modules/resourceGuard.js

@@ -1,7 +1,6 @@
 export default {
   name: 'ResourceGuard',
   path: '/resource-guard',
-  redirect: '/resource-guard/person-guard',
   meta: {
     title: '资源保障',
     sort: 3,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'PersonGuard',
       path: '/resource-guard/person-guard',
-      redirect: '/resource-guard/person-guard/person-files',
       meta: {
         title: '人资保障',
         sort: 1,
@@ -53,7 +51,6 @@ export default {
     {
       name: 'DeviceGuard',
       path: '/resource-guard/device-guard',
-      redirect: '/resource-guard/device-guard/registration-query',
       meta: {
         title: '设备保障',
         sort: 2,

+ 0 - 3
src/router/modules/serviceUnit.js

@@ -1,7 +1,6 @@
 export default {
   name: 'ServiceUnit',
   path: '/service-unit',
-  redirect: '/service-unit/dispatch',
   meta: {
     title: '服务单元',
     sort: 1,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'Dispatch',
       path: '/service-unit/dispatch',
-      redirect: '/service-unit/dispatch/dispatch-manage',
       meta: {
         title: '派单管理',
         sort: 1,
@@ -37,7 +35,6 @@ export default {
     {
       name: 'ServiceUnitManage',
       path: '/service-unit/service-unit-manage',
-      redirect: '/service-unit/service-unit-manage/unit-manage',
       meta: {
         title: '服务单元管理',
         sort: 2,

+ 0 - 3
src/router/modules/sop.js

@@ -1,7 +1,6 @@
 export default {
   name: 'Sop',
   path: '/sop',
-  redirect: '/sop/sop-manage',
   meta: {
     title: 'SOP管理',
     sort: 2,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'SopManage',
       path: '/sop/sop-manage',
-      redirect: '/sop/sop-manage/office-sop',
       meta: {
         title: 'SOP管理',
         sort: 1,
@@ -102,7 +100,6 @@ export default {
     {
       name: 'SopMonitor',
       path: '/sop/sop-monitor',
-      redirect: '/sop/sop-monitor/delay-warning',
       meta: {
         title: 'SOP监控',
         sort: 1,

+ 0 - 4
src/router/modules/system.js

@@ -1,7 +1,6 @@
 export default {
   name: 'System',
   path: '/system',
-  redirect: { name: 'CustomerManage' },
   meta: {
     title: '系统',
     sort: 2,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'ConfigManage',
       path: '/system/config-manage',
-      redirect: { name: 'CustomerManage' },
       meta: {
         title: '配置管理',
         sort: 1,
@@ -87,7 +85,6 @@ export default {
     {
       name: 'NoticeLog',
       path: '/system/notice-log',
-      redirect: { name: 'NoticeManage' },
       meta: {
         title: '通知日志',
         sort: 1,
@@ -123,7 +120,6 @@ export default {
     {
       name: 'Task',
       path: '/system/task',
-      redirect: { name: 'TaskManage' },
       meta: {
         title: '任务管理',
         sort: 1,

+ 0 - 4
src/router/modules/user.js

@@ -1,7 +1,6 @@
 export default {
   name: 'User',
   path: '/user',
-  redirect: '/user/org-struct-manage',
   meta: {
     title: '用户',
     sort: 2,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'OrgStructManage',
       path: '/user/org-struct-manage',
-      redirect: '/user/org-struct-manage/struct-manage',
       meta: {
         title: '组织架构管理',
         sort: 1,
@@ -37,7 +35,6 @@ export default {
     {
       name: 'AuthManage',
       path: '/user/auth-manage',
-      redirect: '/user/auth-manage/user-manage',
       meta: {
         title: '用户权限管理',
         sort: 2,
@@ -83,7 +80,6 @@ export default {
     // {
     //   name: 'PasswordManage',
     //   path: '/user/password-manage',
-    //   redirect: '/user/password-manage/password-modify',
     //   meta: {
     //     title: '密码管理',
     //     sort: 1,

+ 0 - 2
src/router/modules/workHours.js

@@ -1,7 +1,6 @@
 export default {
   name: 'WorkHours',
   path: '/work-hours',
-  redirect: '/work-hours/work-hours-manage',
   meta: {
     title: '工时',
     sort: 5,
@@ -13,7 +12,6 @@ export default {
     {
       name: 'WorkHoursManage',
       path: '/work-hours/work-hours-manage',
-      redirect: '/work-hours/work-hours-manage/abnormal-check',
       meta: {
         title: '工时管理',
         sort: 1,

+ 1 - 1
src/store/modules/user.js

@@ -64,7 +64,7 @@ const filterAsyncRouter = (routerMap) => {
           children: item.children ? filterAsyncRouter(item.children) : null,
           // component: views[`../../views${target.path}/index.vue`],
           component: target.component,
-          redirect: target.redirect || null,
+          // redirect: target.redirect || null,
         };
         accessedRouters.push(route);
       });

+ 6 - 1
src/style/global.less

@@ -251,7 +251,12 @@ body {
   color: @dark-text-color;
   line-height: 24px;
 }
-
+.form-item-title {
+  font-size: 16px;
+  font-weight: bold;
+  color: @dark-text-color;
+  line-height: 24px;
+}
 .table {
   width: 100%;
   border-spacing: 0;

+ 7 - 4
src/views/login/index.vue

@@ -232,9 +232,7 @@ const loginHandle = () => {
   (loginType.value === 'ACCOUNT' ? form.value : form2.value)
     .validate()
     .then(async (result) => {
-      const redirect = route.query.redirect
-        ? route.query.redirect
-        : '/my-workbenches';
+      const redirect = route.query.redirect ? route.query.redirect : '';
       if (result === true) {
         let params =
           loginType.value === 'ACCOUNT'
@@ -252,7 +250,12 @@ const loginHandle = () => {
         if (redirect) {
           router.push(redirect);
         } else {
-          router.push({ name: userStore.menus[0].name });
+          const menu = userStore.moduleMenus.find((item) => !item.disabled);
+          if (!menu) {
+            MessagePlugin.error('权限配置错误!');
+            return;
+          }
+          router.push({ name: menu.name });
         }
       }
     });

+ 25 - 23
src/views/resource-guard/device-guard/registration-query/registration-detail-dialog.vue

@@ -30,25 +30,29 @@
           </t-form-item>
         </t-col>
         <t-col :span="12">
-          <t-form-item label="设备出入库登记"> </t-form-item>
-        </t-col>
-        <t-col :span="12">
-          <t-table
-            size="small"
-            row-key="id"
-            :columns="columns"
-            :data="[curRow]"
-            bordered
-          >
-            <template #status="{ col, row }">
-              {{ runningStatusFilter(row[col.colKey]) }}
-            </template>
-            <template #photo="{ col, row }">
-              <attachment-view
-                :image-list="[row[col.colKey]]"
-              ></attachment-view>
-            </template>
-          </t-table>
+          <t-form-item label="设备出入库登记">
+            <t-table
+              size="small"
+              row-key="id"
+              :columns="columns"
+              :data="[curRow]"
+              bordered
+            >
+              <template #deviceStatus="{ row }">
+                <status-tag
+                  :value="row.deviceStatus"
+                  type="runningStatus"
+                ></status-tag>
+              </template>
+              <template #basePhotoPath="{ col, row }">
+                <t-image
+                  v-if="row.basePhotoPath"
+                  :src="row.basePhotoPath"
+                  :style="{ width: '80px', height: '80px' }"
+                />
+              </template>
+            </t-table>
+          </t-form-item>
         </t-col>
       </t-row>
     </t-form>
@@ -64,10 +68,8 @@
 import {
   deviceUsageTypeFilter,
   inoutTypeFilter,
-  runningStatusFilter,
   timestampFilter,
 } from '@/utils/filter';
-// import { BrowseIcon } from 'tdesign-icons-vue-next';
 
 const emit = defineEmits(['update:visible']);
 const props = defineProps({
@@ -79,10 +81,10 @@ const columns = [
   { colKey: 'deviceNo', title: '设备编号', width: 120 },
   { colKey: 'deviceModel', title: '型号', width: 120 },
   { colKey: 'supplierName', title: '供应商', width: 200 },
-  { colKey: 'deviceStatus', title: '运行状态', width: 80, cell: 'status' },
+  { colKey: 'deviceStatus', title: '运行状态', width: 80 },
   { colKey: 'scanCount', title: '总扫描量', width: 80 },
   { colKey: 'location', title: '当前所在地' },
   { colKey: 'address', title: '发往地' },
-  { colKey: 'basePhotoPath', title: '快递单拍照', width: 100, cell: 'photo' },
+  { colKey: 'basePhotoPath', title: '快递单拍照', width: 100 },
 ];
 </script>

+ 9 - 0
src/views/resource-guard/person-guard/person-files/add-person-file-dialog.vue

@@ -102,6 +102,9 @@
             <t-date-picker
               v-model="formData.archivesTime"
               value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
             />
           </t-form-item>
         </t-col>
@@ -122,6 +125,9 @@
             <t-date-picker
               v-model="formData.authenticationTime"
               value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
               :disable-date="{ after: formData.examEndTime || undefined }"
             />
           </t-form-item>
@@ -143,6 +149,9 @@
             <t-date-picker
               v-model="formData.authenticationValidTime"
               value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
               :disable-date="{
                 before: formData.authenticationTime || undefined,
               }"

+ 6 - 0
src/views/service-unit/dispatch/dispatch-manage/add-dispatch-dialog.vue

@@ -65,6 +65,9 @@
               v-model="formData.examStartTime"
               :disable-date="{ after: formData.examEndTime || undefined }"
               value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
             />
           </t-form-item>
         </t-col>
@@ -74,6 +77,9 @@
               v-model="formData.examEndTime"
               :disable-date="{ before: formData.examStartTime || undefined }"
               value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
             />
           </t-form-item>
         </t-col>

+ 6 - 0
src/views/service-unit/service-unit-manage/unit-manage/add-unit-dialog.vue

@@ -26,6 +26,9 @@
           v-model="formData.startTime"
           :disable-date="{ after: formData.endTime || undefined }"
           value-type="time-stamp"
+          enable-time-picker
+          format="YYYY-MM-DD hh:mm"
+          :time-picker-props="{ format: 'HH:mm' }"
         />
       </t-form-item>
       <t-form-item label="服务截止时间" name="endTime">
@@ -33,6 +36,9 @@
           v-model="formData.endTime"
           :disable-date="{ before: formData.startTime || undefined }"
           value-type="time-stamp"
+          enable-time-picker
+          format="YYYY-MM-DD hh:mm"
+          :time-picker-props="{ format: 'HH:mm' }"
         />
       </t-form-item>
       <t-form-item label="区域配比" name="regionPeopleCount" required-mark>

+ 3 - 0
src/views/sop/components/dynamic-form-item/DATE.vue

@@ -4,6 +4,9 @@
     value-type="time-stamp"
     :disabled="!config.writable"
     style="width: 100%"
+    enable-time-picker
+    format="YYYY-MM-DD hh:mm"
+    :time-picker-props="{ format: 'HH:mm' }"
     @change="emitChange"
   />
 </template>

+ 4 - 1
src/views/sop/sop-manage/device-out-in/add-device-dialog.vue

@@ -21,7 +21,10 @@
             <t-date-picker
               v-model="formData.inOutTime"
               style="width: 100%"
-              valueType="time-stamp"
+              value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
             />
           </t-form-item>
         </t-col>

+ 20 - 0
src/views/sop/sop-manage/device-out-in/index.vue

@@ -56,6 +56,12 @@
         :selected-row-keys="selectedRowKeys"
         @select-change="selectChange"
       >
+        <template #serialNo="{ col, row }">
+          <more-content
+            :content="row[col.colKey]"
+            @action="handleDetail(row)"
+          ></more-content>
+        </template>
         <template #inouttime="{ col, row }">
           {{ timestampFilter(row[col.colKey]) }}
         </template>
@@ -70,6 +76,11 @@
       v-model:visible="showAddDeviceDialog"
       @success="addSuccess"
     ></AddDeviceDialog>
+    <!-- RegistrationDetailDialog -->
+    <registration-detail-dialog
+      v-model:visible="showRegistrationDetailDialog"
+      :cur-row="curRow"
+    ></registration-detail-dialog>
   </div>
 </template>
 
@@ -77,6 +88,8 @@
 import { ref, reactive, computed } from 'vue';
 import useFetchTable from '@/hooks/useFetchTable';
 import AddDeviceDialog from './add-device-dialog.vue';
+import RegistrationDetailDialog from '../../../resource-guard/device-guard/registration-query/registration-detail-dialog.vue';
+
 import { deviceOutInSearch } from '@/api/sop';
 import { omit } from 'lodash';
 import { DEVICE_USAGE_TYPE, RUNNING_STATUS } from '@/config/constants';
@@ -97,6 +110,7 @@ const columns = [
     width: 50,
     fixed: 'left',
   },
+  { colKey: 'serialNo', title: '登记流水号', width: 200 },
   { colKey: 'serviceUnitName', title: '服务单元', width: 120 },
   { colKey: 'usageType', title: '用途类型', width: 120 },
   { colKey: 'deviceNo', title: '设备编号', width: 200 },
@@ -227,4 +241,10 @@ const addSuccess = () => {
   showAddDeviceDialog.value = false;
   search();
 };
+const showRegistrationDetailDialog = ref(false);
+const curRow = ref(null);
+const handleDetail = (row) => {
+  curRow.value = row;
+  showRegistrationDetailDialog.value = true;
+};
 </script>

+ 1 - 1
src/views/sop/sop-manage/project-change-report/index.vue

@@ -83,7 +83,7 @@ const selectChange = (value) => {
 };
 
 const columns = [
-  { colKey: 'code', title: '变更申请编号', width: 200 },
+  { colKey: 'id', title: '变更申请编号', width: 200 },
   { colKey: 'serviceName', title: '服务单元', width: 140 },
   { colKey: 'customTypeStr', title: '客户类型', width: 120 },
   { colKey: 'customName', title: '客户名称', width: 140 },

+ 41 - 27
src/views/sop/sop-monitor/delay-warning/flow-dialog.vue

@@ -30,7 +30,7 @@
               </t-col>
               <t-col :span="3">
                 <t-form-item label="客户类型">
-                  {{ curRow.customType }}
+                  {{ customerTypeFilter(curRow.customType) }}
                 </t-form-item>
               </t-col>
               <t-col :span="3">
@@ -73,31 +73,33 @@
           class="sop-step-body"
         >
           <t-row :gutter="[0, 30]">
-            <t-col :span="12">
-              <div class="form-group-title"> 新增跟进 </div>
-            </t-col>
-            <t-col :span="12">
-              <t-form-item label="跟进人">
-                {{ userStore.user.realName }}</t-form-item
-              >
-            </t-col>
-            <t-col :span="12">
-              <t-form-item label="跟进说明" name="remark">
-                <t-textarea
-                  v-model="formData.remark"
-                  tips="限100字以内"
-                  :maxlength="100"
-                ></t-textarea>
-              </t-form-item>
-            </t-col>
-            <t-col :span="12">
-              <t-form-item label="附件说明">
-                <my-upload @change="fileChange"></my-upload>
-              </t-form-item>
-            </t-col>
+            <template v-if="!IS_VIEW_MODE">
+              <t-col :span="12">
+                <div class="form-group-title"> 新增跟进 </div>
+              </t-col>
+              <t-col :span="12">
+                <t-form-item label="跟进人">
+                  {{ userStore.user.realName }}</t-form-item
+                >
+              </t-col>
+              <t-col :span="12">
+                <t-form-item label="跟进说明" name="remark">
+                  <t-textarea
+                    v-model="formData.remark"
+                    tips="限100字以内"
+                    :maxlength="100"
+                  ></t-textarea>
+                </t-form-item>
+              </t-col>
+              <t-col :span="12">
+                <t-form-item label="附件说明">
+                  <my-upload @change="fileChange"></my-upload>
+                </t-form-item>
+              </t-col>
+            </template>
 
             <t-col :span="12">
-              <div class="m-b-10px">
+              <div v-if="!IS_VIEW_MODE" class="m-b-10px">
                 历史明细查阅
                 <t-link
                   theme="primary"
@@ -106,8 +108,9 @@
                   >查看 <ChevronUpIcon v-if="showHistory" />
                   <ChevronDownIcon v-else /></t-link
               ></div>
+              <div v-else class="form-item-title m-b-10px"> 历史明细查阅 </div>
               <t-table
-                v-if="showHistory"
+                v-if="showHistory || IS_VIEW_MODE"
                 size="small"
                 row-key="id"
                 :columns="columns"
@@ -127,7 +130,7 @@
             </t-col>
           </t-row>
         </t-form>
-        <t-space class="sop-step-footer">
+        <t-space v-if="!IS_VIEW_MODE" class="sop-step-footer">
           <t-button theme="primary" @click="save">保存</t-button>
           <t-button theme="default" @click="emit('update:visible', false)"
             >取消</t-button
@@ -145,7 +148,11 @@ import { MessagePlugin } from 'tdesign-vue-next';
 import { ref, computed } from 'vue';
 import { useUserStore } from '@/store';
 import { delayWarnDetailList, flowDelayWarn } from '@/api/sop';
-import { timestampFilter, warnTypeFilter } from '@/utils/filter';
+import {
+  customerTypeFilter,
+  timestampFilter,
+  warnTypeFilter,
+} from '@/utils/filter';
 
 const userStore = useUserStore();
 const props = defineProps({
@@ -156,6 +163,10 @@ const props = defineProps({
       return {};
     },
   },
+  type: {
+    type: String,
+    default: 'new',
+  },
 });
 const emit = defineEmits(['update:visible', 'success']);
 
@@ -166,6 +177,9 @@ const showHistory = ref(false);
 const title = computed(() => {
   return `预警信息(预警流水号:${props.curRow.code})`;
 });
+const IS_VIEW_MODE = computed(() => {
+  return props.type === 'view';
+});
 
 const getDetail = async () => {
   const res = await delayWarnDetailList(props.curRow.id);

+ 14 - 0
src/views/sop/sop-monitor/delay-warning/index.vue

@@ -25,6 +25,12 @@
         }"
         v-loading="tableLoading"
       >
+        <template #code="{ col, row }">
+          <more-content
+            :content="row[col.colKey]"
+            @action="handleDetail(row)"
+          ></more-content>
+        </template>
         <template #type="{ col, row }">
           {{ warnTypeFilter(row[col.colKey]) }}
         </template>
@@ -76,6 +82,7 @@
       v-if="perm.LINK_Follow"
       v-model:visible="showDelayWarnFlowDialog"
       :curRow="curRow"
+      :type="viewType"
       @success="fetchData"
     ></delay-warn-flow-dialog>
   </div>
@@ -96,8 +103,15 @@ const { perm } = usePermission();
 
 const showDelayWarnFlowDialog = ref(false);
 const curRow = ref({});
+const viewType = ref('');
 
 const handleFollow = (row) => {
+  viewType.value = 'new';
+  curRow.value = row;
+  showDelayWarnFlowDialog.value = true;
+};
+const handleDetail = (row) => {
+  viewType.value = 'view';
   curRow.value = row;
   showDelayWarnFlowDialog.value = true;
 };

+ 3 - 0
src/views/system/config-manage/device-manage/edit-device-dialog.vue

@@ -44,6 +44,9 @@
               v-model="formData.buyTime"
               mode="date"
               value-type="time-stamp"
+              enable-time-picker
+              format="YYYY-MM-DD hh:mm"
+              :time-picker-props="{ format: 'HH:mm' }"
             />
           </t-form-item>
         </t-col>