daily.vue 60 KB

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