huangjiayang
2025-04-22 051f7e4e0528698348efeed6899f0e508458d11e
【UPDATE】1.增加查询所有日历数据接口 2.补全创建事件关联日历功能代码
已修改2个文件
25 ■■■■ 文件已修改
src/api/basicData/calendar.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/event/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicData/calendar.js
@@ -42,3 +42,12 @@
    method: 'delete'
  })
}
// 查询工厂管理列表
export function listAll_calendar(query) {
  return request({
    url: '/aps/calendar/listAll',
    method: 'get',
    params: query
  })
}
src/views/basicData/event/index.vue
@@ -177,8 +177,12 @@
        </el-form-item>
        <el-form-item label="适用日历" prop="applicableCalendar">
          <el-select v-model="form.applicableCalendar" placeholder="请选择适用日历">
            <el-option label="Zone one" value="shanghai" />
            <el-option label="Zone two" value="beijing" />
            <el-option
                v-for="calendar in calendarList"
                :key="calendar.id"
                :label="calendar.description"
                :value="calendar.id">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
@@ -199,6 +203,7 @@
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
import HxlhTable from '@/components/HxlhTable'
import axios from "axios";
import {listAll_calendar} from "@/api/basicData/calendar.js";
const { proxy } = getCurrentInstance();
@@ -215,6 +220,7 @@
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
const calendarList = ref([]);
const height = ref(document.documentElement.clientHeight - 230 + "px;")
@@ -374,12 +380,14 @@
    /** 查询工厂列表 */
    listAll_plant({}),
    /** 查询车间列表 */
    listAll_shop({})
    listAll_shop({}),
    listAll_calendar({})
  ])
  .then(axios.spread((response1, response2, response3) => {
  .then(axios.spread((response1, response2, response3, response4) => {
    eventList.value = response1.rows;
    plantList.value = response2.data;
    allShopList.value = response3.data;
    calendarList.value = response4.data;
    total.value = response1.total;
    loading.value = false;
  }))