batman
2023-03-13 a18fed8fd360788023150e5a3ec4b5315aa3c2ae
调整时间查询
已修改2个文件
64 ■■■■ 文件已修改
src/views/intellectInspect/inspectIndex/components/unusualList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/specialWorkSystem/specialIndex/index.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intellectInspect/inspectIndex/components/unusualList.vue
@@ -51,7 +51,7 @@
        <div style="margin-bottom: 20px">
          <div style="margin-bottom: 10px">处置前:</div>
          <div v-if="beImgs && beImgs.length>0">
            <el-image v-for="(item,index) in beImgs" :key="index" style="width: 100px; height: 100px" :src="item" fit="fill" />
            <el-image v-for="(item,index) in beImgs" :key="index" style="width: 200px; height: 200px;margin-right: 10px" :src="item.split('?')[0]" fit="fill" />
          </div>
          <div v-else>
            无照片信息
@@ -60,7 +60,7 @@
        <div>
          <div style="margin-bottom: 10px">处置后</div>
          <div v-if="afImgs && beImgs.length>0">
            <el-image v-for="(item,index) in afImgs" :key="index" style="width: 100px; height: 100px" :src="item" fit="fill" />
            <el-image v-for="(item,index) in afImgs" :key="index" style="width: 200px; height: 200px;margin-right: 10px" :src="item.split('?')[0]" fit="fill" />
          </div>
          <div v-else>
            无照片信息
src/views/specialWorkSystem/specialIndex/index.vue
@@ -23,11 +23,11 @@
          </div>
        </div>
        <div class="chart" :id="zyfb"></div>
        <el-radio-group v-model="chartSearch1.period" size="small">
          <el-radio label="week" border>近7天</el-radio>
          <el-radio label="month" border>近30天</el-radio>
          <el-radio label="season" border>近90天</el-radio>
          <el-radio label="year" border>近一年</el-radio>
        <el-radio-group v-model="chartSearch1.days" size="small" @change="(value)=>changeTime1(value)">
          <el-radio :label='7' border>近7天</el-radio>
          <el-radio :label='30' border>近30天</el-radio>
          <el-radio :label='90' border>近90天</el-radio>
          <el-radio :label='365' border>近一年</el-radio>
        </el-radio-group>
      </div>
      <div class="chart-item">
@@ -69,12 +69,12 @@
                active-text="作业人"
                inactive-text="监护人"
            />
            <el-select :teleported="false" v-model="chartSearch4.period" size="small">
              <el-option label="近7天" value="week"/>
              <el-option label="近30天" value="month"/>
              <el-option label="近90天" value="season"/>
              <el-option label="近1年" value="year"/>
            </el-select>
            <el-radio-group v-model="chartSearch4.days" size="small" @change="(value)=>changeTime2(value)">
              <el-radio :label='7' border>近7天</el-radio>
              <el-radio :label='30' border>近30天</el-radio>
              <el-radio :label='90' border>近90天</el-radio>
              <el-radio :label='365' border>近一年</el-radio>
            </el-radio-group>
            <el-select :teleported="false" v-model="chartSearch4.workType" size="small">
              <el-option
                  v-for="item in workType1"
@@ -311,7 +311,8 @@
  reviewRules: object;
  warningData: Array<any>;
  isFull:boolean;
  themeColor:string
  themeColor:string;
  endTime:string
}
interface type {
  id: number;
@@ -363,11 +364,11 @@
      chosenIndex: null,
      searchWord: null,
      searchStatus: null,
      endTime: '',
      chartSearch1: {
        searchDep: null,
        startTime: '2023-03-08',
        endTime: '2023-02-08',
        period: 'month'
        startTime: '',
        days: 30
      },
      chartSearch2: {
        searchDep: null,
@@ -377,7 +378,9 @@
        searchDep: null
      },
      chartSearch4: {
        searchDep: null
        searchDep: null,
        startTime: '',
        days: 30
      },
      searchDep2: null,
      searchDep: null,
@@ -552,7 +555,30 @@
      initZyfb()
      initSlfx()
      initZyqs()
      state.endTime = formatDate(new Date())
      // state.chartSearch1.startTime = getPeriod(30)
      console.log(state.chartSearch1.startTime,state.endTime,'默认时间段')
    });
    const getPeriod =(num)=> {
      const currentDate = new Date();
      const startTime = new Date();
      startTime.setDate(currentDate.getDate() - num);
      return formatDate(startTime)
    }
    const formatDate =(date)=> {
      const year = date.getFullYear().toString().slice(-2);
      const month = ('0' + (date.getMonth() + 1)).slice(-2);
      const day = ('0' + date.getDate()).slice(-2);
      return `${year}-${month}-${day} 00:00:00`;
    }
    const changeTime1=(value:number)=>{
      state.chartSearch1.startTime = getPeriod(value)
      console.log(state.chartSearch1.startTime,state.endTime,'结束段')
    }
    const changeTime2=(value:number)=>{
      state.chartSearch4.startTime = getPeriod(value)
      console.log(state.chartSearch4.startTime,state.endTime,'结束段')
    }
    const toFullscreen =()=>{
      const element = document.getElementById('bigScreen')
      if (!screenfull.isEnabled) {
@@ -903,6 +929,8 @@
      zyfb,
      slfx,
      zyqs,
      changeTime1,
      changeTime2,
      toFullscreen,
      handleReview,
      openVideo,