| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064 |
- <template>
- <div class="content-box">
- <div class="left">
- <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
- <span class="cameratxt" @click="getList(1)" :class="themeIndex == 1 ? 'is_active' : ''">时段设置</span>
- <span class="cameratxt" @click="getList(2)" :class="themeIndex == 2 ? 'is_active' : ''">排班设置</span>
- </div>
- <div v-if="themeIndex == 1" v-loading="loading1">
- <div class="middle">
- <!-- 按钮列表 -->
- <div class="gongneng" style="margin-top: 20px">
- <el-button type="primary" color="rgba(111, 182, 184, 1)" @click="addlist"><img src="@/assets/add.png"
- style="width: 14px; height: 14px; margin-right: 4px" alt="" /><span>添加时段</span></el-button>
- </div>
- </div>
- <div class="footer">
- <el-table :row-class-name="tableRowClassName" :data="tableData.list" style="width: 100%" :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }">
- <!-- <el-table-column align="center" type="selection" width="80" /> -->
- <el-table-column width="150" align="center " type="index" label="序号" />
- <el-table-column align="center" prop="name" label="名称" />
- <el-table-column align="center" prop="color" label="颜色">
- <template #default="scope">
- <el-button :color="scope.row.color" :link="false"> </el-button>
- </template>
- </el-table-column>
- <el-table-column align="center" label="起止时间">
- <template #default="{ row }">
- <span>{{ row.startTime + "~" + row.endTime }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="isDutys" label="是否值班" />
- <el-table-column align="center" label="操作" width="220">
- <template #default="scope">
- <div class="edit">
- <div class="look" @click="editTime(scope.row)">编辑</div>
- <el-popconfirm width="220" confirm-button-text="确认" cancel-button-text="取消" :icon="InfoFilled"
- icon-color="#f89626" title="是否删除?" @confirm="delTime(scope.row)" @cancel="cencelTime">
- <template #reference>
- <div class="look">删除</div>
- </template>
- </el-popconfirm>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <!-- 添加时段弹窗 -->
- <el-dialog class="addStaff" v-model="addDialogVisible" :close-on-click-modal="false"
- :close-on-press-escape="false" :title="dialongTitle" align-center width="609" :before-close="cancelAdd">
- <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="100px" class="demo-ruleForm"
- :size="formSize" label-position="left" status-icon>
- <el-form-item label="班次名称 :" prop="name">
- <el-input clearable v-model="ruleForm.name" placeholder="请输入班次名称" />
- </el-form-item>
- <el-form-item label="颜色 :" prop="color">
- <div class="colorSelect">
- <ul>
- <li :class="i.flag == 1 ? 'li_active' : ''" v-for="i in ruleFormColor.list">
- <div class="item" :class="`item${i.id}`" @click="selectColor(i)">
- <img v-if="i.id == colorInd" src="@/assets/colorSelect.png" alt="" />
- </div>
- </li>
- </ul>
- </div>
- </el-form-item>
- <el-form-item label="时间 :" prop="snTime">
- <div>
- <el-time-picker v-model="ruleForm.snTime" type="daterange" range-separator="-" start-placeholder="起始时间"
- end-placeholder="结束时间" format="HH:mm" value-format="HH:mm" :prefix-icon="Calendar" is-range
- placeholder="请选择日期" />
- </div>
- </el-form-item>
- <el-form-item label="非工作时间 :" prop="noworkTime">
- <div class="noworkTime" v-for="(item, index) in ruleForm.noworkTime">
- <el-time-picker v-model="item.time" type="daterange" range-separator="-" start-placeholder="起始时间"
- end-placeholder="结束时间" format="HH:mm" value-format="HH:mm" :prefix-icon="Calendar" is-range
- placeholder="请选择日期" />
- <img @click="delNotWork(index)" v-if="ruleForm.noworkTime.length != 1" src="@/assets/noworkTime.png"
- alt="" />
- <img @click="addNotWork" v-if="index == ruleForm.noworkTime.length - 1" src="@/assets/workTime.png"
- alt="" />
- </div>
- </el-form-item>
- <el-form-item label="是否值班 :" prop="isDuty" style="
- padding-bottom: 40px;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- ">
- <el-switch v-model="ruleForm.isDuty" class="ml-2" style="--el-switch-on-color: rgba(111, 182, 184, 1)" />
- </el-form-item>
- <el-form-item class="options">
- <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="submitAdd(ruleFormRef)">
- 确定
- </el-button>
- <el-button class="congzhi" @click="cancelAdd(ruleFormRef)">取消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- </div>
- <!-- 分页组件 -->
- <div class="pageSize">
- <span></span>
- <el-pagination background :current-page="currentPage" :page-size="pageSize"
- layout="total, prev, pager, next, jumper, slot" :total="total" @update:current-page="handleCurrentChange" />
- </div>
- </div>
- <div v-else-if="themeIndex == 2" v-loading="loading2">
- <div class="middle">
- <div class="filter">
- <div class="condition">
- <span>创建时间 : </span>
- <el-date-picker v-model="searchInput.createTime" type="daterange" range-separator="-" start-placeholder="起始时间"
- end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
- placeholder="请选择日期" />
- </div>
- <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
- @click="searchBtn"><el-icon>
- <Search />
- </el-icon> <span>查询</span></el-button>
- </div>
- <!-- 按钮列表 -->
- <div class="gongneng">
- <!-- <el-button
- type="primary"
- color="rgba(111, 182, 184, 1)"
- @click="addStaff"
- ><img
- src="@/assets/add.png"
- style="width: 14px; height: 14px; margin-right: 4px"
- alt=""
- /><span>添加人员</span></el-button
- > -->
- <el-button type="primary" color="rgba(111, 182, 184, 1)" @click="importTemp"><span>导入模板下载</span></el-button>
- <el-button color="rgba(111, 182, 184, 1)" class="import" type="primary" @click="importFile"><img
- src="@/assets/toLead.png" style="width: 24px; height: 22px" alt="" />
- <span>导入</span></el-button>
- <el-button color="rgba(111, 182, 184, 1)" class="import" type="primary" @click="importExcel"><img
- src="@/assets/import.png" style="width: 14px; height: 14px; margin-right: 4px" alt="" />
- <span>导出</span></el-button>
- </div>
- </div>
- <div class="footer">
- <el-table :row-class-name="tableRowClassName" class="footers" :data="tableData.list" style="width: 100%"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }">
- <!-- <el-table-column align="center" type="selection" width="80" /> -->
- <el-table-column prop="schoolName" align="center" width="120" fixed="left" label="校区" />
- <el-table-column fixed="left" prop="userName" align="center" label="人员">
- </el-table-column>
- <el-table-column align="center" label="日期">
- <el-table-column width="300" prop="date" align="center" v-for="(i, index) in dates.list"
- :label="i.weekStr + '(' + i.dateStr + ')'">
- <template #default="{ row }">
- <!-- <span>{{ row.classSettings[index] }}</span> -->
- <!-- <span>{{ index }}</span> -->
- <div class="word">
- <div class="classItem" v-if="row.classSettings[index].id">
- <div class="del" v-for="item in row.classSettings[index].shifts">
- <el-button :link="false" :color="item.color" :dark="true">{{ item.name }}</el-button>
- <div class="classX" @click="delClass(row.classSettings[index], item)">
- <img src="@/assets/classX.png" alt="" />
- </div>
- </div>
- <div class="bottom" @click="editClass(row.classSettings[index])">
- <img src="@/assets/bottom.png" alt="" />
- </div>
- </div>
- <div class="word" v-else>
- <span @click="addClass(row.classSettings[index])">添加班次</span>
- </div>
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column prop="date" align="center" label="周二(07.08)">
- <div class="word">
- <span @click="addClass">添加班次</span>
- </div>
- </el-table-column> -->
- </el-table-column>
- </el-table>
- <!-- 添加人员弹窗 -->
- <!-- <el-dialog
- class="addStaff2"
- v-model="addStaffVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="添加人员"
- align-center
- width="1009"
- :before-close="addStaffClose"
- >
- <div class="middle">
- <div class="filter">
- <div class="condition">
- <span>校区 : </span>
- <el-select
- v-model="addStaffSearch.schoolId"
- class="m-2"
- placeholder="请选择身份"
- >
- <el-option label="车队长" value="车队长" />
- <el-option label="司机" value="司机" />
- </el-select>
- </div>
- <div class="condition">
- <span>电话 : </span>
- <el-input
- clearable
- v-model="addStaffSearch.phone"
- class="w-50 m-2"
- placeholder="请输入电话号码"
- style="width: 150px"
- />
- </div>
- <div class="condition">
- <span>关联报修类型 : </span>
- <el-select
- v-model="addStaffSearch.type"
- class="m-2"
- placeholder="请选择身份"
- >
- <el-option label="车队长" value="车队长" />
- <el-option label="司机" value="司机" />
- </el-select>
- </div>
- </div>
- </div>
- <div class="footer">
- <el-table
- :row-class-name="tableRowClassName"
- :data="addStaffList.list"
- @selection-change="handleSelectionChange3"
- style="width: 100%"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" type="selection" width="80" />
- <el-table-column
- width="150"
- align="center "
- prop="schoolName"
- label="校区"
- />
- <el-table-column align="center" prop="userName" label="姓名" />
- <el-table-column align="center" prop="userPhone" label="电话" />
- <el-table-column align="center" prop="car_number" label="状态" />
- <el-table-column align="center" prop="teamName" label="维修班" />
- <el-table-column
- align="center"
- prop="car_number"
- label="关联报修类型"
- width="180"
- show-overflow-tooltip
- >
- <template #default="{ row }">
- {{ row.articleName }}
- </template>
- </el-table-column>
- <el-table-column type="selection" width="80" />
- </el-table>
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="currentPage3"
- :page-size="pageSize3"
- layout="total, prev, pager, next, jumper, slot"
- :total="total3"
- @update:current-page="handleCurrentChange3"
- />
- </div>
- </div>
- <div class="options">
- <el-button
- color="rgba(111, 182, 184, 1)"
- class="queding"
- type="primary"
- @click="submitAdd(ruleFormRef)"
- >
- 确定
- </el-button>
- <el-button class="congzhi" @click="addStaffClose(ruleFormRef)"
- >取消</el-button
- >
- </div>
- </el-dialog> -->
- <!-- 添加班次弹窗 -->
- <el-dialog class="addClass" v-model="addClassVisible" :close-on-click-modal="false" :close-on-press-escape="false"
- :title="addClassTitle" align-center width="409" :before-close="addClassClose">
- <el-form ref="ruleFormClassRef" :model="ruleFormClass" :rules="classRules" class="demo-ruleForm"
- :size="formSize" label-position="left" status-icon>
- <el-form-item label="" prop="shiftIds">
- <el-tree :data="addClassList" :props="{ label: 'name', children: 'children', value: 'id' }" node-key="id"
- show-checkbox ref="articleIdsRef" @check-change="handleArticleIds" />
- <!-- <el-checkbox-group
- v-model="checkedCities"
- @change="handleCheckedCitiesChange"
- >
- <el-checkbox
- v-for="item in addClassList"
- :key="item.id"
- :label="item.name"
- >{{ item.name }}</el-checkbox
- >
- </el-checkbox-group> -->
- </el-form-item>
- <el-form-item class="options">
- <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary"
- @click="addClassSubmit(ruleFormClassRef)">
- 确定
- </el-button>
- <el-button class="congzhi" @click="addClassClose(ruleFormClassRef)">取消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 导入弹窗 -->
- <el-dialog class="importXlsx" v-model="importXlsx" :close-on-click-modal="false" :close-on-press-escape="false"
- title="导入文件" align-center width="409" :before-close="closeXlsx">
- <el-upload class="avatar-uploader" action="" ref="upload" :on-preview="handlePreview" :on-remove="handleRemove"
- :on-change="handleChange" :http-request="handleUpload" :before-upload="beforeAvatarUpload"
- :auto-upload="false" :limit="1" :on-exceed="handleExceed">
- <template #trigger>
- <el-button type="primary" color="rgba(111, 182, 184, 1)" @click="updateImg">
- <img src="@/assets/toLead.png" style="width: 24px; height: 22px" alt="" />
- <span style="color: #fff">导入文件</span></el-button>
- </template>
- <!-- <template #tip>
- <div class="el-upload__tip">
- (注:图片大小不超过10M,建议按3:2比例)
- </div>
- </template> -->
- </el-upload>
- <div class="options">
- <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="importSuc()">
- 确定
- </el-button>
- <el-button class="congzhi" @click="closeXlsx()">取消</el-button>
- </div>
- </el-dialog>
- </div>
- <!-- 分页组件 -->
- <div class="pageSize">
- <span></span>
- <el-pagination background :current-page="currentPage2" :page-size="pageSize2"
- layout="total, prev, pager, next, jumper, slot" :total="total2" @update:current-page="handleCurrentChange2" />
- </div>
- </div>
- </div>
- </template>
- <script setup>
- import { ref, watch, reactive, nextTick, onBeforeMount, onUnmounted } from "vue";
- import { useRouter } from "vue-router";
- import { ElMessage, ElMessageBox } from "element-plus";
- import { Calendar } from "@element-plus/icons-vue";
- import vidiconsApi from "@/api/vidicons.js";
- import { dayjs } from "element-plus";
- import lodash, { fill } from "lodash";
- import axios from "axios";
- import { useStore } from "vuex";
- const store = useStore();
- const api = ref("");
- const router = useRouter();
- // 表格数据
- const tableData = reactive({ list: [] }); // 表格数据
- const dates = reactive({ list: [] }); // 日期数据
- const schoolId = ref(""); // 判断是否为超级管理员账号
- const themeIndex = ref(2); // 切换 耗材管理 和 耗材记录
- const loading1 = ref(false);
- const loading2 = ref(false);
- // 添加时段 弹窗数据 (------------------------------------)
- const dialongTitle = ref("添加时段"); // 弹窗标题
- const searchInput = reactive({
- createTime: "",
- }); // 搜索按钮数据
- const currentPage = ref(1); // 当前页
- const pageSize = ref(10);
- const total = ref(); // 当前总数
- const selectData = reactive({ list: [] }); // 多选框选择的数据
- const addDialogVisible = ref(false); // 控制添加员工弹窗
- const colorInd = ref(); // 添加时段中默认选中1中颜色
- const ruleFormColor = reactive({
- list: [
- { color: "#F07459", id: 1, flag: 0 },
- { color: "#DE6868", id: 2, flag: 0 },
- { color: "#5AE090", id: 3, flag: 0 },
- { color: "#679EE6", id: 4, flag: 0 },
- { color: "#F0AA65", id: 5, flag: 0 },
- { color: "#F0D375", id: 6, flag: 0 },
- { color: "#67D6CF", id: 7, flag: 0 },
- { color: "#CC82D9", id: 8, flag: 0 },
- ],
- }); // 颜色数据
- const ruleFormRef = ref();
- const ruleForm = reactive({
- name: "",
- snTime: "",
- color: "",
- isDuty: "",
- noworkTime: [{ time: ["00:00", "12:00"] }],
- id: "",
- });
- // 表单验证
- const rules = reactive({
- // serial: [{ required: true, message: "序列号不能为空", trigger: "blur" }],
- name: [{ required: true, message: "班次名称不能为空", trigger: "blur" }],
- color: [
- {
- required: true,
- message: "请选择一个颜色",
- trigger: "blur",
- },
- ],
- snTime: [{ required: true, message: "请选择时间", trigger: "blur" }],
- noworkTime: [
- { required: true, message: "非工作时间不能为空", trigger: "blur" },
- ],
- // isDuty: [{ required: true, message: "值班", trigger: "blur" }],
- });
- // 添加班次 弹窗数据 (---------------------------)
- const addClassVisible = ref(false); // 控制添加班次弹窗
- const addClassTitle = ref("添加班次");
- const addClassList = ref([]); // 添加时段数据选择列表 如:["日常班次", "周末班次"]
- const checkedCities = ref([]); // 选中的时段列表
- const articleIdsRef = ref(); // 选中时段ref
- const addStaffVisible = ref(false); // 控制添加人员弹窗
- const formSize = ref("default");
- // 排班设置页面(---------------------------------------------)
- const upload = ref(); // 导入按钮ref
- const fileXlsx = ref(); // 导入的文件file
- const importXlsx = ref(false); // 导入弹窗
- const ruleFormClassRef = ref();
- // 添加班次数据
- const ruleFormClass = reactive({
- shiftIds: [],
- id: "",
- startDate: "",
- userId: "",
- });
- // 表单验证
- const classRules = reactive({
- shiftIds: [{ required: true, message: "至少选择一个班次", trigger: "blur" }],
- });
- // // 添加人员中搜索数据
- // const addStaffSearch = reactive({
- // schoolId: "",
- // phone: "",
- // type: "",
- // });
- const addStaffList = reactive({ list: [] }); // 添加人员中的 表格数据
- const currentPage2 = ref(1); // 当前页
- const pageSize2 = ref(6);
- const total2 = ref(30); // 当前总数
- // const currentPage3 = ref(1); // 当前页
- // const pageSize3 = ref(8);
- // const total3 = ref(30); // 当前总数
- watch(
- () => searchInput.createTime,
- (newVal, oldVal) => {
- console.log("监听时间:", newVal);
- if (newVal == null) {
- searchBtn();
- }
- }
- );
- // 查看耗材列表
- const getList = async (flag) => {
- if (flag == 1) {
- loading1.value = true;
- themeIndex.value = 1;
- let data = {
- currentPage: currentPage.value,
- pageCount: pageSize.value,
- // name: "时段设置",
- };
- let res = await axios({
- method: "get",
- url: api.value + "/repairShiftSettings/queryPageRepairShiftSettings",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "时段设置");
- if (res.data.code == 200) {
- res.data.data.list.forEach((item) => {
- if (item.isDuty == 1) {
- item.isDutys = "是";
- } else {
- item.isDutys = "否";
- }
- });
- tableData.list = res.data.data.list;
- total.value = res.data.data.totalCount;
- loading1.value = false;
- } else {
- loading1.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- if (res.data.code == 570) {
- sessionStorage.removeItem("token")
- router.push({
- path: `/login`,
- });
- }
- }
- } else if (flag == 2) {
- loading2.value = true;
- themeIndex.value = 2;
- let data = {
- currentPage: currentPage2.value,
- pageCount: pageSize2.value,
- // startTime: searchInput.createTime[0],
- // endTime: searchInput.createTime[1],
- };
- if (searchInput.createTime) {
- data.startTime = searchInput.createTime[0]
- data.endTime = searchInput.createTime[1]
- }
- let res = await axios({
- method: "get",
- url: api.value + "/repairClassesSettings/queryPageRepairClassesSettings",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "排班设置");
- if (res.data.code == 200) {
- tableData.list = res.data.data.pageDatas.list;
- dates.list = res.data.data.dates;
- total2.value = res.data.data.pageDatas.totalCount;
- loading2.value = false;
- } else {
- loading2.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- };
- //(添加时段--------------------------------------)
- const addlist = () => {
- addDialogVisible.value = true;
- dialongTitle.value = "添加时段";
- colorInd.value = 0;
- ruleForm.name = "";
- ruleForm.snTime = "";
- ruleForm.isDuty = false;
- ruleForm.color = "";
- ruleForm.noworkTime = [{ time: ["00:00", "12:00"] }];
- ruleForm.id = "";
- ruleFormColor.list.forEach((item) => {
- item.flag = 0;
- tableData.list.forEach((i) => {
- if (i.color == item.color) {
- console.log(item.color, "已选择的");
- item.flag = 1;
- }
- });
- });
- };
- //添加时段-编辑时段
- const editTime = (row) => {
- addDialogVisible.value = true;
- dialongTitle.value = "编辑时段";
- ruleFormColor.list.forEach((item) => {
- item.flag = 0;
- tableData.list.forEach((i) => {
- if (i.color == item.color && i.color != row.color) {
- console.log(item.color, "已选择的");
- item.flag = 1;
- }
- });
- });
- console.log(row);
- ruleForm.id = row.id;
- ruleFormColor.list.forEach((item) => {
- if (item.color == row.color) {
- colorInd.value = item.id;
- }
- });
- ruleForm.color = ruleFormColor.list[colorInd.value - 1].color;
- if (row.isDuty == 1) {
- ruleForm.isDuty = true;
- } else {
- ruleForm.isDuty = false;
- }
- ruleForm.snTime = [row.startTime, row.endTime];
- ruleForm.name = row.name;
- ruleForm.noworkTime = [];
- row.notWorkTime.split(",").forEach((item) => {
- ruleForm.noworkTime.push({ time: item.split("-") });
- });
- };
- // 选择颜色
- const selectColor = (i) => {
- // console.log(i);
- if (i.flag) {
- ElMessage({
- type: "warning",
- showClose: true,
- message: "当前颜色已被占用",
- center: true,
- });
- } else {
- colorInd.value = i.id;
- ruleForm.color = i.color;
- }
- };
- // 添加时段-添加非工作时间
- const addNotWork = () => {
- ruleForm.noworkTime.push({ time: [] });
- console.log(ruleForm.noworkTime);
- };
- // 添加时段-减掉非工作时间
- const delNotWork = (i) => {
- console.log(ruleForm.noworkTime);
- ruleForm.noworkTime = ruleForm.noworkTime.filter((item, index) => {
- return i != index;
- });
- };
- // 添加时段-确认添加时段
- const submitAdd = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- if (dialongTitle.value == "添加时段") {
- let isDuty;
- if (ruleForm.isDuty) {
- isDuty = 1;
- } else {
- isDuty = 0;
- }
- let noWork = [];
- ruleForm.noworkTime.forEach((item) => {
- if (item.time) {
- let time = item.time[0] + "-" + item.time[1];
- noWork.push(time);
- }
- });
- console.log(noWork, "非工作时间数组");
- let data = {
- name: ruleForm.name,
- startTime: ruleForm.snTime[0],
- endTime: ruleForm.snTime[1],
- color: ruleForm.color,
- isDuty: isDuty,
- notWorkTime: noWork,
- };
- // let res = await admin.adminAdd(data);
- let res = await axios({
- method: "post",
- url: api.value + "/repairShiftSettings/insertRepairShiftSettings",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "添加时段");
- if (res.data.code == 200) {
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- addDialogVisible.value = false;
- colorInd.value = 0;
- ruleFormRef.value.resetFields();
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- let isDuty;
- if (ruleForm.isDuty) {
- isDuty = 1;
- } else {
- isDuty = 0;
- }
- let noWork = [];
- ruleForm.noworkTime.forEach((item) => {
- if (item.time) {
- let time = item.time[0] + "-" + item.time[1];
- noWork.push(time);
- }
- });
- let data = {
- name: ruleForm.name,
- startTime: ruleForm.snTime[0],
- endTime: ruleForm.snTime[1],
- color: ruleForm.color,
- isDuty: isDuty,
- notWorkTime: noWork,
- id: ruleForm.id,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/repairShiftSettings/updateRepairShiftSettingsById",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "编辑时段");
- if (res.data.code == 200) {
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- addDialogVisible.value = false;
- colorInd.value = 0;
- ruleFormRef.value.resetFields();
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- let data = {
- currentPage: currentPage.value,
- pageCount: pageSize.value,
- // name: "时段设置",
- };
- let res = await axios({
- method: "get",
- url: api.value + "/repairShiftSettings/queryPageRepairShiftSettings",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "添加时段选择数据");
- addClassList.value = res.data.data.list;
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- // 添加时段-取消添加时段
- const cancelAdd = () => {
- addDialogVisible.value = false;
- colorInd.value = 0;
- ruleFormRef.value.resetFields();
- };
- //添加时段-删除时段按钮
- const delTime = async (row) => {
- let data = { id: row.id };
- let res = await axios({
- method: "get",
- url: api.value + "/repairShiftSettings/deleteRepairShiftSettingsById",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "删除时段");
- if (res.data.code == 200) {
- if (tableData.list.length == 1 && currentPage.value != 1) {
- currentPage.value = currentPage.value - 1;
- }
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 添加时段-取消删除
- const cencelTime = () => {
- ElMessage({
- type: "info",
- showClose: true,
- message: "取消删除",
- center: true,
- });
- };
- // 排班管理 (----------------------------------------------)
- // 排班查询
- const searchBtn = () => {
- getList(themeIndex.value);
- };
- // 添加班次弹窗
- const addClass = (row) => {
- addClassTitle.value = "添加班次";
- addClassVisible.value = true;
- ruleFormClass.startDate = row.startDate;
- ruleFormClass.userId = row.userId;
- ruleFormClass.shiftIds = [];
- articleIdsRef.value.setCheckedKeys([]);
- console.log(row);
- };
- const editClass = (row) => {
- addClassTitle.value = "编辑班次";
- addClassVisible.value = true;
- ruleFormClass.startDate = row.startDate;
- ruleFormClass.userId = row.userId;
- ruleFormClass.id = row.id;
- nextTick(() => {
- articleIdsRef.value.setCheckedKeys(row.shiftIds);
- });
- console.log(row);
- };
- // 关闭班次弹窗
- const addClassClose = () => {
- addClassVisible.value = false;
- ruleFormClassRef.value.resetFields();
- };
- // 确定添加班次
- const addClassSubmit = async (formEl) => {
- if (!formEl) return;
- await formEl.validate(async (valid, fields) => {
- if (valid) {
- if (addClassTitle.value == "添加班次") {
- let data = {
- userId: ruleFormClass.userId,
- startDate: ruleFormClass.startDate,
- shiftIds: ruleFormClass.shiftIds,
- };
- // let res = await admin.adminAdd(data);
- let res = await axios({
- method: "post",
- url: api.value + "/repairClassesSettings/insertRepairClassesSettings",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "添加班次");
- if (res.data.code == 200) {
- addClassVisible.value = false;
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- let data = {
- userId: ruleFormClass.userId,
- startDate: ruleFormClass.startDate,
- shiftIds: ruleFormClass.shiftIds,
- id: ruleFormClass.id,
- };
- let res = await axios({
- method: "post",
- url:
- api.value +
- "/repairClassesSettings/updateRepairClassesSettingsById",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "编辑班次");
- if (res.data.code == 200) {
- addClassVisible.value = false;
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- } else {
- console.log("error submit!", fields);
- }
- });
- };
- // 删除班次
- const delClass = async (row, item) => {
- console.log(row, item);
- if (row.shiftIds.length > 1) {
- ruleFormClass.startDate = row.startDate;
- ruleFormClass.userId = row.userId;
- addClassList.value.forEach((i) => {
- if (i.name == item.name) {
- ruleFormClass.shiftIds = row.shiftIds.filter((ii) => {
- return ii != i.id;
- });
- }
- });
- ruleFormClass.id = row.id;
- let data = {
- userId: ruleFormClass.userId,
- startDate: ruleFormClass.startDate,
- shiftIds: ruleFormClass.shiftIds,
- id: ruleFormClass.id,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/repairClassesSettings/updateRepairClassesSettingsById",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "删除班次");
- if (res.data.code == 200) {
- addClassVisible.value = false;
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: "删除成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else {
- ruleFormClass.id = row.id;
- let data = {
- id: ruleFormClass.id,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/repairClassesSettings/deleteRepairClassesSettingsById",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "删除班次");
- if (res.data.code == 200) {
- addClassVisible.value = false;
- getList(themeIndex.value);
- ElMessage({
- type: "success",
- showClose: true,
- message: "删除成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- };
- // // 添加人员
- // const addStaff = async () => {
- // addStaffVisible.value = true;
- // // 报修类型接口
- // let data = {
- // schoolId: 1,
- // };
- // let res = await axios({
- // method: "get",
- // url: api.value + "/repairArticleType/queryRepairArticleType",
- // headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- // },
- // params: data,
- // });
- // console.log(res, "报修类型接口");
- // let datas = {
- // currentPage: 1,
- // pageCount: 8,
- // };
- // let ress = await axios({
- // method: "get",
- // url: api.value + "/repairUser/queryPageRepairUser",
- // headers: {
- // token: sessionStorage.getItem("token"),
- // user_head: sessionStorage.getItem("userhead"),
- // },
- // params: datas,
- // });
- // console.log(ress, "员工列表");
- // if (ress.data.code == 200) {
- // ress.data.data.list.forEach((item) => {
- // // 楼栋关联字段
- // if (item.articleNames) {
- // item.articleName = item.articleNames.join(",");
- // } else {
- // item.articleName = "暂无关联";
- // }
- // });
- // addStaffList.list = ress.data.data.list;
- // total3.value = ress.data.data.totalCount;
- // } else {
- // ElMessage({
- // type: "error",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- // }
- // };
- // 关闭添加人员弹窗
- const addStaffClose = () => {
- addStaffVisible.value = false;
- };
- // // 表格selection中的多选功能
- const handleArticleIds = (data, checked, indeterminate) => {
- console.log(data, checked, indeterminate);
- // let keys = articleIdsRef.value.getCheckedNodes();
- let keys = articleIdsRef.value.getCheckedKeys();
- console.log(keys);
- ruleFormClass.shiftIds = keys;
- };
- // const handleCheckedCitiesChange = (value) => {
- // console.log(value);
- // };
- // 多选框功能
- const handleSelectionChange3 = (val) => {
- console.log(val);
- selectData.list = val;
- };
- // 导入弹窗
- const importFile = () => {
- importXlsx.value = true;
- };
- const closeXlsx = () => {
- importXlsx.value = false;
- upload.value.clearFiles();
- fileXlsx.value = "";
- };
- // 导出模板
- const importTemp = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/repairClassesSettings/downloadRepairClassesSettingExcel",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- responseType: "blob",
- });
- console.log(res, "导出模板");
- if (res.status == 200) {
- let name = `排班导入模板`;
- var content = res.data;
- var data = new Blob([content]);
- var downloadUrl = window.URL.createObjectURL(data);
- var anchor = document.createElement("a");
- anchor.href = downloadUrl;
- anchor.download = name + ".xlsx";
- anchor.click();
- window.URL.revokeObjectURL(data);
- ElMessage({
- type: "success",
- showClose: true,
- message: "导出成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: "导出失败",
- center: true,
- });
- }
- };
- // 添导入文件功能
- const handleChange = (file, fileLists) => {
- console.log(file, "file11111");
- // let formData = new FormData(); //声明一个FormDate对象
- // formData.append("formFile", file.raw);
- // fileXlsx.value = formData;
- fileXlsx.value = file.raw;
- };
- // 可以获取文件参数(封面图上传图片)
- const handleUpload = (file) => {
- console.log(file, "file22222");
- };
- // 移出文件
- const handleRemove = (uploadFile, uploadFiles) => {
- console.log(uploadFile, uploadFiles);
- fileXlsx.value = "";
- };
- // 限制上传图片的大小类型
- const beforeAvatarUpload = (rawFile) => {
- console.log(rawFile.type);
- if (
- rawFile.type !==
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- ) {
- ElMessage.error("文件必须为xlsx格式!");
- return false;
- }
- // else if (rawFile.size / 1024 / 1024 > 10) {
- // ElMessage.error("图片的大小不能超过10MB!");
- // return false;
- // }
- return true;
- };
- // 上传文件时多次上传会替换前一个文件
- const handleExceed = (files) => {
- console.log(files, "替换文件");
- upload.value.clearFiles();
- const file = files[0];
- upload.value.handleStart(file);
- // let formData = new FormData(); //声明一个FormDate对象
- // formData.append("formFile", files.raw);
- // fileXlsx.value = formData;
- fileXlsx.value = files.raw;
- };
- // 确定导入文件
- const importSuc = async () => {
- console.log("确定导入");
- let data = new FormData(); //声明一个FormDate对象
- data.set("file", fileXlsx.value);
- let res = await axios({
- method: "post",
- url: api.value + "/repairClassesSettings/importRepairClassesSettingExcel",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- "Content-Type": "multipart/form-data;charset=UTF-8",
- },
- data: data,
- });
- console.log(res);
- if (res.data.code == 200) {
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- //导出功能
- const importExcel = async () => {
- let datas = {
- account: localStorage.getItem("user"),
- startTime: searchInput.createTime[0],
- endTime: searchInput.createTime[1],
- };
- let res = await axios({
- method: "get",
- url: api.value + "/repairClassesSettings/downloadRepairClassesExcel",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: datas,
- responseType: "blob",
- });
- console.log(res, "导出排班");
- if (res.status == 200) {
- let name = `排班管理`;
- var content = res.data;
- var data = new Blob([content]);
- var downloadUrl = window.URL.createObjectURL(data);
- var anchor = document.createElement("a");
- anchor.href = downloadUrl;
- anchor.download = name + ".xlsx";
- anchor.click();
- window.URL.revokeObjectURL(data);
- ElMessage({
- type: "success",
- showClose: true,
- message: "导出成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: "导出失败",
- center: true,
- });
- }
- };
- // 表格斑马纹颜色修改
- const tableRowClassName = ({ row, rowIndex }) => {
- if (rowIndex % 2 === 0) {
- return "even";
- } else if (rowIndex % 2 !== 0) {
- return "odd";
- }
- return "";
- };
- // 时段设置分页
- const handleCurrentChange = (value) => {
- // console.log(value);
- currentPage.value = value;
- getList(themeIndex.value);
- };
- // 时段管理分页
- const handleCurrentChange2 = (value) => {
- // console.log(value);
- currentPage2.value = value;
- getList(themeIndex.value);
- };
- // const handleCurrentChange3 = (value) => {
- // // console.log(value);
- // currentPage3.value = value;
- // getList(themeIndex.value);
- // };
- onBeforeMount(async () => {
- api.value = store.state.user.api;
- schoolId.value = sessionStorage.getItem("schoolId");
- getList(themeIndex.value);
- let data = {
- currentPage: currentPage.value,
- pageCount: pageSize.value,
- // name: "时段设置",
- };
- let res = await axios({
- method: "get",
- url: api.value + "/repairShiftSettings/queryPageRepairShiftSettings",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, "添加时段选择数据");
- addClassList.value = res.data.data.list;
- });
- onUnmounted(() => { });
- </script>
- <style scoped lang="scss">
- .content-box {
- width: 97.5%;
- height: 89%;
- margin: 20px auto;
- background-color: #fff;
- color: #fff;
- display: flex;
- flex-direction: column;
- box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- margin: 0 30px;
- border-bottom: 1px solid #ccc;
- color: rgb(0, 0, 0);
- font-size: 18px;
- font-weight: 600;
- user-select: none;
- span {
- height: 60px;
- line-height: 60px;
- margin-right: 20px;
- cursor: pointer;
- }
- .is_active {
- color: rgba(111, 182, 184, 1);
- }
- }
- .middle {
- width: 96%;
- margin: 0 auto;
- color: #000;
- // border-bottom: 1px solid rgb(231, 231, 231);
- .filter {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- margin: 10px 0 0 0;
- .search {
- color: #fff;
- }
- .condition {
- display: flex;
- align-items: center;
- margin: 10px 30px 10px 0;
- :deep(.el-input .el-input__inner) {
- font-size: 16px;
- }
- span {
- margin: 0 10px 0 0;
- }
- }
- }
- .gongneng {
- margin: 10px 0 15px 0;
- display: flex;
- .avatar-uploader {
- margin: 0 10px;
- :deep(.el-upload-list) {
- display: none;
- }
- }
- span {
- color: #fff;
- }
- }
- :deep(.cont) {
- width: 60%;
- margin: 20px auto;
- }
- :deep(.download) {
- display: flex;
- align-items: center;
- margin: 10px;
- }
- :deep(.download span) {
- font-size: 16px;
- margin-left: 20px;
- }
- :deep(.cont .el-button) {
- margin-left: 60px;
- margin-bottom: 30px;
- }
- :deep(.cont .accomplish) {
- width: 100%;
- display: flex;
- justify-content: center;
- }
- :deep(.cont .accomplish .el-button) {
- width: 50%;
- margin: 0;
- }
- }
- .footer {
- width: 96%;
- height: 550px;
- margin: 10px auto 30px;
- .el-table--fit {
- height: 100%;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 16px;
- tr {
- color: #000;
- }
- }
- :deep(.el-table__row) {
- height: 50px;
- font-size: 16px;
- color: #000;
- }
- :deep(.el-table__row):nth-child(2n) {
- .el-table-fixed-column--left {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- :deep(.el-table__row td) {
- padding: 0;
- border: 0;
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- :deep(.edit) {
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(111, 182, 184, 1);
- }
- :deep(.look) {
- padding: 0 10px;
- cursor: pointer;
- }
- :deep(.look):hover {
- color: red;
- }
- .el-table__row {
- //添加班次 周一到周日样式
- .word {
- color: rgba(111, 182, 184, 1);
- cursor: pointer;
- .classItem {
- display: flex;
- justify-content: center;
- align-items: center;
- .del {
- display: flex;
- justify-content: center;
- align-items: center;
- margin-left: 5px;
- }
- .el-button {
- color: #fff;
- }
- .classX {
- width: 25px;
- height: 25px;
- img {
- width: 25px;
- height: 25px;
- margin-left: 2px;
- }
- }
- .bottom {
- img {
- width: 15px;
- height: 8px;
- margin-left: 10px;
- }
- }
- }
- }
- .word span:hover {
- color: red;
- }
- }
- }
- // 添加时段弹窗样式
- :deep(.addStaff) {
- // height: 420px;
- border-radius: 11px;
- user-select: none;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 30px 20px 10px 20px;
- .el-input {
- width: 200px;
- }
- .el-form-item__content {
- // 非工作时间样式
- .noworkTime {
- display: flex;
- align-items: center;
- margin-bottom: 3px;
- img {
- width: 20px;
- height: 20px;
- margin-left: 10px;
- display: inline-block;
- cursor: pointer;
- }
- }
- .colorSelect {
- width: 200px;
- ul {
- list-style: none;
- display: flex;
- flex-wrap: wrap;
- padding: 0;
- margin: 0;
- li {
- border: 1px solid transparent;
- margin: 4px 10px 0px 0;
- border-radius: 5px;
- .item {
- width: 35px;
- height: 22px;
- border-radius: 5px;
- background: #000;
- cursor: pointer;
- margin: 1px;
- img {
- width: 12px;
- height: 12px;
- position: relative;
- right: -22px;
- }
- }
- .item1 {
- background-color: rgba(240, 116, 89, 1);
- }
- .item2 {
- background-color: rgb(187, 99, 99, 1);
- }
- .item3 {
- background-color: rgba(90, 224, 144, 1);
- }
- .item4 {
- background-color: rgba(103, 158, 230, 1);
- }
- .item5 {
- background-color: rgba(240, 170, 101, 1);
- }
- .item6 {
- background-color: rgba(240, 211, 117, 1);
- }
- .item7 {
- background-color: rgba(103, 214, 207, 1);
- }
- .item8 {
- background-color: rgba(204, 130, 217, 1);
- }
- }
- // li:hover {
- // border: 1px solid rgba(30, 125, 251, 1);
- // }
- .li_active {
- border: 1px solid rgba(30, 125, 251, 1);
- }
- }
- }
- .el-checkbox-group {
- display: flex;
- flex-direction: column;
- }
- }
- .checkbox {
- .el-form-item__content {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- .noworkTime {
- border: 1px solid red;
- img {
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- }
- .el-checkbox-group {
- display: flex;
- flex-direction: column;
- }
- }
- }
- .options {
- .el-form-item__content {
- .queding {
- margin-left: 20px;
- color: #fff;
- }
- display: flex;
- flex-direction: row-reverse;
- }
- }
- }
- }
- // 添加员工弹窗样式
- :deep(.addStaff2) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0 20px 10px 20px;
- .middle {
- width: 100%;
- }
- .footer {
- width: 100%;
- margin: 10px auto;
- .el-table--fit {
- height: 450px;
- .el-table__header {
- th:last-child {
- .cell {
- display: flex;
- justify-content: center;
- }
- }
- }
- .el-table__row {
- .cell {
- display: flex;
- justify-content: center;
- }
- }
- }
- .pageSize {
- margin: 0;
- padding: 20px 0;
- border-bottom: 1px solid #ccc;
- }
- }
- .options {
- margin: 15px 0 10px 0;
- .queding {
- margin-left: 20px;
- color: #fff;
- }
- display: flex;
- flex-direction: row-reverse;
- }
- }
- }
- // 添加员工弹窗样式
- :deep(.addClass) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 20px 20px 10px 20px;
- .el-input {
- width: 200px;
- }
- .el-form {
- .el-form-item__content {
- margin-left: 22px !important;
- }
- }
- .el-form-item__content {
- // 非工作时间样式
- .noworkTime {
- display: flex;
- align-items: center;
- img {
- width: 20px;
- height: 20px;
- margin-left: 10px;
- display: inline-block;
- cursor: pointer;
- }
- }
- .colorSelect {
- width: 200px;
- ul {
- list-style: none;
- display: flex;
- flex-wrap: wrap;
- padding: 0;
- margin: 0;
- li {
- border: 1px solid transparent;
- margin: 4px 10px 0px 0;
- border-radius: 5px;
- .item {
- width: 35px;
- height: 22px;
- border-radius: 5px;
- background: #000;
- cursor: pointer;
- margin: 1px;
- img {
- width: 12px;
- height: 12px;
- position: relative;
- right: -22px;
- }
- }
- .item1 {
- background-color: rgba(240, 116, 89, 1);
- }
- .item2 {
- background-color: rgb(187, 99, 99, 1);
- }
- .item3 {
- background-color: rgba(90, 224, 144, 1);
- }
- .item4 {
- background-color: rgba(103, 158, 230, 1);
- }
- .item5 {
- background-color: rgba(240, 170, 101, 1);
- }
- .item6 {
- background-color: rgba(240, 211, 117, 1);
- }
- .item7 {
- background-color: rgba(103, 214, 207, 1);
- }
- .item8 {
- background-color: rgba(204, 130, 217, 1);
- }
- }
- li:hover {
- border: 1px solid rgba(30, 125, 251, 1);
- }
- }
- }
- .el-checkbox-group {
- display: flex;
- flex-direction: column;
- }
- }
- .checkbox {
- .el-form-item__content {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- .noworkTime {
- border: 1px solid red;
- img {
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- }
- .el-checkbox-group {
- display: flex;
- flex-direction: column;
- }
- }
- }
- .options {
- .el-form-item__content {
- .queding {
- margin-left: 20px;
- color: #fff;
- }
- display: flex;
- flex-direction: row-reverse;
- }
- }
- }
- }
- // 导入弹窗样式
- :deep(.importXlsx) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 20px 20px 10px 20px;
- .options {
- margin: 15px 0;
- .queding {
- margin-left: 20px;
- color: #fff;
- }
- display: flex;
- flex-direction: row-reverse;
- }
- }
- }
- }
- .footers {
- :deep(.el-table__row) {
- height: 50px;
- font-size: 16px;
- color: #000;
- td:nth-of-type(n + 3) {
- .cell {
- display: flex;
- justify-content: right;
- .word {
- width: 280px;
- .classItem {
- justify-content: left;
- flex-wrap: wrap;
- .del {
- margin: 4px 3px;
- }
- }
- }
- }
- }
- }
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 0 30px;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- :deep(.el-pagination__total) {
- color: #000;
- }
- :deep(.el-pagination__goto) {
- color: #000;
- }
- :deep(.el-pagination__classifier) {
- color: #000;
- }
- :deep(.el-input__wrapper) {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- :deep(.el-pager li) {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.el-pager li.is-active) {
- background-color: rgba(111, 182, 184, 1);
- }
- :deep(.btn-prev) {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.btn-next) {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- }
- .el-input {
- width: 192px;
- }
- </style>
|