Browse Source

Merge branch 'release_v1.0.0' of http://git.qmth.com.cn/sop/web into dev_1.0.1

刘洋 1 year ago
parent
commit
ca8e8c8dc3

+ 3 - 1
build/config/define.js

@@ -1,7 +1,9 @@
 import dayjs from 'dayjs';
 import dayjs from 'dayjs';
 
 
 /** 项目构建时间 */
 /** 项目构建时间 */
-const PROJECT_BUILD_TIME = JSON.stringify(dayjs().format('YYYY-MM-DD HH:mm:ss'));
+const PROJECT_BUILD_TIME = JSON.stringify(
+  dayjs().format('YYYY/MM/DD HH:mm:ss')
+);
 
 
 export const viteDefine = {
 export const viteDefine = {
   PROJECT_BUILD_TIME,
   PROJECT_BUILD_TIME,

+ 3 - 0
src/components/global/search-form/components/search-form-item.vue

@@ -96,6 +96,9 @@
     <t-date-range-picker
     <t-date-range-picker
       v-model="params[item.prop]"
       v-model="params[item.prop]"
       value-type="time-stamp"
       value-type="time-stamp"
+      enable-time-picker
+      format="YYYY/MM/DD HH:mm"
+      :time-picker-props="{ format: 'HH:mm' }"
       v-bind="attrs"
       v-bind="attrs"
     />
     />
   </template>
   </template>

+ 1 - 1
src/utils/filter.js

@@ -54,7 +54,7 @@ export function educationTypeFilter(val) {
 export function timestampFilter(val, fmt = 'mm') {
 export function timestampFilter(val, fmt = 'mm') {
   // fmt: dd or yyyy-MM-dd
   // fmt: dd or yyyy-MM-dd
   const formats = {
   const formats = {
-    dd: 'yyyy-MM-dd',
+    dd: 'yyyy/MM/dd',
     mm: 'yyyy/MM/dd HH:mm',
     mm: 'yyyy/MM/dd HH:mm',
     ss: 'yyyy/MM/dd HH:mm:ss',
     ss: 'yyyy/MM/dd HH:mm:ss',
   };
   };

+ 1 - 1
src/utils/tool.js

@@ -174,7 +174,7 @@ export const generateId = function () {
 /* 日期格式化 */
 /* 日期格式化 */
 export const dateFormat = (
 export const dateFormat = (
   date,
   date,
-  fmt = 'yyyy-MM-dd HH:mm:ss',
+  fmt = 'yyyy/MM/dd HH:mm:ss',
   isDefault = '-'
   isDefault = '-'
 ) => {
 ) => {
   if (!date) {
   if (!date) {

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

@@ -41,9 +41,9 @@
           :rules="rules"
           :rules="rules"
           v-if="loginType === 'ACCOUNT'"
           v-if="loginType === 'ACCOUNT'"
         >
         >
-          <t-form-item name="mobileNumber">
+          <t-form-item name="loginName">
             <t-input
             <t-input
-              v-model="formData.mobileNumber"
+              v-model="formData.loginName"
               clearable
               clearable
               placeholder="请输入手机号码"
               placeholder="请输入手机号码"
               size="large"
               size="large"
@@ -192,7 +192,7 @@ const route = useRoute();
 const router = useRouter();
 const router = useRouter();
 
 
 const formData = reactive({
 const formData = reactive({
-  mobileNumber: '',
+  loginName: '',
   password: '',
   password: '',
 });
 });
 const formData2 = reactive({
 const formData2 = reactive({
@@ -200,10 +200,10 @@ const formData2 = reactive({
   code: '',
   code: '',
 });
 });
 const rules = {
 const rules = {
-  mobileNumber: [
+  loginName: [
     {
     {
       required: true,
       required: true,
-      message: '请输入手机号',
+      message: '请输入号',
       type: 'error',
       type: 'error',
       trigger: 'change',
       trigger: 'change',
     },
     },
@@ -242,7 +242,7 @@ const loginHandle = () => {
         let params =
         let params =
           loginType.value === 'ACCOUNT'
           loginType.value === 'ACCOUNT'
             ? {
             ? {
-                mobileNumber: formData.mobileNumber,
+                loginName: formData.loginName,
                 password: getBase64(formData.password),
                 password: getBase64(formData.password),
               }
               }
             : formData2;
             : formData2;
@@ -267,7 +267,7 @@ const loginHandle = () => {
 };
 };
 const findSuccess = () => {
 const findSuccess = () => {
   forgetStatus.value = false;
   forgetStatus.value = false;
-  formData.mobileNumber = '';
+  formData.loginName = '';
   formData.password = '';
   formData.password = '';
 };
 };
 </script>
 </script>

+ 5 - 5
src/views/my-workbenches/workbenches/notice/index.vue

@@ -43,7 +43,7 @@
     >
     >
       <h2 class="text-center notice-title">{{ curNotice.title }}</h2>
       <h2 class="text-center notice-title">{{ curNotice.title }}</h2>
       <div class="text-center notice-subtitle"
       <div class="text-center notice-subtitle"
-        >发布时间:{{ dateFormat(curNotice.sendTime, 'yyyy-MM-dd') }}</div
+        >发布时间:{{ dateFormat(curNotice.sendTime, 'yyyyMM-dd') }}</div
       >
       >
       <div class="notice-content" v-html="curNotice.content"></div>
       <div class="notice-content" v-html="curNotice.content"></div>
 
 
@@ -57,7 +57,7 @@
 <script setup name="Notice">
 <script setup name="Notice">
 import { reactive, computed, ref } from 'vue';
 import { reactive, computed, ref } from 'vue';
 import useFetchTable from '@/hooks/useFetchTable';
 import useFetchTable from '@/hooks/useFetchTable';
-import {getMyMessages, setMyMessagesRead} from '@/api/my-workbenches';
+import { getMyMessages, setMyMessagesRead } from '@/api/my-workbenches';
 import NoticeList from './notice-list.vue';
 import NoticeList from './notice-list.vue';
 import { omit } from 'lodash';
 import { omit } from 'lodash';
 import { dateFormat } from '@/utils/tool';
 import { dateFormat } from '@/utils/tool';
@@ -70,10 +70,10 @@ const visible = ref(false);
 const open = (notice) => {
 const open = (notice) => {
   curNotice.value = notice;
   curNotice.value = notice;
   visible.value = true;
   visible.value = true;
-  setMyMessagesRead(curNotice.value.id).then(()=> {
-    search()
+  setMyMessagesRead(curNotice.value.id).then(() => {
+    search();
     workStore.updateWorkCounts();
     workStore.updateWorkCounts();
-  })
+  });
 };
 };
 
 
 const tabs = [
 const tabs = [

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

@@ -103,7 +103,7 @@
               v-model="formData.archivesTime"
               v-model="formData.archivesTime"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
             />
             />
           </t-form-item>
           </t-form-item>
@@ -126,7 +126,7 @@
               v-model="formData.authenticationTime"
               v-model="formData.authenticationTime"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
               :disable-date="{ after: formData.examEndTime || undefined }"
               :disable-date="{ after: formData.examEndTime || undefined }"
             />
             />
@@ -150,7 +150,7 @@
               v-model="formData.authenticationValidTime"
               v-model="formData.authenticationValidTime"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
               :disable-date="{
               :disable-date="{
                 before: formData.authenticationTime || undefined,
                 before: formData.authenticationTime || undefined,

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

@@ -25,7 +25,7 @@
               v-model="formData.beginTime"
               v-model="formData.beginTime"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
             />
             />
           </t-form-item>
           </t-form-item>
@@ -65,7 +65,7 @@
               v-model="formData.examStartTime"
               v-model="formData.examStartTime"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
             />
             />
           </t-form-item>
           </t-form-item>
@@ -76,7 +76,7 @@
               v-model="formData.examEndTime"
               v-model="formData.examEndTime"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
             />
             />
           </t-form-item>
           </t-form-item>

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

@@ -27,7 +27,7 @@
           :disable-date="{ after: formData.endTime || undefined }"
           :disable-date="{ after: formData.endTime || undefined }"
           value-type="time-stamp"
           value-type="time-stamp"
           enable-time-picker
           enable-time-picker
-          format="YYYY-MM-DD HH:mm"
+          format="YYYY/MM/DD HH:mm"
           :time-picker-props="{ format: 'HH:mm' }"
           :time-picker-props="{ format: 'HH:mm' }"
         />
         />
       </t-form-item>
       </t-form-item>
@@ -37,7 +37,7 @@
           :disable-date="{ before: formData.startTime || undefined }"
           :disable-date="{ before: formData.startTime || undefined }"
           value-type="time-stamp"
           value-type="time-stamp"
           enable-time-picker
           enable-time-picker
-          format="YYYY-MM-DD HH:mm"
+          format="YYYY/MM/DD HH:mm"
           :time-picker-props="{ format: 'HH:mm' }"
           :time-picker-props="{ format: 'HH:mm' }"
         />
         />
       </t-form-item>
       </t-form-item>

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

@@ -5,7 +5,7 @@
     :disabled="!config.writable"
     :disabled="!config.writable"
     style="width: 100%"
     style="width: 100%"
     enable-time-picker
     enable-time-picker
-    format="YYYY-MM-DD HH:mm"
+    format="YYYY/MM/DD HH:mm"
     :time-picker-props="{ format: 'HH:mm' }"
     :time-picker-props="{ format: 'HH:mm' }"
     @change="emitChange"
     @change="emitChange"
   />
   />

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

@@ -23,7 +23,7 @@
               style="width: 100%"
               style="width: 100%"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
             />
             />
           </t-form-item>
           </t-form-item>

+ 9 - 5
src/views/sop/sop-manage/plan-change/index.vue

@@ -189,7 +189,6 @@
               <h2>
               <h2>
                 {{ sopInfo.statusStr }}
                 {{ sopInfo.statusStr }}
               </h2>
               </h2>
-              <p>{{ stepDuration }}</p>
             </div>
             </div>
             <div class="content-body">
             <div class="content-body">
               <t-collapse>
               <t-collapse>
@@ -269,18 +268,21 @@ const emit = defineEmits(['confirm', 'cancel']);
 const sopInfo = ref({ ...props.sop });
 const sopInfo = ref({ ...props.sop });
 const stepHistoryShow = ref(false);
 const stepHistoryShow = ref(false);
 const flowApproveHistoryList = ref([]);
 const flowApproveHistoryList = ref([]);
-const stepDuration = ref('');
 
 
-function getFlowApproveHistoryList(data) {
+function getFlowApproveHistoryList(data, allStepData) {
   if (!data) return [];
   if (!data) return [];
 
 
+  let setupData = {};
+  allStepData.forEach((item) => {
+    setupData[item.setup] = item.taskName;
+  });
   let lastTime = 0;
   let lastTime = 0;
   return data.map((item, index) => {
   return data.map((item, index) => {
     let nitem = { ...item };
     let nitem = { ...item };
     nitem.duration =
     nitem.duration =
       index === 0 ? '-' : timeNumberToText(item.createTime - lastTime);
       index === 0 ? '-' : timeNumberToText(item.createTime - lastTime);
     lastTime = item.createTime;
     lastTime = item.createTime;
-    nitem.taskName = item.approveRemark;
+    nitem.taskName = setupData[item.approveSetup];
     return nitem;
     return nitem;
   });
   });
 }
 }
@@ -369,9 +371,11 @@ const initData = async () => {
   sopInfo.value.examStartTime = res.crmInfo.examStartTime;
   sopInfo.value.examStartTime = res.crmInfo.examStartTime;
   sopInfo.value.examEndTime = res.crmInfo.examEndTime;
   sopInfo.value.examEndTime = res.crmInfo.examEndTime;
   sopInfo.value.productName = res.crmInfo.productName;
   sopInfo.value.productName = res.crmInfo.productName;
+  sopInfo.value.statusStr = props.sop.projectExchangeFlowStatusStr;
 
 
   flowApproveHistoryList.value = getFlowApproveHistoryList(
   flowApproveHistoryList.value = getFlowApproveHistoryList(
-    res.flowApproveHistoryList
+    res.flowApproveHistoryList,
+    res.flowTaskHistoryList
   );
   );
 
 
   for (const key in res.tbProjectExchange) {
   for (const key in res.tbProjectExchange) {

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

@@ -45,7 +45,7 @@
               mode="date"
               mode="date"
               value-type="time-stamp"
               value-type="time-stamp"
               enable-time-picker
               enable-time-picker
-              format="YYYY-MM-DD HH:mm"
+              format="YYYY/MM/DD HH:mm"
               :time-picker-props="{ format: 'HH:mm' }"
               :time-picker-props="{ format: 'HH:mm' }"
             />
             />
           </t-form-item>
           </t-form-item>

+ 43 - 3
src/views/system/notice-log/notice-manage/index.vue

@@ -40,6 +40,10 @@
           {{ noticeTypeFilter(row[col.colKey]) }}
           {{ noticeTypeFilter(row[col.colKey]) }}
         </template>
         </template>
         <template #name="{ col, row }">
         <template #name="{ col, row }">
+          <t-link
+              hover="color"
+              @click="open(row)"
+          >
           <span>{{ row.title }}</span>
           <span>{{ row.title }}</span>
           <span>
           <span>
             【 {{ row.createName + ':'
             【 {{ row.createName + ':'
@@ -49,6 +53,7 @@
                 : '暂未发布'
                 : '暂未发布'
             }}】
             }}】
           </span>
           </span>
+          </t-link>
         </template>
         </template>
         <template #status="{ col, row }">
         <template #status="{ col, row }">
           <status-tag :value="row[col.colKey]" type="notice"></status-tag>
           <status-tag :value="row[col.colKey]" type="notice"></status-tag>
@@ -112,6 +117,20 @@
       v-model:visible="showNoticeMessageDialog"
       v-model:visible="showNoticeMessageDialog"
       :curRow="curRow"
       :curRow="curRow"
     ></notice-message-dialog>
     ></notice-message-dialog>
+    <t-drawer
+        v-model:visible="visible"
+        header="通知公告"
+        size="80%"
+        :close-btn="true"
+    >
+      <h2 class="text-center notice-title">{{ curRow?.title }}</h2>
+      <div class="text-center notice-subtitle">创建时间:{{ timestampFilter(curRow?.createTime) }}</div>
+      <div class="notice-content" v-html="curRow?.content"></div>
+
+      <template #footer>
+        <t-button theme="primary" @click="visible = false">返回</t-button>
+      </template>
+    </t-drawer>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -128,12 +147,12 @@ import {
   noticePublishApi,
   noticePublishApi,
   noticeCancelPublishApi,
   noticeCancelPublishApi,
 } from '@/api/system';
 } from '@/api/system';
-import { dictToOptionList } from '@/utils/tool';
+import {dateFormat, dictToOptionList} from '@/utils/tool';
 import { NOTICE_TYPE, PUBLISH_STATUS } from '@/config/constants';
 import { NOTICE_TYPE, PUBLISH_STATUS } from '@/config/constants';
 import { noticeTypeFilter, timestampFilter } from '@/utils/filter';
 import { noticeTypeFilter, timestampFilter } from '@/utils/filter';
 import usePermission from '@/hooks/usePermission';
 import usePermission from '@/hooks/usePermission';
 const { perm } = usePermission();
 const { perm } = usePermission();
-
+const visible = ref(false);
 const showEditNoticeDialog = ref(false);
 const showEditNoticeDialog = ref(false);
 const showNoticeMessageDialog = ref(false);
 const showNoticeMessageDialog = ref(false);
 const curRow = ref(null);
 const curRow = ref(null);
@@ -210,6 +229,7 @@ const columns = [
   { colKey: 'type', title: '类型', cell: 'type', width: 120 },
   { colKey: 'type', title: '类型', cell: 'type', width: 120 },
   { colKey: 'title', title: '消息名称', cell: 'name' },
   { colKey: 'title', title: '消息名称', cell: 'name' },
   { colKey: 'status', title: '发布状态', cell: 'status', width: 120 },
   { colKey: 'status', title: '发布状态', cell: 'status', width: 120 },
+  { colKey: 'readCount', title: '回执进度', cell: 'readCount', width: 120 },
   {
   {
     title: '管理',
     title: '管理',
     colKey: 'operate',
     colKey: 'operate',
@@ -234,7 +254,10 @@ const {
 const selectChange = (value) => {
 const selectChange = (value) => {
   selectedRowKeys.value = value;
   selectedRowKeys.value = value;
 };
 };
-
+const open = (notice) => {
+  curRow.value = notice;
+  visible.value = true;
+};
 const handleAdd = () => {
 const handleAdd = () => {
   curRow.value = null;
   curRow.value = null;
   showEditNoticeDialog.value = true;
   showEditNoticeDialog.value = true;
@@ -301,3 +324,20 @@ const handlePublish = (row) => {
   });
   });
 };
 };
 </script>
 </script>
+<style lang="less" scoped>
+.notice {
+  .notice-title {
+    color: #333;
+    font-size: 20px;
+  }
+  .notice-subtitle {
+    font-size: 13px;
+    margin-top: 6px;
+  }
+//.notice-content {
+//  font-size: 14px;
+//  margin-top: 10px;
+//  text-indent: 2em;
+//}
+}
+</style>

+ 8 - 4
src/views/work-hours/work-hours-manage/abnormal-check/abnormal-detail-dialog.vue

@@ -199,26 +199,30 @@ const getUrls = (type) => {
   }
   }
 };
 };
 
 
-function getFlowApproveHistoryList(data) {
+function getFlowApproveHistoryList(data, allStepData) {
   if (!data) return [];
   if (!data) return [];
 
 
+  let setupData = {};
+  allStepData.forEach((item) => {
+    setupData[item.setup] = item.taskName;
+  });
   let lastTime = 0;
   let lastTime = 0;
   return data.map((item, index) => {
   return data.map((item, index) => {
     let nitem = { ...item };
     let nitem = { ...item };
     nitem.duration =
     nitem.duration =
       index === 0 ? '-' : timeNumberToText(item.createTime - lastTime);
       index === 0 ? '-' : timeNumberToText(item.createTime - lastTime);
     lastTime = item.createTime;
     lastTime = item.createTime;
-    nitem.taskName = item.approveSetup + '';
+    nitem.taskName = setupData[item.approveSetup];
     return nitem;
     return nitem;
   });
   });
 }
 }
-
 const initDetail = async () => {
 const initDetail = async () => {
   stepHistoryShow.value = false;
   stepHistoryShow.value = false;
   flowApproveHistoryList.value = [];
   flowApproveHistoryList.value = [];
   const res = await workHoursCheckDetailApi(props.row.objId);
   const res = await workHoursCheckDetailApi(props.row.objId);
   flowApproveHistoryList.value = getFlowApproveHistoryList(
   flowApproveHistoryList.value = getFlowApproveHistoryList(
-    res.flowApproveHistoryList
+    res.flowApproveHistoryList,
+    res.flowTaskHistoryList
   );
   );
 };
 };
 const toViewHistory = () => {
 const toViewHistory = () => {