incidentList.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. <template>
  2. <div class="bgColor">
  3. <div slot="content" class="scroll-wrapper">
  4. <div class="demo">
  5. <div class="header">事件列表</div>
  6. <div class="stateSearchWrap">
  7. <cube-select
  8. class="stateSearch"
  9. v-model="searchType"
  10. :options="searchsType"
  11. @change="typeChange()"
  12. ></cube-select>
  13. <cube-select
  14. class="stateSearch"
  15. v-model="searchState"
  16. :options="searchsState"
  17. @change="typeChange()"
  18. ></cube-select>
  19. </div>
  20. <div class="scroll-list-wrap">
  21. <cube-scroll
  22. ref="scroll"
  23. :data="items"
  24. :options="options"
  25. @pulling-down="onPullingDown"
  26. @pulling-up="onPullingUp"
  27. >
  28. <div class="conentBox" v-if="!loadShow && items.length">
  29. <div
  30. class="conent"
  31. v-for="item in items"
  32. :key="item.id"
  33. @click="toIncidentDetails(item)"
  34. >
  35. <div class="head">
  36. <p>
  37. <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
  38. 事件编号:{{ item.incidentsign }}
  39. <span
  40. :class="{
  41. btn: true,
  42. daipingjia: item.state.name == '待评价',
  43. daijiedan:
  44. item.state.name == '待接单' &&
  45. item.handlerUser &&
  46. !item.candidateGroups,
  47. daiqiangdan:
  48. item.state.name == '待接单' &&
  49. !item.handlerUser &&
  50. item.candidateGroups,
  51. chulizhong: item.state.name == '处理中',
  52. yijiejue: item.state.name == '已解决',
  53. yiguanbi: item.state.name == '已关闭',
  54. chongxinzhipai: item.state.name == '重新指派'
  55. }"
  56. >{{
  57. item.state.name == "待接单"
  58. ? item.handlerUser && !item.candidateGroups
  59. ? "待接单"
  60. : "待抢单"
  61. : item.state.name
  62. }}</span
  63. >
  64. </p>
  65. </div>
  66. <div class="center">
  67. <p class="desc">
  68. <span class="fl">故障描述:</span>
  69. <span
  70. class="grayFont overflowEllipsis2"
  71. v-html="item.description"
  72. ></span>
  73. </p>
  74. <p v-if="valConfig == 1">
  75. 报修人 :
  76. <span class="grayFont">{{ item.requester?item.requester.name:'' }}</span>
  77. <span @click.stop v-if="item.contactsInformation"
  78. ><a :href="'tel:' + item.contactsInformation"
  79. >(<i class="iconfont icon-shouji"></i
  80. >{{ item.contactsInformation }})</a
  81. ></span
  82. >
  83. </p>
  84. <p v-if="valConfig == 2">
  85. 报修科室 :
  86. <span class="grayFont">{{
  87. item.department ? item.department.dept : ""
  88. }}</span>
  89. </p>
  90. </div>
  91. <div class="bottom">
  92. <span v-if="!item.place"></span>
  93. <span
  94. v-if="item.place"
  95. style="width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
  96. >{{ item.place.area.area }} {{ item.place.place }}
  97. {{ item.houseNumber }}</span
  98. >
  99. <span class="flex">
  100. <i v-if="item.callID" @click.stop="showAudio(item.callID)" class="dash dash-dianbohuifang"></i>
  101. {{ item.acceptDate | timeFormat("MM-dd HH:mm") }}
  102. </span>
  103. </div>
  104. <div class="btns">
  105. <cube-form-group
  106. class="sub-btn"
  107. v-show="
  108. (item.state.id === 1544 || item.state.id === 1543) &&
  109. isAssign
  110. "
  111. >
  112. <cube-button @click.stop="assign(item)">指派</cube-button>
  113. </cube-form-group>
  114. <cube-form-group
  115. class="sub-btn"
  116. v-show="item.state.id === 1544"
  117. >
  118. <cube-button @click.stop="addHandlerLog(item)"
  119. >维修进度</cube-button
  120. >
  121. </cube-form-group>
  122. <cube-form-group
  123. class="sub-btn"
  124. v-if="item.state.value != 1546 && !item.handlerUser && jurisdiction(item) && qiangdan(item)"
  125. >
  126. <cube-button @click.stop="subVali(item)"
  127. >抢单</cube-button
  128. >
  129. </cube-form-group>
  130. </div>
  131. </div>
  132. </div>
  133. <template v-if="customPullDown" slot="pulldown" slot-scope="props">
  134. <div
  135. v-if="props.pullDownRefresh"
  136. class="cube-pulldown-wrapper"
  137. :style="props.pullDownStyle"
  138. >
  139. <div
  140. v-show="props.beforePullDown"
  141. class="before-trigger"
  142. :style="{ paddingTop: props.bubbleY + 'px' }"
  143. >
  144. <span
  145. :class="{
  146. rotate: props.bubbleY > pullDownRefreshThreshold - 40
  147. }"
  148. >↓</span
  149. >
  150. </div>
  151. <div class="after-trigger" v-show="!props.beforePullDown">
  152. <div v-show="props.isPullingDown" class="loading">
  153. <cube-loading></cube-loading>
  154. </div>
  155. <div v-show="!props.isPullingDown" class="text">
  156. <span class="refresh-text">更新成功</span>
  157. </div>
  158. </div>
  159. </div>
  160. </template>
  161. <!-- <div class="wushuju" v-if="!loadShow && items.length === 0">
  162. <img src="./../../static/images/wushuju.svg" alt />
  163. <p>暂无事件</p>
  164. </div> -->
  165. </cube-scroll>
  166. </div>
  167. </div>
  168. </div>
  169. <load-ing v-show="loadShow"></load-ing>
  170. <!-- 指派弹窗 -->
  171. <showModel
  172. v-if="models.disjunctor"
  173. :title="models.title"
  174. :icon="models.icon"
  175. :disjunctor="models.disjunctor"
  176. @ok="ok"
  177. @cancel="cancel"
  178. :operate="models.operate"
  179. selectName="user"
  180. ></showModel>
  181. <!-- 新增维修记录弹窗 -->
  182. <showModel
  183. :title="models1.title"
  184. :icon="models1.icon"
  185. :disjunctor="models1.disjunctor"
  186. @ok="ok1"
  187. @cancel="cancel1"
  188. :operate="models1.operate"
  189. textName="textarea"
  190. ></showModel>
  191. <div class="mask" v-if="audioMask" @click="hideAudio()">
  192. <audio controls autoplay="autoplay" id="bgMusic">
  193. <source :src="audioSrc" type="audio/mpeg">
  194. </audio>
  195. </div>
  196. </div>
  197. </template>
  198. <script>
  199. import showModel from "../components/showModel/showModel.vue";
  200. import CubePage from "../components/cube-page.vue";
  201. import SwitchOption from "../components/switch-option";
  202. import InputOption from "../components/input-option";
  203. import SelectOption from "../components/select-option";
  204. import { formatDate } from "./../components/js/date.js";
  205. import LoadIng from "./../views/loading.vue";
  206. export default {
  207. data() {
  208. return {
  209. audioSrc:'',//音频路径
  210. audioMask:false,//音频
  211. modelsData: null, //点击弹窗的那一项数据
  212. modelsData1: null, //点击弹窗的那一项数据
  213. // 弹窗model
  214. models: {
  215. disjunctor: false
  216. },
  217. models1: {
  218. disjunctor: false
  219. },
  220. isAssign: false, //是否有权限指派
  221. isAll: false, //是否显示全部事件
  222. loginUser: JSON.parse(localStorage.getItem("loginUser")),
  223. menu: JSON.parse(localStorage.getItem("menu")),
  224. valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
  225. items: [],
  226. pullDownRefresh: true,
  227. pullDownRefreshThreshold: 60,
  228. pullDownRefreshStop: 40,
  229. pullDownRefreshTxt: "更新成功",
  230. pullUpLoad: true,
  231. pullUpLoadThreshold: 0,
  232. pullUpLoadMoreTxt: "加载更多",
  233. pullUpLoadNoMoreTxt: "没有更多数据",
  234. customPullDown: true,
  235. candidateGroups: "",
  236. searchsType: [
  237. {
  238. text: "待我处理",
  239. value: "todo"
  240. },
  241. {
  242. text: "与我关联",
  243. value: "done"
  244. }
  245. ],
  246. searchsState:[],//状态列表
  247. searchType: "all",
  248. searchState: 0,
  249. type: "all",
  250. isToday: "",
  251. sum: 10,
  252. idx: 0,
  253. stateClass: "",
  254. loadShow: true
  255. };
  256. },
  257. components: {
  258. CubePage,
  259. SwitchOption,
  260. InputOption,
  261. SelectOption,
  262. LoadIng,
  263. showModel
  264. },
  265. computed: {
  266. options() {
  267. return {
  268. pullDownRefresh: this.pullDownRefreshObj,
  269. pullUpLoad: this.pullUpLoadObj,
  270. scrollbar: true
  271. };
  272. },
  273. pullDownRefreshObj: function() {
  274. return this.pullDownRefresh
  275. ? {
  276. threshold: parseInt(this.pullDownRefreshThreshold),
  277. txt: this.pullDownRefreshTxt
  278. }
  279. : false;
  280. },
  281. pullUpLoadObj: function() {
  282. return this.pullUpLoad
  283. ? {
  284. threshold: parseInt(this.pullUpLoadThreshold),
  285. txt: {
  286. more: this.pullUpLoadMoreTxt,
  287. noMore: this.pullUpLoadNoMoreTxt
  288. }
  289. }
  290. : false;
  291. }
  292. },
  293. methods: {
  294. qiangdan(incident){
  295. return this.menu.some(v => v.link == 'shijianliebiao_qiangdan');
  296. },
  297. jurisdiction(incident){
  298. return this.loginUser.group.some(v => v.id == incident.candidateGroups);
  299. },
  300. // 抢单
  301. subVali(incident) {
  302. //数据提交
  303. var that = this;
  304. this.$createDialog({
  305. type: 'confirm',
  306. icon: 'cubeic-alert',
  307. title: '提示',
  308. content: '是否抢单?',
  309. confirmBtn: {
  310. text: '确定',
  311. active: true,
  312. disabled: false,
  313. href: 'javascript:;'
  314. },
  315. cancelBtn: {
  316. text: '取消',
  317. active: false,
  318. disabled: false,
  319. href: 'javascript:;'
  320. },
  321. onConfirm: () => {
  322. that.$http
  323. .post(
  324. "service/bpm/bpm/claimAndCompletedTask/" + incident.taskId,
  325. { receive_code: "handler", userId: that.loginUser.id }
  326. )
  327. .then(function (res) {
  328. console.log(res.data);
  329. if (res.data.status == 200) {
  330. that
  331. .$createDialog({
  332. type: "alert",
  333. title: "抢单成功",
  334. content: "点击返回首页",
  335. icon: "cubeic-right",
  336. onConfirm: (e, promptValue) => {
  337. that.$router.push({ path: "/main" });
  338. },
  339. })
  340. .show();
  341. }else{
  342. this.$createDialog({
  343. type: "alert",
  344. title: "系统错误,请稍后再试!",
  345. icon: "cubeic-wrong",
  346. }).show();
  347. }
  348. });
  349. },
  350. onCancel: () => {
  351. }
  352. }).show()
  353. },
  354. // 播放音频
  355. showAudio(callID){
  356. const toast = this.$createToast({
  357. txt: "Loading...",
  358. mask: true
  359. });
  360. toast.show();
  361. this.$http
  362. .post("service/bpm/data/fetchDataList/callrecord", {idx: 0, sum: 1, callrecord: {callAccept: callID}})
  363. .then(res => {
  364. toast.hide();
  365. if (res.data.status == 200) {
  366. res.data.list = res.data.list || [];
  367. if(res.data.list.length){
  368. this.audioMask = true;
  369. this.audioSrc = this.$host+res.data.list[0].recordingFileName;
  370. }
  371. }
  372. });
  373. },
  374. // 隐藏音频组件
  375. hideAudio(){
  376. this.audioMask=false;
  377. },
  378. //确定
  379. ok(selectUserId) {
  380. console.log(selectUserId);
  381. if (!selectUserId) {
  382. this.$createDialog({
  383. type: "alert",
  384. title: "请选择指派对象",
  385. icon: "cubeic-warn"
  386. }).show();
  387. return;
  388. }
  389. const toast = this.$createToast({
  390. txt: "Loading...",
  391. mask: true
  392. });
  393. toast.show();
  394. this.$http
  395. .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, {
  396. assginee: selectUserId,
  397. incId: this.modelsData.assignee ? this.modelsData.id : undefined,
  398. incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
  399. taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
  400. })
  401. .then(res => {
  402. toast.hide();
  403. this.models.disjunctor = false;
  404. if (res.status == 200) {
  405. this.$createDialog({
  406. type: "alert",
  407. title: "操作成功",
  408. icon: "cubeic-right",
  409. onConfirm: (e, promptValue) => {
  410. this.loadShow = true;
  411. this.items = [];
  412. this.idx = 0;
  413. this.getData();
  414. }
  415. }).show();
  416. } else {
  417. this.$createDialog({
  418. type: "alert",
  419. title: "系统错误,请稍后再试!",
  420. icon: "cubeic-wrong",
  421. onConfirm: (e, promptValue) => {
  422. this.loadShow = true;
  423. this.items = [];
  424. this.idx = 0;
  425. this.getData();
  426. }
  427. }).show();
  428. }
  429. });
  430. },
  431. //取消
  432. cancel() {
  433. this.models.disjunctor = false;
  434. },
  435. // 指派
  436. assign(item) {
  437. this.modelsData = item;
  438. this.models = {
  439. disjunctor: true,
  440. title: "指派对象",
  441. icon: "warn",
  442. operate: {
  443. ok: "确定",
  444. cancel: "取消"
  445. }
  446. };
  447. },
  448. //确定
  449. ok1(obj) {
  450. console.log(obj);
  451. if (!obj.maintenanceMode) {
  452. this.$createDialog({
  453. type: "alert",
  454. title: "请选择维修方式",
  455. icon: "cubeic-warn"
  456. }).show();
  457. return;
  458. }
  459. if (!obj.estimatedNumberOfDays) {
  460. this.$createDialog({
  461. type: "alert",
  462. title: "请选择预估天数",
  463. icon: "cubeic-warn"
  464. }).show();
  465. return;
  466. }
  467. if (!obj.textareaData.trim()) {
  468. this.$createDialog({
  469. type: "alert",
  470. title: "请填写维修记录",
  471. icon: "cubeic-warn"
  472. }).show();
  473. return;
  474. }
  475. const toast = this.$createToast({
  476. txt: "Loading...",
  477. mask: true
  478. });
  479. toast.show();
  480. this.$http
  481. .post("service/bpm/data/addData/operationLog", {
  482. operationLog: {
  483. opType: "handlerLog",
  484. opValue: obj.textareaData,
  485. extra1: this.modelsData1.id,
  486. repairType: obj.maintenanceMode,
  487. expectedDay: obj.estimatedNumberOfDays,
  488. }
  489. })
  490. .then(res => {
  491. toast.hide();
  492. this.models1.disjunctor = false;
  493. if (res.status == 200) {
  494. this.$createDialog({
  495. type: "alert",
  496. title: "操作成功",
  497. icon: "cubeic-right",
  498. onConfirm: (e, promptValue) => {
  499. this.loadShow = true;
  500. this.items = [];
  501. this.idx = 0;
  502. this.getData();
  503. }
  504. }).show();
  505. } else {
  506. this.$createDialog({
  507. type: "alert",
  508. title: "系统错误,请稍后再试!",
  509. icon: "cubeic-wrong",
  510. onConfirm: (e, promptValue) => {
  511. this.loadShow = true;
  512. this.items = [];
  513. this.idx = 0;
  514. this.getData();
  515. }
  516. }).show();
  517. }
  518. });
  519. },
  520. //取消
  521. cancel1() {
  522. this.models1.disjunctor = false;
  523. },
  524. // 新增维修记录
  525. addHandlerLog(item) {
  526. this.modelsData1 = item;
  527. this.models1 = {
  528. disjunctor: true,
  529. title: "新增维修记录",
  530. icon: "warn",
  531. operate: {
  532. ok: "确定",
  533. cancel: "取消"
  534. }
  535. };
  536. },
  537. getParamsState() {
  538. if (this.$route.params.type) {
  539. this.type = this.$route.params.type;
  540. this.isToday = this.$route.params.isToday;
  541. if (this.type === "todo") {
  542. this.searchType = "todo";
  543. } else if (this.type === "done") {
  544. this.searchType = "done";
  545. } else {
  546. this.searchType = "all";
  547. }
  548. }
  549. if(this.$route.params.status){
  550. this.searchState = this.$route.params.status ? Number(this.$route.params.status) : 0;
  551. }
  552. },
  553. typeChange() {
  554. this.loadShow = true;
  555. this.items = [];
  556. this.idx = 0;
  557. this.sum = 10;
  558. this.getData();
  559. },
  560. toIncidentDetails(data) {
  561. console.log(1111111);
  562. console.log(data);
  563. var name = "";
  564. if (data.state.value == "pending") {
  565. if (data.handlerUser && !data.candidateGroups) {
  566. // 指派给人 接单
  567. name = "Order";
  568. } else if (data.candidateGroups && !data.handlerUser) {
  569. // 指派给组 抢单
  570. name = "GrabSheet";
  571. }
  572. } else if (data.state.value == "reassign") {
  573. name = "AgainAssign";
  574. } else if (data.state.value == "handler") {
  575. name = "Processing";
  576. } else if (data.state.value == "resolved") {
  577. name = "Solved";
  578. } else if (data.state.value == "close") {
  579. name = "Closed";
  580. }
  581. if(data.duty && data.duty.addSummary == 1 && name == "Processing"){
  582. // 责任科室【是否需要填写汇总单】开启,并且工单状态是处理中
  583. this.$router.push({
  584. path: `/summaryOrder/${data.id}/${data.processInstanceId}`
  585. });
  586. }else{
  587. this.$router.push({
  588. name: name,
  589. params: {
  590. data: data
  591. }
  592. });
  593. }
  594. },
  595. getData() {
  596. let postData = {
  597. assignee: this.loginUser.id,
  598. candidateGroups: this.candidateGroups,
  599. searchType: this.searchType,
  600. idx: this.idx,
  601. sum: this.sum,
  602. incident: { temporary: true,statusId:this.searchState?this.searchState:undefined }
  603. };
  604. if (this.isToday == "today") {
  605. postData.incident.acceptDate =
  606. formatDate(new Date(), "yyyy-MM-dd") + " 00:00:00";
  607. postData.incident.acceptDateEnd =
  608. formatDate(new Date(), "yyyy-MM-dd") + " 23:59:59";
  609. }
  610. if(this.searchType === 'all'){
  611. // 全部事件
  612. if(this.loginUser.duty){
  613. // 当前的所属责任科室
  614. postData.incident.duty = this.loginUser.duty;
  615. }else if(this.loginUser.branch){
  616. // 当前的所属院区
  617. postData.incident.branch = this.loginUser.branch.id;
  618. }
  619. this.$http
  620. .post("service/user/data/fetchDataList/incident", postData)
  621. .then((res) => {
  622. if (res.data.list.length > 0) {
  623. for (var i = 0; i < res.data.list.length; i++) {
  624. delete res.data.list[i].handlingPersonnelUser;
  625. delete res.data.list[i].sendBackUser;
  626. delete res.data.list[i].colourInfo;
  627. if(res.data.list[i].acceptUser){
  628. res.data.list[i].acceptUser = {
  629. id: res.data.list[i].acceptUser.id,
  630. name: res.data.list[i].acceptUser.name,
  631. };
  632. }
  633. res.data.list[i].createTime = formatDate(
  634. new Date(res.data.list[i].createTime),
  635. "yyyy-MM-dd hh:mm"
  636. );
  637. }
  638. if (this.idx) {
  639. this.items = this.items.concat(res.data.list);
  640. } else {
  641. this.items = res.data.list;
  642. }
  643. } else {
  644. this.$refs.scroll.forceUpdate();
  645. // this.pullUpLoad = false;
  646. }
  647. this.loadShow = false;
  648. });
  649. }else{
  650. this.$http
  651. .post("service/bpm/bpm/fetchTask/bpm_incident", postData)
  652. .then((res) => {
  653. if (res.data.data.length > 0) {
  654. for (var i = 0; i < res.data.data.length; i++) {
  655. delete res.data.data[i].handlingPersonnelUser;
  656. delete res.data.data[i].sendBackUser;
  657. delete res.data.data[i].colourInfo;
  658. if(res.data.data[i].acceptUser){
  659. res.data.data[i].acceptUser = {
  660. id: res.data.data[i].acceptUser.id,
  661. name: res.data.data[i].acceptUser.name,
  662. };
  663. }
  664. res.data.data[i].createTime = formatDate(
  665. new Date(res.data.data[i].createTime),
  666. "yyyy-MM-dd hh:mm"
  667. );
  668. }
  669. if (this.idx) {
  670. this.items = this.items.concat(res.data.data);
  671. } else {
  672. this.items = res.data.data;
  673. }
  674. } else {
  675. this.$refs.scroll.forceUpdate();
  676. // this.pullUpLoad = false;
  677. }
  678. this.loadShow = false;
  679. });
  680. }
  681. },
  682. onPullingDown() {
  683. this.idx = 0;
  684. this.sum = 10;
  685. this.getData();
  686. },
  687. onPullingUp() {
  688. this.idx = this.idx + 1;
  689. this.getData();
  690. },
  691. // 获取事件状态
  692. getStateList(){
  693. this.$http
  694. .post("service/common/common/getDictionary", {"type":"list","key":"incident_status"})
  695. .then((res) => {
  696. this.searchsState = [{text:'全部',value:0},...res.data.map(v=>({text:v.name,value:v.id}))]
  697. });
  698. }
  699. },
  700. created() {
  701. var that = this;
  702. let menu = JSON.parse(localStorage.getItem("menu"));
  703. if (menu) {
  704. this.isAssign = menu.some(v => v.link == "shijianliebiao_assign");
  705. this.isAll = menu.some(v => v.link == "shijianliebiao_all");
  706. if(this.isAll){
  707. this.searchsType.unshift({
  708. text: "全部事件",
  709. value: "all"
  710. })
  711. }
  712. }
  713. that.loginUser.group.forEach(element => {
  714. that.candidateGroups += element.id + ",";
  715. });
  716. that.candidateGroups = that.candidateGroups.substring(
  717. 0,
  718. that.candidateGroups.length - 1
  719. );
  720. this.getParamsState();
  721. this.loadShow = true;
  722. this.getData();
  723. this.getStateList();
  724. localStorage.removeItem("modelData");
  725. // localStorage.removeItem("category");
  726. // localStorage.removeItem("categoryVal");
  727. localStorage.removeItem("referenceInfo");
  728. localStorage.removeItem("order");
  729. localStorage.removeItem("model");
  730. // localStorage.removeItem("selectedCategoryTxt");
  731. }
  732. };
  733. </script>
  734. <style lang="stylus" rel="stylesheet/stylus" scoped>
  735. .mask{
  736. width: 100%;
  737. height: 100%;
  738. position: fixed;
  739. top: 0;
  740. background: rgba(0,0,0,.5);
  741. z-index: 999;
  742. display: flex;
  743. align-items: center;
  744. justify-content: center;
  745. }
  746. .btns{
  747. display: flex;
  748. justify-content: space-between
  749. .sub-btn {
  750. margin:0 2px;
  751. flex:1;
  752. background: #ececec;
  753. .cube-btn {
  754. background-color: #005395 !important;
  755. border-radius: 8px
  756. }
  757. }
  758. }
  759. .scroll-list-wrap {
  760. height: calc(100vh - 2.72rem);
  761. border-radius: 5px;
  762. transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
  763. overflow: hidden;
  764. padding-top: 1.76rem;
  765. }
  766. .foods-wrapper {
  767. .food-item {
  768. display: flex;
  769. /* padding: 18px */
  770. /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
  771. /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
  772. &:last-child {
  773. border-none();
  774. margin-bottom: 0;
  775. }
  776. .icon {
  777. flex: 0 0 57px;
  778. margin-right: 10px;
  779. }
  780. .food-content {
  781. flex: 1;
  782. .name {
  783. margin: 2px 0 8px 0;
  784. height: 14px;
  785. line-height: 14px;
  786. font-size: 14px;
  787. color: rgb(7, 17, 27);
  788. }
  789. .description, .extra {
  790. line-height: 10px;
  791. font-size: 10px;
  792. color: rgb(147, 153, 159);
  793. }
  794. .description {
  795. line-height: 12px;
  796. margin-bottom: 8px;
  797. }
  798. .extra {
  799. .count {
  800. margin-right: 12px;
  801. }
  802. }
  803. .price {
  804. font-weight: 700;
  805. line-height: 24px;
  806. .now {
  807. margin-right: 8px;
  808. font-size: 14px;
  809. color: rgb(240, 20, 20);
  810. }
  811. .old {
  812. text-decoration: line-through;
  813. font-size: 10px;
  814. color: rgb(147, 153, 159);
  815. }
  816. }
  817. .cartcontrol-wrapper {
  818. position: absolute;
  819. right: 0;
  820. bottom: 12px;
  821. .scroll-wrapper {
  822. .cube-pulldown-wrapper {
  823. .before-trigger {
  824. font-size: 30px;
  825. line-height: 30px;
  826. align-self: flex-end;
  827. span {
  828. display: inline-block;
  829. transition: all 0.3s;
  830. color: #666;
  831. &.rotate {
  832. transform: rotate(180deg);
  833. }
  834. }
  835. }
  836. .after-trigger {
  837. .refresh-text {
  838. color: grey;
  839. }
  840. }
  841. }
  842. }
  843. }
  844. }
  845. }
  846. }
  847. </style>
  848. <style lang="less" scoped>
  849. .cont {
  850. margin-top: 1.86rem;
  851. }
  852. .scroll-list-wrap {
  853. padding-top: 1.76rem;
  854. }
  855. .header {
  856. width: 100%;
  857. height: 0.88rem;
  858. line-height: 0.88rem;
  859. text-align: center;
  860. color: #fff;
  861. font-size: 0.37rem;
  862. background: linear-gradient(#2e2f32, #414246);
  863. position: fixed;
  864. top: 0;
  865. z-index: 6;
  866. }
  867. .stateSearchWrap{
  868. width: 100%;
  869. position: fixed;
  870. top: 0.88rem;
  871. z-index: 6;
  872. display: flex;
  873. .stateSearch {
  874. flex: 1;
  875. }
  876. }
  877. .bgColor {
  878. background-color: white;
  879. }
  880. .food-item {
  881. border-top: 0.16rem rgb(238, 238, 238) solid;
  882. }
  883. .food-content {
  884. border-top: 0.01rem rgb(223, 222, 222) solid;
  885. border-bottom: 0.01rem rgb(223, 222, 222) solid;
  886. }
  887. .cube-select {
  888. height: 0.88rem;
  889. line-height: 0.88rem;
  890. padding: 0 0.24rem;
  891. font-size: 0.36rem;
  892. color: #333333;
  893. border-bottom: 0.08rem solid #e5e5e5;
  894. }
  895. .title {
  896. display: flex;
  897. justify-content: space-between;
  898. height: 0.7rem;
  899. line-height: 0.7rem;
  900. border-top: 0.01rem rgb(223, 222, 222) solid;
  901. padding: 0 0.24rem;
  902. border-bottom: 0.01rem rgb(223, 222, 222) solid;
  903. }
  904. .title i {
  905. font-size: 0.32rem;
  906. color: #005395;
  907. }
  908. .title div:nth-child(1) {
  909. font-size: 0.32rem;
  910. }
  911. .title div:nth-child(1) span {
  912. display: inline-block;
  913. margin-left: 0.08rem;
  914. }
  915. .title div:nth-child(2) {
  916. padding: 0.05rem 0.3rem;
  917. /* border: 0.01rem rgb(0,0,255) solid; */
  918. border-radius: 16px;
  919. /* color: rgb(0,0,255); */
  920. height: 0.25rem;
  921. line-height: 0.25rem;
  922. margin-top: 0.15rem;
  923. font-size: 0.24rem;
  924. }
  925. .weishouli {
  926. color: #991f00;
  927. border: 0.01rem #991f00 solid;
  928. background-color: #f4e8e5;
  929. }
  930. .bushouli {
  931. color: #666666;
  932. background-color: #eeeeee;
  933. border: 0.01rem #666666 solid;
  934. }
  935. .chulizhong {
  936. color: #003057;
  937. background-color: #e5eaee;
  938. border: 0.01rem #003057 solid;
  939. }
  940. .daipingjia {
  941. color: #825b00;
  942. background-color: #f2eee5;
  943. border: 0.01rem #825b00 solid;
  944. }
  945. .yijiejue {
  946. color: #40a19c;
  947. background-color: #ebf5f5;
  948. border: 0.01rem #40a19c solid;
  949. }
  950. .yichehui {
  951. color: #48a843;
  952. background-color: #ecf6ec;
  953. border: 0.01rem #48a843 solid;
  954. }
  955. // .conent {
  956. // font-size: 0.28rem;
  957. // line-height: 0.39rem;
  958. // overflow: hidden;
  959. // display: -webkit-box;
  960. // -webkit-line-clamp: 2;
  961. // -webkit-box-orient: vertical;
  962. // word-break: break-all;
  963. // padding: 0 0.64rem;
  964. // margin: 0.24rem 0;
  965. // }
  966. .timeBox {
  967. display: flex;
  968. justify-content: space-between;
  969. font-size: 0.24rem;
  970. color: #999999;
  971. border-top: 0.01rem rgb(223, 222, 222) solid;
  972. height: 0.7rem;
  973. line-height: 0.7rem;
  974. padding: 0 0.24rem 0 0.64rem;
  975. }
  976. .wushuju {
  977. margin-top: 2.4rem;
  978. text-align: center;
  979. color: #999;
  980. }
  981. .wushuju img {
  982. width: 5.12rem;
  983. height: 2.84rem;
  984. }
  985. .conentBox {
  986. width: 100%;
  987. height: 100%;
  988. .conent {
  989. font-size: 0.32rem;
  990. font-weight: 400;
  991. line-height: 0.45rem;
  992. border-bottom: 0.16rem solid #e5e5e5;
  993. .head {
  994. border-bottom: 0.01rem solid #e6e6e6;
  995. p {
  996. padding: 0.24rem 0.48rem;
  997. i {
  998. color: #00559d;
  999. }
  1000. .btn {
  1001. float: right;
  1002. }
  1003. }
  1004. }
  1005. .center {
  1006. color: #333333;
  1007. border-bottom: 0.01rem solid #e6e6e6;
  1008. padding: 0.24rem 0.48rem;
  1009. p {
  1010. &.desc {
  1011. overflow: hidden;
  1012. max-height: 0.88rem;
  1013. }
  1014. .grayFont {
  1015. overflow-x: scroll;
  1016. color: #666;
  1017. }
  1018. }
  1019. }
  1020. .bottom {
  1021. display: flex;
  1022. justify-content: space-between;
  1023. align-items: center;
  1024. overflow: hidden;
  1025. height: 0.86rem;
  1026. border-bottom: 0.01rem solid #e6e6e6;
  1027. font-size: 0.24rem;
  1028. color: #999;
  1029. padding: 0 0.24rem 0 0.48rem;
  1030. }
  1031. }
  1032. }
  1033. </style>