ll
liukangdong
2024-10-15 1477a1353e96b5620a29c78e2b08647a1a2bc5b7
ll
已修改9个文件
228 ■■■■■ 文件已修改
admin/src/api/platform/platform.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/base/BaseTable.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/common/MenuSelect.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/index.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/meeting/components/common/FileLink.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/meeting/components/selectMember.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/subscribe.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/set/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/platform/platform.js
@@ -51,3 +51,7 @@
    }
  })
}
// 查询可预约量
export function checkSurplusNum (data) {
  return request.post('/visitsAdmin/cloudService/business/platformBooks/checkSurplusNum', data)
}
admin/src/components/base/BaseTable.vue
@@ -220,4 +220,4 @@
    }
  }
}
</script>
</script>
admin/src/components/common/MenuSelect.vue
@@ -12,7 +12,8 @@
<script>
import TreeSelect from './TreeSelect'
import { fetchTree, fetchTree1 } from '@/api/system/menu'
// import { fetchTree, fetchTree1 } from '@/api/system/menu'
import { fetchTree } from '@/api/system/menu'
export default {
  name: 'MenuSelect',
  components: { TreeSelect },
@@ -51,14 +52,14 @@
    // 获取所有菜单
    fetchData () {
      if (this.type === '1') {
        fetchTree1()
          .then(records => {
            this.data = []
            this.__fillData(this.data, records)
          })
          .catch(e => {
            this.$tip.apiFailed(e)
          })
        // fetchTree1()
        //   .then(records => {
        //     this.data = []
        //     this.__fillData(this.data, records)
        //   })
        //   .catch(e => {
        //     this.$tip.apiFailed(e)
        //   })
      } else {
        fetchTree()
          .then(records => {
admin/src/views/index.vue
@@ -89,21 +89,10 @@
                  <div class="echart" id="echart1"></div>
                </div>
                <div class="list">
                  <div class="item">
                    <div class="icon"></div>
                    <div class="text">访客</div>
                    <div class="num">{{ headerData.inParkVisitUserNum }}</div>
                  </div>
                  <div class="item">
                    <div :style="{ background: colors[0] }" class="icon"></div>
                    <div class="text">内部员工</div>
                    <div class="num">{{ headerData.todayInParkUserNum - headerData.inParkLwUserNum -
                      headerData.inParkVisitUserNum }}</div>
                  </div>
                  <div class="item">
                    <div :style="{ background: colors[1] }" class="icon"></div>
                    <div class="text">长期相关方</div>
                    <div class="num">{{ headerData.inParkLwUserNum }}</div>
                  <div class="item" v-for="item, i in manningRatio" :key="i">
                    <div :style="{ background: colors[i] }" class="icon"></div>
                    <div class="text">{{ item.name }}</div>
                    <div class="num">{{ item.value }}</div>
                  </div>
                </div>
              </div>
@@ -189,7 +178,7 @@
                <div class="btn" @click="departure(item.id)">离场</div>
              </div>
            </div>
          </div>
          </div>
          <div v-if="warningList.length == 0" class="empty">
            <img src="@/assets/images/default_nodata.png" alt="">
          </div>
@@ -243,6 +232,7 @@
      nowWeek: '',
      headerData: {},
      staticData: {},
      manningRatio: [],
      taskList: [],
      taskTotal: 0,
      warningList: [],
@@ -320,6 +310,12 @@
    getWorkHead() {
      getWorkbenchData({ queryType: 1 }).then(res => {
        this.headerData = res || {}
        let arr = []
        arr.push({ name: '访客', value: this.headerData.inParkVisitUserNum })
        arr.push({ name: '内部员工', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum })
        arr.push({ name: '长期相关方', value: this.headerData.inParkLwUserNum })
        arr.sort((a, b) => b.value - a.value)
        this.manningRatio = arr
        this.initEchart1()
      })
    },
@@ -340,7 +336,7 @@
      })
    },
    handleDetail (row) {
    handleDetail(row) {
      if (row.objType === 2) {
        this.$refs.OperaDetailsWindow.open('公务车申请详情', { ...row, id: row.objId })
        return
@@ -386,6 +382,9 @@
      let that = this
      const option = {
        tooltip: {
          trigger: 'item'
        },
        series: [
          {
            type: 'pie',
@@ -398,11 +397,12 @@
            labelLine: {
              show: false
            },
            data: [
              { value: that.headerData.inParkVisitUserNum, name: '访客' },
              { value: that.headerData.todayInParkUserNum - that.headerData.inParkVisitUserNum - that.headerData.inParkLwUserNum, name: '内部员工' },
              { value: that.headerData.inParkLwUserNum, name: '长期相关方' }
            ]
            data: that.manningRatio
            // data: [
            //   { value: that.headerData.inParkVisitUserNum, name: '访客' },
            //   { value: that.headerData.todayInParkUserNum - that.headerData.inParkVisitUserNum - that.headerData.inParkLwUserNum, name: '内部员工' },
            //   { value: that.headerData.inParkLwUserNum, name: '长期相关方' }
            // ]
          }
        ]
      }
@@ -929,19 +929,21 @@
        }
      }
    }
    .more{
    .more {
      cursor: pointer;
    }
    .empty {
        height: 300px;
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          width: 140px;
        }
    .empty {
      height: 300px;
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        width: 140px;
      }
    }
  }
  .static_wrap {
@@ -979,6 +981,7 @@
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        .echart_wrap {
          position: relative;
admin/src/views/meeting/components/common/FileLink.vue
@@ -21,7 +21,7 @@
</template>
<script>
import { fileType } from '@/utils/util';
// import { fileType } from '@/utils/util';
import FileLinkItem from './FileLinkItem.vue';
import PDFPreview from './PDFPreview'
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
@@ -52,12 +52,12 @@
  },
  computed: {
    // 图片地址
    srcList() {
      return this.links.filter(item => {
        let link = item[this.linkName]
        return fileType(link) == 1
      }).map(item => item[this.linkName])
    }
    // srcList() {
    //   return this.links.filter(item => {
    //     let link = item[this.linkName]
    //     return fileType(link) == 1
    //   }).map(item => item[this.linkName])
    // }
  },
  methods: {
    deleteFile(index) {
@@ -68,21 +68,21 @@
    },
    showFile(url) {
      debugger
      let type = fileType(url)
      switch (type) {
        case 1:
          this.tempIndex = this.srcList.findIndex(item => item == url)
          this.showViewer = true
          break;
        case 2:
          this.$refs.PDFPreview.open('', { url })
          break;
        case 3:
          window.open(url, '_blank')
          break;
        default:
          break;
      }
      // let type = fileType(url)
      // switch (type) {
      //   case 1:
      //     this.tempIndex = this.srcList.findIndex(item => item == url)
      //     this.showViewer = true
      //     break;
      //   case 2:
      //     this.$refs.PDFPreview.open('', { url })
      //     break;
      //   case 3:
      //     window.open(url, '_blank')
      //     break;
      //   default:
      //     break;
      // }
    },
    close() {
      this.showViewer = false
admin/src/views/meeting/components/selectMember.vue
@@ -51,7 +51,7 @@
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalAlertWindow from '@/components/common/GlobalAlertWindow'
import { findTreeUser } from '@/api/system/department'
// import { findTreeUser } from '@/api/system/department'
import { fetchList as userList } from '@/api/system/user'
export default {
  name: 'selectMember',
@@ -133,34 +133,34 @@
      } else {
        parentId = node.data.id
      }
      findTreeUser({parentId})
        .then(res => {
          // this.data = [res]
          if (!parentId) {
            resolve([res])
          } else {
            let resolveList = []
            if (res.userList) {
              res.userList.forEach(item => {
                let index = this.selectList.findIndex(sel => sel.id == item.id)
                resolveList.push({
                  ...item,
                  name: item.realname,
                  isUser: true,
                  isSelect: index !== -1
                })
              });
            }
            if (res.children) {
              res.children.forEach(item => {
                resolveList.push(item)
              })
            }
      // findTreeUser({parentId})
      //   .then(res => {
      //     // this.data = [res]
      //     if (!parentId) {
      //       resolve([res])
      //     } else {
      //       let resolveList = []
      //       if (res.userList) {
      //         res.userList.forEach(item => {
      //           let index = this.selectList.findIndex(sel => sel.id == item.id)
      //           resolveList.push({
      //             ...item,
      //             name: item.realname,
      //             isUser: true,
      //             isSelect: index !== -1
      //           })
      //         });
      //       }
      //       if (res.children) {
      //         res.children.forEach(item => {
      //           resolveList.push(item)
      //         })
      //       }
            resolve(resolveList)
          }
      //       resolve(resolveList)
      //     }
        })
      //   })
    },
    inputAction() {
      if (!this.filterText) {
admin/src/views/platform/LogisticsRecord/subscribe.vue
@@ -53,7 +53,7 @@
      <el-form :model="param" :rules="rules" ref="ruleForm" label-width="100px">
        <div class="param_title">运输信息</div>
        <el-form-item label="入园原因" prop="reasonId">
          <el-select v-model="param.reasonId" class="w300" placeholder="请选择">
          <el-select v-model="param.reasonId" @change="checkSurplus" class="w300" placeholder="请选择">
            <el-option v-for="item in reasonList" :key="item.id" :label="item.reason" :value="item.id">
            </el-option>
          </el-select>
@@ -62,7 +62,7 @@
          <el-input v-model="param.contractNum" class="w300" placeholder="请输入合同号"></el-input>
        </el-form-item>
        <el-form-item label="到场时间" prop="arriveDate">
          <el-date-picker v-model="param.arriveDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" class="w300"
          <el-date-picker v-model="param.arriveDate" @change="checkSurplus" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" class="w300"
            placeholder="请选择">
          </el-date-picker>
        </el-form-item>
@@ -73,7 +73,7 @@
          </div>
        </el-form-item>
        <el-form-item label="总运输量" prop="totalNum">
          <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 10)" v-model="param.totalNum" placeholder="请输入" class="w300"></el-input>
          <el-input @blur="checkSurplus" oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 10)" v-model="param.totalNum" placeholder="请输入" class="w300"></el-input>
          <span class="ml10">万支</span>
        </el-form-item>
        <el-form-item label="准运证照片" prop="transportImg">
@@ -105,9 +105,11 @@
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api'
import { checkSurplusNum } from '@/api/platform/platform'
import DriverDetail from "@/views/task/driverDetail"
import GlobalWindow from '@/components/common/GlobalWindow'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { Message } from 'element-ui'
import dayjs from 'dayjs'
export default {
  components: {
@@ -203,6 +205,21 @@
    this.getList()
  },
  methods: {
    checkSurplus() {
      const { arriveDate, reasonId, totalNum } = this.param
      if(!arriveDate || !reasonId || !totalNum) return
      checkSurplusNum({
        arriveDate,
        reasonId,
        totalNum
      }).then(res => {
        console.log('res', res);
        if( res == 0 ||  res < Number(totalNum)){
          Message.error(`当日剩余可预约作业量${res}万支不足请选择其他到场日期`)
        }
      })
    },
    changeRadio (day) {
      const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59']
      this.$set(this.filters, 'selDate', arr)
admin/src/views/platform/index.vue
@@ -86,7 +86,7 @@
                <span>运输公司:</span>
                <span>{{ task.carrierName }}</span>
              </div>
              <div class="ite"></div>
              <!-- <div class="ite"></div> -->
            </div>
            <div class="line">
              <div class="left">
admin/src/views/platform/set/index.vue
@@ -162,7 +162,8 @@
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import GlobalWindow from '@/components/common/GlobalWindow'
import { getPlatform, PlatformEdit, PlatformDel } from '@/api'
// import { getPlatform, PlatformEdit, PlatformDel } from '@/api'
import { PlatformEdit, PlatformDel } from '@/api'
export default {
  components: {
    Pagination,
@@ -202,12 +203,12 @@
    getList (page) {
      const { filters, pagination } = this
      pagination.page = page || pagination.page
      getPlatform({
        model: { ...filters },
        ...pagination
      }).then(res => {
        this.dataList = res.records
      })
      // getPlatform({
      //   model: { ...filters },
      //   ...pagination
      // }).then(res => {
      //   this.dataList = res.records
      // })
    },
    handleDel (item) {
      this.$confirm('确定删除该月台吗, 是否继续?', '提示', {