addVisit.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. <template>
  2. <div class="addVisit">
  3. <m-header v-if="statusList.headerStatus" :name="name" />
  4. <van-cell-group>
  5. <van-field label="回访老师" v-model="teacherName" readonly input-align="right" placeholder="请选择" />
  6. </van-cell-group>
  7. <van-cell-group>
  8. <van-field label="学员姓名" @click="onCheckStudent" v-model="studentName" readonly input-align="right" :is-link="id || userId || studentId ? false : true" placeholder="请选择">
  9. <template #right-icon>
  10. <a v-if="studentPhone" @click.stop="() => {}" class="phone_section" :href="'tel:' + studentPhone"><img src="../../assets/images/icon_phone.png" class="iconPhone" alt="" /></a>
  11. </template>
  12. </van-field>
  13. <van-field label="回访类型" @click="onChange('type')" v-model="form.type" readonly input-align="right" :is-link="id || userId ? false : true" placeholder="请选择" />
  14. <van-field label="回访目的" @click="onChange('purpose')" v-model="form.purpose" readonly input-align="right" :is-link="id || userId ? false : true" placeholder="请选择" />
  15. <van-field v-if="form.type == '小课回访'" label="学员状态" @click="onChange('feedbackType')" v-model="form.feedbackTypeName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" />
  16. <!-- <van-field v-if="form.type == '小课回访' && (form.feedbackType == 'THINKING' || form.feedbackType == 'LOST')" label="反馈详情" @click="onChange('feedbackTypeDesc')" v-model="form.feedbackTypeDescName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" /> -->
  17. <van-field label="问题状态" @click="onChange('probStatus')" v-model="form.probStatusName" readonly input-align="right" :is-link="id ? false : true" placeholder="请选择" />
  18. </van-cell-group>
  19. <van-cell-group>
  20. <div class="dot"></div>
  21. <van-field label="当前学生情况" class="textarea" :readonly="id ? true : false" v-model="form.overview" rows="2" autosize type="textarea" maxlength="400" placeholder="请输入留言" :show-word-limit="id ? false : true" />
  22. </van-cell-group>
  23. <van-cell-group>
  24. <div class="dot"></div>
  25. <van-field label="沟通后家长反馈" class="textarea" :readonly="id ? true : false" v-model="form.feedback" rows="2" autosize type="textarea" maxlength="400" placeholder="请输入留言" :show-word-limit="id ? false : true" />
  26. </van-cell-group>
  27. <van-cell-group>
  28. <van-field label="回访时间" class="visiTimer" v-model="form.visitTime" readonly @click="onEnListShow" input-align="right" :is-link="id ? false : true" placeholder="请选择" />
  29. </van-cell-group>
  30. <van-cell-group v-if="(id && uploader[0] && uploader[0].url) || !id">
  31. <div class="visiWrap">
  32. <p>回访图片</p>
  33. <!-- :before-delete="beforDelete" -->
  34. <van-uploader v-model="uploader" :before-read="beforeRead" :after-read="afterRead" :disabled="id ? true : false" :deletable="!id ? true : false" accept="image/*" multiple :max-count="5" />
  35. <p class="submit" v-if="!id">上传文件大小不能超过5MB且最多上传五张</p>
  36. </div>
  37. </van-cell-group>
  38. <div class="button-group" v-if="!id">
  39. <van-button type="primary" @click="onSubmit" round size="large">确认</van-button>
  40. </div>
  41. <van-action-sheet v-model="visit.status" :actions="visit.data" cancel-text="取消" @cancel="visit.status = false" @select="onModeSelect" />
  42. <van-popup v-model="dataForm.status" position="bottom">
  43. <van-datetime-picker v-model="dataForm.currentDate" type="date" :min-date="dataForm.minDate" :max-date="dataForm.maxDate" :formatter="formatter" @cancel="dataForm.status = false" @confirm="onCurrentConfirm" />
  44. </van-popup>
  45. <!-- 选择上课学生 -->
  46. <van-popup v-model="statusList.studentStatus" :lock-scroll="true" position="bottom" :style="{ height: '180%' }">
  47. <van-sticky>
  48. <van-search show-action shape="round" :left-icon="searchIcon" @search="onSearch" v-model="params.search" placeholder="请输入学生名或手机号">
  49. <template #action>
  50. <div @click="onSearch">搜索</div>
  51. </template>
  52. </van-search>
  53. </van-sticky>
  54. <div class="paddingB80">
  55. <van-list v-model="loading" class="studentContainer" v-if="dataShow" key="data" :finished="finished" finished-text="" @load="getStudent">
  56. <van-radio-group v-model="radioSelect">
  57. <van-cell-group>
  58. <van-cell v-for="(item, index) in dataList" :key="index" @click="onCheckboxSelect(item)" class="input-cell" :center="true">
  59. <template slot="icon">
  60. <img class="logo" v-if="item.avatar" :src="item.avatar" alt="" />
  61. <img class="logo" v-else src="@/assets/images/icon_student.png" alt="" />
  62. </template>
  63. <template slot="title">
  64. <div class="studentName">
  65. {{ item.userName }}
  66. </div>
  67. </template>
  68. <template slot="label">
  69. <span>{{ desensitPhone(item.phone) }}</span>
  70. </template>
  71. <template slot="default">
  72. <van-radio :name="item.userId"></van-radio>
  73. </template>
  74. </van-cell>
  75. </van-cell-group>
  76. </van-radio-group>
  77. </van-list>
  78. <m-empty class="empty" v-else key="data" />
  79. </div>
  80. <div class="button-group-popup">
  81. <span class="btn" @click="onPopupCancel">取消</span>
  82. <span class="btn primary" @click="onPopupSubmit">确认选择</span>
  83. </div>
  84. </van-popup>
  85. </div>
  86. </template>
  87. <script>
  88. import MHeader from "@/components/MHeader";
  89. import { browser } from "@/common/common";
  90. import MEmpty from "@/components/MEmpty";
  91. import dayjs from "dayjs";
  92. import { queryStudentsWithTeacher, visitAdd, visitGetInfo, queryUserById } from "@/api/teacher";
  93. import { queryUserInfo } from "@/api/app";
  94. import { policy } from "@/views/massMessage/api";
  95. import setLoading from "@/utils/loading";
  96. import axios from "axios";
  97. export default {
  98. name: "addVisit",
  99. components: {
  100. MHeader,
  101. MEmpty,
  102. },
  103. data() {
  104. const query = this.$route.query;
  105. return {
  106. id: query.id,
  107. name: query.name,
  108. userId: query.userId, // 如果有userId的时候说明是从评测详情进来的
  109. studentId: query.studentId, // 这个参数是从原生传过来的,单独做了处理
  110. beforeId: query.beforeId, // 如果有beforeId的时候说明是从待回访列表进来的
  111. inside: query.inside || 0,
  112. visitFlag: Number(query.visitFlag) || 0,
  113. uploader: [],
  114. dataForm: {
  115. // 时间下拉框
  116. status: false,
  117. minDate: new Date(2000, 0, 1),
  118. maxDate: new Date(),
  119. currentDate: new Date(),
  120. },
  121. statusList: {
  122. // 散状态集合
  123. headerStatus: true, // 头部是否展示
  124. studentStatus: false, // 上课学生状态
  125. },
  126. typeList: [{ name: "课程推荐" }, { name: "常规回访" }, { name: "小课回访" }, { name: "云教练" }, { name: "其它" }],
  127. visit: {
  128. status: false,
  129. type: null,
  130. data: [],
  131. },
  132. studentName: query.username || null,
  133. studentPhone: query.phone || null,
  134. teacherName: null,
  135. form: {
  136. teacherId: null,
  137. studentId: query.userId || query.studentId || query.beforeId || null,
  138. type: query.userId ? "云教练" : query.beforeId ? "常规回访" : null,
  139. purpose: query.userId ? "体验回访" : query.beforeId ? "教学内容未达标" : null,
  140. overview: "",
  141. feedback: "",
  142. visitTime: query.userId || query.id || query.beforeId ? dayjs().format("YYYY年MM月DD日") : null,
  143. visiterType: "TEACHER",
  144. feedbackTypeDesc: "",
  145. feedbackType: "",
  146. probStatus: "",
  147. },
  148. loading: false,
  149. finished: false,
  150. params: {
  151. search: null,
  152. page: 1,
  153. rows: 20,
  154. },
  155. dataShow: true, // 是否有数据
  156. radioSelect: null,
  157. radioSelectName: null,
  158. radioSelectPhone: null,
  159. clickStatus: false,
  160. dataList: [],
  161. searchIcon: require("@/assets/images/search.png"),
  162. // ossUploadUrl: "https://ks3-cn-beijing.ksyuncs.com/daya",
  163. ossUploadUrl: "https://daya.ks3-cn-beijing.ksyuncs.com",
  164. dataObj: {
  165. policy: "",
  166. signature: "",
  167. key: "",
  168. KSSAccessKeyId: "",
  169. acl: "public-read",
  170. name: "",
  171. },
  172. feedbackTypeList: [
  173. { name: "在读", value: "NORMAL" },
  174. { name: "暂停", value: "PAUSE" },
  175. { name: "沉睡", value: "SLEEPY" },
  176. { name: "流失", value: "LOST" },
  177. { name: "其他", value: "OTHER" },
  178. ],
  179. feedbackTypeDescList: [
  180. { name: "价格原因", value: "PRICE" },
  181. { name: "时间原因", value: "TIME" },
  182. { name: "教学不满意", value: "TEACHING" },
  183. { name: "其他", value: "OTHER" },
  184. ],
  185. probStatusList: [
  186. { name: "已解决", value: 1 },
  187. { name: "待跟进", value: 0 },
  188. ],
  189. };
  190. },
  191. mounted() {
  192. let params = this.$route.query;
  193. if (params.Authorization) {
  194. localStorage.setItem("Authorization", decodeURI(params.Authorization));
  195. localStorage.setItem("userInfo", decodeURI(params.Authorization));
  196. }
  197. if (browser().android || browser().iPhone) {
  198. this.statusList.headerStatus = false;
  199. }
  200. document.title = this.name || "新增回访记录";
  201. this.__init();
  202. },
  203. methods: {
  204. async __init() {
  205. let res = await queryUserInfo();
  206. let result = res.data;
  207. if (res.status == 200) {
  208. this.teacherName = result.realName;
  209. this.form.teacherId = result.id;
  210. } else {
  211. this.$toast(res.msg);
  212. }
  213. if (this.id) {
  214. setLoading(true);
  215. let queryInfo = await visitGetInfo({ id: this.id });
  216. const queryResult = queryInfo.data;
  217. let form = this.form;
  218. setLoading(false);
  219. if (queryResult.code == 200) {
  220. let tempData = queryResult.data;
  221. this.studentName = tempData.studentName;
  222. form.studentId = tempData.studentId;
  223. form.type = tempData.type;
  224. form.purpose = tempData.purpose;
  225. form.overview = tempData.overview;
  226. form.feedback = tempData.feedback;
  227. form.visitTime = dayjs(tempData.visitTime).format("YYYY年MM月DD日");
  228. form.visiterType = tempData.visiterType;
  229. form.feedbackType = tempData.feedbackType;
  230. form.feedbackTypeDesc = tempData.feedbackTypeDesc;
  231. form.probStatus = tempData.probStatus;
  232. if (form.feedbackType) {
  233. form.feedbackTypeName = "";
  234. this.feedbackTypeList.forEach((item) => {
  235. if (item.value == form.feedbackType) {
  236. form.feedbackTypeName = item.name;
  237. }
  238. });
  239. }
  240. if (form.feedbackTypeDesc) {
  241. form.feedbackTypeDescName = "";
  242. this.feedbackTypeDescList.forEach((item) => {
  243. if (item.value == form.feedbackType) {
  244. form.feedbackTypeDescName = item.name;
  245. }
  246. });
  247. }
  248. if (form.probStatus) {
  249. form.probStatusName = "已解决";
  250. } else {
  251. form.probStatusName = "待跟进";
  252. }
  253. /**
  254. * form.feedbackTypeDescName = null;
  255. form.feedbackTypeDesc = null;
  256. form.probStatus = null;
  257. form.probStatusName = null;
  258. form.feedbackTypeDescName = null;
  259. form.feedbackTypeDesc = null;
  260. */
  261. form.probStatus = tempData.probStatus;
  262. let attrList = tempData.attachments.split(",");
  263. this.uploader = attrList.map((item) => {
  264. return { url: item };
  265. });
  266. // console.log(this.uploader);
  267. } else {
  268. this.$toast(res.msg);
  269. }
  270. }
  271. let userId = this.userId || this.studentId || this.beforeId;
  272. if (userId) {
  273. await queryUserById({ userId }).then((res) => {
  274. let result = res.data;
  275. this.studentPhone = result.phone;
  276. this.studentName = result.username;
  277. });
  278. }
  279. },
  280. async onSubmit() {
  281. let form = this.form;
  282. if (!form.studentId) {
  283. this.$toast("请选择学员");
  284. return;
  285. } else if (!form.type) {
  286. this.$toast("请选择回访类型");
  287. return;
  288. } else if (!form.purpose) {
  289. this.$toast("请选择回访目的");
  290. return;
  291. } else if (!form.visitTime) {
  292. this.$toast("请选择回访时间");
  293. return;
  294. } else if (!form.feedbackTypeDesc && form.type == "小课回访") {
  295. this.$toast("请选择反馈详情");
  296. return;
  297. } else if (!form.feedbackType && form.type == "小课回访") {
  298. this.$toast("请选择家长反馈");
  299. return;
  300. } else if (!(form.probStatus + "")) {
  301. this.$toast("请选择问题状态");
  302. return;
  303. }
  304. if (this.clickStatus) {
  305. return;
  306. }
  307. this.clickStatus = true;
  308. setLoading(true);
  309. // let visitTime = this.form.visitTime.replace(/[^\d]/g,'/');
  310. // let someDate = new Date(visitTime)
  311. let visitTime = dayjs(this.dataForm.currentDate).format("YYYY-MM-DD");
  312. let attachmentsList = this.uploader.map((item) => {
  313. return item.url;
  314. });
  315. let params = {
  316. ...form,
  317. visitTime,
  318. attachments: attachmentsList.join(","),
  319. };
  320. // 待回访时要传的参数
  321. if (this.beforeId) {
  322. params.objectId = this.$route.query.objectId;
  323. }
  324. let res = await visitAdd({ ...params });
  325. let result = res.data;
  326. setLoading(false);
  327. if (result.code == 200) {
  328. this.$toast("添加成功");
  329. setTimeout(() => {
  330. if (this.inside) {
  331. this.onAppBack();
  332. } else if (this.userId) {
  333. let { visitFlag, ...query } = this.$route.query;
  334. visitFlag = 0;
  335. this.$router.replace({
  336. path: "/trainDetail",
  337. query: {
  338. ...query,
  339. visitFlag,
  340. },
  341. });
  342. } else if (this.beforeId) {
  343. let { ...query } = this.$route.query;
  344. this.$router.replace({
  345. path: "/visitList",
  346. query: {
  347. userId: this.beforeId,
  348. ...query,
  349. },
  350. });
  351. } else {
  352. this.$router.replace("visitList");
  353. }
  354. }, 800);
  355. } else {
  356. this.$toast(result.msg);
  357. this.clickStatus = false;
  358. return;
  359. }
  360. },
  361. onAppBack() {
  362. if (browser().android) {
  363. DAYA.postMessage(JSON.stringify({ api: "back" }));
  364. } else if (browser().iPhone) {
  365. window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({ api: "back" }));
  366. }
  367. },
  368. onCheckStudent() {
  369. if (this.id || this.userId || this.studentId || this.beforeId) {
  370. return;
  371. }
  372. this.statusList.studentStatus = true;
  373. },
  374. onChange(type) {
  375. if (this.id) {
  376. return;
  377. }
  378. if ((this.userId || this.beforeId) && type != "probStatus") {
  379. return;
  380. }
  381. let visit = this.visit;
  382. let form = this.form;
  383. if (type == "type") {
  384. visit.data = this.typeList;
  385. } else if (type == "purpose") {
  386. if (form.type == "其它") {
  387. visit.data = [{ name: "其它" }, { name: "会员续费" }];
  388. } else if (form.type == "课程推荐") {
  389. visit.data = [{ name: "新课推荐" }, { name: "续费提醒" }];
  390. } else if (form.type == "常规回访") {
  391. visit.data = [{ name: "课后及作业回访" }, { name: "练习及乐团表现" }, { name: "考勤申诉" }, { name: "异常请假回访" }];
  392. } else if (form.type == "小课回访") {
  393. visit.data = [{ name: "续费类回访" }, { name: "服务回访" }, { name: "其他" }];
  394. } else if (form.type == "云教练") {
  395. visit.data = [{ name: "体验回访" }];
  396. } else {
  397. this.$toast("请选择回访类型");
  398. return;
  399. }
  400. } else if (type == "feedbackType") {
  401. visit.data = this.feedbackTypeList;
  402. } else if (type == "feedbackTypeDesc") {
  403. visit.data = this.feedbackTypeDescList;
  404. } else if (type == "probStatus") {
  405. visit.data = this.probStatusList;
  406. }
  407. visit.status = true;
  408. visit.type = type;
  409. },
  410. onSearch() {
  411. this.params.page = 1;
  412. this.dataList = [];
  413. this.dataShow = true;
  414. this.loading = true;
  415. this.finished = false;
  416. this.getStudent();
  417. },
  418. onCheckboxSelect(item) {
  419. this.radioSelect = item.userId;
  420. this.radioSelectName = item.userName;
  421. this.radioSelectPhone = item.phone;
  422. },
  423. onPopupCancel() {
  424. this.statusList.studentStatus = false;
  425. },
  426. onPopupSubmit() {
  427. this.form.studentId = this.radioSelect;
  428. this.studentName = this.radioSelectName;
  429. this.studentPhone = this.radioSelectPhone;
  430. this.statusList.studentStatus = false;
  431. },
  432. onCurrentConfirm(value) {
  433. if (value) {
  434. this.form.visitTime = dayjs(value).format("YYYY年MM月DD日");
  435. }
  436. this.dataForm.status = false;
  437. },
  438. onEnListShow() {
  439. // 从云教练统计来的,不许改时间,默认当前时间
  440. if (this.id || this.visitFlag) {
  441. return;
  442. }
  443. this.dataForm.status = true;
  444. },
  445. getStudent() {
  446. let params = this.params;
  447. queryStudentsWithTeacher(params).then((res) => {
  448. let result = res.data;
  449. this.loading = false;
  450. if (result.code == 200 && result.data) {
  451. params.page = result.data.pageNo;
  452. this.dataList = this.dataList.concat(result.data.rows);
  453. if (params.page >= result.data.totalPage) {
  454. this.finished = true;
  455. }
  456. this.params.page++;
  457. } else {
  458. this.finished = true;
  459. }
  460. // 判断是否有数据
  461. if (this.dataList.length <= 0) {
  462. this.dataShow = false;
  463. }
  464. });
  465. },
  466. onModeSelect(value) {
  467. let visit = this.visit;
  468. let form = this.form;
  469. if (visit.type == "type") {
  470. form.type = value.name;
  471. form.purpose = null;
  472. form.feedbackTypeDescName = null;
  473. form.feedbackTypeDesc = null;
  474. form.probStatus = null;
  475. form.probStatusName = null;
  476. form.feedbackTypeDescName = null;
  477. form.feedbackTypeDesc = null;
  478. } else if (visit.type == "purpose") {
  479. form.purpose = value.name;
  480. } else if (visit.type == "feedbackType") {
  481. form.feedbackType = value.value;
  482. form.feedbackTypeName = value.name;
  483. } else if (visit.type == "feedbackTypeDesc") {
  484. form.feedbackTypeDescName = value.name;
  485. form.feedbackTypeDesc = value.value;
  486. } else if (visit.type == "probStatus") {
  487. form.probStatus = value.value;
  488. form.probStatusName = value.name;
  489. }
  490. visit.status = false;
  491. },
  492. formatter(type, value) {
  493. if (type === "year") {
  494. return `${value}年`;
  495. } else if (type === "month") {
  496. return `${value}月`;
  497. } else if (type === "day") {
  498. return `${value}日`;
  499. }
  500. return value;
  501. },
  502. desensitPhone(phone) {
  503. // 手机号脱敏
  504. let first = phone.substr(0, 3);
  505. let last = phone.substr(-4);
  506. return first + "****" + last;
  507. },
  508. beforeRead(file) {
  509. if (file.length) {
  510. file.map((item) => {
  511. const isLt2M = item.size / 1000 / 1000 < 5;
  512. if (!isLt2M) {
  513. this.$toast("上传文件大小不能超过 5MB");
  514. return false;
  515. }
  516. });
  517. } else {
  518. const isLt2M = file.size / 1000 / 1000 < 5;
  519. if (!isLt2M) {
  520. this.$toast("上传文件大小不能超过 5MB");
  521. return false;
  522. }
  523. }
  524. return true;
  525. },
  526. async uploadFile(file) {
  527. // console.log("uploadFile", file);
  528. try {
  529. file.status = "uploading";
  530. file.message = "上传中...";
  531. let tempName = file.file.name || "";
  532. const fileName = tempName && tempName.replace(/ /gi, "_");
  533. let key = new Date().getTime() + fileName;
  534. let objTemp = {
  535. filename: fileName,
  536. bucketName: this.bucket_name,
  537. postData: {
  538. filename: fileName,
  539. acl: "public-read",
  540. key: key,
  541. unknowValueField: [],
  542. },
  543. };
  544. const res = await policy(objTemp);
  545. const obj = {
  546. policy: res.data.policy,
  547. signature: res.data.signature,
  548. key: key,
  549. KSSAccessKeyId: res.data.kssAccessKeyId,
  550. acl: "public-read",
  551. name: fileName,
  552. };
  553. let formData = new FormData();
  554. for (let key in obj) {
  555. formData.append(key, obj[key]);
  556. }
  557. formData.append("file", file.file);
  558. // console.log(formData);
  559. await axios({
  560. method: "post",
  561. url: this.ossUploadUrl,
  562. data: formData,
  563. });
  564. const uploadUrl = this.ossUploadUrl + "/" + key;
  565. file.url = uploadUrl;
  566. file.status = "done";
  567. } catch (e) {
  568. console.log(e);
  569. file.status = "failed";
  570. file.message = "上传失败";
  571. this.uploader = [];
  572. }
  573. },
  574. async afterRead(file) {
  575. // 上传头像
  576. const form = this.form;
  577. try {
  578. if (file && file.length) {
  579. file.forEach((item) => {
  580. this.uploadFile(item);
  581. });
  582. } else {
  583. this.uploadFile(file);
  584. }
  585. } catch (e) {
  586. console.log(e);
  587. return false;
  588. }
  589. // this.$toast.loading({
  590. // duration: 0,
  591. // forbidClick: true,
  592. // message: "上传中...",
  593. // });
  594. //
  595. // try {
  596. // file.status = "uploading";
  597. // file.message = "上传中...";
  598. // let formData = new FormData();
  599. // formData.append("file", file.file);
  600. // let res = await uploadFile(formData);
  601. // this.$toast.clear();
  602. // let result = res.data;
  603. // if (result.code == 200) {
  604. // file.status = "done";
  605. // form.fileName = file.file.name;
  606. // form.fileUrl = result.data.url;
  607. // form.messageType = this.onCheckFileType(file.file.type);
  608. // } else {
  609. // file.status = "failed";
  610. // file.message = "上传失败";
  611. // this.$toast(result.msg);
  612. // form.fileName = "";
  613. // form.fileUrl = "";
  614. // return false;
  615. // }
  616. // } catch (err) {
  617. // this.$toast.clear();
  618. // file.status = "failed";
  619. // file.message = "上传失败";
  620. // form.fileName = "";
  621. // form.fileUrl = "";
  622. // return false;
  623. // }
  624. },
  625. },
  626. };
  627. </script>
  628. <style lang="less" scoped>
  629. @import url("../../assets/commonLess/variable.less");
  630. /deep/.van-popup--bottom {
  631. border-radius: 0px 0px 0px 0px !important;
  632. overflow: auto !important;
  633. }
  634. .addVisit {
  635. min-height: 100vh;
  636. }
  637. .vip-title {
  638. padding: 0.06rem 0.14rem 0.04rem;
  639. font-size: 0.14rem;
  640. color: #808080;
  641. }
  642. /deep/.van-cell-group {
  643. margin-bottom: 0.1rem;
  644. }
  645. /deep/.van-cell {
  646. display: flex;
  647. align-items: center;
  648. font-size: 0.16rem;
  649. line-height: 0.28rem;
  650. }
  651. /deep/.van-field__label,
  652. /deep/.van-cell__value {
  653. flex: 1 auto;
  654. }
  655. /deep/.van-field__word-limit {
  656. margin-top: 0px;
  657. position: absolute;
  658. top: -0.2rem;
  659. right: 5px;
  660. font-size: 0.14rem;
  661. }
  662. /deep/.van-field__control:disabled {
  663. color: #6a6969;
  664. }
  665. .textarea {
  666. display: flex;
  667. flex-direction: column;
  668. align-items: inherit;
  669. padding: 0.1rem 0.21rem;
  670. /deep/.van-field__label {
  671. width: 100%;
  672. }
  673. // /deep/.van-field__value {
  674. // border: 1px solid #ccc;
  675. // }
  676. }
  677. .button-group {
  678. margin: 0.3rem 0.26rem 0.2rem;
  679. .van-button--primary {
  680. background: @mColor;
  681. border: 1px solid @mColor;
  682. font-size: 0.18rem;
  683. height: 0.5rem;
  684. }
  685. }
  686. .studentContainer {
  687. /deep/.van-cell__title {
  688. font-size: 0.14rem;
  689. color: @mFontColor;
  690. // flex: 1 auto;
  691. }
  692. .logo {
  693. width: 0.42rem;
  694. height: 0.42rem;
  695. margin-right: 0.12rem;
  696. border-radius: 100%;
  697. }
  698. .input-cell {
  699. padding: 0.2rem 0.16rem;
  700. .van-radio {
  701. justify-content: flex-end;
  702. }
  703. }
  704. /deep/.van-cell__value {
  705. height: 0.2rem;
  706. }
  707. /deep/.van-radio__icon .van-icon {
  708. border-color: #d3d3d3;
  709. }
  710. /deep/.van-radio__icon--checked {
  711. .van-icon {
  712. border-color: @mColor;
  713. background: @mColor;
  714. }
  715. }
  716. .van-tag {
  717. margin-left: 0.08rem;
  718. }
  719. }
  720. /deep/.van-field__right-icon,
  721. .phone_section {
  722. display: flex;
  723. }
  724. .iconPhone {
  725. width: 0.17rem;
  726. height: 0.21rem;
  727. }
  728. .paddingB80 {
  729. padding-bottom: 0.8rem;
  730. }
  731. .button-group-popup {
  732. position: fixed;
  733. bottom: 0;
  734. padding: 0.2rem 0;
  735. width: 100%;
  736. text-align: center;
  737. background-color: #ffffff;
  738. .btn {
  739. line-height: 0.5rem;
  740. display: inline-block;
  741. border: 1px solid @mColor;
  742. width: 1.65rem;
  743. border-radius: 0.4rem;
  744. color: @mColor;
  745. background: #fff;
  746. font-size: 0.18rem;
  747. &.primary {
  748. color: #fff;
  749. background: @mColor;
  750. }
  751. }
  752. .btn + .btn {
  753. margin-left: 0.1rem;
  754. }
  755. }
  756. .studentColor {
  757. color: @mColor;
  758. }
  759. .visiTimer {
  760. /deep/.van-field__control {
  761. color: #333333 !important;
  762. font-size: 0.16rem;
  763. }
  764. }
  765. .studentName {
  766. font-size: 0.16rem;
  767. color: #1a1a1a;
  768. line-height: 0.22rem;
  769. }
  770. .dot {
  771. width: 4px;
  772. height: 0.17rem;
  773. background: #01c1b5;
  774. border-radius: 3px;
  775. position: absolute;
  776. z-index: 200;
  777. top: 0.14rem;
  778. left: 0.12rem;
  779. }
  780. .van-icon-search {
  781. color: @mColor;
  782. }
  783. .visiWrap {
  784. padding: 10px 16px;
  785. p {
  786. font-size: 0.16rem;
  787. line-height: 0.28rem;
  788. color: #646566;
  789. margin-bottom: 0.1rem;
  790. }
  791. .submit {
  792. color: red;
  793. font-size: 0.12rem;
  794. }
  795. }
  796. </style>