Controltree.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  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 data = JSON.stringify({
  496. "paras": "{\"PortType\":\"1\",\"SearchType\":\"1\",\"ScheduleId\":\"24\"}"
  497. });
  498. this.$axios({
  499. method: 'post',
  500. url:url,
  501. headers:{
  502. Authorization:'Bearer '+that.token,
  503. 'Content-Type':'application/json;charset=UTF-8'
  504. },
  505. data:data
  506. }).then(function(res){
  507. console.log(res)
  508. if(res.data.code==200){
  509. that.treeData=res.data.data.rootList
  510. console.log(that.treeData)
  511. console.log(res.data.data)
  512. that.ruleForm.scheduleId=res.data.data.primary.id;
  513. that.employeeColumn=res.data.data.personList;
  514. that.employeeColumn=res.data.data.personList;
  515. // that.$message({
  516. // message: res.data.msg,
  517. // type: 'success',
  518. // offset:50
  519. // });
  520. that.fullscreenLoading = false;
  521. }else{
  522. // that.$message({
  523. // message:res.data.msg,
  524. // type: 'warning',
  525. // offset:50
  526. // });
  527. that.fullscreenLoading = false;
  528. }
  529. })
  530. },
  531. handleClose(done) {
  532. this.$confirm('确认关闭?')
  533. .then(_ => {
  534. done();
  535. })
  536. .catch(_ => {});
  537. },
  538. addBtn(){
  539. this.titleName="添 加"
  540. this.innerVisible = true;
  541. this.ruleForm.parentStep=this.addArgument.parentStep;
  542. this.ruleForm.step=this.addArgument.step;
  543. this.ruleForm.SLevel=this.addArgument.SLevel;
  544. this.ruleForm.duty="";
  545. this.ruleForm.JobContent="";
  546. this.ruleForm.ExpectBeginDt="";
  547. this.ruleForm.ExpectEndDt="";
  548. this.ruleForm.Remark="";
  549. },
  550. addfigures(val){
  551. console.log(val.childList);
  552. this.outerVisible = true;
  553. this.addArgument.parentStep=val.root,
  554. this.addArgument.SLevel=val.childList[0].level,
  555. this.addArgument.step=val.root+"01",
  556. this.educationalList=val.childList;
  557. },
  558. levelAddfigures(val,index){
  559. console.log(val.childList);
  560. console.log(index);
  561. this.outerVisible = true;
  562. this.educationalList=val.childList;
  563. this.addArgument.parentStep=60+((index+1)+"");
  564. this.addArgument.SLevel=val.childList[0].level,
  565. this.addArgument.step=val.step+"1";
  566. console.log(this.addArgument)
  567. },
  568. //处理时间
  569. disposeTime(val){
  570. var date = new Date(val);
  571. var y = date.getFullYear();
  572. var m = date.getMonth() + 1;
  573. m = m < 10 ? ('0' + m) : m;
  574. var d = date.getDate();
  575. d = d < 10 ? ('0' + d) : d;
  576. let time = y + '-' + m + '-' + d;
  577. return time
  578. },
  579. //修改详情
  580. reviseInfo(){
  581. var url="/api/Groups/PostUpdateGrpScheduleDetail";
  582. var that=this;
  583. that.fullscreenLoading = true;
  584. this.$axios({
  585. method: 'post',
  586. url:url,
  587. headers:{
  588. Authorization:'Bearer '+that.token,
  589. 'Content-Type':'application/json;charset=UTF-8'
  590. },
  591. data:{
  592. id:Number(that.stepID),
  593. duty:Number(that.ruleForm.duty),
  594. stepStatus:0,
  595. jobContent:that.ruleForm.JobContent,
  596. expectBeginDt:that.disposeTime(that.ruleForm.ExpectBeginDt) +' '+ "09:00:00",
  597. expectEndDt:that.disposeTime(that.ruleForm.ExpectEndDt) +' '+ "18:00:00",
  598. remark:that.ruleForm.Remark,
  599. }
  600. }).then(function(res){
  601. console.log(res)
  602. if(res.data.code==200){
  603. that.$message({
  604. message: res.data.msg,
  605. type: 'success',
  606. offset:50
  607. });
  608. that.getControl()
  609. that.innerVisible = false;
  610. that.outerVisible = false;
  611. that.fullscreenLoading = false;
  612. }else{
  613. that.$message({
  614. message:res.data.msg,
  615. type: 'warning',
  616. offset:50
  617. });
  618. that.fullscreenLoading = false;
  619. }
  620. })
  621. },
  622. //新增详情
  623. addopinfo(){
  624. var url="/api/Groups/PostInsertGrpScheduleDetail";
  625. var that=this;
  626. that.fullscreenLoading = true;
  627. this.$axios({
  628. method: 'post',
  629. url:url,
  630. headers:{
  631. Authorization:'Bearer '+that.token,
  632. 'Content-Type':'application/json;charset=UTF-8'
  633. },
  634. data:{
  635. scheduleId:that.ruleForm.scheduleId,
  636. step:Number(that.ruleForm.step),
  637. parentStep:that.ruleForm.parentStep,
  638. duty:that.ruleForm.duty,
  639. jobContent:that.ruleForm.JobContent,
  640. expectBeginDt:that.disposeTime(that.ruleForm.ExpectBeginDt) +' '+ "09:00:00",
  641. expectEndDt:that.disposeTime(that.ruleForm.ExpectEndDt) +' '+ "18:00:00",
  642. createUserId:that.ruleForm.CreateUserId,
  643. remark:that.ruleForm.Remark,
  644. SLevel:that.ruleForm.SLevel
  645. }
  646. }).then(function(res){
  647. console.log(res)
  648. if(res.data.code==200){
  649. that.$message({
  650. message: res.data.msg,
  651. type: 'success',
  652. offset:50
  653. });
  654. that.getControl()
  655. that.educationalList.push(res.data.data);
  656. that.innerVisible = false;
  657. that.fullscreenLoading = false;
  658. }else{
  659. that.$message({
  660. message:res.data.msg,
  661. type: 'warning',
  662. offset:50
  663. });
  664. that.fullscreenLoading = false;
  665. }
  666. })
  667. },
  668. submitForm(formName) {
  669. this.$refs[formName].validate((valid) => {
  670. if (valid) {
  671. if(this.titleName=="添 加"){
  672. this.addopinfo();
  673. }else if(this.titleName=="修 改"){
  674. this.reviseInfo();
  675. }
  676. } else {
  677. console.log('error submit!!');
  678. return false;
  679. }
  680. });
  681. },
  682. resetForm(formName) {
  683. this.$refs[formName].resetFields();
  684. },
  685. filteryear(val){
  686. let gstime=val.expectBeginDt.split(' ')[0]
  687. return gstime;
  688. },
  689. filteryears(val){
  690. let gstime=val.expectEndDt.split(' ')[0]
  691. return gstime;
  692. },
  693. //编辑
  694. handleEdit(index, row) {
  695. console.log(index, row);
  696. this.stepID=row.detailId;
  697. this.titleName="修 改";
  698. this.innerVisible = true;
  699. this.ruleForm.parentStep=row.root;
  700. this.ruleForm.step=row.step;
  701. this.ruleForm.JobContent=row.jobContent;
  702. this.ruleForm.duty=row.duty;
  703. this.ruleForm.ExpectEndDt=row.expectEndDt.split(' ')[0];
  704. this.ruleForm.ExpectBeginDt=row.expectBeginDt.split(' ')[0];
  705. this.ruleForm.Remark=row.remark;
  706. },
  707. //删除
  708. handleDelete(index, row,rows) {
  709. console.log(index, row.step);
  710. var url="/api/Groups/PostDeleteGrpScheduleDetail";
  711. var that=this;
  712. that.fullscreenLoading = true;
  713. this.$axios({
  714. method: 'post',
  715. url:url,
  716. headers:{
  717. Authorization:'Bearer '+that.token,
  718. 'Content-Type':'application/json;charset=UTF-8'
  719. },
  720. data:{
  721. id:row.detailId,
  722. duty:that.ruleForm.CreateUserId,
  723. StepStatus:-1,
  724. JobContent:'',
  725. ExpectBeginDt:'',
  726. ExpectEndDt:'',
  727. Remark:''
  728. }
  729. }).then(function(res){
  730. console.log(res)
  731. if(res.data.code==200){
  732. that.$message({
  733. message: res.data.msg,
  734. type: 'success',
  735. offset:50
  736. });
  737. rows.splice(index, 1);
  738. that.getControl()
  739. that.fullscreenLoading = false;
  740. }else{
  741. that.$message({
  742. message:res.data.msg,
  743. type: 'warning',
  744. offset:50
  745. });
  746. that.fullscreenLoading = false;
  747. }
  748. })
  749. }
  750. },
  751. filters:{
  752. },
  753. mounted(){
  754. this.token=JSON.parse(localStorage.getItem('userinif')).token;
  755. this.OPid=JSON.parse(localStorage.getItem('OPid'));
  756. this.ruleForm.CreateUserId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  757. this.getControl()
  758. }
  759. }
  760. </script>
  761. <style>
  762. ul li{
  763. list-style: none;
  764. }
  765. .controltree-box{
  766. background-color: #fff;
  767. box-shadow: 0 0 5px #0005;
  768. border-radius: 10px;
  769. display: flex;
  770. justify-content: center;
  771. padding: 100px 0;
  772. }
  773. .controltree-ul{
  774. display: flex;
  775. flex-direction: column;
  776. }
  777. .controltree-w{
  778. display: inline-block;
  779. margin: 0 auto;
  780. }
  781. .controltree-li{
  782. display: inline-block;
  783. padding: 10px 20px;
  784. box-shadow: 0 0 5px #0005;
  785. border-radius: 5px;
  786. text-align: center;
  787. position: relative;
  788. }
  789. .controltree-li:not(:last-child){
  790. margin-bottom: 250px;
  791. }
  792. .controltree-li:not(:last-child)::after{
  793. content: "";
  794. display: inline-block;
  795. width: 1px;
  796. height: 245px;
  797. position: absolute;
  798. left: 50%;
  799. top: 44px;
  800. background-color: #F1B72C;
  801. }
  802. .controltree-li:nth-child(2n) .second-ul::before{
  803. content: "";
  804. display: inline-block;
  805. width: 115px;
  806. height: 1px;
  807. position: absolute;
  808. left: -115px;
  809. top: 20px;
  810. background-color: #F1B72C;
  811. }
  812. .controltree-li:nth-child(2n+1) .second-ul::before{
  813. content: "";
  814. display: inline-block;
  815. width: 115px;
  816. height: 1px;
  817. position: absolute;
  818. right: -115px;
  819. top: 20px;
  820. background-color: #1E5DA5;
  821. }
  822. .second-ul{
  823. width: 480px;
  824. position: absolute;
  825. top: 0px;
  826. box-shadow: 0 0 5px #0005;
  827. border-radius: 5px;
  828. }
  829. .second-li{
  830. text-align: left;
  831. position: relative;
  832. margin-bottom: 10px;
  833. }
  834. .controltree-li:nth-child(2n+1) .second-ul{
  835. flex-direction: row-reverse;
  836. color: #1E5DA5;
  837. }
  838. .controltree-li:nth-child(2n+1) .second-ul .second-ul-haed{
  839. background-color: #1E5DA5;
  840. }
  841. .controltree-li:nth-child(2n) .second-ul .second-ul-haed{
  842. background-color: #F1B72C;
  843. }
  844. .second-ul-haed{
  845. display: flex;
  846. justify-content: space-between;
  847. color: #fff;
  848. border-radius: 5px 5px 0px 0px;
  849. }
  850. .second-ul-haed>div{
  851. padding: 10px 0;
  852. }
  853. .second-ul-haed>div:nth-child(1){
  854. width: 30%;
  855. }
  856. .second-ul-haed>div:nth-child(2){
  857. border-left: 1px solid #fff;
  858. border-right:1px solid #fff ;
  859. width: 50%;
  860. }
  861. .second-ul-haed>div:nth-child(3){
  862. width: 20%;
  863. }
  864. /*.controltree-li:nth-child(2n+1) .second-ul .second-li::after{
  865. content: "";
  866. display: inline-block;
  867. width: 24px;
  868. height: 2px;
  869. position: absolute;
  870. left: 21px;
  871. top: 10px;
  872. background-color: #1E5DA5;
  873. }*/
  874. .controltree-li:nth-child(2n) .second-ul{
  875. left: 300px;
  876. color: #F1B72C;
  877. }
  878. .controltree-li:nth-child(2n+1) .second-ul{
  879. right: 300px;
  880. color: #1E5DA5;
  881. }
  882. .controltree-li:nth-child(2n){
  883. background-color: #F1B72C;
  884. color: #fff;
  885. }
  886. .controltree-li:nth-child(2n+1){
  887. background-color: #1E5DA5;
  888. color: #fff;
  889. }
  890. /*.controltree-li:nth-child(2n) .second-ul .second-li::after{
  891. content: "";
  892. display: inline-block;
  893. width: 24px;
  894. height: 2px;
  895. position: absolute;
  896. right: 21px;
  897. top: 10px;
  898. background-color: #F1B72C;
  899. }*/
  900. .second-li span{
  901. display: inline-block;
  902. width: 30%;
  903. color: #555;
  904. font-size: 17px;
  905. font-weight: 600;
  906. margin-bottom: 5px;
  907. }
  908. .li-steps-li{
  909. display: flex;
  910. align-items: center;
  911. color: #8f8383;
  912. }
  913. .li-steps-li>div{
  914. font-size: 13px;
  915. padding: 5px 0;
  916. text-align: center;
  917. height: 100%;
  918. padding: 11px 0;
  919. }
  920. .li-steps-li{
  921. border: 1px solid #f7f7f7;
  922. }
  923. .li-steps-li:not(:first-child){
  924. border-top: none;
  925. }
  926. .li-steps-li>div:not(:first-child){
  927. border-left:1px solid #f7f7f7 ;
  928. }
  929. .li-steps-li>div:nth-child(1){
  930. width: 30%;
  931. }
  932. .li-steps-li>div:nth-child(2){
  933. width: 50%;
  934. }
  935. .li-steps-li>div:nth-child(3){
  936. width: 20%;
  937. }
  938. .zanwu{
  939. font-size: 12px;
  940. color: #8f8383;
  941. width: 30%;
  942. text-align: center;
  943. padding: 5px;
  944. }
  945. .onefloors{
  946. position: relative;
  947. }
  948. .addonebtn{
  949. font-size: 14px;
  950. color: #606266;
  951. position: absolute;
  952. padding: 5px 10px;
  953. box-shadow: 0 0 5px #0005;
  954. border-radius:5px ;
  955. cursor: pointer;
  956. }
  957. .level-title{
  958. display: flex;
  959. justify-content: space-between;
  960. }
  961. .levelTwo-btn{
  962. font-size: 14px;
  963. color: #606266;
  964. padding: 5px 10px;
  965. box-shadow: 0 0 5px #0005;
  966. border-radius:5px ;
  967. cursor: pointer;
  968. }
  969. .controltree-box .el-dialog{
  970. border-radius:5px;
  971. }
  972. .controltree-box .el-dialog__body{
  973. padding-top: 10px;
  974. }
  975. .dialog-abb{
  976. text-align: right;
  977. padding-bottom: 5px;
  978. }
  979. .controltree-li:nth-child(2n+1) .addonebtn{
  980. top: -76px;
  981. right: 0px;
  982. }
  983. .controltree-li:nth-child(2n) .addonebtn{
  984. top: -76px;
  985. left: 0px;
  986. }
  987. .flx-box{
  988. display: flex;
  989. flex-wrap: wrap;
  990. justify-content: space-between;
  991. }
  992. .flx-box>.el-form-item{
  993. width: 48%;
  994. }
  995. .el-dialog{
  996. border-radius: 5px; ;
  997. }
  998. .onefloor{
  999. max-height: 460px;
  1000. overflow-y: auto;
  1001. }
  1002. .onefloor::-webkit-scrollbar {
  1003. /*滚动条整体样式*/
  1004. width: 4px;
  1005. /*高宽分别对应横竖滚动条的尺寸*/
  1006. height: 4px;
  1007. border-radius: 2px;
  1008. }
  1009. .onefloor::-webkit-scrollbar-thumb {
  1010. /*滚动条里面小方块*/
  1011. width: 4px;
  1012. height: 80px;
  1013. border-radius: 2px;
  1014. background: rgba(48, 47, 47, 0.2);
  1015. }
  1016. .onefloor::-webkit-scrollbar-track {
  1017. /*滚动条里面轨道*/
  1018. background: rgba(255, 255, 255, 0.05);
  1019. border-radius: 2px;
  1020. }
  1021. </style>