suishenbangOutstoreVisit.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. <template>
  2. <div>
  3. <!-- 顶部条-->
  4. <div class="navBarTOP">
  5. <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft" />
  6. </div>
  7. <!-- 主体内容-->
  8. <div class="container">
  9. <div class="lineGrey"></div>
  10. <div class="lineGrey"></div>
  11. <div class="lineGrey"></div>
  12. <div class="lineGrey"></div>
  13. <div class="lineGrey"></div>
  14. <div class="card mt10">
  15. <div class="title f-blue">
  16. {{ storeName }}(<span style="color: #0057ba">{{ urlParameter.storeCode }}</span
  17. >)
  18. </div>
  19. <div class="info1" v-if="addressLine != null">类型:{{ storeCategory }}</div>
  20. <div class="info1" v-if="addressLine != 'null'">地址:{{ addressLine }}</div>
  21. <div class="info1" v-if="notes != null">上次拜访备注:{{ notes }}</div>
  22. <div class="info1">拜访时长:{{ showTime }}</div>
  23. <div class="info1">
  24. <span v-if="urlParameter.hisTime"
  25. >上次拜访时间:{{ parseTime(urlParameter.hisTime) }}</span
  26. ><span @click="shows = true" class="f-blue" v-if="visitsRemarks" style="font-weight: bold"
  27. ><van-icon name="browsing-history-o" />查看最近三次</span
  28. >
  29. </div>
  30. <van-button
  31. type="info"
  32. style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
  33. size="small"
  34. plain
  35. class="centerBtn"
  36. @click="visitFn(urlParameter.storeCode)"
  37. >经营情况</van-button
  38. >
  39. <van-button
  40. type="info"
  41. style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
  42. size="small"
  43. plain
  44. v-if="showOrderButton"
  45. class="centerBtn"
  46. @click="overbookingFn(urlParameter)"
  47. >去下单</van-button
  48. >
  49. <van-button
  50. type="info"
  51. style="
  52. float: right;
  53. background: #ed5565;
  54. border-color: #ed5565;
  55. color: #fff;
  56. margin: 10px 0;
  57. border-radius: 5px;
  58. "
  59. size="small"
  60. plain
  61. class="centerBtn"
  62. @click="onstopVisit"
  63. >取消拜访</van-button
  64. >
  65. </div>
  66. <div
  67. v-if="addShow1"
  68. style="color: #999; font-size: 12px; padding: 10px; background-color: #f5f5f5">
  69. <van-icon name="info-o" />&nbsp;今天拜访拍照内容,将同步传给部主管查阅。
  70. </div>
  71. <div class="card">
  72. <div
  73. class="info"
  74. v-for="(item, index) in list"
  75. :key="index"
  76. @click="addStoreVisit(item, index)">
  77. <span class="must" v-show="item.isMust == '0' || item.isMust == '2'">*</span>
  78. <span class="must" v-show="item.isMust != '0' && item.isMust != '2'">&nbsp;</span>
  79. <p style="width: 74%; margin: 0; line-height: 24px; display: inline-block">
  80. {{ item.taskName }}
  81. </p>
  82. <span v-show="item.processKey != null" class="processIco">
  83. <van-icon :name="sp" size="16" />
  84. </span>
  85. <span v-show="!item.success" class="arrow" style="background-color: #fff; color: #444"
  86. ><van-icon name="arrow"
  87. /></span>
  88. <span v-show="item.success" class="arrow" tyle="background-color: #0057ba"
  89. ><van-icon name="success"
  90. /></span>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="tc" style="padding: 0 16px">
  95. <van-button class="submitBtn" block type="info" color="#0057ba" @click="endVisitsFn"
  96. >提交拜访</van-button
  97. >
  98. </div>
  99. <br />
  100. <van-dialog v-model="shows">
  101. <div class="tipTitleBox" style="padding: 10px">
  102. <p class="p">近三次拜访备注</p>
  103. <div
  104. v-for="item in visitsRemarks"
  105. style="border-bottom: 1px solid #e8e8e8; font-size: 14px; padding: 10px 0">
  106. <p>拜访时间:{{ item.stopTime }}</p>
  107. <p>备注:{{ item.visitRemark }}</p>
  108. </div>
  109. </div>
  110. </van-dialog>
  111. <div id="allmap"></div>
  112. </div>
  113. </template>
  114. <script>
  115. import sp from './../../assets/sp.png';
  116. import {
  117. getStoreGroupTask,
  118. endVisits,
  119. editDwellTime,
  120. suishenbangStoreSale,
  121. stopVisit,
  122. buryingPoint,
  123. } from '@/api/index';
  124. import axios from 'axios';
  125. import { saveVisitsParams, getOrderUrlByStoreId } from '@/api/inventory';
  126. import store from '@/store';
  127. export default {
  128. name: 'suishenbangOutstoreVisit',
  129. data() {
  130. return {
  131. notes: '',
  132. visitModel: '1',
  133. sp: sp,
  134. shows: false,
  135. flag: true,
  136. questionsshow: false,
  137. uploadImgshow: false,
  138. imgs: [],
  139. uploadImages: [],
  140. uploadid1: 'uploadid1',
  141. uploadid2: 'uploadid2',
  142. iscuxiao: false,
  143. text: '',
  144. radio: '',
  145. uploadImgEditText: '编辑',
  146. isEdit: false,
  147. storeId: '',
  148. rdId: '',
  149. lat: '',
  150. lon: '',
  151. list: [],
  152. storeGroupId: '',
  153. addShow1: false,
  154. visitId: '',
  155. addressLine: '',
  156. storeCategory: '',
  157. storeName: '',
  158. contactName: '',
  159. urlParameter: '',
  160. uType: '-1',
  161. showOrderButton: null,
  162. visitsRemarks: [],
  163. location: {
  164. lat: '34.6174',
  165. lon: '112.44039',
  166. },
  167. address: '',
  168. showTime: '00:00:00',
  169. city: '',
  170. locationAccuracy: '',
  171. id: '89',
  172. startTime: null,
  173. timeN: null,
  174. };
  175. },
  176. created() {
  177. this.urlParameter = this.$route.query;
  178. this.storeId = this.$route.query.storeId + '';
  179. this.visitId = this.$route.query.visitId;
  180. this.storeCode = this.$route.query.storeCode;
  181. this.rdId = this.$route.query.rdId + '';
  182. this.addressLine = this.$route.query.addressLine;
  183. this.storeCategory = this.$route.query.storeCategory;
  184. this.storeName = this.$route.query.storeName;
  185. this.contactName = this.$route.query.contactName;
  186. this.lat = this.$route.query.lat + '';
  187. this.lon = this.$route.query.lon + '';
  188. this.visitModel = this.$route.query.visitModel + '';
  189. this.uType = localStorage.getItem('uType');
  190. },
  191. beforeRouteLeave(to, from, next) {
  192. if (
  193. (to.path == '/outsidelist/index' && from.path == '/suishenbangOutstoreVisit') ||
  194. (to.path == '/storeAdd' && from.path == '/suishenbangOutstoreVisit')
  195. ) {
  196. if (this.visitId != null && this.visitId != '') {
  197. this.editDwellTimes();
  198. }
  199. }
  200. next();
  201. },
  202. activated() {
  203. this.urlParameter = this.$route.query;
  204. this.storeId = this.$route.query.storeId + '';
  205. this.visitId = this.$route.query.visitId;
  206. this.storeCode = this.$route.query.storeCode;
  207. this.rdId = this.$route.query.rdId + '';
  208. this.addressLine = this.$route.query.addressLine + '';
  209. this.storeCategory = this.$route.query.storeCategory + '';
  210. this.storeName = this.$route.query.storeName + '';
  211. this.contactName = this.$route.query.contactName + '';
  212. this.lat = this.$route.query.lat + '';
  213. this.lon = this.$route.query.lon + '';
  214. this.list = [];
  215. this.visitModel = this.$route.query.visitModel + '';
  216. this.uType = localStorage.getItem('uType');
  217. if (localStorage.getItem('visitId') != null) {
  218. this.visitId = localStorage.getItem('visitId');
  219. setTimeout(() => {
  220. this.addVisits();
  221. });
  222. } else {
  223. setTimeout(() => {
  224. this.addVisits();
  225. });
  226. }
  227. },
  228. methods: {
  229. animation() {
  230. //前时间减去上次开启时间减去暂停累计时间
  231. var times = new Date().getTime() - new Date(this.startTime).getTime();
  232. var house = Math.floor(times / 3600000); //毫秒转化为分钟
  233. var minutes = Math.floor(times / 60000 - house * 60); //毫秒转化为分钟
  234. var minutes1 = Math.floor(times / 60000); //毫秒转化为分钟
  235. var seconds = Math.floor((times - minutes1 * 60000) / 1000); //已知分钟将time减去分钟 除去1000得出 秒
  236. var ms = Math.floor((times - minutes1 * 60000 - seconds * 1000) / 10); //
  237. this.showTime =
  238. (house < 10 ? '0' + house : house) +
  239. ':' +
  240. (minutes < 10 ? '0' + minutes : minutes) +
  241. ':' +
  242. (seconds < 10 ? '0' + seconds : seconds);
  243. // +":"
  244. // +(ms<10 ? "0"+ms : ms);
  245. },
  246. // 结束拜访
  247. onstopVisit() {
  248. this.$dialog
  249. .confirm({
  250. confirmButtonText: '确定',
  251. cancelButtonText: '取消',
  252. title: '系统提示',
  253. message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
  254. })
  255. .then(() => {
  256. stopVisit({ visitsId: this.visitId }).then((res) => {
  257. if (res.code == 200) {
  258. this.$dialog
  259. .alert({
  260. title: '系统提示',
  261. message: '拜访中任务结束成功!',
  262. })
  263. .then(() => {
  264. // this.$router.replace({});
  265. this.onClickLeft();
  266. // window.location.replace(window.location.origin + '/mobile/outsidelist/index');
  267. });
  268. } else {
  269. this.$dialog.alert({
  270. title: '系统提示',
  271. message: res.msg,
  272. });
  273. }
  274. });
  275. });
  276. },
  277. overbookingFn(val) {
  278. buryingPoint({
  279. systemModel: '拜访页',
  280. buryingPointType: 1,
  281. buryingPointValue: val.storeName + '(' + val.storeCode + ')',
  282. buryingPointName: '去下单',
  283. buryingPointPosition: '拜访页',
  284. });
  285. this.toastLoading(0, '加载中...', true);
  286. getOrderUrlByStoreId({
  287. storeId: this.$route.query.storeId,
  288. from: this.$route.query.from,
  289. }).then((res) => {
  290. this.toastLoading().clear();
  291. if (res.code == 200 && res.data) {
  292. window.location.href = res.data;
  293. } else {
  294. this.Toast({
  295. message: res.msg,
  296. duration: 5000,
  297. });
  298. }
  299. });
  300. },
  301. visitFn(val) {
  302. var that = this;
  303. suishenbangStoreSale({ storeCode: val }).then((res) => {
  304. if (res.code == 200) {
  305. if (res.data.num != '0') {
  306. window.location.href =
  307. process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + val;
  308. } else {
  309. that.$toast(res.data.msg);
  310. }
  311. } else {
  312. that.$toast(res.msg);
  313. }
  314. });
  315. },
  316. getLocation() {
  317. let loading1 = this.$toast.loading({
  318. duration: 0,
  319. message: '加载中...',
  320. forbidClick: true,
  321. });
  322. this.list = [];
  323. let url = window.location.href;
  324. let that = this;
  325. let wx = this.wx;
  326. let qiyeData;
  327. const instance = axios.create();
  328. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  329. instance
  330. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  331. params: {
  332. url: url,
  333. },
  334. })
  335. .then((response) => {
  336. if (response.status == 200) {
  337. loading1.clear();
  338. qiyeData = response.data.data;
  339. wx.config({
  340. beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  341. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  342. appId: qiyeData.appId, // 必填,企业微信的corpID
  343. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  344. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  345. signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  346. jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  347. });
  348. wx.ready(function () {
  349. wx.getLocation({
  350. type: 'gcj02',
  351. success: function (res) {
  352. var location = that.CJ02BD(res.latitude, res.longitude);
  353. that.location = location;
  354. if (that.urlParameter.lat == '' || that.urlParameter.lat == null) {
  355. that.lat = that.location.lat;
  356. that.lon = that.location.lon;
  357. }
  358. let PointSum = that
  359. .twoPointSum(that.lat, that.lon, location.lat, location.lon)
  360. .toFixed(2);
  361. if (PointSum > 500) {
  362. that.visitModel = '5';
  363. localStorage.setItem('visitModel', '5');
  364. that.$dialog
  365. .confirm({
  366. confirmButtonText: '确定',
  367. cancelButtonText: '重新定位',
  368. title: '系统提示',
  369. message: '距离本店距离差距太大',
  370. })
  371. .then(() => {
  372. that.addVisits();
  373. })
  374. .catch(() => {
  375. that.getLocation();
  376. });
  377. } else {
  378. that.addVisits();
  379. }
  380. },
  381. fail: function () {
  382. that.$dialog
  383. .alert({
  384. message: 'GPS未开启',
  385. })
  386. .then(() => {
  387. that.getLocation();
  388. });
  389. },
  390. });
  391. });
  392. }
  393. });
  394. },
  395. editDwellTimes() {
  396. let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date()) + '';
  397. editDwellTime({ dwellTime: dwellTime, visitsId: this.visitId }).then((res) => {
  398. if (res.code == 200) {
  399. localStorage.removeItem('visitId');
  400. }
  401. });
  402. },
  403. weekend(time1) {
  404. var arrtime1 = new Date(time1).getTime();
  405. var arrtime2 = new Date().getTime();
  406. return Math.round((arrtime2 - arrtime1) / 1000);
  407. },
  408. addVisits() {
  409. var postType = localStorage.getItem('postType');
  410. if (postType == 'GZ') {
  411. this.addShow1 = false;
  412. } else {
  413. this.addShow1 = true;
  414. }
  415. var visitEntry = '';
  416. if (this.urlParameter.tabVal == '0') {
  417. visitEntry = '2';
  418. } else {
  419. visitEntry = '1';
  420. }
  421. if (this.$route.query.shopCode != undefined) {
  422. this.storeCode = this.$route.query.shopCode;
  423. }
  424. var that = this;
  425. var map = new TMap.Map('allmap', {
  426. zoom: 14,
  427. center: new TMap.LatLng(39.986785, 116.301012),
  428. });
  429. var geocoder = new TMap.service.Geocoder();
  430. var markers = new TMap.MultiMarker({
  431. map: map,
  432. geometries: [],
  433. });
  434. markers.setGeometries([]);
  435. var input = [that.urlParameter.marklat, that.urlParameter.marklon];
  436. var location = new TMap.LatLng(Number(input[0]), Number(input[1]));
  437. geocoder.getAddress({ location: location }).then(
  438. function (result) {
  439. var addresses = result.result.formatted_addresses;
  440. let address_component = result.result.address_component;
  441. let province = address_component.province;
  442. let city = address_component.city;
  443. let district = address_component.district;
  444. console.log('province=' + province);
  445. console.log('city=' + city);
  446. console.log('district=' + district);
  447. var params = {
  448. storeId: that.storeId,
  449. storeCode: that.storeCode,
  450. visitEntry: visitEntry,
  451. lat: that.urlParameter.latNew,
  452. lon: that.urlParameter.lonNew,
  453. visitModel: that.visitModel,
  454. routeDetailsId: that.rdId,
  455. visitSource: '1',
  456. locationCity: '',
  457. locationRemark: addresses.recommend,
  458. locationAccuracy: that.urlParameter.PointSum,
  459. province: address_component.province,
  460. city: address_component.city,
  461. district: address_component.district,
  462. };
  463. that.locationAccuracy = that.urlParameter.PointSum;
  464. that.city = '';
  465. that.address = addresses.recommend;
  466. localStorage.setItem('address', '');
  467. if (that.visitId != null) {
  468. params.id = that.visitId;
  469. }
  470. let loading2 = that.$toast.loading({
  471. duration: 0,
  472. message: '加载中...',
  473. forbidClick: true,
  474. });
  475. getStoreGroupTask(params).then((res) => {
  476. loading2.clear();
  477. if (res.code == 200) {
  478. localStorage.setItem('visitId', res.data.visitId);
  479. that.notes = res.data.notes;
  480. that.visitId = res.data.visitId;
  481. that.list = res.data.sfaTaskList;
  482. that.storeGroupId = res.data.storeGroupId;
  483. that.showOrderButton = res.data.showOrderButton;
  484. that.startTime = res.data.startTime;
  485. that.timeN = setInterval(that.animation, 16);
  486. that.visitsRemarks = res.data.visitsRemarks;
  487. } else {
  488. that.$toast(res.msg);
  489. }
  490. });
  491. },
  492. function (err) {
  493. var params = {
  494. storeId: that.storeId,
  495. storeCode: that.storeCode,
  496. visitEntry: visitEntry,
  497. lat: that.urlParameter.latNew,
  498. lon: that.urlParameter.lonNew,
  499. visitModel: that.visitModel,
  500. routeDetailsId: that.rdId,
  501. visitSource: '1',
  502. locationCity: '',
  503. locationRemark: '',
  504. locationAccuracy: that.urlParameter.PointSum,
  505. };
  506. that.locationAccuracy = that.urlParameter.PointSum;
  507. that.city = '';
  508. that.address = '';
  509. localStorage.setItem('address', '');
  510. if (that.visitId != null) {
  511. params.id = that.visitId;
  512. }
  513. let loading2 = that.$toast.loading({
  514. duration: 0,
  515. message: '加载中...',
  516. forbidClick: true,
  517. });
  518. getStoreGroupTask(params).then((res) => {
  519. loading2.clear();
  520. if (res.code == 200) {
  521. localStorage.setItem('visitId', res.data.visitId);
  522. that.notes = res.data.notes;
  523. that.visitId = res.data.visitId;
  524. that.list = res.data.sfaTaskList;
  525. that.storeGroupId = res.data.storeGroupId;
  526. that.showOrderButton = res.data.showOrderButton;
  527. that.startTime = res.data.startTime;
  528. that.timeN = setInterval(that.animation, 16);
  529. that.visitsRemarks = res.data.visitsRemarks;
  530. } else {
  531. that.$toast(res.msg);
  532. }
  533. });
  534. }
  535. );
  536. },
  537. addStoreVisit(val, index) {
  538. this.$router.push({
  539. path: '/addStoreVisit',
  540. query: {
  541. storeId: this.storeId,
  542. storeCode: this.urlParameter.storeCode,
  543. visitId: this.visitId,
  544. ids: index,
  545. taskId: val.taskId,
  546. storeGroupId: this.storeGroupId,
  547. taskType: val.taskType,
  548. photoType: val.photoType,
  549. lat: this.lat,
  550. lon: this.lon,
  551. visitSource: '1',
  552. visitModel: this.visitModel,
  553. locationCity: this.city,
  554. locationRemark: this.address,
  555. locationAccuracy: this.locationAccuracy,
  556. },
  557. });
  558. },
  559. onClickLeft() {
  560. if (this.$route.query.urltype == 1) {
  561. window.location.replace(window.location.origin + '/mobile/home');
  562. } else {
  563. store.dispatch('setDeviceOutsidePage', true);
  564. // 返回上一页不会刷新页面
  565. this.$router.go(-1);
  566. }
  567. },
  568. onshouow() {
  569. this.uploadshow = false;
  570. this.questionsshow = false;
  571. },
  572. uploadImgEdit() {
  573. if (this.uploadImgEditText == '编辑') {
  574. this.uploadImgEditText = '完成';
  575. } else {
  576. this.uploadImgEditText = '编辑';
  577. this.uploadImgshow = false;
  578. }
  579. },
  580. deleteImg(index) {
  581. this.imgs.splice(index, 1);
  582. },
  583. questionClick(item) {
  584. console.log(item);
  585. if (item.isUpload) {
  586. this.uploadshow = true;
  587. } else if (item.isQuestion) {
  588. this.questionsshow = true;
  589. }
  590. },
  591. endVisitsFn() {
  592. if (this.list.length == 0) {
  593. this.$toast('暂无任务提交');
  594. return;
  595. }
  596. for (var vl = 0; vl < this.list.length; vl++) {
  597. if (this.list[vl].isMust == '0') {
  598. if (!this.list[vl].success) {
  599. this.$toast(this.list[vl].taskName + '任务未完成');
  600. return;
  601. }
  602. }
  603. }
  604. let loading1 = this.$toast.loading({
  605. duration: 0,
  606. message: '加载中...',
  607. forbidClick: true,
  608. });
  609. let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date());
  610. let storeCode = this.storeCode;
  611. if (this.$route.query.shopCode != undefined) {
  612. storeCode = this.$route.query.shopCode;
  613. }
  614. if (this.flag) {
  615. this.flag = false;
  616. this.timer = null;
  617. this.timer = setTimeout(() => {
  618. this.flag = true;
  619. }, 5000);
  620. endVisits({
  621. visitSource: '1',
  622. storeGroupId: this.storeGroupId,
  623. id: this.visitId,
  624. storeCode: storeCode,
  625. dwellTime: dwellTime,
  626. visitModel: this.$route.query.visitModel,
  627. }).then((res) => {
  628. this.flag = true;
  629. loading1.clear();
  630. if (res.code == 200) {
  631. this.editDwellTimes();
  632. if (this.$route.query.linkType == 6) {
  633. window.location.replace(window.location.origin + '/mobile/topStore?info=y');
  634. } else {
  635. if (this.$route.query.urltype == 1) {
  636. window.location.replace(window.location.origin + '/mobile/home');
  637. } else {
  638. this.onClickLeft();
  639. // window.location.replace(
  640. // window.location.origin + '/mobile/outsidelist/index?info=y'
  641. // );
  642. }
  643. }
  644. } else {
  645. this.$toast({
  646. message: res.msg,
  647. duration: 5000,
  648. });
  649. }
  650. });
  651. }
  652. },
  653. newimgarr1(val) {
  654. this.imgs = val;
  655. },
  656. uploadImgShowFn() {
  657. this.uploadImgshow = true;
  658. if (this.uploadImages.length <= 0) {
  659. this.uploadImgEditText = '';
  660. }
  661. },
  662. previewsImg(index) {
  663. ImagePreview({
  664. images: this.uploadImages,
  665. startPosition: index,
  666. onClose() {
  667. // do something
  668. },
  669. });
  670. },
  671. },
  672. destroyed() {
  673. this.timeN = null;
  674. clearInterval(this.timeN);
  675. },
  676. };
  677. </script>
  678. <style lang="scss" scoped>
  679. .container {
  680. margin-bottom: 10px;
  681. background-color: white;
  682. /*padding:0 16px;*/
  683. }
  684. .navBarOverlay {
  685. background: #fff;
  686. }
  687. .card {
  688. background: #fff;
  689. box-sizing: border-box;
  690. padding: 10px 16px;
  691. .title {
  692. line-height: 32px;
  693. font-size: 16px;
  694. font-weight: bold;
  695. color: #333;
  696. }
  697. .subtitle {
  698. line-height: 24px;
  699. font-size: 14px;
  700. color: #7b7b7b;
  701. .status {
  702. float: right;
  703. }
  704. }
  705. .info {
  706. font-size: 14px;
  707. color: #484848;
  708. padding: 14px;
  709. border-bottom: 1px solid #f1f1f1;
  710. position: relative;
  711. .arrow {
  712. float: right;
  713. display: inline-block;
  714. height: 20px;
  715. width: 20px;
  716. line-height: 20px;
  717. text-align: center;
  718. border-radius: 50%;
  719. background: #0057ba;
  720. color: #fff;
  721. font-weight: bold;
  722. font-size: 14px;
  723. position: absolute;
  724. margin-top: -10px;
  725. right: 0;
  726. top: 50%;
  727. }
  728. }
  729. .info1 {
  730. font-size: 14px;
  731. color: #666;
  732. line-height: 18px;
  733. padding: 4px 0;
  734. position: relative;
  735. .arrow {
  736. float: right;
  737. display: inline-block;
  738. height: 20px;
  739. width: 20px;
  740. line-height: 20px;
  741. text-align: center;
  742. border-radius: 50%;
  743. background: #0057ba;
  744. color: #fff;
  745. font-weight: bold;
  746. font-size: 14px;
  747. margin-top: 9px;
  748. position: absolute;
  749. right: 0;
  750. top: 50%;
  751. margin-top: -10px;
  752. }
  753. }
  754. }
  755. .must {
  756. font-size: 18px;
  757. color: #f56c6c;
  758. margin-right: 2px;
  759. }
  760. .zw {
  761. display: inline-block;
  762. width: 7px;
  763. height: 100%;
  764. }
  765. .lineGrey {
  766. height: 10px;
  767. width: 100%;
  768. background: #f1f1f1;
  769. }
  770. .submitBtn {
  771. margin: 16px 0;
  772. font-size: 18px;
  773. }
  774. .wrapper {
  775. display: flex;
  776. align-items: center;
  777. justify-content: center;
  778. height: 100%;
  779. .block {
  780. width: 100%;
  781. height: 100%;
  782. background-color: #fff;
  783. overflow: auto;
  784. }
  785. }
  786. .questionName {
  787. font-size: 16px;
  788. color: #484848;
  789. /*line-height: 40px;*/
  790. background: #f4f4f4;
  791. padding: 10px 15px;
  792. box-sizing: border-box;
  793. position: relative;
  794. display: flex;
  795. justify-content: center;
  796. .text {
  797. flex: 9;
  798. }
  799. }
  800. .answerDiv {
  801. background: #fff;
  802. padding: 0 15px 10px;
  803. .answerItem {
  804. padding: 10px 0;
  805. border-bottom: 1px solid #dedede;
  806. .name {
  807. line-height: 36px;
  808. font-size: 14px;
  809. color: #8b8b8b;
  810. }
  811. }
  812. }
  813. .border {
  814. border: 1px solid #dedede;
  815. }
  816. .ht30 {
  817. height: 30px;
  818. }
  819. .bodrder-b {
  820. border-bottom: 1px solid #dedede;
  821. }
  822. .img-box {
  823. width: 50%;
  824. /*height: 100%;*/
  825. position: relative;
  826. padding: 10px;
  827. display: inline-block;
  828. i {
  829. position: absolute;
  830. right: 2px;
  831. top: 2px;
  832. }
  833. img {
  834. width: 100%;
  835. height: 100%;
  836. }
  837. }
  838. .imgNull {
  839. text-align: center;
  840. padding-top: 100px;
  841. i {
  842. color: #dedede;
  843. }
  844. div {
  845. padding-top: 30px;
  846. font-size: 18px;
  847. font-weight: bold;
  848. }
  849. }
  850. .card .f-blue {
  851. color: #0057ba;
  852. }
  853. </style>
  854. <style>
  855. .navBarOverlay .van-nav-bar__left .van-icon {
  856. color: #8b8b8b;
  857. }
  858. .navBarOverlay .van-nav-bar__right .van-nav-bar__text {
  859. color: #333;
  860. }
  861. .ht30 .van-radio__label {
  862. color: #8b8b8b;
  863. }
  864. .van-dialog__confirm,
  865. .van-dialog__confirm:active {
  866. color: #0057ba;
  867. }
  868. #allmap {
  869. width: 20px;
  870. height: 20px;
  871. left: -1000px;
  872. position: relative;
  873. }
  874. </style>