Controltree.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  1. <template>
  2. <div class="controltree-box" v-loading.fullscreen.lock="fullscreenLoading">
  3. <div class="controltree-w">
  4. <div class="controltree-ul" >
  5. <div class="controltree-li" v-for="(item,index) in treeData" :key="index">
  6. {{item.rootName}}
  7. <div v-if="item.childList!==undefined && item.childList!= null&&item.childList.length>0" class="second-ul">
  8. <div class="second-ul-haed">
  9. <div>版块步骤</div>
  10. <div>预计完成时间</div>
  11. <div>完成时间</div>
  12. </div>
  13. <div class="onefloors" v-if="item.childList[0].childList==undefined||item.childList[0].childList==null||item.childList[0].childList.length<=0">
  14. <div v-for="(seconditem,index) in item.childList" :key="index" class="li-steps-li">
  15. <div :style="filter_color(seconditem.stepStatus)">{{seconditem.jobContent}}</div>
  16. <div>{{seconditem.expectBeginDt.split(" ")[0]}}~{{seconditem.expectEndDt.split(" ")[0]}}</div>
  17. <div>{{seconditem.expectEndDt.split(" ")[0]}}</div>
  18. </div>
  19. <div ref="btnB" @click="addfigures(item)" class="addonebtn">
  20. <i class="el-icon-edit"></i>
  21. 编 辑
  22. </div>
  23. </div>
  24. <div class="onefloor" v-if="item.childList[0].childList!==undefined&&item.childList[0].childList!=null&&item.childList[0].childList.length>0" style="padding:5px">
  25. <div v-for="(seconditem,index) in item.childList" :key="index" class="second-li">
  26. <div class="level-title">
  27. <span>{{seconditem.jobContent.split("-")[1]}}</span>
  28. <div @click="levelAddfigures(seconditem,index)" class="levelTwo-btn">
  29. <i class="el-icon-edit"></i>
  30. 编 辑
  31. </div>
  32. </div>
  33. <div class="li-steps-ul">
  34. <div class="zanwu" v-if="!seconditem.childList">暂无事件</div>
  35. <div v-for="(stepsitem,index) in seconditem.childList" :key="index" class="li-steps-li">
  36. <div :style="filter_color(stepsitem.stepStatus)">{{stepsitem.jobContent}}</div>
  37. <div>{{stepsitem.expectBeginDt.split(" ")[0]}}~{{stepsitem.expectEndDt.split(" ")[0]}}</div>
  38. <div>{{stepsitem.expectEndDt.split(" ")[0]}}</div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <el-dialog title="编 辑" :visible.sync="outerVisible">
  48. <el-dialog
  49. width="30%"
  50. :title="titleName"
  51. :visible.sync="innerVisible"
  52. append-to-body>
  53. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  54. <div class="flx-box">
  55. <el-form-item label="管控编号" label-width="80px" prop="scheduleId">
  56. <el-input :readonly="true" v-model="ruleForm.scheduleId"></el-input>
  57. </el-form-item>
  58. <el-form-item label="操作标识" label-width="80px" prop="step">
  59. <el-input :readonly="true" v-model="ruleForm.step"></el-input>
  60. </el-form-item>
  61. <el-form-item label="节点标识" label-width="80px" prop="parentStep">
  62. <el-input :readonly="true" v-model="ruleForm.parentStep"></el-input>
  63. </el-form-item>
  64. <el-form-item label="指派员工" prop="duty" label-width="80px">
  65. <el-select v-model="ruleForm.duty" placeholder="请选择员工">
  66. <el-option v-for="(item,index) in employeeColumn" :key="index" :label="item.sysUserName" :value="item.sysUserId"></el-option>
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item label="操作名称" label-width="80px" prop="JobContent">
  70. <el-input v-model="ruleForm.JobContent"></el-input>
  71. </el-form-item>
  72. <el-form-item label="操作人ID" label-width="80px" prop="CreateUserId">
  73. <el-input :readonly="true" v-model="ruleForm.CreateUserId"></el-input>
  74. </el-form-item>
  75. <el-form-item label="开始时间" label-width="80px" required>
  76. <el-form-item prop="ExpectBeginDt">
  77. <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.ExpectBeginDt" style="width: 100%;"></el-date-picker>
  78. </el-form-item>
  79. </el-form-item>
  80. <el-form-item label="结束时间" label-width="80px" required>
  81. <el-form-item prop="ExpectEndDt">
  82. <el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.ExpectEndDt" style="width: 100%;"></el-date-picker>
  83. </el-form-item>
  84. </el-form-item>
  85. </div>
  86. <el-form-item label="备注" label-width="80px" prop="Remark">
  87. <el-input type="textarea" v-model="ruleForm.Remark"></el-input>
  88. </el-form-item>
  89. <div>
  90. <el-button class="final-btn" type="primary" @click="submitForm('ruleForm')">{{titleName}}</el-button>
  91. <el-button @click="resetForm('ruleForm')">重置</el-button>
  92. </div>
  93. </el-form>
  94. </el-dialog>
  95. <div class="dialog-abb">
  96. <el-button type="primary" @click="addBtn()">添 加</el-button>
  97. </div>
  98. <el-table
  99. :data="educationalList"
  100. border
  101. style="width: 100%">
  102. <el-table-column
  103. prop="jobContent"
  104. label="步骤名称"
  105. width="180">
  106. </el-table-column>
  107. <el-table-column
  108. prop="expectBeginDt"
  109. :formatter="filteryear"
  110. label="开始时间"
  111. width="180">
  112. </el-table-column>
  113. <el-table-column
  114. prop="expectEndDt"
  115. :formatter="filteryears"
  116. width="180"
  117. label="结束时间">
  118. </el-table-column>
  119. <el-table-column
  120. prop="remark"
  121. label="备注">
  122. </el-table-column>
  123. <el-table-column label="操作" width="130">
  124. <template slot-scope="scope">
  125. <el-button
  126. size="mini"
  127. @click="handleEdit(scope.$index, scope.row)"><i class="el-icon-edit"></i></el-button>
  128. <el-button
  129. size="mini"
  130. type="danger"
  131. @click="handleDelete(scope.$index, scope.row,educationalList)"><i class="el-icon-delete"></i></el-button>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. <div slot="footer" class="dialog-footer">
  136. <el-button @click="outerVisible = false">取 消</el-button>
  137. <!-- <el-button type="primary">确 定</el-button> -->
  138. </div>
  139. </el-dialog>
  140. </div>
  141. </template>
  142. <script>
  143. import { el } from '@fullcalendar/core/internal-common'
  144. export default {
  145. data() {
  146. return {
  147. token:'',
  148. treeData: [{
  149. id: 1,
  150. label: "团组出行",
  151. },
  152. {
  153. id: 2,
  154. label: "确认出团",
  155. },
  156. {
  157. id: 3,
  158. label: "经费预算",
  159. panduan:"wu",
  160. children:[
  161. {
  162. id:15,
  163. label: "完成经费预算",
  164. date:"2023-01-12 ~ 2023-02-10",
  165. enddate:'2023-02-10'
  166. }
  167. ]
  168. },
  169. {
  170. id: 4,
  171. label: " 市场部人员报价对接/反馈",
  172. panduan:"wu",
  173. children:[
  174. {
  175. id:18,
  176. label: "完成报价对接/反馈",
  177. date:"2023-01-12 ~ 2023-02-10",
  178. enddate:'2023-02-10'
  179. },
  180. {
  181. id:19,
  182. label: "录入最终总经费预算",
  183. date:"2023-01-12 ~ 2023-02-10",
  184. enddate:'2023-02-10'
  185. },
  186. {
  187. id:20,
  188. label: "上传明细单",
  189. date:"2023-01-12 ~ 2023-02-10",
  190. enddate:'2023-02-10'
  191. }
  192. ]
  193. },
  194. {
  195. id: 5,
  196. label: "报批流程"
  197. },
  198. {
  199. id: 6,
  200. label: "护照/签证",
  201. panduan:"wu",
  202. children:[
  203. {
  204. id:22,
  205. label: "签证费用录入",
  206. date:"2023-01-12 ~ 2023-02-10",
  207. enddate:'2023-02-10',
  208. state:1
  209. },
  210. {
  211. id:23,
  212. label: "归还护照",
  213. date:"2023-01-12 ~ 2023-02-10",
  214. enddate:'2023-02-10',
  215. state:2
  216. },
  217. {
  218. id:24,
  219. label: "出签+取护照",
  220. date:"2023-01-12 ~ 2023-02-10",
  221. enddate:'2023-02-10',
  222. state:3
  223. },
  224. {
  225. id:25,
  226. label: "送签",
  227. date:"2023-01-12 ~ 2023-02-10",
  228. enddate:'2023-02-10',
  229. state:3
  230. },
  231. {
  232. id:26,
  233. label: "填资料",
  234. date:"2023-01-12 ~ 2023-02-10",
  235. enddate:'2023-02-10',
  236. state:1
  237. },
  238. {
  239. id:27,
  240. label: "取护照资料",
  241. date:"2023-01-12 ~ 2023-02-10",
  242. enddate:'2023-02-10',
  243. state:1
  244. },
  245. {
  246. id:28,
  247. label: "收集资料",
  248. date:"2023-01-12 ~ 2023-02-10",
  249. enddate:'2023-02-10',
  250. state:1
  251. }
  252. ]
  253. },
  254. {
  255. id: 7,
  256. label: "各版块操作",
  257. panduan:"you",
  258. children:[
  259. {
  260. id:29,
  261. label: "机票",
  262. children:[
  263. {
  264. id:42,
  265. label: "询价并导入黑屏代码",
  266. date:"2023-01-12 ~ 2023-02-10",
  267. enddate:'2023-02-10',
  268. state:1
  269. },
  270. {
  271. id:43,
  272. label: "机票已占位",
  273. date:"2023-01-12 ~ 2023-02-10",
  274. enddate:'2023-02-10',
  275. state:1
  276. },
  277. {
  278. id:44,
  279. label: "已出票",
  280. date:"2023-01-12 ~ 2023-02-10",
  281. enddate:'2023-02-10',
  282. state:2
  283. },
  284. {
  285. id:45,
  286. label: "机票费用录入",
  287. date:"2023-01-12 ~ 2023-02-10",
  288. enddate:'',
  289. state:3
  290. }
  291. ]
  292. },
  293. {
  294. id:30,
  295. label: "酒店",
  296. children:[
  297. {
  298. id:46,
  299. label: "酒店费用录入",
  300. date:"2023-01-12 ~ 2023-02-10",
  301. enddate:'2023-02-10'
  302. }
  303. ]
  304. },
  305. {
  306. id:31,
  307. label: "OP",
  308. children:[
  309. {
  310. id:47,
  311. label: "OP费用录入",
  312. date:"2023-01-12 ~ 2023-02-10",
  313. enddate:'2023-02-10'
  314. }
  315. ]
  316. },
  317. {
  318. id:32,
  319. label: "商邀",
  320. children:[
  321. {
  322. id:48,
  323. label: "报批/商邀费用录入",
  324. date:"2023-01-12 ~ 2023-02-10",
  325. enddate:'2023-02-10'
  326. }
  327. ]
  328. },
  329. {
  330. id:33,
  331. label: "其他",
  332. children:[
  333. {
  334. id:49,
  335. label: "增减款项录入",
  336. date:"2023-01-12 ~ 2023-02-10",
  337. enddate:'2023-02-10'
  338. }
  339. ]
  340. }
  341. ]
  342. },
  343. {
  344. id: 8,
  345. label: "费用审批",
  346. panduan:"wu",
  347. children:[
  348. {
  349. id:34,
  350. label: "机票费用审批",
  351. date:"2023-01-12 ~ 2023-02-10",
  352. enddate:'2023-02-10',
  353. state:1
  354. },
  355. {
  356. id:35,
  357. label: "酒店费用审批",
  358. date:"2023-01-12 ~ 2023-02-10",
  359. enddate:'2023-02-10',
  360. state:1
  361. },
  362. {
  363. id:36,
  364. label: "OP费用审批",
  365. date:"2023-01-12 ~ 2023-02-10",
  366. enddate:'2023-02-10',
  367. state:1
  368. },
  369. {
  370. id:37,
  371. label: "商邀费用审批",
  372. date:"2023-01-12 ~ 2023-02-10",
  373. enddate:'2023-02-10',
  374. state:1
  375. },
  376. {
  377. id:38,
  378. label: "增减款项审批",
  379. date:"2023-01-12 ~ 2023-02-10",
  380. enddate:'2023-02-10',
  381. state:1
  382. }
  383. ]
  384. },
  385. {
  386. id: 9,
  387. label: "付款给供应商",
  388. panduan:"wu",
  389. children:[
  390. {
  391. id:39,
  392. label: "OP费用付款",
  393. date:"2023-01-12 ~ 2023-02-10",
  394. enddate:'2023-02-10',
  395. state:1
  396. },
  397. {
  398. id:40,
  399. label: "商邀费用付款",
  400. date:"2023-01-12 ~ 2023-02-10",
  401. enddate:'2023-02-10',
  402. state:1
  403. },
  404. {
  405. id:41,
  406. label: "增减款项付款",
  407. date:"2023-01-12 ~ 2023-02-10",
  408. enddate:'2023-02-10',
  409. state:1
  410. }
  411. ]
  412. },
  413. {
  414. id: 10,
  415. label: "开行前会"
  416. },
  417. {
  418. id: 11,
  419. label: "送机"
  420. },
  421. {
  422. id: 12,
  423. label: "数据/附件归档"
  424. },
  425. {
  426. id: 13,
  427. label: "接机"
  428. },
  429. {
  430. id: 14,
  431. label: "客户意见表"
  432. }
  433. ],
  434. educationalList:[
  435. ],
  436. outerVisible: false,
  437. innerVisible: false,
  438. //添加表单数据
  439. ruleForm: {
  440. scheduleId: '',
  441. step: '',
  442. parentStep: '',
  443. duty: '',
  444. JobContent: '',
  445. CreateUserId: '',
  446. ExpectBeginDt: '',
  447. ExpectEndDt: '',
  448. SLevel:'',
  449. Remark: ''
  450. },
  451. //表单数据非空验明
  452. rules: {
  453. duty: [
  454. { required: true, message: '请选择员工', trigger: 'change' }
  455. ],
  456. ExpectBeginDt: [
  457. { required: true, message: '请选择开始日期', trigger: 'change' }
  458. ],
  459. ExpectEndDt: [
  460. { required: true, message: '请选择结束日期', trigger: 'change' }
  461. ],
  462. JobContent: [
  463. { required: true, message: '请输入操作名称', trigger: 'blur' },
  464. ]
  465. },
  466. //员工列
  467. employeeColumn:[],
  468. //添加参数
  469. addArgument:{},
  470. //标题名称
  471. titleName:'',
  472. stepID:'',
  473. OPid:"",
  474. fullscreenLoading:false
  475. }
  476. },
  477. created(){
  478. },
  479. methods:{
  480. filter_color(val){
  481. if(val==0){
  482. return "color:red"
  483. }
  484. if(val==1){
  485. return "color:#159bfb"
  486. }
  487. if(val==2){
  488. return "color:#green"
  489. }
  490. },
  491. getControl(){
  492. var url="/api/Groups/PostSearchGrpSchedule";
  493. var that=this;
  494. that.fullscreenLoading = true;
  495. var datas={
  496. paras:{
  497. PortType:1,
  498. SearchType:1,
  499. DiId:that.OPid
  500. }
  501. }
  502. // "paras": "{\"PortType\":\"1\",\"SearchType\":\"1\",\"DiId\":\"{this.OPid}\"}"
  503. var data = JSON.stringify( {"paras": "{\"PortType\":\"1\",\"SearchType\":\"1\",\"ScheduleId\":\""+that.OPid+"\"}"});
  504. console.log()
  505. this.$axios({
  506. method: 'post',
  507. url:url,
  508. headers:{
  509. Authorization:'Bearer '+that.token,
  510. 'Content-Type':'application/json;charset=UTF-8'
  511. },
  512. data:data
  513. }).then(function(res){
  514. console.log(res)
  515. if(res.data.code==200){
  516. that.treeData=res.data.data.rootList
  517. console.log(that.treeData)
  518. console.log(res.data.data)
  519. that.ruleForm.scheduleId=res.data.data.primary.id;
  520. that.employeeColumn=res.data.data.personList;
  521. that.employeeColumn=res.data.data.personList;
  522. // that.$message({
  523. // message: res.data.msg,
  524. // type: 'success',
  525. // offset:50
  526. // });
  527. that.fullscreenLoading = false;
  528. }else{
  529. // that.$message({
  530. // message:res.data.msg,
  531. // type: 'warning',
  532. // offset:50
  533. // });
  534. that.fullscreenLoading = false;
  535. }
  536. })
  537. },
  538. handleClose(done) {
  539. this.$confirm('确认关闭?')
  540. .then(_ => {
  541. done();
  542. })
  543. .catch(_ => {});
  544. },
  545. addBtn(){
  546. this.titleName="添 加"
  547. this.innerVisible = true;
  548. this.ruleForm.parentStep=this.addArgument.parentStep;
  549. this.ruleForm.step=this.addArgument.step;
  550. this.ruleForm.SLevel=this.addArgument.SLevel;
  551. this.ruleForm.duty="";
  552. this.ruleForm.JobContent="";
  553. this.ruleForm.ExpectBeginDt="";
  554. this.ruleForm.ExpectEndDt="";
  555. this.ruleForm.Remark="";
  556. },
  557. addfigures(val){
  558. console.log(val.childList);
  559. this.outerVisible = true;
  560. this.addArgument.parentStep=val.root,
  561. this.addArgument.SLevel=val.childList[0].level,
  562. this.addArgument.step=val.root+"01",
  563. this.educationalList=val.childList;
  564. },
  565. levelAddfigures(val,index){
  566. console.log(val.childList);
  567. console.log(index);
  568. this.outerVisible = true;
  569. this.educationalList=val.childList;
  570. this.addArgument.parentStep=60+((index+1)+"");
  571. this.addArgument.SLevel=val.childList[0].level,
  572. this.addArgument.step=val.step+"1";
  573. console.log(this.addArgument)
  574. },
  575. //处理时间
  576. disposeTime(val){
  577. var date = new Date(val);
  578. var y = date.getFullYear();
  579. var m = date.getMonth() + 1;
  580. m = m < 10 ? ('0' + m) : m;
  581. var d = date.getDate();
  582. d = d < 10 ? ('0' + d) : d;
  583. let time = y + '-' + m + '-' + d;
  584. return time
  585. },
  586. //修改详情
  587. reviseInfo(){
  588. var url="/api/Groups/PostUpdateGrpScheduleDetail";
  589. var that=this;
  590. that.fullscreenLoading = true;
  591. this.$axios({
  592. method: 'post',
  593. url:url,
  594. headers:{
  595. Authorization:'Bearer '+that.token,
  596. 'Content-Type':'application/json;charset=UTF-8'
  597. },
  598. data:{
  599. id:Number(that.stepID),
  600. duty:Number(that.ruleForm.duty),
  601. stepStatus:0,
  602. jobContent:that.ruleForm.JobContent,
  603. expectBeginDt:that.disposeTime(that.ruleForm.ExpectBeginDt) +' '+ "09:00:00",
  604. expectEndDt:that.disposeTime(that.ruleForm.ExpectEndDt) +' '+ "18:00:00",
  605. remark:that.ruleForm.Remark,
  606. }
  607. }).then(function(res){
  608. console.log(res)
  609. if(res.data.code==200){
  610. that.$message({
  611. message: res.data.msg,
  612. type: 'success',
  613. offset:50
  614. });
  615. that.getControl()
  616. that.innerVisible = false;
  617. that.outerVisible = false;
  618. that.fullscreenLoading = false;
  619. }else{
  620. that.$message({
  621. message:res.data.msg,
  622. type: 'warning',
  623. offset:50
  624. });
  625. that.fullscreenLoading = false;
  626. }
  627. })
  628. },
  629. //新增详情
  630. addopinfo(){
  631. var url="/api/Groups/PostInsertGrpScheduleDetail";
  632. var that=this;
  633. that.fullscreenLoading = true;
  634. this.$axios({
  635. method: 'post',
  636. url:url,
  637. headers:{
  638. Authorization:'Bearer '+that.token,
  639. 'Content-Type':'application/json;charset=UTF-8'
  640. },
  641. data:{
  642. scheduleId:that.ruleForm.scheduleId,
  643. step:Number(that.ruleForm.step),
  644. parentStep:that.ruleForm.parentStep,
  645. duty:that.ruleForm.duty,
  646. jobContent:that.ruleForm.JobContent,
  647. expectBeginDt:that.disposeTime(that.ruleForm.ExpectBeginDt) +' '+ "09:00:00",
  648. expectEndDt:that.disposeTime(that.ruleForm.ExpectEndDt) +' '+ "18:00:00",
  649. createUserId:that.ruleForm.CreateUserId,
  650. remark:that.ruleForm.Remark,
  651. SLevel:that.ruleForm.SLevel
  652. }
  653. }).then(function(res){
  654. console.log(res)
  655. if(res.data.code==200){
  656. that.$message({
  657. message: res.data.msg,
  658. type: 'success',
  659. offset:50
  660. });
  661. that.getControl()
  662. that.educationalList.push(res.data.data);
  663. that.innerVisible = false;
  664. that.fullscreenLoading = false;
  665. }else{
  666. that.$message({
  667. message:res.data.msg,
  668. type: 'warning',
  669. offset:50
  670. });
  671. that.fullscreenLoading = false;
  672. }
  673. })
  674. },
  675. submitForm(formName) {
  676. this.$refs[formName].validate((valid) => {
  677. if (valid) {
  678. if(this.titleName=="添 加"){
  679. this.addopinfo();
  680. }else if(this.titleName=="修 改"){
  681. this.reviseInfo();
  682. }
  683. } else {
  684. console.log('error submit!!');
  685. return false;
  686. }
  687. });
  688. },
  689. resetForm(formName) {
  690. this.$refs[formName].resetFields();
  691. },
  692. filteryear(val){
  693. let gstime=val.expectBeginDt.split(' ')[0]
  694. return gstime;
  695. },
  696. filteryears(val){
  697. let gstime=val.expectEndDt.split(' ')[0]
  698. return gstime;
  699. },
  700. //编辑
  701. handleEdit(index, row) {
  702. console.log(index, row);
  703. this.stepID=row.detailId;
  704. this.titleName="修 改";
  705. this.innerVisible = true;
  706. this.ruleForm.parentStep=row.root;
  707. this.ruleForm.step=row.step;
  708. this.ruleForm.JobContent=row.jobContent;
  709. this.ruleForm.duty=row.duty;
  710. this.ruleForm.ExpectEndDt=row.expectEndDt.split(' ')[0];
  711. this.ruleForm.ExpectBeginDt=row.expectBeginDt.split(' ')[0];
  712. this.ruleForm.Remark=row.remark;
  713. },
  714. //删除
  715. handleDelete(index, row,rows) {
  716. console.log(index, row.step);
  717. var url="/api/Groups/PostDeleteGrpScheduleDetail";
  718. var that=this;
  719. that.fullscreenLoading = true;
  720. this.$axios({
  721. method: 'post',
  722. url:url,
  723. headers:{
  724. Authorization:'Bearer '+that.token,
  725. 'Content-Type':'application/json;charset=UTF-8'
  726. },
  727. data:{
  728. id:row.detailId,
  729. duty:that.ruleForm.CreateUserId,
  730. StepStatus:-1,
  731. JobContent:'',
  732. ExpectBeginDt:'',
  733. ExpectEndDt:'',
  734. Remark:''
  735. }
  736. }).then(function(res){
  737. console.log(res)
  738. if(res.data.code==200){
  739. that.$message({
  740. message: res.data.msg,
  741. type: 'success',
  742. offset:50
  743. });
  744. rows.splice(index, 1);
  745. that.getControl()
  746. that.fullscreenLoading = false;
  747. }else{
  748. that.$message({
  749. message:res.data.msg,
  750. type: 'warning',
  751. offset:50
  752. });
  753. that.fullscreenLoading = false;
  754. }
  755. })
  756. }
  757. },
  758. filters:{
  759. },
  760. mounted(){
  761. this.token=JSON.parse(localStorage.getItem('userinif')).token;
  762. this.OPid=JSON.parse(localStorage.getItem('OPid'));
  763. this.ruleForm.CreateUserId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  764. this.getControl()
  765. }
  766. }
  767. </script>
  768. <style>
  769. ul li{
  770. list-style: none;
  771. }
  772. .controltree-box{
  773. background-color: #fff;
  774. box-shadow: 0 0 5px #0005;
  775. border-radius: 10px;
  776. display: flex;
  777. justify-content: center;
  778. padding: 100px 0;
  779. }
  780. .controltree-ul{
  781. display: flex;
  782. flex-direction: column;
  783. }
  784. .controltree-w{
  785. display: inline-block;
  786. margin: 0 auto;
  787. }
  788. .controltree-li{
  789. display: inline-block;
  790. padding: 10px 20px;
  791. box-shadow: 0 0 5px #0005;
  792. border-radius: 5px;
  793. text-align: center;
  794. position: relative;
  795. }
  796. .controltree-li:not(:last-child){
  797. margin-bottom: 250px;
  798. }
  799. .controltree-li:not(:last-child)::after{
  800. content: "";
  801. display: inline-block;
  802. width: 1px;
  803. height: 245px;
  804. position: absolute;
  805. left: 50%;
  806. top: 44px;
  807. background-color: #F1B72C;
  808. }
  809. .controltree-li:nth-child(2n) .second-ul::before{
  810. content: "";
  811. display: inline-block;
  812. width: 115px;
  813. height: 1px;
  814. position: absolute;
  815. left: -115px;
  816. top: 20px;
  817. background-color: #F1B72C;
  818. }
  819. .controltree-li:nth-child(2n+1) .second-ul::before{
  820. content: "";
  821. display: inline-block;
  822. width: 115px;
  823. height: 1px;
  824. position: absolute;
  825. right: -115px;
  826. top: 20px;
  827. background-color: #1E5DA5;
  828. }
  829. .second-ul{
  830. width: 480px;
  831. position: absolute;
  832. top: 0px;
  833. box-shadow: 0 0 5px #0005;
  834. border-radius: 5px;
  835. }
  836. .second-li{
  837. text-align: left;
  838. position: relative;
  839. margin-bottom: 10px;
  840. }
  841. .controltree-li:nth-child(2n+1) .second-ul{
  842. flex-direction: row-reverse;
  843. color: #1E5DA5;
  844. }
  845. .controltree-li:nth-child(2n+1) .second-ul .second-ul-haed{
  846. background-color: #1E5DA5;
  847. }
  848. .controltree-li:nth-child(2n) .second-ul .second-ul-haed{
  849. background-color: #F1B72C;
  850. }
  851. .second-ul-haed{
  852. display: flex;
  853. justify-content: space-between;
  854. color: #fff;
  855. border-radius: 5px 5px 0px 0px;
  856. }
  857. .second-ul-haed>div{
  858. padding: 10px 0;
  859. }
  860. .second-ul-haed>div:nth-child(1){
  861. width: 30%;
  862. }
  863. .second-ul-haed>div:nth-child(2){
  864. border-left: 1px solid #fff;
  865. border-right:1px solid #fff ;
  866. width: 50%;
  867. }
  868. .second-ul-haed>div:nth-child(3){
  869. width: 20%;
  870. }
  871. /*.controltree-li:nth-child(2n+1) .second-ul .second-li::after{
  872. content: "";
  873. display: inline-block;
  874. width: 24px;
  875. height: 2px;
  876. position: absolute;
  877. left: 21px;
  878. top: 10px;
  879. background-color: #1E5DA5;
  880. }*/
  881. .controltree-li:nth-child(2n) .second-ul{
  882. left: 300px;
  883. color: #F1B72C;
  884. }
  885. .controltree-li:nth-child(2n+1) .second-ul{
  886. right: 300px;
  887. color: #1E5DA5;
  888. }
  889. .controltree-li:nth-child(2n){
  890. background-color: #F1B72C;
  891. color: #fff;
  892. }
  893. .controltree-li:nth-child(2n+1){
  894. background-color: #1E5DA5;
  895. color: #fff;
  896. }
  897. /*.controltree-li:nth-child(2n) .second-ul .second-li::after{
  898. content: "";
  899. display: inline-block;
  900. width: 24px;
  901. height: 2px;
  902. position: absolute;
  903. right: 21px;
  904. top: 10px;
  905. background-color: #F1B72C;
  906. }*/
  907. .second-li span{
  908. display: inline-block;
  909. width: 30%;
  910. color: #555;
  911. font-size: 17px;
  912. font-weight: 600;
  913. margin-bottom: 5px;
  914. }
  915. .li-steps-li{
  916. display: flex;
  917. align-items: center;
  918. color: #8f8383;
  919. }
  920. .li-steps-li>div{
  921. font-size: 13px;
  922. padding: 5px 0;
  923. text-align: center;
  924. height: 100%;
  925. padding: 11px 0;
  926. }
  927. .li-steps-li{
  928. border: 1px solid #f7f7f7;
  929. }
  930. .li-steps-li:not(:first-child){
  931. border-top: none;
  932. }
  933. .li-steps-li>div:not(:first-child){
  934. border-left:1px solid #f7f7f7 ;
  935. }
  936. .li-steps-li>div:nth-child(1){
  937. width: 30%;
  938. }
  939. .li-steps-li>div:nth-child(2){
  940. width: 50%;
  941. }
  942. .li-steps-li>div:nth-child(3){
  943. width: 20%;
  944. }
  945. .zanwu{
  946. font-size: 12px;
  947. color: #8f8383;
  948. width: 30%;
  949. text-align: center;
  950. padding: 5px;
  951. }
  952. .onefloors{
  953. position: relative;
  954. }
  955. .addonebtn{
  956. font-size: 14px;
  957. color: #606266;
  958. position: absolute;
  959. padding: 5px 10px;
  960. box-shadow: 0 0 5px #0005;
  961. border-radius:5px ;
  962. cursor: pointer;
  963. }
  964. .level-title{
  965. display: flex;
  966. justify-content: space-between;
  967. }
  968. .levelTwo-btn{
  969. font-size: 14px;
  970. color: #606266;
  971. padding: 5px 10px;
  972. box-shadow: 0 0 5px #0005;
  973. border-radius:5px ;
  974. cursor: pointer;
  975. }
  976. .controltree-box .el-dialog{
  977. border-radius:5px;
  978. }
  979. .controltree-box .el-dialog__body{
  980. padding-top: 10px;
  981. }
  982. .dialog-abb{
  983. text-align: right;
  984. padding-bottom: 5px;
  985. }
  986. .controltree-li:nth-child(2n+1) .addonebtn{
  987. top: -76px;
  988. right: 0px;
  989. }
  990. .controltree-li:nth-child(2n) .addonebtn{
  991. top: -76px;
  992. left: 0px;
  993. }
  994. .flx-box{
  995. display: flex;
  996. flex-wrap: wrap;
  997. justify-content: space-between;
  998. }
  999. .flx-box>.el-form-item{
  1000. width: 48%;
  1001. }
  1002. .el-dialog{
  1003. border-radius: 5px; ;
  1004. }
  1005. .onefloor{
  1006. max-height: 460px;
  1007. overflow-y: auto;
  1008. }
  1009. .onefloor::-webkit-scrollbar {
  1010. /*滚动条整体样式*/
  1011. width: 4px;
  1012. /*高宽分别对应横竖滚动条的尺寸*/
  1013. height: 4px;
  1014. border-radius: 2px;
  1015. }
  1016. .onefloor::-webkit-scrollbar-thumb {
  1017. /*滚动条里面小方块*/
  1018. width: 4px;
  1019. height: 80px;
  1020. border-radius: 2px;
  1021. background: rgba(48, 47, 47, 0.2);
  1022. }
  1023. .onefloor::-webkit-scrollbar-track {
  1024. /*滚动条里面轨道*/
  1025. background: rgba(255, 255, 255, 0.05);
  1026. border-radius: 2px;
  1027. }
  1028. </style>