index.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <div class="mianBox">
  3. <template v-if="isLogin">
  4. <div class="mianBoxF">
  5. <div class="titleType">
  6. <div>我的预约客户({{tableData.length}}人)</div>
  7. <div>商务端</div>
  8. </div>
  9. <van-divider />
  10. <van-form validate-trigger="onSubmit" class="formS" :submit-on-enter="false" ref="formS" :show-error="false">
  11. <van-field v-model="searchForm.phone" size="tel" name="手机" type="tel" placeholder="联系电话"/>
  12. <van-button plain block type="info" native-type="submit" @click="getData()">查询</van-button>
  13. </van-form>
  14. <div class="tableBox">
  15. <el-table border fit :data="tableData" height="100%" style="width: 100%">
  16. <el-table-column prop="name" label="客户姓名"> </el-table-column>
  17. <el-table-column prop="phone" label="联系电话"> </el-table-column>
  18. <el-table-column prop="companyName" label="单位名称"> </el-table-column>
  19. <el-table-column prop="post" label="职位"> </el-table-column>
  20. <el-table-column prop="sf" label="省份"> </el-table-column>
  21. <el-table-column prop="dateOfVisit" label="到访日期"> </el-table-column>
  22. <el-table-column prop="accompany" label="随行人数"> </el-table-column>
  23. </el-table>
  24. </div>
  25. </div>
  26. </template>
  27. <template v-else>
  28. <img src="../../assets/image/title.png" alt="" class="title" />
  29. <div class="ckyyxx">第20届上海国际社会</div>
  30. <div class="kjdl">公共安全展览会</div>
  31. <div class="formBox">
  32. <van-form
  33. @submit="onSubmit"
  34. validate-trigger="onSubmit"
  35. :submit-on-enter="false"
  36. ref="formT"
  37. :show-error="false"
  38. >
  39. <van-field
  40. v-model="form.phone"
  41. name="手机"
  42. type="tel"
  43. placeholder="请输入你的手机号"
  44. :rules="[
  45. {
  46. required: true,
  47. pattern: /^1[345678]\d{9}$/,
  48. message: '请输入正确的手机号',
  49. },
  50. ]"
  51. />
  52. <van-field
  53. v-model="form.password"
  54. name="密码"
  55. type="password"
  56. placeholder="请输入密码"
  57. :rules="[{ required: true, message: '请输入密码' }]"
  58. >
  59. </van-field>
  60. <div style="margin: 16px">
  61. <van-button plain round block type="info" native-type="submit"
  62. >立即登录</van-button
  63. >
  64. </div>
  65. </van-form>
  66. </div>
  67. </template>
  68. </div>
  69. </template>
  70. <script>
  71. // import { Notify } from "vant";
  72. export default {
  73. data() {
  74. return {
  75. isLogin: false,
  76. form: {
  77. phone: "",
  78. password: "",
  79. },
  80. searchForm: {
  81. phone: "",
  82. },
  83. tableData:[]
  84. };
  85. },
  86. mounted() {
  87. },
  88. destroyed() {
  89. this.isLogin = false;
  90. },
  91. methods: {
  92. async getData() {
  93. let res = await this.$axios.post(
  94. "/AF/listAppointment" +
  95. "?" +
  96. this.$qs.stringify({
  97. ...this.searchForm,
  98. })
  99. );
  100. if (res.data.success) {
  101. this.tableData = res.data.data
  102. }
  103. },
  104. async onSubmit() {
  105. let res = await this.$axios.post(
  106. "/AF/userLogin" +
  107. "?" +
  108. this.$qs.stringify({
  109. ...this.form,
  110. })
  111. );
  112. if (res.data.success) {
  113. this.getData();
  114. this.isLogin = true;
  115. for (const key in this.form) {
  116. this.form[key] = "";
  117. }
  118. this.$refs.formT.resetValidation();
  119. }
  120. },
  121. },
  122. };
  123. </script>
  124. <style lang="scss" scoped>
  125. .mianBox {
  126. width: 100vw;
  127. height: 100vh;
  128. background: url("../../assets/image/bg2.png");
  129. background-size: 100% 100%;
  130. font-family: PingFangSC-Medium, PingFang SC;
  131. color: #ffffff;
  132. position: relative;
  133. overflow: hidden;
  134. .mianBoxF {
  135. width: 100%;
  136. height: 100%;
  137. display: flex;
  138. flex-direction: column;
  139. }
  140. .titleType {
  141. width: 100%;
  142. display: flex;
  143. justify-content: space-between;
  144. align-items: flex-end;
  145. padding: 0 30px;
  146. height: 60px;
  147. box-sizing: border-box;
  148. }
  149. .formS {
  150. display: flex;
  151. padding: 0 30px 20px;
  152. width: 100%;
  153. box-sizing: border-box;
  154. align-items: flex-end;
  155. /deep/ .van-field {
  156. flex: 1;
  157. margin-right: 20px;
  158. font-size: 28px;
  159. padding-left: 0;
  160. background: transparent;
  161. border: none;
  162. border-bottom: 1px solid #fff;
  163. padding: 10px;
  164. .van-field__label {
  165. color: #fff;
  166. }
  167. &::after {
  168. display: none;
  169. }
  170. input {
  171. color: #fff;
  172. }
  173. .van-field__button {
  174. border-left: 1px solid #d8d8d8;
  175. }
  176. .hqyzm {
  177. font-size: 24px;
  178. font-weight: 400;
  179. color: #ffc27b;
  180. line-height: 33px;
  181. }
  182. }
  183. .van-button {
  184. height: 70px;
  185. width: 150px;
  186. }
  187. }
  188. .tableBox {
  189. flex: 1;
  190. padding: 20px 30px;
  191. box-sizing: border-box;
  192. /deep/.el-table {
  193. background: transparent !important;
  194. color: #fff;
  195. border-color: rgba(0, 250, 251, 0.20);
  196. &::before{
  197. background: rgba(0, 250, 251, 0.20);
  198. }
  199. &::after{
  200. background: rgba(0, 250, 251, 0.20);
  201. }
  202. table,
  203. tr,
  204. td,
  205. th {
  206. background: transparent !important;
  207. color: #fff;
  208. border-color: rgba(0, 250, 251, 0.20);
  209. }
  210. .el-table__empty-text {
  211. background: transparent;
  212. color: #fff;
  213. border-color: rgba(0, 250, 251, 0.20);
  214. }
  215. .el-table__expand-icon {
  216. color: #FFF;
  217. }
  218. }
  219. /deep/ table {
  220. tr,
  221. td {
  222. background: rgba(0, 251, 251, .051) !important;
  223. color: #FFF;
  224. border-color: rgba(0, 250, 251, 0.20);
  225. }
  226. tr {
  227. margin-bottom: 1px;
  228. }
  229. th {
  230. color: #FFF;
  231. background: rgba(0, 250, 251, 0.20);
  232. border-color: transparent;
  233. }
  234. thead {
  235. th {
  236. border-color: rgba(0, 250, 251, 0.20) !important;
  237. }
  238. }
  239. }
  240. }
  241. .ckyyxx {
  242. position: absolute;
  243. top: 210px;
  244. left: 55px;
  245. height: 59px;
  246. font-size: 42px;
  247. font-weight: 500;
  248. line-height: 59px;
  249. letter-spacing: 1px;
  250. }
  251. .kjdl {
  252. position: absolute;
  253. left: 55px;
  254. top: 283px;
  255. height: 33px;
  256. font-size: 24px;
  257. font-weight: 400;
  258. line-height: 33px;
  259. letter-spacing: 1px;
  260. }
  261. .infoBtn {
  262. position: absolute;
  263. bottom: 100px;
  264. left: 0;
  265. right: 0;
  266. margin: 0 auto;
  267. width: 600px;
  268. }
  269. .van-steps {
  270. margin-top: 50px;
  271. background: transparent;
  272. .van-step {
  273. color: #fff;
  274. font-size: 26px;
  275. font-weight: 400;
  276. color: #ffffff;
  277. line-height: 37px;
  278. letter-spacing: 1px;
  279. span {
  280. display: block;
  281. }
  282. &::after {
  283. display: none;
  284. }
  285. }
  286. }
  287. .infoBox {
  288. position: absolute;
  289. top: 500px;
  290. left: o;
  291. padding: 0 50px 0 30px;
  292. box-sizing: border-box;
  293. width: 100vw;
  294. height: auto;
  295. .titleInfo {
  296. display: flex;
  297. align-items: center;
  298. margin-left: 27px;
  299. span {
  300. width: 10px;
  301. height: 40px;
  302. background: linear-gradient(180deg, #0016ff 0%, #c724f8 100%);
  303. display: inline-block;
  304. margin-right: 20px;
  305. }
  306. }
  307. }
  308. .title {
  309. position: absolute;
  310. top: 54px;
  311. right: 58px;
  312. width: 110px;
  313. height: 55px;
  314. }
  315. .gjsh {
  316. position: absolute;
  317. top: 200px;
  318. left: 50px;
  319. height: 43px;
  320. font-size: 39px;
  321. font-weight: 400;
  322. line-height: 59px;
  323. letter-spacing: 1px;
  324. }
  325. .ggaq {
  326. position: absolute;
  327. left: 50px;
  328. top: 260px;
  329. height: 86px;
  330. font-size: 86px;
  331. font-weight: bold;
  332. line-height: 129px;
  333. letter-spacing: 1px;
  334. }
  335. .ggaqEl {
  336. position: absolute;
  337. left: 55px;
  338. top: 375px;
  339. height: 38px;
  340. font-size: 34px;
  341. font-family: ArialMT;
  342. line-height: 39px;
  343. letter-spacing: 4px;
  344. text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
  345. }
  346. .formBox {
  347. position: absolute;
  348. top: 360px;
  349. left: 0;
  350. right: 0;
  351. margin: auto;
  352. width: 670px;
  353. // height: 1069px;
  354. border-radius: 8px;
  355. margin: 0 auto;
  356. margin-top: 40px;
  357. padding: 40px;
  358. box-sizing: border-box;
  359. .van-form {
  360. /deep/ .van-field {
  361. font-size: 28px;
  362. padding-left: 0;
  363. margin-top: 25px;
  364. background: transparent;
  365. border: none;
  366. border-bottom: 1px solid #fff;
  367. .van-field__label {
  368. color: #fff;
  369. }
  370. &::after {
  371. display: none;
  372. }
  373. input {
  374. color: #fff;
  375. }
  376. .van-field__button {
  377. border-left: 1px solid #d8d8d8;
  378. }
  379. .hqyzm {
  380. font-size: 24px;
  381. font-weight: 400;
  382. color: #ffc27b;
  383. line-height: 33px;
  384. }
  385. }
  386. .infoT {
  387. font-size: 24px;
  388. font-weight: 300;
  389. color: #ffffff;
  390. line-height: 33px;
  391. text-align: right;
  392. width: 100%;
  393. display: block;
  394. margin-top: 16px;
  395. }
  396. .van-button {
  397. margin-top: 120px;
  398. }
  399. }
  400. }
  401. }
  402. </style>