index.vue 9.3 KB

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