incidentList.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052
  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>
  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. incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
  398. })
  399. .then(res => {
  400. toast.hide();
  401. this.models.disjunctor = false;
  402. if (res.status == 200) {
  403. this.$createDialog({
  404. type: "alert",
  405. title: "操作成功",
  406. icon: "cubeic-right",
  407. onConfirm: (e, promptValue) => {
  408. this.loadShow = true;
  409. this.items = [];
  410. this.idx = 0;
  411. this.getData();
  412. }
  413. }).show();
  414. } else {
  415. this.$createDialog({
  416. type: "alert",
  417. title: "系统错误,请稍后再试!",
  418. icon: "cubeic-wrong",
  419. onConfirm: (e, promptValue) => {
  420. this.loadShow = true;
  421. this.items = [];
  422. this.idx = 0;
  423. this.getData();
  424. }
  425. }).show();
  426. }
  427. });
  428. },
  429. //取消
  430. cancel() {
  431. this.models.disjunctor = false;
  432. },
  433. // 指派
  434. assign(item) {
  435. this.modelsData = item;
  436. this.models = {
  437. disjunctor: true,
  438. title: "指派对象",
  439. icon: "warn",
  440. operate: {
  441. ok: "确定",
  442. cancel: "取消"
  443. }
  444. };
  445. },
  446. //确定
  447. ok1(obj) {
  448. console.log(obj);
  449. if (!obj.maintenanceMode) {
  450. this.$createDialog({
  451. type: "alert",
  452. title: "请选择维修方式",
  453. icon: "cubeic-warn"
  454. }).show();
  455. return;
  456. }
  457. if (!obj.estimatedNumberOfDays) {
  458. this.$createDialog({
  459. type: "alert",
  460. title: "请选择预估天数",
  461. icon: "cubeic-warn"
  462. }).show();
  463. return;
  464. }
  465. if (!obj.textareaData.trim()) {
  466. this.$createDialog({
  467. type: "alert",
  468. title: "请填写维修记录",
  469. icon: "cubeic-warn"
  470. }).show();
  471. return;
  472. }
  473. const toast = this.$createToast({
  474. txt: "Loading...",
  475. mask: true
  476. });
  477. toast.show();
  478. this.$http
  479. .post("service/bpm/data/addData/operationLog", {
  480. operationLog: {
  481. opType: "handlerLog",
  482. opValue: obj.textareaData,
  483. extra1: this.modelsData1.id,
  484. repairType: obj.maintenanceMode,
  485. expectedDay: obj.estimatedNumberOfDays,
  486. }
  487. })
  488. .then(res => {
  489. toast.hide();
  490. this.models1.disjunctor = false;
  491. if (res.status == 200) {
  492. this.$createDialog({
  493. type: "alert",
  494. title: "操作成功",
  495. icon: "cubeic-right",
  496. onConfirm: (e, promptValue) => {
  497. this.loadShow = true;
  498. this.items = [];
  499. this.idx = 0;
  500. this.getData();
  501. }
  502. }).show();
  503. } else {
  504. this.$createDialog({
  505. type: "alert",
  506. title: "系统错误,请稍后再试!",
  507. icon: "cubeic-wrong",
  508. onConfirm: (e, promptValue) => {
  509. this.loadShow = true;
  510. this.items = [];
  511. this.idx = 0;
  512. this.getData();
  513. }
  514. }).show();
  515. }
  516. });
  517. },
  518. //取消
  519. cancel1() {
  520. this.models1.disjunctor = false;
  521. },
  522. // 新增维修记录
  523. addHandlerLog(item) {
  524. this.modelsData1 = item;
  525. this.models1 = {
  526. disjunctor: true,
  527. title: "新增维修记录",
  528. icon: "warn",
  529. operate: {
  530. ok: "确定",
  531. cancel: "取消"
  532. }
  533. };
  534. },
  535. getParamsState() {
  536. if (this.$route.params.type) {
  537. this.type = this.$route.params.type;
  538. this.isToday = this.$route.params.isToday;
  539. if (this.type === "todo") {
  540. this.searchType = "todo";
  541. } else if (this.type === "done") {
  542. this.searchType = "done";
  543. } else {
  544. this.searchType = "all";
  545. }
  546. }
  547. if(this.$route.params.status){
  548. this.searchState = this.$route.params.status ? Number(this.$route.params.status) : 0;
  549. }
  550. },
  551. typeChange() {
  552. this.loadShow = true;
  553. this.items = [];
  554. this.idx = 0;
  555. this.sum = 10;
  556. this.getData();
  557. },
  558. toIncidentDetails(data) {
  559. console.log(1111111);
  560. console.log(data);
  561. var name = "";
  562. if (data.state.value == "pending") {
  563. if (data.handlerUser && !data.candidateGroups) {
  564. // 指派给人 接单
  565. name = "Order";
  566. } else if (data.candidateGroups && !data.handlerUser) {
  567. // 指派给组 抢单
  568. name = "GrabSheet";
  569. }
  570. } else if (data.state.value == "reassign") {
  571. name = "AgainAssign";
  572. } else if (data.state.value == "handler") {
  573. name = "Processing";
  574. } else if (data.state.value == "resolved") {
  575. name = "Solved";
  576. } else if (data.state.value == "close") {
  577. name = "Closed";
  578. }
  579. if(data.duty && data.duty.addSummary == 1 && name == "Processing"){
  580. // 责任科室【是否需要填写汇总单】开启,并且工单状态是处理中
  581. this.$router.push({
  582. path: `/summaryOrder/${data.id}/${data.processInstanceId}`
  583. });
  584. }else{
  585. this.$router.push({
  586. name: name,
  587. params: {
  588. data: data
  589. }
  590. });
  591. }
  592. },
  593. getData() {
  594. let postData = {
  595. assignee: this.loginUser.id,
  596. candidateGroups: this.candidateGroups,
  597. searchType: this.searchType,
  598. idx: this.idx,
  599. sum: this.sum,
  600. incident: { temporary: true,statusId:this.searchState?this.searchState:undefined }
  601. };
  602. if (this.isToday == "today") {
  603. postData.incident.acceptDate =
  604. formatDate(new Date(), "yyyy-MM-dd") + " 00:00:00";
  605. postData.incident.acceptDateEnd =
  606. formatDate(new Date(), "yyyy-MM-dd") + " 23:59:59";
  607. }
  608. if(this.searchType === 'all'){
  609. // 全部事件
  610. if(this.loginUser.duty){
  611. // 当前的所属责任科室
  612. postData.incident.duty = this.loginUser.duty;
  613. }else if(this.loginUser.branch){
  614. // 当前的所属院区
  615. postData.incident.branch = this.loginUser.branch.id;
  616. }
  617. this.$http
  618. .post("service/user/data/fetchDataList/incident", postData)
  619. .then((res) => {
  620. if (res.data.list.length > 0) {
  621. for (var i = 0; i < res.data.list.length; i++) {
  622. delete res.data.list[i].handlingPersonnelUser;
  623. delete res.data.list[i].sendBackUser;
  624. delete res.data.list[i].colourInfo;
  625. if(res.data.list[i].acceptUser){
  626. res.data.list[i].acceptUser = {
  627. id: res.data.list[i].acceptUser.id,
  628. name: res.data.list[i].acceptUser.name,
  629. };
  630. }
  631. res.data.list[i].createTime = formatDate(
  632. new Date(res.data.list[i].createTime),
  633. "yyyy-MM-dd hh:mm"
  634. );
  635. }
  636. if (this.idx) {
  637. this.items = this.items.concat(res.data.list);
  638. } else {
  639. this.items = res.data.list;
  640. }
  641. } else {
  642. this.$refs.scroll.forceUpdate();
  643. // this.pullUpLoad = false;
  644. }
  645. this.loadShow = false;
  646. });
  647. }else{
  648. this.$http
  649. .post("service/bpm/bpm/fetchTask/bpm_incident", postData)
  650. .then((res) => {
  651. if (res.data.data.length > 0) {
  652. for (var i = 0; i < res.data.data.length; i++) {
  653. delete res.data.data[i].handlingPersonnelUser;
  654. delete res.data.data[i].sendBackUser;
  655. delete res.data.data[i].colourInfo;
  656. if(res.data.data[i].acceptUser){
  657. res.data.data[i].acceptUser = {
  658. id: res.data.data[i].acceptUser.id,
  659. name: res.data.data[i].acceptUser.name,
  660. };
  661. }
  662. res.data.data[i].createTime = formatDate(
  663. new Date(res.data.data[i].createTime),
  664. "yyyy-MM-dd hh:mm"
  665. );
  666. }
  667. if (this.idx) {
  668. this.items = this.items.concat(res.data.data);
  669. } else {
  670. this.items = res.data.data;
  671. }
  672. } else {
  673. this.$refs.scroll.forceUpdate();
  674. // this.pullUpLoad = false;
  675. }
  676. this.loadShow = false;
  677. });
  678. }
  679. },
  680. onPullingDown() {
  681. this.idx = 0;
  682. this.sum = 10;
  683. this.getData();
  684. },
  685. onPullingUp() {
  686. this.idx = this.idx + 1;
  687. this.getData();
  688. },
  689. // 获取事件状态
  690. getStateList(){
  691. this.$http
  692. .post("service/common/common/getDictionary", {"type":"list","key":"incident_status"})
  693. .then((res) => {
  694. this.searchsState = [{text:'全部',value:0},...res.data.map(v=>({text:v.name,value:v.id}))]
  695. });
  696. }
  697. },
  698. created() {
  699. var that = this;
  700. let menu = JSON.parse(localStorage.getItem("menu"));
  701. if (menu) {
  702. this.isAssign = menu.some(v => v.link == "shijianliebiao_assign");
  703. this.isAll = menu.some(v => v.link == "shijianliebiao_all");
  704. if(this.isAll){
  705. this.searchsType.unshift({
  706. text: "全部事件",
  707. value: "all"
  708. })
  709. }
  710. }
  711. that.loginUser.group.forEach(element => {
  712. that.candidateGroups += element.id + ",";
  713. });
  714. that.candidateGroups = that.candidateGroups.substring(
  715. 0,
  716. that.candidateGroups.length - 1
  717. );
  718. this.getParamsState();
  719. this.loadShow = true;
  720. this.getData();
  721. this.getStateList();
  722. localStorage.removeItem("modelData");
  723. // localStorage.removeItem("category");
  724. // localStorage.removeItem("categoryVal");
  725. localStorage.removeItem("referenceInfo");
  726. localStorage.removeItem("order");
  727. localStorage.removeItem("model");
  728. // localStorage.removeItem("selectedCategoryTxt");
  729. }
  730. };
  731. </script>
  732. <style lang="stylus" rel="stylesheet/stylus" scoped>
  733. .mask{
  734. width: 100%;
  735. height: 100%;
  736. position: fixed;
  737. top: 0;
  738. background: rgba(0,0,0,.5);
  739. z-index: 999;
  740. display: flex;
  741. align-items: center;
  742. justify-content: center;
  743. }
  744. .btns{
  745. display: flex;
  746. justify-content: space-between
  747. .sub-btn {
  748. margin:0 2px;
  749. flex:1;
  750. background: #ececec;
  751. .cube-btn {
  752. background-color: #005395 !important;
  753. border-radius: 8px
  754. }
  755. }
  756. }
  757. .scroll-list-wrap {
  758. height: calc(100vh - 2.72rem);
  759. border-radius: 5px;
  760. transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
  761. overflow: hidden;
  762. padding-top: 1.76rem;
  763. }
  764. .foods-wrapper {
  765. .food-item {
  766. display: flex;
  767. /* padding: 18px */
  768. /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
  769. /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
  770. &:last-child {
  771. border-none();
  772. margin-bottom: 0;
  773. }
  774. .icon {
  775. flex: 0 0 57px;
  776. margin-right: 10px;
  777. }
  778. .food-content {
  779. flex: 1;
  780. .name {
  781. margin: 2px 0 8px 0;
  782. height: 14px;
  783. line-height: 14px;
  784. font-size: 14px;
  785. color: rgb(7, 17, 27);
  786. }
  787. .description, .extra {
  788. line-height: 10px;
  789. font-size: 10px;
  790. color: rgb(147, 153, 159);
  791. }
  792. .description {
  793. line-height: 12px;
  794. margin-bottom: 8px;
  795. }
  796. .extra {
  797. .count {
  798. margin-right: 12px;
  799. }
  800. }
  801. .price {
  802. font-weight: 700;
  803. line-height: 24px;
  804. .now {
  805. margin-right: 8px;
  806. font-size: 14px;
  807. color: rgb(240, 20, 20);
  808. }
  809. .old {
  810. text-decoration: line-through;
  811. font-size: 10px;
  812. color: rgb(147, 153, 159);
  813. }
  814. }
  815. .cartcontrol-wrapper {
  816. position: absolute;
  817. right: 0;
  818. bottom: 12px;
  819. .scroll-wrapper {
  820. .cube-pulldown-wrapper {
  821. .before-trigger {
  822. font-size: 30px;
  823. line-height: 30px;
  824. align-self: flex-end;
  825. span {
  826. display: inline-block;
  827. transition: all 0.3s;
  828. color: #666;
  829. &.rotate {
  830. transform: rotate(180deg);
  831. }
  832. }
  833. }
  834. .after-trigger {
  835. .refresh-text {
  836. color: grey;
  837. }
  838. }
  839. }
  840. }
  841. }
  842. }
  843. }
  844. }
  845. </style>
  846. <style lang="less" scoped>
  847. .cont {
  848. margin-top: 1.86rem;
  849. }
  850. .scroll-list-wrap {
  851. padding-top: 1.76rem;
  852. }
  853. .header {
  854. width: 100%;
  855. height: 0.88rem;
  856. line-height: 0.88rem;
  857. text-align: center;
  858. color: #fff;
  859. font-size: 0.37rem;
  860. background: linear-gradient(#2e2f32, #414246);
  861. position: fixed;
  862. top: 0;
  863. z-index: 6;
  864. }
  865. .stateSearchWrap{
  866. width: 100%;
  867. position: fixed;
  868. top: 0.88rem;
  869. z-index: 6;
  870. display: flex;
  871. .stateSearch {
  872. flex: 1;
  873. }
  874. }
  875. .bgColor {
  876. background-color: white;
  877. }
  878. .food-item {
  879. border-top: 0.16rem rgb(238, 238, 238) solid;
  880. }
  881. .food-content {
  882. border-top: 0.01rem rgb(223, 222, 222) solid;
  883. border-bottom: 0.01rem rgb(223, 222, 222) solid;
  884. }
  885. .cube-select {
  886. height: 0.88rem;
  887. line-height: 0.88rem;
  888. padding: 0 0.24rem;
  889. font-size: 0.36rem;
  890. color: #333333;
  891. border-bottom: 0.08rem solid #e5e5e5;
  892. }
  893. .title {
  894. display: flex;
  895. justify-content: space-between;
  896. height: 0.7rem;
  897. line-height: 0.7rem;
  898. border-top: 0.01rem rgb(223, 222, 222) solid;
  899. padding: 0 0.24rem;
  900. border-bottom: 0.01rem rgb(223, 222, 222) solid;
  901. }
  902. .title i {
  903. font-size: 0.32rem;
  904. color: #005395;
  905. }
  906. .title div:nth-child(1) {
  907. font-size: 0.32rem;
  908. }
  909. .title div:nth-child(1) span {
  910. display: inline-block;
  911. margin-left: 0.08rem;
  912. }
  913. .title div:nth-child(2) {
  914. padding: 0.05rem 0.3rem;
  915. /* border: 0.01rem rgb(0,0,255) solid; */
  916. border-radius: 16px;
  917. /* color: rgb(0,0,255); */
  918. height: 0.25rem;
  919. line-height: 0.25rem;
  920. margin-top: 0.15rem;
  921. font-size: 0.24rem;
  922. }
  923. .weishouli {
  924. color: #991f00;
  925. border: 0.01rem #991f00 solid;
  926. background-color: #f4e8e5;
  927. }
  928. .bushouli {
  929. color: #666666;
  930. background-color: #eeeeee;
  931. border: 0.01rem #666666 solid;
  932. }
  933. .chulizhong {
  934. color: #003057;
  935. background-color: #e5eaee;
  936. border: 0.01rem #003057 solid;
  937. }
  938. .daipingjia {
  939. color: #825b00;
  940. background-color: #f2eee5;
  941. border: 0.01rem #825b00 solid;
  942. }
  943. .yijiejue {
  944. color: #40a19c;
  945. background-color: #ebf5f5;
  946. border: 0.01rem #40a19c solid;
  947. }
  948. .yichehui {
  949. color: #48a843;
  950. background-color: #ecf6ec;
  951. border: 0.01rem #48a843 solid;
  952. }
  953. // .conent {
  954. // font-size: 0.28rem;
  955. // line-height: 0.39rem;
  956. // overflow: hidden;
  957. // display: -webkit-box;
  958. // -webkit-line-clamp: 2;
  959. // -webkit-box-orient: vertical;
  960. // word-break: break-all;
  961. // padding: 0 0.64rem;
  962. // margin: 0.24rem 0;
  963. // }
  964. .timeBox {
  965. display: flex;
  966. justify-content: space-between;
  967. font-size: 0.24rem;
  968. color: #999999;
  969. border-top: 0.01rem rgb(223, 222, 222) solid;
  970. height: 0.7rem;
  971. line-height: 0.7rem;
  972. padding: 0 0.24rem 0 0.64rem;
  973. }
  974. .wushuju {
  975. margin-top: 2.4rem;
  976. text-align: center;
  977. color: #999;
  978. }
  979. .wushuju img {
  980. width: 5.12rem;
  981. height: 2.84rem;
  982. }
  983. .conentBox {
  984. width: 100%;
  985. height: 100%;
  986. .conent {
  987. font-size: 0.32rem;
  988. font-weight: 400;
  989. line-height: 0.45rem;
  990. border-bottom: 0.16rem solid #e5e5e5;
  991. .head {
  992. border-bottom: 0.01rem solid #e6e6e6;
  993. p {
  994. padding: 0.24rem 0.48rem;
  995. i {
  996. color: #00559d;
  997. }
  998. .btn {
  999. float: right;
  1000. }
  1001. }
  1002. }
  1003. .center {
  1004. color: #333333;
  1005. border-bottom: 0.01rem solid #e6e6e6;
  1006. padding: 0.24rem 0.48rem;
  1007. p {
  1008. &.desc {
  1009. overflow: hidden;
  1010. max-height: 0.88rem;
  1011. }
  1012. .grayFont {
  1013. overflow-x: scroll;
  1014. color: #666;
  1015. }
  1016. }
  1017. }
  1018. .bottom {
  1019. display: flex;
  1020. justify-content: space-between;
  1021. align-items: center;
  1022. overflow: hidden;
  1023. height: 0.86rem;
  1024. border-bottom: 0.01rem solid #e6e6e6;
  1025. font-size: 0.24rem;
  1026. color: #999;
  1027. padding: 0 0.24rem 0 0.48rem;
  1028. }
  1029. }
  1030. }
  1031. </style>