刘洋 2 年之前
父节点
当前提交
97d854a417

+ 1 - 1
src/assets/styles/app.scss

@@ -14,7 +14,7 @@ html {
   line-height: normal;
   -webkit-text-size-adjust: 100%;
   height: 100%;
-  user-select: none;
+  // user-select: none;
 }
 
 main {

+ 1 - 1
src/components/element/BaseDialog.vue

@@ -33,7 +33,7 @@ const props = withDefaults(
     footer?: boolean
     canResize?: string
   }>(),
-  { header: true, footer: true }
+  { header: true, footer: true, canResize: '' }
 )
 const attrs = useAttrs()
 </script>

+ 2 - 2
src/components/shared/MarkHeader.vue

@@ -29,9 +29,9 @@
       </span>
       <span class="data-item m-r-base"><user-info></user-info></span>
 
-      <div class="grid pointer close-icon" @click="willLogout">
+      <!-- <div class="grid pointer close-icon" @click="willLogout">
         <el-icon><close /></el-icon>
-      </div>
+      </div> -->
     </div>
 
     <base-dialog v-model="standardVisible" title="评分标准" width="40vw" center :footer="false">

+ 1 - 1
src/components/shared/message/MessageSend.vue

@@ -235,7 +235,7 @@ const onSendMessage = async () => {
       return ElMessage.error('输入内容过长')
     }
     let ids: any = checkedUsers.value?.filter(Boolean)?.map((u) => u.id)
