chengxiangling
2025-05-16 e875ccb607bc37c9515217277aafb3d4204c6d14
src/views/basicData/calendar/index.vue
@@ -26,7 +26,7 @@
            <el-select
              style="width: 140px"
              clearable
              v-model="queryParams.plant"
              v-model="queryParams.applicableFactory"
              placeholder="适用工厂"
            >
              <el-option
@@ -38,14 +38,14 @@
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="13" style="text-align: right">
        <!-- <el-col :span="13" style="text-align: right">
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery"
              >查询</el-button
            >
            <el-button icon="Refresh" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-col>
        </el-col> -->
      </el-row>
    </el-form>
@@ -112,7 +112,7 @@
    >
      <template #status="{ row }">
        <vxe-tag v-if="row.type === '1'" status="primary">周工作</vxe-tag>
        <vxe-tag v-if="row.type === '2'" status="success">节假日</vxe-tag>
        <!-- <vxe-tag v-if="row.type === '2'" status="success">节假日</vxe-tag> -->
      </template>
      <template #mark="{ row }">
        <div v-if="row.type === '1'">
@@ -642,7 +642,7 @@
    pageNum: 1,
    pageSize: 10,
    description: null,
    plant: null,
    applicableFactory: null,
    type: null,
    effectiveDate: null,
    expiringDate: null,
@@ -1013,15 +1013,13 @@
    console.log(response.data, "response.data");
    form.value.content = JSON.parse(response.data.content.value);
    weekDaysSettingList.value = response.data.content.weekdays;
    //  else if (form.value.type === "2") {
    //   holidays.value = JSON.parse(response.data.content.value).holidays;
    // }
    form.value.applicableTranslate= applicableTranslateArr(response.data);
    console.log(form.value.applicableTranslate,"form.value.applicableTranslate")
  });
}
// 设置节假日
function handleSetHolidays(row) {
  let applicableTranslateArr = JSON.parse(row.applicableTranslate).map(
let applicableTranslateArr = (row)=>{
  return JSON.parse(row.applicableTranslate).map(
    (item) => {
      return Object.keys(item).map((n) => {
        console.log(item);
@@ -1035,10 +1033,13 @@
      });
    }
  );
}
// 设置节假日
function handleSetHolidays(row) {
  console.log(applicableTranslateArr, "applicableTranslateArr");
  form.value = {
    ...row,
    applicableTranslate: applicableTranslateArr,
    applicableTranslate: applicableTranslateArr(row),
  };
  if (!row.holidays) {
    formHolidays.value = {