| | |
| | | <el-select |
| | | style="width: 140px" |
| | | clearable |
| | | v-model="queryParams.plant" |
| | | v-model="queryParams.applicableFactory" |
| | | placeholder="适用工厂" |
| | | > |
| | | <el-option |
| | |
| | | </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> |
| | | |
| | |
| | | </el-col> --> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | @queryTable="handleQuery" |
| | | @resetTable="resetQuery" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | <HxlhTable |
| | |
| | | > |
| | | <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'"> |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | description: null, |
| | | plant: null, |
| | | applicableFactory: null, |
| | | type: null, |
| | | effectiveDate: null, |
| | | expiringDate: null, |
| | |
| | | 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); |
| | |
| | | }); |
| | | } |
| | | ); |
| | | } |
| | | // 设置节假日 |
| | | function handleSetHolidays(row) { |
| | | console.log(applicableTranslateArr, "applicableTranslateArr"); |
| | | form.value = { |
| | | ...row, |
| | | applicableTranslate: applicableTranslateArr, |
| | | applicableTranslate: applicableTranslateArr(row), |
| | | }; |
| | | if (!row.holidays) { |
| | | formHolidays.value = { |