suishenbangOutstoreVisit.vue 25 KB

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