daily.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365
  1. <template>
  2. <section>
  3. <!--工具条-->
  4. <!-- <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  5. <el-form :inline="true">
  6. <el-form-item>
  7. <el-date-picker v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM" @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
  8. </el-form-item>
  9. </el-form>
  10. </el-col> -->
  11. <!--列表-->
  12. <div>
  13. <el-card class="box-card daily" shadow="never" >
  14. <div slot="header" class="clearfix">
  15. <el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM" @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
  16. <span >
  17. <span>日期:</span>
  18. <span v-for="(item,index) in allDate" :id="'day'+index" :class="index==choseDay?'chooseDate date_item':'date_item'"
  19. @click="choseDate(index, item)" :key="index">{{item}}</span>
  20. </span>
  21. </div>
  22. <div style="display:flex;">
  23. <div v-if="user.role > 0 || user.manageDeptId != 0">
  24. <div>
  25. <el-select v-model="selectState" size="small" @change="stateChange">
  26. <el-option value="-1" label="全部状态" >全部状态</el-option>
  27. <el-option value="-2" label="未填报">未填报</el-option>
  28. <el-option value="1" label="已通过">已通过</el-option>
  29. <el-option value="0" label="待审核">待审核</el-option>
  30. <el-option value="2" label="不通过">不通过</el-option>
  31. <el-option value="3" label="已撤回">已撤回</el-option>
  32. </el-select></div>
  33. <div>
  34. <el-tree :data="data" @node-click="handleNodeClick" >
  35. <span class="custom-tree-node" slot-scope="{ node, data}">
  36. <span>{{ node.label }}</span>
  37. <span v-if="data.membCount != null && data.isUser == null">({{data.membCount}})</span>
  38. <div style="width:0%;float:right;">
  39. <span v-if="data.isUser == 1 && data.state == null" style="color:red;">
  40. 未填报
  41. </span>
  42. <span v-if="data.isUser == 1 && data.state == 0" style="color:orange;">
  43. 待审核
  44. </span>
  45. <span v-if="data.isUser == 1 && data.state == 1" style="color:green;">
  46. 已通过
  47. </span>
  48. <span v-if="data.isUser == 1 && data.state == 2" style="color:red;">
  49. 未通过
  50. </span>
  51. <span v-if="data.isUser == 1 && data.state == 3" style="color:red;">
  52. 已撤回
  53. </span>
  54. </div>
  55. </span>
  56. </el-tree>
  57. </div>
  58. </div>
  59. <div :style="'height:'+tableHeight+'px;width:0.5px;background:#eee;margin-right:10px;margin-left:10px;'" ></div>
  60. <div class="allDaily" style="float:left;flex-grow:1">
  61. <!--系统管理员 -->
  62. <div class="report_title" v-if="user.role > 0 || user.manageDeptId > 0">
  63. <span>工作日报 | {{depData.label}}</span> - 已填写<span style="margin-left:5px;margin-right:5px;color:green;">{{reportList.length}}</span>人,
  64. 未填写<span style="margin-left:5px;margin-right:5px;color:red;">{{(depData == null?data[0].membCount:(depData.isUser == 1?1:depData.membCount))-reportList.length}}</span>人
  65. <span style="float:right;">
  66. <el-link type="primary" style="margin-right:10px;" :underline="false" @click="fillInReport(-1)">填写日报</el-link>
  67. <el-link type="primary" style="margin-right:10px;" :underline="false" @click="exportReport">导出日报</el-link>
  68. <el-link type="primary" style="margin-right:10px;" :underline="false" @click="batchApprove">批量审核</el-link>
  69. </span>
  70. </div>
  71. <!--普通员工,含项目经理 -->
  72. <div class="report_title" v-if="user.role==0"><span>日报列表</span>
  73. <span style="float:right;" v-if="user.role==0">
  74. <el-link type="primary" style="margin-right:10px;" :underline="false" @click="fillInReport(-1)">填写日报</el-link>
  75. <el-link type="primary" v-if="user.leader" style="margin-right:10px;" :underline="false" @click="batchApprove">批量审核</el-link>
  76. </span>
  77. </div>
  78. <div :style="'height:'+(tableHeight-50)+'px;overflow:scroll;padding-top:10px;'">
  79. <div class="one_daily" v-for="(item1,index1) in reportList" :key="index1">
  80. <i class="fa fa-circle"></i>{{item1.name}}
  81. <span style="margin-left:30px;">
  82. <span style="margin-right:20px;">
  83. <!-- <i v-if="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5" style="color:red;margin-right:8px;" class="fa fa-exclamation-triangle"></i> -->
  84. 工作总时长:
  85. <!-- <span :style="parseFloat(item1.reportTime)>parseFloat(item1.calculateTime)+0.5?'color:red':''">{{item1.reportTime}}h</span> -->
  86. <span >{{item1.reportTime}}</span>h
  87. <span v-if="user.role > 0"><span style="margin-left:10px;">成本:</span>
  88. <span >{{item1.cost}}</span>元</span>
  89. </span>
  90. </span>
  91. <div class="checkbtn">
  92. <el-button v-if="(user.role != 0 || user.id == item1.data[0].inchargerId) && item1.state == 0" type="primary" :loading="logining" size="small" @click="approve(item1.id, item1)">通过</el-button>
  93. <el-button v-if="(user.role != 0 || user.id == item1.data[0].inchargerId) && item1.state == 0" type="danger" :loading="logining" size="small" @click="deny(item1.id,0, item1)">驳回</el-button>
  94. <!--自己可以撤回待审核状态的报告 -->
  95. <el-button v-if="(user.id == item1.id) && item1.state == 0" type="normal" :loading="logining" size="small" @click="cancel(item1)">撤回</el-button>
  96. <el-button v-if="(user.role != 0 || user.id == item1.data[0].inchargerId) && item1.state == 1" type="normal" :loading="logining" size="small" @click="deny(item1.id,1, item1)">撤销</el-button>
  97. <el-button v-if="item1.state >= 2 && user.id == item1.id" type="primary" size="small" @click="fillInReport(index1)">编辑日报</el-button>
  98. </div>
  99. <div class="one_daily_body">
  100. <el-timeline>
  101. <el-timeline-item v-for="(item2,index2) in item1.data" :key="index2">
  102. <el-card shadow="never">
  103. <p>项目:<b>{{item2.project}}</b><span v-if="item2.subProjectName != null"> / {{item2.subProjectName}}</span>
  104. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0">[ 待审核 ]</span>
  105. <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">[ 已通过 ]</span>
  106. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">[ 已驳回 ]</span>
  107. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">[ 已撤回 ]</span>
  108. </p>
  109. <p v-if="item2.taskId != null">任务:{{item2.taskName}}
  110. </p>
  111. <p style="display: inline-block;">时长:
  112. <span v-if="item2.reportTimeType == 0" style="margin-right:10px;">{{typeList[item2.timeType]}}</span>
  113. <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{item2.startTime+'-'+item2.endTime}}</span>
  114. {{item2.time.toFixed(1)}}h
  115. <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">加班</el-tag>
  116. </p>
  117. <p>事项:<span v-html="item2.content"></span></p>
  118. </el-card>
  119. </el-timeline-item>
  120. </el-timeline>
  121. </div>
  122. </div>
  123. <!-- 简陋的无报告提示 -->
  124. <div v-if="reportList.length==0" style="width:100%;font-size:17px;text-align:center;color:#aaa;">{{curDate}}暂无报告</div>
  125. </div>
  126. </div>
  127. </div>
  128. </el-card>
  129. </div>
  130. <!-- 填写日报的dialog -->
  131. <el-dialog title="填写日报" :visible.sync="dialogVisible" width="60%">
  132. <el-form ref="workForm" :model="workForm" :rules="workRules" label-width="100px">
  133. <el-form-item label="工作日期" prop="createDate">
  134. <el-date-picker v-model="workForm.createDate" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  135. @change="changeMonth()" :clearable="false" type="date" placeholder="选择工作日期" :disabled="isDisable"></el-date-picker>
  136. </el-form-item>
  137. <!-- <el-form-item label="待分配时长" prop="name">
  138. <span>{{report.time}}h</span>
  139. <el-link type="primary" :underline="false" @click="addDomain" style="margin-left:40px">添加项目</el-link>
  140. </el-form-item> -->
  141. <div v-for="(domain, index) in workForm.domains" :key="domain.id">
  142. <el-form-item label="工作时长" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
  143. :rules="{ required: true, message: '请选择工作时长', trigger: 'blur' }">
  144. <el-select v-model="domain.timeType"
  145. v-if="reportTimeType.type == 0"
  146. placeholder="请选择工作时长"
  147. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
  148. @change="onTimeTypeChange(domain.timeType)">
  149. <el-option
  150. v-for="item in timeType"
  151. :key="item.value"
  152. :label="item.label"
  153. :value="item.value">
  154. </el-option>
  155. </el-select>
  156. <!-- 数字时长选择 -->
  157. <el-select v-model="domain.workingTime"
  158. v-if="reportTimeType.type == 1"
  159. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
  160. placeholder="请选择工作时长" >
  161. <el-option v-for="item in timeRange" :key="item" :value="item.toFixed(1)">{{item.toFixed(1)}}</el-option>
  162. </el-select>
  163. <span v-if="reportTimeType.type == 1">小时</span>
  164. <!-- 是否加班 -->
  165. <!-- <el-checkbox v-model="domain.isOvertime">加班</el-checkbox> -->
  166. <!-- <div class="overtime">
  167. <input type="checkbox" :checked='selected' @click="check">
  168. <span>加班</span>
  169. </div> -->
  170. <!-- /是否加班 -->
  171. <span v-if="reportTimeType.type == 2">
  172. <!--时间范围选择 -->
  173. <el-time-select
  174. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
  175. placeholder="起始时间"
  176. style="width:120px;"
  177. v-model="domain.startTime"
  178. :picker-options="{
  179. start: '08:00',
  180. step: '00:30',
  181. end: '23:30'
  182. }">
  183. </el-time-select> - <el-time-select
  184. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
  185. placeholder="结束时间"
  186. style="width:120px;"
  187. v-model="domain.endTime"
  188. :picker-options="{
  189. start: '08:00',
  190. step: '00:30',
  191. end: '23:30',
  192. minTime: domain.startTime
  193. }">
  194. </el-time-select>
  195. </span>
  196. <div class="overtime"><el-checkbox v-model="domain.isOvertime">加班</el-checkbox></div>
  197. </el-form-item>
  198. <el-form-item label="投入项目" :prop="'domains.' + index + '.projectId'"
  199. :rules="{ required: true, message: '请选择投入项目', trigger: ['change','blur'] }">
  200. <el-select v-model="domain.projectId" placeholder="请选择" style="width:200px;" clearable="true" @change="selectProject(domain, index)"
  201. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
  202. <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
  203. </el-select>
  204. <!--子项目 -->
  205. <el-select v-model="domain.subProjectId" placeholder="请选择" style="width:200px;" clearable="true" v-if="domain.subProjectList != null && domain.subProjectList.length> 0"
  206. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
  207. <el-option v-for="item in domain.subProjectList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  208. </el-select>
  209. <el-link v-if="index >= 1" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
  210. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
  211. <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
  212. </el-link>
  213. </el-form-item>
  214. <!--项目管理专业版模式下,项目下的近期执行的任务 -->
  215. <el-form-item label="相关任务" :prop="'domains.' + index + '.taskId'" v-if="user.company.packageProject==1">
  216. <el-select v-model="domain.taskId" placeholder="请选择" style="width:100%;"
  217. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
  218. <el-option v-for="item in domain.taskList" :key="item.taskId" :label="item.taskName" :value="item.taskId"></el-option>
  219. </el-select>
  220. </el-form-item>
  221. <el-form-item label="工作事项" :prop="'domains.' + index + '.content'" >
  222. <el-input v-model="domain.content" type="textarea" :rows="4" placeholder="请填写工作事项" clearable
  223. :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"></el-input>
  224. </el-form-item>
  225. <el-divider v-if="workForm.domains.length>1"></el-divider>
  226. </div>
  227. <el-link v-if="showAddMore" type="primary" :underline="false" @click="addDomain" style="margin-left:40px">添加更多</el-link>
  228. </el-form>
  229. <span slot="footer" class="dialog-footer">
  230. <el-button @click="deleteReport" v-if="workForm.domains[0].id != null">删除</el-button>
  231. <el-button @click="dialogVisible = false">取消</el-button>
  232. <el-button type="primary" @click="submitDepartment"
  233. :disabled="workForm.domains.length==0?true:(canEdit?false:true)" >提交</el-button>
  234. </span>
  235. </el-dialog>
  236. <!-- 批量日报审核 -->
  237. <el-dialog title="批量日报审核" :visible.sync="approveDialogVisible" width="500px">
  238. <el-checkbox v-model="isAllSelect" label="全选" style="margin-left:24px;" @change="selectAll" v-if="reportNames.length > 0"></el-checkbox>
  239. <el-tree ref="approveTree" node-key="id" :data="reportNames" show-checkbox="true" @check-change="handleCheckChange" >
  240. </el-tree>
  241. <span slot="footer" class="dialog-footer">
  242. <el-button @click="approveDialogVisible = false">取消</el-button>
  243. <el-button type="primary" @click="submitBatchApprove" :disabled="batchShowData.length == 0">审核通过</el-button>
  244. </span>
  245. </el-dialog>
  246. </section>
  247. </template>
  248. <script>
  249. import util from "../../common/js/util";
  250. export default {
  251. data() {
  252. return {
  253. timeFields:['timeType', 'workingTime', 'startTime'],
  254. subProjectList:[],
  255. canEdit: true,
  256. timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0],
  257. selectTime:null,
  258. reportTimeType:{},
  259. curDate:'',
  260. isAllSelect: false,
  261. approveDialogVisible:false,
  262. deptId:null,
  263. targetUid: null,
  264. membCount:0,
  265. selectState:"-1",
  266. user: JSON.parse(sessionStorage.getItem("user")),
  267. showAddMore:false,
  268. allDate: [],
  269. typeList:['全天','上午','下午'],
  270. date: sessionStorage.msg?sessionStorage.msg.split('-')[0]+"-"+sessionStorage.msg.split('-')[1]:util.formatDate.format(new Date(new Date()), "yyyy-MM"),
  271. choseDay: 0,
  272. tableHeight: 0,
  273. listLoading: false,
  274. projectList: [], //项目列表
  275. reportList: [], //日报列表
  276. reportNames:[], //批量审批列表
  277. dialogVisible: false, //项目弹窗
  278. report: '',
  279. workForm: {
  280. createDate: sessionStorage.msg?sessionStorage.msg:util.formatDate.format(new Date(new Date()), "yyyy-MM-dd"),
  281. domains: [{
  282. id: null,
  283. projectId: "",
  284. workingTime: "",
  285. timeType:0,
  286. content: "",
  287. state: 2,
  288. }],
  289. },
  290. workRules: {
  291. createDate: [{ required: true, message: "请选择工作日期", trigger: "change" }],
  292. },
  293. logining: false,
  294. isDisable: false,
  295. timeType:[],
  296. //部门人员树状结构
  297. data: [
  298. {
  299. id: -1,
  300. label: '全部人员',
  301. membCount:0
  302. },
  303. {
  304. id: 0,
  305. label: '未分配',
  306. }
  307. ],
  308. allData:{},
  309. batchShowData:{},
  310. option: [],
  311. depData: {
  312. id: -1,
  313. label: '全部人员',
  314. },
  315. defaultProps: {
  316. children: 'children',
  317. label: 'label'
  318. },
  319. isNew: false,
  320. selected: false
  321. };
  322. },
  323. methods: {
  324. // 是否加班的单机事件
  325. check() {
  326. this.selected = !this.selected
  327. this.isNew = this.selected
  328. },
  329. //项目选中了, 加载子项目
  330. selectProject(domain, index) {
  331. this.http.post('/sub-project/list',{
  332. projectId: domain.projectId
  333. },
  334. res => {
  335. if (res.code == "ok") {
  336. this.workForm.domains[index].subProjectList = res.data;
  337. // domain.subProjectList = res.data;
  338. // console.log(domain.subProjectList);
  339. this.$forceUpdate();
  340. }
  341. },
  342. error => {
  343. this.$message({
  344. message: error,
  345. type: "error"
  346. });
  347. }
  348. );
  349. //项目相关的近期任务
  350. if (this.user.company.packageProject == 1) {
  351. this.http.post('/task/getRecentTask',{
  352. projectId: domain.projectId
  353. },
  354. res => {
  355. if (res.code == "ok") {
  356. this.workForm.domains[index].taskList = res.data;
  357. this.$forceUpdate();
  358. }
  359. },
  360. error => {
  361. this.$message({
  362. message: error,
  363. type: "error"
  364. });
  365. }
  366. );
  367. }
  368. },
  369. //删除自己的日报
  370. deleteReport() {
  371. this.$confirm("确定要删除该日报吗?","提示", {
  372. confirmButtonText: "确定",
  373. cancelButtonText: "取消",
  374. type: "warning"
  375. })
  376. .then(() => {
  377. this.listLoading = true;
  378. this.http.post('/report/delete',{
  379. userId: this.user.id,
  380. date: this.workForm.createDate
  381. },
  382. res => {
  383. this.listLoading = false;
  384. if (res.code == "ok") {
  385. this.$message({
  386. message: "删除成功",
  387. type: "success"
  388. });
  389. this.getReportList();
  390. this.getDepartment();
  391. this.dialogVisible = false;
  392. } else {
  393. this.$message({
  394. message: res.msg,
  395. type: "error"
  396. });
  397. }
  398. },
  399. error => {
  400. this.listLoading = false;
  401. this.$message({
  402. message: error,
  403. type: "error"
  404. });
  405. }
  406. );
  407. })
  408. .catch(() => {});
  409. },
  410. //提交批量审核数据
  411. submitBatchApprove() {
  412. console.log(this.$refs.approveTree.getCheckedNodes());
  413. var data = this.$refs.approveTree.getCheckedNodes();
  414. var ids = '';
  415. if (data.length == 0) {
  416. this.$message({
  417. message: '请选择要审核的人员',
  418. type: "error"
  419. });
  420. return;
  421. }
  422. for (var i=0;i<data.length; i++) {
  423. ids += data[i].id;
  424. if (i < data.length-1) {
  425. ids += ',';
  426. }
  427. }
  428. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  429. console.log('ids==='+ids);
  430. this.http.post("/report/batchApproveReport", {ids:ids, date:this.date + day},
  431. res => {
  432. if (res.code == "ok") {
  433. this.$message({
  434. message: '审核成功',
  435. type: "success"
  436. });
  437. this.getReportList();
  438. this.getDepartment();
  439. this.approveDialogVisible = false;
  440. } else {
  441. this.$message({
  442. message: res.msg,
  443. type: "error"
  444. });
  445. }
  446. },
  447. error => {
  448. this.$message({
  449. message: error,
  450. type: "error"
  451. });
  452. });
  453. },
  454. selectAll() {
  455. if (this.isAllSelect) {
  456. var keys = [];
  457. this.reportNames.forEach(b=>{
  458. keys.push(b.id);
  459. })
  460. this.$refs.approveTree.setCheckedKeys(keys);
  461. } else {
  462. this.$refs.approveTree.setCheckedKeys([]);
  463. }
  464. },
  465. //批量审核
  466. batchApprove() {
  467. this.approveDialogVisible = true;
  468. console.log(this.allData);
  469. this.reportNames = [];
  470. for (var i=0;i<this.reportList.length; i++) {
  471. var report = this.reportList[i];
  472. var hasUnChecked =false;
  473. var id = '';
  474. for (var j=0;j<report.data.length; j++) {
  475. if (report.data[j].state == 0) {
  476. hasUnChecked = true;
  477. id += report.data[j].id+',';
  478. }
  479. }
  480. if (hasUnChecked) {
  481. this.reportNames.push({id:id, label: report.name});
  482. }
  483. }
  484. },
  485. removeEmptyNode(list) {
  486. for (var i=0;i<list.length;i++) {
  487. var cnt = 0;
  488. if (list[i].membCount == 0) {
  489. list.splice(i, 1);
  490. i--;
  491. } else if (list[i].children != null) {
  492. this.removeEmptyNode(list[i].children);
  493. }
  494. }
  495. },
  496. calculateMembCount(list) {
  497. for (var i in list) {
  498. var cnt = 0;
  499. if (list[i].children != null) {
  500. this.calculateMembCount(list[i].children);
  501. for (var m in list[i].children) {
  502. cnt += list[i].children[m].membCount;
  503. }
  504. }
  505. if (list[i].isUser == 1) {
  506. cnt++;
  507. this.membCount++;
  508. }
  509. list[i].membCount = cnt;
  510. }
  511. },
  512. stateChange() {
  513. this.membCount = 0;
  514. if (this.selectState == -1) {
  515. //全部状态
  516. this.data = this.allData;
  517. } else {
  518. //未填报
  519. var newData = JSON.parse(JSON.stringify(this.allData));
  520. this.filterState(this.selectState, newData);
  521. this.data = newData;
  522. }
  523. this.calculateMembCount(this.data);
  524. this.data[0].membCount = this.membCount;//总人数
  525. },
  526. //按状态过滤部门人员
  527. filterState(state, list) {
  528. for (var i =0;i<list.length; i++) {
  529. var obj = list[i];
  530. if (obj.isUser == 1) {
  531. var match = false;
  532. if (state == -2) {
  533. if (obj.state == null) {
  534. match = true;
  535. }
  536. } else {
  537. if (obj.state == state) {
  538. match = true;
  539. }
  540. }
  541. if (!match) {
  542. console.log("不匹配,删除="+obj.label+', state='+obj.state);
  543. list.splice(i, 1);
  544. i--;
  545. } else {
  546. console.log("匹配"+obj.label);
  547. }
  548. } else {
  549. if (obj.children != null) {
  550. this.filterState(state, obj.children);
  551. }
  552. }
  553. }
  554. },
  555. // 部门列表点击
  556. handleNodeClick(data) {
  557. console.log(data);
  558. // if(this.depData == null || data.id != this.depData.id) {
  559. // this.depData = data;
  560. // //this.getUser();
  561. // }
  562. this.depData = data;
  563. if (data.id == -1) {
  564. this.deptId = null;
  565. this.targetUid = null;
  566. } else if (data.isUser == 1) {
  567. this.deptId = null;
  568. this.targetUid = data.id;
  569. } else {
  570. this.deptId = data.id;
  571. this.targetUid = null;
  572. }
  573. this.getReportList();
  574. },
  575. // 获取部门列表
  576. getDepartment() {
  577. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  578. var param = {date:this.date + day};
  579. if (this.user.manageDeptId != 0) {
  580. param.manageDeptId = this.user.manageDeptId;
  581. }
  582. this.http.post("/report/getMembList", param,
  583. res => {
  584. if (res.code == "ok") {
  585. var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
  586. if (this.user.role > 0) {
  587. list.splice(0,0,{
  588. id: -1,
  589. label: '全部人员',
  590. })
  591. list.push({
  592. id: 0,
  593. label: '未分配',
  594. })
  595. }
  596. this.membCount = 0;
  597. //设置员工到部门下面
  598. this.setUserToDept(list);
  599. this.data = list;
  600. this.allData = list;
  601. this.option = this.changeArr(list1);
  602. list[0].membCount = this.membCount;
  603. if (this.depData.id == -1) {
  604. this.depData.membCount = this.membCount;
  605. }
  606. } else {
  607. this.$message({
  608. message: res.msg,
  609. type: "error"
  610. });
  611. }
  612. },
  613. error => {
  614. this.$message({
  615. message: error,
  616. type: "error"
  617. });
  618. });
  619. },
  620. setUserToDept(list) {
  621. for (var i in list) {
  622. var cnt = 0;
  623. if (list[i].children != null) {
  624. this.setUserToDept(list[i].children);
  625. for (var m in list[i].children) {
  626. cnt += list[i].children[m].membCount;
  627. }
  628. }
  629. if (list[i].userList != null) {
  630. if (list[i].children == null) {
  631. list[i].children = [];
  632. }
  633. list[i].userList.forEach(element => {
  634. var obj = {id: element.id, label:element.name, state:element.state, parentId:element.departmentId, isUser:1};
  635. list[i].children.push(obj);
  636. this.membCount++;
  637. cnt++;
  638. });
  639. }
  640. list[i].membCount = cnt;
  641. }
  642. },
  643. // 修改数组
  644. changeArr(arr) {
  645. for (var i = 0; i < arr.length; i++) {
  646. if(arr[i].id != -1 && arr[i].id != 0) {
  647. if (arr[i].children != null && arr[i].children.length>0) {
  648. arr[i].children = this.changeArr(arr[i].children);
  649. }
  650. arr[i].id && (arr[i].value = arr[i].id);
  651. delete arr[i].id;
  652. }
  653. }
  654. for(var i in arr) {
  655. if(arr[i].id == -1 || arr[i].id == 0) {
  656. arr.splice(i,1)
  657. }
  658. }
  659. return arr;
  660. },
  661. //时间段范围设置改动,监听
  662. onTimeTypeChange(timeType) {
  663. this.showAddMore = true;
  664. console.log("======" + timeType);
  665. for(var i in this.workForm.domains) {
  666. if (this.workForm.domains[i].timeType == 0) {
  667. this.showAddMore = false;
  668. break;
  669. }
  670. }
  671. if (this.showAddMore) {
  672. //检测数量
  673. if (this.workForm.domains.length == 2) {
  674. this.showAddMore = false;
  675. } else {
  676. this.showAddMore = true;
  677. }
  678. }
  679. },
  680. getTimeType() {
  681. this.http.post('/time-type/getCompanyTimeSetting', { companyId: this.user.companyId},
  682. res => {
  683. if (res.code == "ok") {
  684. var t = res.data;
  685. this.reportTimeType = t;
  686. if (this.reportTimeType.type > 0) {
  687. this.showAddMore = true;
  688. }
  689. //转化时间格式
  690. if (t.allday != null) {
  691. this.timeType.push({value:0, label:'全天 - '+t.allday+'小时', hours:t.allday});
  692. }
  693. if (t.am != null) {
  694. this.timeType.push({value:1, label:'上午 - '+t.am+'小时', hours: t.am});
  695. }
  696. if (t.pm != null) {
  697. this.timeType.push({value:2, label:'下午 - '+t.pm+'小时', hours: t.pm});
  698. }
  699. } else {
  700. this.$message({
  701. message: res.msg,
  702. type: "error"
  703. });
  704. }
  705. },
  706. error => {
  707. this.listLoading = false;
  708. this.$message({
  709. message: error,
  710. type: "error"
  711. });
  712. });
  713. },
  714. // 改变月份
  715. changeMonthOut() {
  716. console.log(sessionStorage.msg)
  717. this.getAllDate();
  718. this.getReportList();
  719. this.getDepartment();
  720. },
  721. // 选择日期
  722. choseDate(i, item) {
  723. this.choseDay = i;
  724. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  725. sessionStorage.msg = this.date + day,
  726. this.getReportList();
  727. this.getDepartment();
  728. this.curDate = item;
  729. },
  730. // 获取日期列表
  731. getAllDate() {
  732. var dayArry = [];
  733. var day = this.getCountDays();
  734. for (var k = 1; k <= day; k++) {
  735. var str = new Date(this.date.replace(/-/g, "/")).getMonth() + 1 + "月" + k + "日";
  736. if ( new Date(this.date.replace(/-/g, "/")).getFullYear() == new Date(new Date()).getFullYear() &&
  737. new Date(this.date.replace(/-/g, "/")).getMonth() == new Date(new Date()).getMonth()) {
  738. if(sessionStorage.msg) {
  739. if(parseInt(sessionStorage.msg.split("-")[2]) == k) {
  740. this.choseDay = k - 1;
  741. }
  742. } else {
  743. if (new Date().getDate() == k) {
  744. this.choseDay = k - 1;
  745. }
  746. }
  747. } else {
  748. this.choseDay = 0;
  749. }
  750. dayArry.push(str);
  751. }
  752. this.allDate = dayArry;
  753. if (sessionStorage.msg) {
  754. this.curDate = sessionStorage.msg;
  755. }
  756. },
  757. getCountDays() {
  758. var newstr = this.date.replace(/-/g, "/");
  759. var curDate = new Date(newstr);
  760. var curMonth = curDate.getMonth();
  761. curDate.setMonth(curMonth + 1);
  762. curDate.setDate(0);
  763. return curDate.getDate();
  764. },
  765. //获取日报列表
  766. getReportList() {
  767. this.listLoading = true;
  768. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  769. let param = {date: this.date + day};
  770. if (this.deptId != null) {
  771. param.deptId = this.deptId;
  772. }
  773. if (this.targetUid != null) {
  774. param.userId = this.targetUid;
  775. }
  776. this.http.post( this.port.report.list, param,
  777. res => {
  778. this.listLoading = false;
  779. if (res.code == "ok") {
  780. console.log(res);
  781. this.reportList = res.data;
  782. document.querySelector("#day"+this.choseDay).scrollIntoView(true);
  783. } else {
  784. this.$message({
  785. message: res.msg,
  786. type: "error"
  787. });
  788. }
  789. },
  790. error => {
  791. this.listLoading = false;
  792. this.$message({
  793. message: error,
  794. type: "error"
  795. });
  796. });
  797. },
  798. //导出日报
  799. exportReport() {
  800. if (this.reportList.length > 0) {
  801. this.listLoading = true;
  802. //首先处理日期
  803. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  804. this.http.post( this.port.report.export, { date: this.date + day },
  805. res => {
  806. this.listLoading = false;
  807. if (res.code == "ok") {
  808. location.href = res.data;
  809. } else {
  810. this.$message({
  811. message: res.msg,
  812. type: "error"
  813. });
  814. }
  815. },
  816. error => {
  817. this.listLoading = false;
  818. this.$message({
  819. message: error,
  820. type: "error"
  821. });
  822. });
  823. } else {
  824. this.$message({
  825. message: "当天没有报告 无法导出",
  826. type: "info"
  827. });
  828. }
  829. },
  830. //获取项目列表
  831. getProjectList() {
  832. this.listLoading = true;
  833. this.http.post( this.port.project.list, {},
  834. res => {
  835. this.listLoading = false;
  836. if (res.code == "ok") {
  837. this.projectList = res.data;
  838. } else {
  839. this.$message({
  840. message: res.msg,
  841. type: "error"
  842. });
  843. }
  844. },
  845. error => {
  846. this.listLoading = false;
  847. this.$message({
  848. message: error,
  849. type: "error"
  850. });
  851. });
  852. },
  853. // 获取个人某天的日报
  854. getReport(i) {
  855. this.http.post( this.port.report.getPort, {
  856. date: this.workForm.createDate
  857. },
  858. res => {
  859. if (res.code == "ok") {
  860. var list = res.data;
  861. this.report = list;
  862. if(list.report.length != 0) {
  863. var arr = [];
  864. this.canEdit = false;
  865. for(var i in list.report) {
  866. arr.push({
  867. id: list.report[i].id,
  868. projectId: list.report[i].projectId,
  869. workingTime: list.report[i].workingTime,
  870. content: list.report[i].content,
  871. state: list.report[i].state,
  872. timeType: list.report[i].timeType,
  873. subProjectList: list.report[i].subProjectList,
  874. taskList: list.report[i].taskList,
  875. subProjectId: list.report[i].subProjectId,
  876. taskId: list.report[i].taskId,
  877. })
  878. if (list.report[i].state >= 2) {
  879. this.canEdit = true;
  880. }
  881. }
  882. this.workForm = {
  883. createDate: this.workForm.createDate,
  884. domains: arr,
  885. }
  886. } else {
  887. this.workForm = {
  888. createDate: this.workForm.createDate,
  889. domains: [{
  890. id: null,
  891. projectId: "",
  892. workingTime: "",
  893. content: "",
  894. state: 2,
  895. timeType:0,
  896. }],
  897. }
  898. this.canEdit = true;
  899. }
  900. } else {
  901. this.$message({
  902. message: res.msg,
  903. type: "error"
  904. });
  905. }
  906. },
  907. error => {
  908. this.$message({
  909. message: error,
  910. type: "error"
  911. });
  912. });
  913. },
  914. // 打开日报填写
  915. fillInReport(i) {
  916. if(i == -1) {
  917. this.isDisable = false;
  918. } else {
  919. this.isDisable = true;
  920. }
  921. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  922. this.workForm.createDate = this.date + day;
  923. this.getReport(i);
  924. this.dialogVisible = true;
  925. },
  926. // 添加模块
  927. addDomain() {
  928. this.workForm.domains.push({
  929. projectId: "",
  930. workingTime: "",
  931. content: "",
  932. state:2,//2-表示待提交
  933. });
  934. if (this.reportTimeType.type == 0) {
  935. //全天上下午模式下,检测时间段数量,达到2个,不能再加了
  936. var length = this.workForm.domains.length;
  937. if (length == 2) {
  938. this.showAddMore = false;
  939. }
  940. }
  941. },
  942. // 移除模块
  943. delDomain(i) {
  944. this.workForm.domains.splice(i,1)
  945. //检测当前剩下的一个,时间类型是否是全天
  946. if (this.reportTimeType.type == 0) {
  947. if (this.workForm.domains[0].timeType == 0) {
  948. this.showAddMore = false;
  949. } else {
  950. this.showAddMore = true;
  951. }
  952. }
  953. },
  954. // 改变月份
  955. changeMonth() {
  956. this.getReport()
  957. },
  958. // 保存日报
  959. submitDepartment() {
  960. this.$refs.workForm.validate(valid => {
  961. if (valid) {
  962. //检查时间,全天和上下午不能同时存在
  963. if (this.reportTimeType.type == 0) {
  964. var alldayNum = 0;
  965. var amNum = 0;
  966. var pmNum = 0;
  967. for(var i in this.workForm.domains) {
  968. if (this.workForm.domains[i].timeType == 0) {
  969. alldayNum ++;
  970. } else if (this.workForm.domains[i].timeType == 1) {
  971. amNum++;
  972. } else if (this.workForm.domains[i].timeType == 2) {
  973. pmNum++;
  974. }
  975. }
  976. if (alldayNum > 1) {
  977. this.$message({
  978. message: "工作时间-全天,只能选择一次",
  979. type: "error"
  980. });
  981. return;
  982. }
  983. if (amNum > 1) {
  984. this.$message({
  985. message: "工作时间-上午,只能选择一次",
  986. type: "error"
  987. });
  988. return;
  989. }
  990. if (pmNum > 1) {
  991. this.$message({
  992. message: "工作时间-下午,只能选择一次",
  993. type: "error"
  994. });
  995. return;
  996. }
  997. if (alldayNum == 1 && (amNum > 0 || pmNum > 0)) {
  998. this.$message({
  999. message: "工作时间-全天,不能和上下午同时存在",
  1000. type: "error"
  1001. });
  1002. return;
  1003. }
  1004. }
  1005. this.listLoading = true;
  1006. let formData = new FormData();
  1007. for(var i in this.workForm.domains) {
  1008. if (this.workForm.domains[i].id != null) {
  1009. formData.append("id", this.workForm.domains[i].id);
  1010. } else {
  1011. formData.append("id", -1);
  1012. }
  1013. formData.append("projectId", this.workForm.domains[i].projectId);
  1014. if (this.workForm.domains[i].subProjectId != null) {
  1015. formData.append("subProjectId", this.workForm.domains[i].subProjectId);
  1016. } else {
  1017. formData.append("subProjectId", 0);
  1018. }
  1019. if (this.workForm.domains[i].taskId != null) {
  1020. formData.append("taskId", this.workForm.domains[i].taskId);
  1021. } else {
  1022. formData.append("taskId", 0);
  1023. }
  1024. formData.append("reportTimeType", this.reportTimeType.type);
  1025. if (this.reportTimeType.type == 0) {
  1026. formData.append("timeType", this.workForm.domains[i].timeType);
  1027. var workingTime = this.timeType.filter(t=>t.value == this.workForm.domains[i].timeType)[0].hours;
  1028. formData.append("workingTime", workingTime);
  1029. } else if (this.reportTimeType.type == 1){
  1030. formData.append("workingTime", this.workForm.domains[i].workingTime);
  1031. } else if (this.reportTimeType.type == 2) {
  1032. formData.append("startTime", this.workForm.domains[i].startTime);
  1033. formData.append("endTime", this.workForm.domains[i].endTime);
  1034. }
  1035. if (this.workForm.domains[i].content == null || this.workForm.domains[i].content == '') {
  1036. formData.append("content", '-');
  1037. } else {
  1038. formData.append("content", this.workForm.domains[i].content);
  1039. }
  1040. formData.append("createDate", this.workForm.createDate);
  1041. console.log(this.workForm.domains[i].isOvertime,123);
  1042. if(this.workForm.domains[i].isOvertime == undefined ) {
  1043. this.workForm.domains[i].isOvertime = '0'
  1044. formData.append("isOvertime", this.workForm.domains[i].isOvertime);
  1045. } else if (this.workForm.domains[i].isOvertime == false){
  1046. this.workForm.domains[i].isOvertime = '0'
  1047. formData.append("isOvertime", this.workForm.domains[i].isOvertime);
  1048. } else {
  1049. this.workForm.domains[i].isOvertime = '1'
  1050. formData.append("isOvertime", this.workForm.domains[i].isOvertime);
  1051. }
  1052. // formData.append("isOvertime", this.workForm.domains[i].isOvertime);
  1053. }
  1054. console.log(123,this.workForm);
  1055. console.log(formData);
  1056. this.http.uploadFile( this.port.report.editPort, formData,
  1057. res => {
  1058. this.listLoading = false;
  1059. if (res.code == "ok") {
  1060. this.$message({
  1061. message: "填报成功",
  1062. type: "success"
  1063. });
  1064. this.dialogVisible = false;
  1065. this.getReportList();
  1066. this.getDepartment();
  1067. } else {
  1068. this.$message({
  1069. message: res.msg,
  1070. type: "error"
  1071. });
  1072. }
  1073. },
  1074. error => {
  1075. this.listLoading = false;
  1076. this.$message({
  1077. message: error,
  1078. type: "error"
  1079. });
  1080. });
  1081. }
  1082. });
  1083. },
  1084. // 跳转
  1085. junpToDeskTop(id) {
  1086. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  1087. this.$router.push("/desktop/" + id + "/" + this.date +day);
  1088. },
  1089. // 通过日报
  1090. approve(id, item) {
  1091. this.logining = true;
  1092. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  1093. var ids = '';
  1094. var data = item.data;
  1095. data.forEach(element => {
  1096. ids +=(element.id+',');
  1097. });
  1098. this.http.post( this.port.report.approve, {id: id , date: this.date +day, reportIds: ids},
  1099. res => {
  1100. this.logining = false;
  1101. if (res.code == "ok") {
  1102. this.$message({
  1103. message: "审核成功",
  1104. type: "success"
  1105. });
  1106. this.getReportList();
  1107. this.getDepartment();
  1108. } else {
  1109. this.$message({
  1110. message: res.msg,
  1111. type: "error"
  1112. });
  1113. }
  1114. },
  1115. error => {
  1116. this.logining = false;
  1117. this.$message({
  1118. message: error,
  1119. type: "error"
  1120. });
  1121. });
  1122. },
  1123. //撤回日报
  1124. cancel(item) {
  1125. this.logining = true;
  1126. var ids = '';
  1127. var data = item.data;
  1128. data.forEach(element => {
  1129. ids +=(element.id+',');
  1130. });
  1131. this.http.post(this.port.report.cancelReport, {userId: this.user.id, reportIds: ids},
  1132. res => {
  1133. this.logining = false;
  1134. if (res.code == "ok") {
  1135. this.$message({
  1136. message:"撤回成功",
  1137. type: "success"
  1138. });
  1139. this.getReportList();
  1140. this.getDepartment();
  1141. } else {
  1142. this.$message({
  1143. message: res.msg,
  1144. type: "error"
  1145. });
  1146. }
  1147. },
  1148. error => {
  1149. this.logining = false;
  1150. this.$message({
  1151. message: error,
  1152. type: "error"
  1153. });
  1154. });
  1155. },
  1156. // 未通过日报
  1157. deny(id,i, item) {
  1158. this.logining = true;
  1159. let day = this.choseDay > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
  1160. var ids = '';
  1161. var data = item.data;
  1162. data.forEach(element => {
  1163. ids +=(element.id+',');
  1164. });
  1165. this.http.post( this.port.report.deny, {id: id , date: this.date +day, reportIds: ids},
  1166. res => {
  1167. this.logining = false;
  1168. if (res.code == "ok") {
  1169. this.$message({
  1170. message: i==0?"驳回成功":"撤销成功",
  1171. type: "success"
  1172. });
  1173. this.getReportList();
  1174. this.getDepartment();
  1175. } else {
  1176. this.$message({
  1177. message: res.msg,
  1178. type: "error"
  1179. });
  1180. }
  1181. },
  1182. error => {
  1183. this.logining = false;
  1184. this.$message({
  1185. message: error,
  1186. type: "error"
  1187. });
  1188. });
  1189. }
  1190. },
  1191. created() {
  1192. let height = window.innerHeight;
  1193. console.log('window inner height=='+height)
  1194. this.tableHeight = height - 178;
  1195. const that = this;
  1196. window.onresize = function temp() {
  1197. that.tableHeight = window.innerHeight - 178;
  1198. };
  1199. },
  1200. mounted() {
  1201. this.getAllDate();
  1202. this.getReportList();
  1203. this.getProjectList();
  1204. this.getTimeType();
  1205. this.getDepartment();
  1206. }
  1207. };
  1208. </script>
  1209. <style lang="scss" scoped>
  1210. .allDaily {
  1211. width:82%;
  1212. }
  1213. .report_title {
  1214. padding:10px 0;
  1215. }
  1216. .clearfix {
  1217. overflow-x: auto;
  1218. white-space: nowrap;
  1219. padding: 15px 0;
  1220. .date_item {
  1221. padding: 0 15px;
  1222. cursor: pointer;
  1223. }
  1224. .chooseDate {
  1225. color: #20a0ff;
  1226. }
  1227. }
  1228. .one_daily {
  1229. i {
  1230. color: #9ed0ff;
  1231. margin-right: 5px;
  1232. }
  1233. .one_daily_body {
  1234. padding: 15px 0px;
  1235. p {
  1236. margin: 0;
  1237. line-height: 30px;
  1238. }
  1239. }
  1240. ul {
  1241. padding: 0;
  1242. }
  1243. }
  1244. .checkbtn {
  1245. float: right;
  1246. margin-top: -10px;
  1247. }
  1248. </style>
  1249. <style lang="scss">
  1250. .daily {
  1251. .el-card__body {
  1252. height: 80%;
  1253. overflow-y: auto;
  1254. }
  1255. .el-card__header {
  1256. padding: 0 20px;
  1257. }
  1258. }
  1259. </style>
  1260. <style scoped>
  1261. /* 项目标签的样式 */
  1262. .el-tag + .el-tag {
  1263. margin-left: 10px;
  1264. }
  1265. .button-new-tag {
  1266. margin-left: 10px;
  1267. height: 32px;
  1268. line-height: 30px;
  1269. padding-top: 0;
  1270. padding-bottom: 0;
  1271. }
  1272. .input-new-tag {
  1273. width: 90px;
  1274. margin-left: 10px;
  1275. vertical-align: bottom;
  1276. }
  1277. </style>
  1278. <style lang="scss" scoped>
  1279. // 加班样式
  1280. .overtime {
  1281. display: inline-block;
  1282. margin-left: 20px;
  1283. input {
  1284. display: inline-block;
  1285. margin-top: 5px;
  1286. }
  1287. }
  1288. .plus {
  1289. display: inline-block;
  1290. }
  1291. // .tages {
  1292. // float: right;
  1293. // }
  1294. .overtime {
  1295. display: inline-block;
  1296. margin-left: 30px;
  1297. }
  1298. </style>