-    if (ids.indexOf(replyUserId?.value) == -1) {
+    if (replyUserId?.value && ids.indexOf(replyUserId?.value) == -1) {
       ids.unshift(replyUserId.value)
     }
     await sendMessage({

+ 2 - 1
src/components/shared/message/MessageWindow.vue

@@ -21,7 +21,7 @@ import MessageHistory from '@/components/shared/message/MessageList.vue'
 import MessageSend from '@/components/shared/message/MessageSend.vue'
 
 type ModalType = 'view' | 'send'
-const replyUserName = ref('')
+const replyUserName = ref<string | null>('')
 const props = withDefaults(
   defineProps<{
     modelValue: boolean
@@ -45,6 +45,7 @@ const MessageWindowContent = computed(() => {
 const onClose = () => {
   visible.value = false
   replyUserId.value = null
+  replyUserName.value = null
 }
 
 const onChangeType = (type: ModalType) => {

+ 12 - 7
src/hooks/useMessageLoop.ts

@@ -39,16 +39,21 @@ const useMessageLoop = () => {
   const getUnReadMessageFn = async () => {
     let seconds = 10
     try {
-      await getUnReadMessage()
-    } catch (err: any) {
-      if (err.response.status == 401) {
+      if (sessionStorage.get('LOGIN_RESULT')) {
+        await getUnReadMessage()
+      } else {
         cleanTimer()
-        sessionStorage.remove('LOGIN_RESULT')
-        router.replace({ name: 'Login' })
         return
-      } else {
-        seconds = 30
       }
+    } catch (err: any) {
+      // if (err.response.status == 401) {
+      //   cleanTimer()
+      //   sessionStorage.remove('LOGIN_RESULT')
+      //   router.replace({ name: 'Login' })
+      //   return
+      // } else {
+      seconds = 30
+      // }
     }
     cleanTimer()
     timer = window.setTimeout(getUnReadMessageFn, seconds * 1000)

+ 4 - 0
src/hooks/useTableCheck.ts

@@ -82,6 +82,9 @@ const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = t
       toggleClass(rightTableViewDom, 'collapse')
     }
   }
+  const nextRow = () => {
+    elTableRef?.value?.setCurrentRow(tableData.value[((current.value?.index || 0) + 1) % tableData.value.length])
+  }
 
   return {
     tableRef,
@@ -93,6 +96,7 @@ const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = t
     onCurrentChange,
     onDbClick,
     next,
+    nextRow,
   }
 }
 

+ 102 - 19
src/modules/analysis/personnel-compare/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="personnel-compare-view">
+  <div class="personnel-compare-view full">
     <div class="p-l-base p-r-base p-t-medium-base fill-blank filter-form" style="padding-bottom: 10px">
       <base-form size="small" :label-width="'88px'" :model="model" :items="items">
         <template #form-item-button-group>
@@ -24,6 +24,7 @@
           :data="allTableData"
           :height="'calc(100vh - 520px)'"
           highlight-current-row
+          @row-dblclick="onDbClick"
         >
         </base-table>
         <base-table
@@ -34,8 +35,7 @@
           size="small"
           :columns="columns2"
           :data="allTableData"
-          :height="'calc(100vh - 520px)'"
-          highlight-current-row
+          :height="multipleSelection.length ? 'calc(100vh - 520px)' : 'auto'"
           @selection-change="handleSelectionChange"
         >
         </base-table>
@@ -59,6 +59,10 @@
         <div v-else-if="multipleSelection.length" class="chart-box">
           <vue-e-charts class="full" :option="multLineChartOptions"></vue-e-charts>
         </div>
+        <div v-if="curRow" class="row-chart">
+          <vue-e-charts class="full" :option="rowChartOptions"></vue-e-charts>
+          <el-icon class="close-icon" @click="curRow = null"><circle-close /></el-icon>
+        </div>
       </div>
     </div>
   </div>
@@ -68,11 +72,16 @@ import { ref, reactive, computed, watch } from 'vue'
 import BaseForm from '@/components/element/BaseForm.vue'
 import useFetch from '@/hooks/useFetch'
 import BaseTable from '@/components/element/BaseTable.vue'
-import { ElButton, ElRadioButton, ElRadioGroup } from 'element-plus'
+import { ElButton, ElRadioButton, ElRadioGroup, ElIcon } from 'element-plus'
 import useCompareFilter from './hooks/useCompareFilter'
 import VueECharts from 'vue-echarts'
+import { CircleClose } from '@element-plus/icons-vue'
 import { myColorList } from '@/utils/common'
 
+const curRow = ref<any>(null)
+const onDbClick = (row: any) => {
+  curRow.value = row
+}
 const dataType = ref('avg')
 const dataTypeValues = ['avg', 'std', 'segmentScores', 'markingCount', 'xyRelate']
 const dataTypeLabelMap = reactive<any>({
@@ -119,6 +128,11 @@ const allTableData = computed(() => {
     return []
   }
 })
+
+watch(dataType, () => {
+  multipleSelection.value = []
+  curRow.value = null
+})
 watch(allTableData, () => {
   if (!multLineXdatas.value.length) {
     multLineXdatas.value = allTableData.value[0].segmentScores.map((item: any) => {
@@ -186,7 +200,35 @@ const handleSelectionChange = (val: any[]) => {
   multipleSelection.value = val
   console.log('multipleSelection.value:', multipleSelection.value)
 }
-
+const rowChartOptions = computed(() => {
+  if (!curRow.value) {
+    return {}
+  } else {
+    console.log('curRow.value:', curRow.value)
+    const { dateItems } = curRow.value
+    const xData = dateItems.map((v: any) => v.date)
+    const yData = dateItems.map((v: any) => v[dataType.value])
+    return {
+      grid: {
+        left: 60,
+        right: 240,
+        bottom: 40,
+      },
+      tooltip: { show: true, trigger: 'axis' },
+      legend: { show: true },
+      xAxis: {
+        axisLine: { show: false },
+        axisTick: { show: false },
+        splitLine: { show: false },
+        data: xData,
+      },
+      yAxis: {
+        type: 'value',
+      },
+      series: [{ name: dataTypeLabelMap[dataType.value], type: 'line', data: yData }],
+    }
+  }
+})
 const lineChartOptions = computed(() => {
   let xData = allTableData.value.map((item) => item.loginName)
   return {
@@ -210,28 +252,45 @@ const lineChartOptions = computed(() => {
       {
         name: dataTypeLabelMap[dataType.value],
         type: 'line',
-        barWidth: 20,
-        itemStyle: {
-          color: '#3AD500',
-        },
+        // itemStyle: {
+        // color: '#3AD500',
+        // },
         data: allTableData.value.map((item) => item[dataType.value]),
         markLine: {
-          data: averageDatas.value.map((item: any) => {
-            return {
-              name:
-                item.markingGroupNumber == 0
-                  ? '总体' + dataTypeLabelMap[dataType.value]
-                  : `小组${item.markingGroupNumber}` + dataTypeLabelMap[dataType.value],
-              yAxis: item[dataType.value === 'markingCount' ? 'avgMarkingCount' : dataType.value],
+          data: [
+            {
+              name: '总体' + dataTypeLabelMap[dataType.value],
+              yAxis: averageDatas.value.find((item: any) => {
+                return item.markingGroupNumber == 0
+              })?.[dataType.value === 'markingCount' ? 'avgMarkingCount' : dataType.value],
               label: {
                 show: true,
                 position: 'end',
               },
               lineStyle: {
-                color: item.markingGroupNumber == 0 ? 'red' : 'auto',
+                color: 'red',
+                width: 3,
+                type: 'solid',
               },
-            }
-          }),
+            },
+            ...filterAverageDatas.value.map((item: any, index: number) => {
+              return {
+                name: `小组${item.markingGroupNumber}` + dataTypeLabelMap[dataType.value],
+                // name:
+                //   item.markingGroupNumber == 0
+                //     ? '总体' + dataTypeLabelMap[dataType.value]
+                //     : `小组${item.markingGroupNumber}` + dataTypeLabelMap[dataType.value],
+                yAxis: item[dataType.value === 'markingCount' ? 'avgMarkingCount' : dataType.value],
+                label: {
+                  show: true,
+                  position: 'end',
+                },
+                lineStyle: {
+                  color: myColorList[index],
+                },
+              }
+            }),
+          ],
         },
       },
     ],
@@ -279,9 +338,33 @@ onOptionInit(onSearch)
 <style scoped lang="scss">
 .personnel-compare-view {
   background-color: #fff;
+  .out-chart-box {
+    position: relative;
+  }
   // .out-chart-box {
   //   height: 300px;
   // }
+  .row-chart {
+    position: absolute;
+    top: 0;
+    left: 0;
+    height: 300px;
+    width: 100%;
+    z-index: 101;
+    background-color: #fff;
+    .close-icon {
+      position: absolute;
+      right: 20px;
+      top: 10px;
+      z-index: 1;
+      font-size: 26px;
+      color: #666;
+      cursor: pointer;
+      &:hover {
+        color: $color--primary;
+      }
+    }
+  }
   .chart-box {
     height: 300px;
     position: relative;

+ 19 - 2
src/modules/marking/mark/index.vue

@@ -185,6 +185,10 @@ onBeforeUnmount(() => {
     clearTimeout(refreshTimer)
     refreshTimer = null
   }
+  if (timer) {
+    clearInterval(timer)
+    timer = null
+  }
 })
 
 const refreshTaskPool = (force = false, isRefresh = false) => {
@@ -441,9 +445,12 @@ const getEnableRemark = () => {
       enableRemark.value = markHistoryRes.enableRemark
     })
 }
-
-watch(currentTask, () => {
+let timer: any = null
+watch(currentTask, (newVal, oldVal) => {
   // getMarkStatus()
+  if (!oldVal && !!newVal) {
+    getMarkStatus()
+  }
   resume()
   if (!currentTask.value) {
     getEnableRemark()
@@ -455,6 +462,16 @@ getEnableRemark()
 // bus.on('showStandard', () => {
 //   standardVisible.value = true
 // })
+watch(enableRemark, (val) => {
+  if (!val) {
+    timer = setInterval(() => {
+      getEnableRemark()
+    }, 7000)
+  } else {
+    clearInterval(timer)
+    timer = null
+  }
+})
 </script>
 
 <style scoped lang="scss">

+ 32 - 11
src/modules/monitor/system-check/index.vue

@@ -30,11 +30,22 @@
             <el-button :loading="loading" type="primary" @click="onSearch">查询</el-button>
           </template>
         </base-form>
-        <div>
+        <div class="flex items-center justify-between detail-info-table-header">
           <el-button custom-1 size="small" class="detail-info-label">
             <span class="">系统抽查卷: 共</span>
-            <span class="m-l-extra-small detail-info-label-num">{{ tableData.length }}</span>
+            <span class="m-l-extra-small detail-info-label-num">{{ total }}</span>
           </el-button>
+          <el-pagination
+            v-bind="pagination"
+            v-model:current-page="currentPage"
+            size="small"
+            class="m-t-unset"
+            background
+            right
+            hide-on-single-page
+            :pager-count="3"
+            small
+          ></el-pagination>
         </div>
         <div class="flex-1 scroll-auto m-t-mini">
           <base-table
@@ -79,7 +90,7 @@
 <script setup lang="ts" name="SystemCheck">
 /** 系统抽查卷 */
 import { reactive, ref, computed, watch } from 'vue'
-import { ElButton, ElMessage } from 'element-plus'
+import { ElButton, ElPagination, ElMessage } from 'element-plus'
 import { add } from '@/utils/common'
 import { useSetImgBg } from '@/hooks/useSetImgBg'
 import useVW from '@/hooks/useVW'
@@ -87,6 +98,8 @@ import useFetch from '@/hooks/useFetch'
 import useForm from '@/hooks/useForm'
 import useOptions from '@/hooks/useOptions'
 import useMarkHeader from '@/hooks/useMarkHeader'
+import useTable from '@/hooks/useTable'
+
 import useTableCheck from '@/hooks/useTableCheck'
 import MarkHeader from '@/components/shared/MarkHeader.vue'
 import SvgIcon from '@/components/common/SvgIcon.vue'
@@ -150,7 +163,8 @@ const onSendBack = () => {
 
 /** 打回成功 */
 const onRejected = () => {
-  onSearch()
+  // onSearch()
+  fetchTable()
 }
 
 type OperationClick = MarkHeaderInstance['onClick']
@@ -174,12 +188,12 @@ const onOperationClick: OperationClick = ({ type, value }) => {
 
 const { mainQuestionList, dataModel, changeModelValue, onOptionInit } = useOptions(['question'])
 
-const formModel = reactive<ExtractApiParams<'getSystemSpotList'>>({
+const formModel = reactive<any>({
   mainNumber: dataModel.question,
   status: 'INITIAL',
   level: '',
-  pageNumber: 1,
-  pageSize: 9999999,
+  // pageNumber: 1,
+  // pageSize: 9999999,
 })
 
 const hideHeaderButtons = computed(() => {
@@ -247,9 +261,13 @@ const columns: EpTableColumn[] = [
   { label: '评卷时间', prop: 'markTime', width: 160 },
 ]
 
-const { fetch: getSystemSpotList, result: systemSpotList, loading } = useFetch('getSystemSpotList')
+// const { fetch: getSystemSpotList, result: systemSpotList, loading } = useFetch('getSystemSpotList')
 const { fetch: getSystemCheckLevel, result: levelOptions } = useFetch('getSystemCheckLevel')
 getSystemCheckLevel()
+
+const { pagination, currentPage, data, fetchTable, loading, total } = useTable('getSystemSpotList', formModel, {
+  pageSize: 20,
+})
 const {
   tableRef,
   tableData,
@@ -259,7 +277,8 @@ const {
   visibleHistory,
   onDbClick,
   onCurrentChange,
-} = useTableCheck(systemSpotList)
+  // } = useTableCheck(systemSpotList)
+} = useTableCheck(data)
 
 watch(currentSystemCheckPaper, () => {
   if (currentSystemCheckPaper.value) {
@@ -268,7 +287,8 @@ watch(currentSystemCheckPaper, () => {
 })
 
 const onSearch = async () => {
-  getSystemSpotList(formModel)
+  // getSystemSpotList(formModel)
+  currentPage.value = 1
 }
 
 /** 系统抽查卷打分 */
@@ -279,7 +299,8 @@ const onSubmit = async () => {
     await markSystemSpotPaper({ id: currentSystemCheckPaper.value.id, scores: modelScore.value })
     // currentSystemCheckPaper.value.headerScore = add(...modelScore.value)
     ElMessage.success('修改成功')
-    onSearch()
+    // onSearch()
+    fetchTable()
   }
 }
 

+ 3 - 1
src/modules/quality/self-check-detail/index.vue

@@ -146,7 +146,8 @@ const onSendBack = () => {
 
 /** 打回成功 */
 const onRejected = () => {
-  checkNext()
+  // checkNext()
+  nextRow()
 }
 type OperationClick = MarkHeaderInstance['onClick']
 
@@ -184,6 +185,7 @@ const {
   visibleHistory,
   onDbClick,
   onCurrentChange,
+  nextRow,
 } = useTableCheck(selfCheckDataDetail)
 
 /** 修改给分 */