suishenbangOutstoreVisit.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  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
  70. name="info-o" />&nbsp;可控店及金牌店的店招任务中,若拍摄两次仍不通过,允许提交,不影响正常拜访。
  71. </div>
  72. <div class="card">
  73. <div
  74. class="info"
  75. v-for="(item, index) in list"
  76. :key="index"
  77. @click="addStoreVisit(item, index)">
  78. <span class="must" v-show="item.isMust == '0' || item.isMust == '2'">*</span>
  79. <span class="must" v-show="item.isMust != '0' && item.isMust != '2'">&nbsp;</span>
  80. <p style="width: 74%; margin: 0; line-height: 24px; display: inline-block">
  81. {{ item.taskName }}
  82. </p>
  83. <span v-show="item.processKey != null" class="processIco">
  84. <van-icon :name="sp" size="16" />
  85. </span>
  86. <span v-show="!item.success" class="arrow" style="background-color: #fff; color: #444"
  87. ><van-icon name="arrow"
  88. /></span>
  89. <span v-show="item.success" class="arrow" tyle="background-color: #0057ba"
  90. ><van-icon name="success"
  91. /></span>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="tc" style="padding: 0 16px">
  96. <van-button class="submitBtn" block type="info" color="#0057ba" @click="endVisitsFn"
  97. >提交拜访</van-button
  98. >
  99. </div>
  100. <br />
  101. <van-dialog v-model="shows">
  102. <div class="tipTitleBox" style="padding: 10px">
  103. <p class="p">近三次拜访备注</p>
  104. <div
  105. v-for="item in visitsRemarks"
  106. style="border-bottom: 1px solid #e8e8e8; font-size: 14px; padding: 10px 0">
  107. <p>拜访时间:{{ item.stopTime }}</p>
  108. <p>备注:{{ item.visitRemark }}</p>
  109. </div>
  110. </div>
  111. </van-dialog>
  112. <div id="allmap"></div>
  113. </div>
  114. </template>
  115. <script>
  116. import sp from './../../assets/sp.png';
  117. import {
  118. getStoreGroupTask,
  119. endVisits,
  120. editDwellTime,
  121. suishenbangStoreSale,
  122. stopVisit,
  123. buryingPoint,
  124. } from '@/api/index';
  125. import axios from 'axios';
  126. import { saveVisitsParams, getOrderUrlByStoreId } from '@/api/inventory';
  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. console.log(addresses);
  448. console.log(addresses.recommend);
  449. var params = {
  450. storeId: that.storeId,
  451. storeCode: that.storeCode,
  452. visitEntry: visitEntry,
  453. lat: that.urlParameter.latNew,
  454. lon: that.urlParameter.lonNew,
  455. visitModel: that.visitModel,
  456. routeDetailsId: that.rdId,
  457. visitSource: '1',
  458. locationCity: '',
  459. locationRemark: addresses.recommend,
  460. locationAccuracy: that.urlParameter.PointSum,
  461. province: address_component.province,
  462. city: address_component.city,
  463. district: address_component.district,
  464. };
  465. that.locationAccuracy = that.urlParameter.PointSum;
  466. that.city = '';
  467. that.address = addresses.recommend;
  468. localStorage.setItem('address', '');
  469. if (that.visitId != null) {
  470. params.id = that.visitId;
  471. }
  472. let loading2 = that.$toast.loading({
  473. duration: 0,
  474. message: '加载中...',
  475. forbidClick: true,
  476. });
  477. getStoreGroupTask(params).then((res) => {
  478. loading2.clear();
  479. if (res.code == 200) {
  480. localStorage.setItem('visitId', res.data.visitId);
  481. that.notes = res.data.notes;
  482. that.visitId = res.data.visitId;
  483. that.list = res.data.sfaTaskList;
  484. that.storeGroupId = res.data.storeGroupId;
  485. that.showOrderButton = res.data.showOrderButton;
  486. that.startTime = res.data.startTime;
  487. that.timeN = setInterval(that.animation, 16);
  488. that.visitsRemarks = res.data.visitsRemarks;
  489. } else {
  490. that.$toast(res.msg);
  491. }
  492. });
  493. },
  494. function (err) {
  495. var params = {
  496. storeId: that.storeId,
  497. storeCode: that.storeCode,
  498. visitEntry: visitEntry,
  499. lat: that.urlParameter.latNew,
  500. lon: that.urlParameter.lonNew,
  501. visitModel: that.visitModel,
  502. routeDetailsId: that.rdId,
  503. visitSource: '1',
  504. locationCity: '',
  505. locationRemark: '',
  506. locationAccuracy: that.urlParameter.PointSum,
  507. };
  508. that.locationAccuracy = that.urlParameter.PointSum;
  509. that.city = '';
  510. that.address = '';
  511. localStorage.setItem('address', '');
  512. if (that.visitId != null) {
  513. params.id = that.visitId;
  514. }
  515. let loading2 = that.$toast.loading({
  516. duration: 0,
  517. message: '加载中...',
  518. forbidClick: true,
  519. });
  520. getStoreGroupTask(params).then((res) => {
  521. loading2.clear();
  522. if (res.code == 200) {
  523. localStorage.setItem('visitId', res.data.visitId);
  524. that.notes = res.data.notes;
  525. that.visitId = res.data.visitId;
  526. that.list = res.data.sfaTaskList;
  527. that.storeGroupId = res.data.storeGroupId;
  528. that.showOrderButton = res.data.showOrderButton;
  529. that.startTime = res.data.startTime;
  530. that.timeN = setInterval(that.animation, 16);
  531. that.visitsRemarks = res.data.visitsRemarks;
  532. } else {
  533. that.$toast(res.msg);
  534. }
  535. });
  536. }
  537. );
  538. },
  539. addStoreVisit(val, index) {
  540. this.$router.push({
  541. path: '/addStoreVisit',
  542. query: {
  543. storeId: this.storeId,
  544. storeCode: this.urlParameter.storeCode,
  545. visitId: this.visitId,
  546. ids: index,
  547. taskId: val.taskId,
  548. storeGroupId: this.storeGroupId,
  549. taskType: val.taskType,
  550. photoType: val.photoType,
  551. lat: this.lat,
  552. lon: this.lon,
  553. visitSource: '1',
  554. visitModel: this.visitModel,
  555. locationCity: this.city,
  556. locationRemark: this.address,
  557. locationAccuracy: this.locationAccuracy,
  558. photoIdentifyType: val.photoIdentifyType,
  559. },
  560. });
  561. },
  562. onClickLeft() {
  563. if (this.$route.query.urltype == 1) {
  564. window.location.replace(window.location.origin + '/mobile/home');
  565. } else {
  566. this.$router.go(-1);
  567. }
  568. },
  569. onshouow() {
  570. this.uploadshow = false;
  571. this.questionsshow = false;
  572. },
  573. uploadImgEdit() {
  574. if (this.uploadImgEditText == '编辑') {
  575. this.uploadImgEditText = '完成';
  576. } else {
  577. this.uploadImgEditText = '编辑';
  578. this.uploadImgshow = false;
  579. }
  580. },
  581. deleteImg(index) {
  582. this.imgs.splice(index, 1);
  583. },
  584. questionClick(item) {
  585. console.log(item);
  586. if (item.isUpload) {
  587. this.uploadshow = true;
  588. } else if (item.isQuestion) {
  589. this.questionsshow = true;
  590. }
  591. },
  592. endVisitsFn() {
  593. if (this.list.length == 0) {
  594. this.$toast('暂无任务提交');
  595. return;
  596. }
  597. for (var vl = 0; vl < this.list.length; vl++) {
  598. if (this.list[vl].isMust == '0') {
  599. if (!this.list[vl].success) {
  600. this.$toast(this.list[vl].taskName + '任务未完成');
  601. return;
  602. }
  603. }
  604. }
  605. let loading1 = this.$toast.loading({
  606. duration: 0,
  607. message: '加载中...',
  608. forbidClick: true,
  609. });
  610. let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date());
  611. let storeCode = this.storeCode;
  612. if (this.$route.query.shopCode != undefined) {
  613. storeCode = this.$route.query.shopCode;
  614. }
  615. if (this.flag) {
  616. this.flag = false;
  617. this.timer = null;
  618. this.timer = setTimeout(() => {
  619. this.flag = true;
  620. }, 5000);
  621. endVisits({
  622. visitSource: '1',
  623. storeGroupId: this.storeGroupId,
  624. id: this.visitId,
  625. storeCode: storeCode,
  626. dwellTime: dwellTime,
  627. visitModel: this.$route.query.visitModel,
  628. }).then((res) => {
  629. this.flag = true;
  630. loading1.clear();
  631. if (res.code == 200) {
  632. this.editDwellTimes();
  633. if (this.$route.query.linkType == 6) {
  634. window.location.replace(window.location.origin + '/mobile/topStore?info=y');
  635. } else {
  636. if (this.$route.query.urltype == 1) {
  637. window.location.replace(window.location.origin + '/mobile/home');
  638. } else {
  639. this.onClickLeft();
  640. // window.location.replace(
  641. // window.location.origin + '/mobile/outsidelist/index?info=y'
  642. // );
  643. }
  644. }
  645. } else {
  646. this.$toast({
  647. message: res.msg,
  648. duration: 5000,
  649. });
  650. }
  651. });
  652. }
  653. },
  654. newimgarr1(val) {
  655. this.imgs = val;
  656. },
  657. uploadImgShowFn() {
  658. this.uploadImgshow = true;
  659. if (this.uploadImages.length <= 0) {
  660. this.uploadImgEditText = '';
  661. }
  662. },
  663. previewsImg(index) {
  664. ImagePreview({
  665. images: this.uploadImages,
  666. startPosition: index,
  667. onClose() {
  668. // do something
  669. },
  670. });
  671. },
  672. },
  673. destroyed() {
  674. this.timeN = null;
  675. clearInterval(this.timeN);
  676. },
  677. };
  678. </script>
  679. <style lang="scss" scoped>
  680. .container {
  681. margin-bottom: 10px;
  682. background-color: white;
  683. /*padding:0 16px;*/
  684. }
  685. .navBarOverlay {
  686. background: #fff;
  687. }
  688. .card {
  689. background: #fff;
  690. box-sizing: border-box;
  691. padding: 10px 16px;
  692. .title {
  693. line-height: 32px;
  694. font-size: 16px;
  695. font-weight: bold;
  696. color: #333;
  697. }
  698. .subtitle {
  699. line-height: 24px;
  700. font-size: 14px;
  701. color: #7b7b7b;
  702. .status {
  703. float: right;
  704. }
  705. }
  706. .info {
  707. font-size: 14px;
  708. color: #484848;
  709. padding: 14px;
  710. border-bottom: 1px solid #f1f1f1;
  711. position: relative;
  712. .arrow {
  713. float: right;
  714. display: inline-block;
  715. height: 20px;
  716. width: 20px;
  717. line-height: 20px;
  718. text-align: center;
  719. border-radius: 50%;
  720. background: #0057ba;
  721. color: #fff;
  722. font-weight: bold;
  723. font-size: 14px;
  724. position: absolute;
  725. margin-top: -10px;
  726. right: 0;
  727. top: 50%;
  728. }
  729. }
  730. .info1 {
  731. font-size: 14px;
  732. color: #666;
  733. line-height: 18px;
  734. padding: 4px 0;
  735. position: relative;
  736. .arrow {
  737. float: right;
  738. display: inline-block;
  739. height: 20px;
  740. width: 20px;
  741. line-height: 20px;
  742. text-align: center;
  743. border-radius: 50%;
  744. background: #0057ba;
  745. color: #fff;
  746. font-weight: bold;
  747. font-size: 14px;
  748. margin-top: 9px;
  749. position: absolute;
  750. right: 0;
  751. top: 50%;
  752. margin-top: -10px;
  753. }
  754. }
  755. }
  756. .must {
  757. font-size: 18px;
  758. color: #f56c6c;
  759. margin-right: 2px;
  760. }
  761. .zw {
  762. display: inline-block;
  763. width: 7px;
  764. height: 100%;
  765. }
  766. .lineGrey {
  767. height: 10px;
  768. width: 100%;
  769. background: #f1f1f1;
  770. }
  771. .submitBtn {
  772. margin: 16px 0;
  773. font-size: 18px;
  774. }
  775. .wrapper {
  776. display: flex;
  777. align-items: center;
  778. justify-content: center;
  779. height: 100%;
  780. .block {
  781. width: 100%;
  782. height: 100%;
  783. background-color: #fff;
  784. overflow: auto;
  785. }
  786. }
  787. .questionName {
  788. font-size: 16px;
  789. color: #484848;
  790. /*line-height: 40px;*/
  791. background: #f4f4f4;
  792. padding: 10px 15px;
  793. box-sizing: border-box;
  794. position: relative;
  795. display: flex;
  796. justify-content: center;
  797. .text {
  798. flex: 9;
  799. }
  800. }
  801. .answerDiv {
  802. background: #fff;
  803. padding: 0 15px 10px;
  804. .answerItem {
  805. padding: 10px 0;
  806. border-bottom: 1px solid #dedede;
  807. .name {
  808. line-height: 36px;
  809. font-size: 14px;
  810. color: #8b8b8b;
  811. }
  812. }
  813. }
  814. .border {
  815. border: 1px solid #dedede;
  816. }
  817. .ht30 {
  818. height: 30px;
  819. }
  820. .bodrder-b {
  821. border-bottom: 1px solid #dedede;
  822. }
  823. .img-box {
  824. width: 50%;
  825. /*height: 100%;*/
  826. position: relative;
  827. padding: 10px;
  828. display: inline-block;
  829. i {
  830. position: absolute;
  831. right: 2px;
  832. top: 2px;
  833. }
  834. img {
  835. width: 100%;
  836. height: 100%;
  837. }
  838. }
  839. .imgNull {
  840. text-align: center;
  841. padding-top: 100px;
  842. i {
  843. color: #dedede;
  844. }
  845. div {
  846. padding-top: 30px;
  847. font-size: 18px;
  848. font-weight: bold;
  849. }
  850. }
  851. .card .f-blue {
  852. color: #0057ba;
  853. }
  854. </style>
  855. <style>
  856. .navBarOverlay .van-nav-bar__left .van-icon {
  857. color: #8b8b8b;
  858. }
  859. .navBarOverlay .van-nav-bar__right .van-nav-bar__text {
  860. color: #333;
  861. }
  862. .ht30 .van-radio__label {
  863. color: #8b8b8b;
  864. }
  865. .van-dialog__confirm,
  866. .van-dialog__confirm:active {
  867. color: #0057ba;
  868. }
  869. #allmap {
  870. width: 20px;
  871. height: 20px;
  872. left: -1000px;
  873. position: relative;
  874. }
  875. </style>