add.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  1. <template>
  2. <div class="app-body-white">
  3. <div class="form-box form-box-label-width">
  4. <div class="item-box">
  5. <div class="input-tit">
  6. <p class="tit">活动名称</p>
  7. </div>
  8. <div class="input-item-box blue">
  9. <div class="one-selcet-box">
  10. <input
  11. type="text"
  12. v-model="form.activityName"
  13. placeholder="请输入活动名称"
  14. />
  15. </div>
  16. </div>
  17. </div>
  18. <div class="item-box">
  19. <div class="input-tit">
  20. <p class="tit">活动类型</p>
  21. </div>
  22. <div class="input-item-box blue">
  23. <div class="one-selcet-box">
  24. <input
  25. type="text"
  26. placeholder="请选择类型"
  27. @click="choseActiveType = true"
  28. v-model="activeTypeName"
  29. readonly
  30. />
  31. <!-- <van-popup v-model="choseActiveType" round position="bottom">-->
  32. <!-- <van-picker-->
  33. <!-- show-toolbar-->
  34. <!-- @confirm="(value) => typeConfirm(value)"-->
  35. <!-- @cancel="chose = false"-->
  36. <!-- />-->
  37. <!-- </van-popup>-->
  38. <i class="iconfont icon-down"></i>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="item-box">
  43. <div class="input-tit">
  44. <p class="tit">参与可得</p>
  45. </div>
  46. <div class="input-item-box blue">
  47. <div class="one-selcet-box">
  48. <input
  49. type="number"
  50. placeholder="请输入积分值"
  51. v-model="form.integral"
  52. />
  53. </div>
  54. </div>
  55. </div>
  56. <div class="upload-group">
  57. <div class="video-name">
  58. 主题图片 <span>(支持图片上传限20M内,最多6张)</span>
  59. </div>
  60. <van-uploader
  61. :max-count="12"
  62. @delete="deleteFileList"
  63. :file-list="fileList"
  64. @after-read="afterRead"
  65. :show-upload="true"
  66. class="upload-style"
  67. />
  68. </div>
  69. <div class="item-box">
  70. <div class="input-tit">
  71. <p class="tit">联系电话</p>
  72. </div>
  73. <div class="input-item-box blue">
  74. <div class="one-selcet-box">
  75. <input
  76. type="text"
  77. v-model="form.activityPhone"
  78. placeholder="请输入联系电话"
  79. />
  80. </div>
  81. </div>
  82. </div>
  83. <div class="item-box">
  84. <div class="input-tit">
  85. <p class="tit">举办方</p>
  86. </div>
  87. <div class="input-item-box blue">
  88. <div class="one-selcet-box">
  89. <input
  90. type="text"
  91. v-model="form.activitiesNotice"
  92. placeholder="请输入活动举办"
  93. />
  94. </div>
  95. </div>
  96. </div>
  97. <div class="item-box">
  98. <div class="input-tit">
  99. <p class="tit">活动内容</p>
  100. </div>
  101. <div class="input-item-box blue">
  102. <van-field
  103. @input="getInputValue($event, 'activityContent')"
  104. :value="form.activityContent"
  105. style="padding: 0rpx"
  106. autosize
  107. :rows="4"
  108. type="textarea"
  109. placeholder="请输入内容"
  110. ></van-field>
  111. </div>
  112. </div>
  113. <div class="item-box">
  114. <div class="input-tit">
  115. <p class="tit">活动开始</p>
  116. </div>
  117. <div class="input-item-box blue">
  118. <div class="date-selcet-box" @click="activityStartDateShow = true">
  119. <input
  120. type="text"
  121. v-model="form.activityStartTime"
  122. placeholder="请选择活动开始时间"
  123. disabled
  124. />
  125. <!-- <img src="@/assets/image/date-icon.png" alt="" /> -->
  126. </div>
  127. </div>
  128. </div>
  129. <div class="item-box">
  130. <div class="input-tit">
  131. <p class="tit">活动结束</p>
  132. </div>
  133. <div class="input-item-box blue">
  134. <div class="date-selcet-box" @click="activityEndDateShow = true">
  135. <input
  136. type="text"
  137. v-model="form.activityEndTime"
  138. placeholder="请选择活动结束时间"
  139. disabled
  140. />
  141. <!-- <img src="@/assets/image/date-icon.png" alt="" /> -->
  142. </div>
  143. </div>
  144. </div>
  145. <div class="item-box">
  146. <div class="input-tit">
  147. <p class="tit">活动地址</p>
  148. </div>
  149. <div class="input-item-box blue">
  150. <div class="one-selcet-box">
  151. <input
  152. type="text"
  153. v-model="form.activityAddress"
  154. placeholder="请输入活动地址"
  155. />
  156. </div>
  157. </div>
  158. </div>
  159. <div class="item-box">
  160. <div class="input-tit">
  161. <p class="tit">报名条件</p>
  162. </div>
  163. <div class="input-item-box blue">
  164. <van-field
  165. @input="getInputValue($event, 'registrationConditions')"
  166. :value="form.registrationConditions"
  167. style="padding: 0rpx"
  168. autosize
  169. rows="4"
  170. type="textarea"
  171. placeholder="请输入报名条件"
  172. ></van-field>
  173. </div>
  174. </div>
  175. <div class="item-box">
  176. <div class="input-tit">
  177. <p class="tit">报名开始</p>
  178. </div>
  179. <div class="input-item-box blue">
  180. <div
  181. class="date-selcet-box"
  182. @click="registrationStartDateShow = true"
  183. >
  184. <input
  185. type="text"
  186. v-model="form.registrationStartTime"
  187. placeholder="请选择报名开始时间"
  188. disabled
  189. />
  190. <!-- <img src="@/assets/image/date-icon.png" alt="" /> -->
  191. </div>
  192. </div>
  193. </div>
  194. <div class="item-box">
  195. <div class="input-tit">
  196. <p class="tit">报名结束</p>
  197. </div>
  198. <div class="input-item-box blue">
  199. <div class="date-selcet-box" @click="registrationEndDateShow = true">
  200. <input
  201. type="text"
  202. v-model="form.registrationEndTime"
  203. placeholder="请选择报名结束时间"
  204. disabled
  205. />
  206. <!-- <img src="@/assets/image/date-icon.png" alt="" /> -->
  207. </div>
  208. </div>
  209. </div>
  210. <div class="item-box">
  211. <div class="input-tit">
  212. <p class="tit">参与人数</p>
  213. </div>
  214. <div class="input-item-box blue">
  215. <div class="one-selcet-box">
  216. <input
  217. v-model="form.activityQuota"
  218. type="text"
  219. placeholder="请输入限制人数"
  220. />
  221. </div>
  222. </div>
  223. </div>
  224. <!-- <div class="button-group" v-if="form.id&&form.id!==''&&form.isValid==='0'">
  225. <van-button color="#3b7aff" size="small" plain round @click="commit()">保存</van-button>
  226. <van-button color="#3b7aff" size="small" round @click="commit('0')">发布</van-button>
  227. </div>-->
  228. <div class="button-group" v-if="type !== 'view'">
  229. <van-button
  230. color="#3b7aff"
  231. size="small"
  232. plain
  233. round
  234. @click="commit('1')"
  235. >暂存</van-button
  236. >
  237. <van-button color="#3b7aff" size="small" round @click="commit('0')"
  238. >发布</van-button
  239. >
  240. </div>
  241. </div>
  242. <van-popup :show="chose" round position="bottom">
  243. <van-picker
  244. show-toolbar
  245. :columns="communityList"
  246. @confirm="onConfirm"
  247. @cancel="chose = false"
  248. />
  249. </van-popup>
  250. <van-popup :show="choseActiveType" round position="bottom">
  251. <van-picker
  252. show-toolbar
  253. :columns="activeTypeList"
  254. value-key="label"
  255. @confirm="onConfirmType"
  256. @cancel="choseActiveType = false"
  257. />
  258. </van-popup>
  259. <!-- 时间选择器 -->
  260. <van-popup :show="activityStartDateShow" position="bottom">
  261. <van-datetime-picker
  262. type="datetime"
  263. :min-date="minDate"
  264. :value="currentDate"
  265. @confirm="onActivityStartDateConfirm"
  266. @cancel="activityStartDateShow = false"
  267. />
  268. </van-popup>
  269. <van-popup :show="activityEndDateShow" position="bottom">
  270. <van-datetime-picker
  271. type="datetime"
  272. :min-date="minDate"
  273. :value="currentDate"
  274. @confirm="onActivityEndDateConfirm"
  275. @cancel="activityEndDateShow = false"
  276. />
  277. </van-popup>
  278. <!-- <van-calendar v-model="activityDateShow" type="range" @confirm="onActivityDateConfirm" />-->
  279. <van-popup :show="registrationStartDateShow" position="bottom">
  280. <van-datetime-picker
  281. type="datetime"
  282. :min-date="minDate"
  283. :value="currentDate"
  284. @confirm="onRegistrationStartDateConfirm"
  285. @cancel="registrationStartDateShow = false"
  286. />
  287. </van-popup>
  288. <van-popup :show="registrationEndDateShow" position="bottom">
  289. <van-datetime-picker
  290. type="datetime"
  291. :min-date="minDate"
  292. :value="currentDate"
  293. @confirm="onRegistrationEndDateConfirm"
  294. @cancel="registrationEndDateShow = false"
  295. />
  296. </van-popup>
  297. </div>
  298. </template>
  299. <script>
  300. import {
  301. listPubCommunityByFrameUser,
  302. insertHomeCommunityActivity,
  303. getHomeCommunityActivityIsValid,
  304. getHomeCommunityActivityById,
  305. compareDate,
  306. } from "@/js_sdk/api_community";
  307. import common from "../../utils/common.js";
  308. import { getByCodes, getUserLocalStorageInfo } from "@/js_sdk/http";
  309. // import { upload } from "@/service/api_file";
  310. export default {
  311. data() {
  312. return {
  313. dc_key: ["activity_type"],
  314. id: "",
  315. dic_SelectList: {},
  316. type: "",
  317. currentDate: new Date().getTime(),
  318. chose: false,
  319. choseActiveType: false,
  320. activityStartDateShow: false,
  321. activityEndDateShow: false,
  322. activityDateShow: false,
  323. registrationStartDateShow: false,
  324. registrationEndDateShow: false,
  325. activeTypeList: [],
  326. activeTypeName: "",
  327. communityList: [],
  328. minDate: new Date(2022, 3, 1),
  329. communityName: "",
  330. activityStartDate: "",
  331. activityEndDate: "",
  332. activityDate: "",
  333. registrationDate: "",
  334. form: this.initForm(),
  335. fileList: [
  336. // { url: 'https://img.yzcdn.cn/vant/leaf.jpg' },
  337. // { url: 'https://cloud-image', isImage: true }
  338. ],
  339. fileUrlList: [],
  340. };
  341. },
  342. onLoad(option) {
  343. console.log(option);
  344. this.id = option.id;
  345. this.type = option.type;
  346. // this.selectCommunityByFrameUser();
  347. this.getDictData(this.dc_key);
  348. },
  349. methods: {
  350. getInputValue(event, formKey) {
  351. console.log(event);
  352. this.form[formKey] = event.detail;
  353. },
  354. onActivityStartDateConfirm(event) {
  355. this.activityStartDateShow = false;
  356. this.form.activityStartTime = common.transServDate(event.detail);
  357. },
  358. onActivityEndDateConfirm(event) {
  359. this.activityEndDateShow = false;
  360. this.form.activityEndTime = common.transServDate(event.detail);
  361. },
  362. onRegistrationStartDateConfirm(event) {
  363. this.registrationStartDateShow = false;
  364. this.form.registrationStartTime = common.transServDate(event.detail);
  365. },
  366. onRegistrationEndDateConfirm(event) {
  367. this.registrationEndDateShow = false;
  368. this.form.registrationEndTime = common.transServDate(event.detail);
  369. },
  370. getActivityById() {
  371. const _this = this;
  372. getHomeCommunityActivityById({ id: _this.id }).then((res) => {
  373. if (res.data) {
  374. _this.form = res.data;
  375. _this.activeTypeName =
  376. _this.dic_SelectList.activity_type[res.data.activityType].label;
  377. const fileList = [];
  378. if (_this.form.annex && _this.form.annex.length != 0) {
  379. console.log("_this.form.annex", _this.form.annex);
  380. // const annex = _common.castEval(_this.form.annex);
  381. _this.fileUrlList = JSON.parse(_this.form.annex);
  382. _this.fileList = _this.fileUrlList;
  383. console.log(JSON.parse(_this.form.annex));
  384. // annex.forEach((item) => {
  385. // fileList.push({
  386. // url:
  387. // process.env.VUE_APP_API_URL +
  388. // item.url.substring(7, item.url.length),
  389. // isImage: true,
  390. // });
  391. // });
  392. } else {
  393. _this.fileList = _this.fileUrlList = [];
  394. }
  395. _this.communityList.forEach((item) => {
  396. if (item.id === res.data.communityId) {
  397. _this.communityName = item.label;
  398. }
  399. });
  400. _this.form.activityStartTime = common.transServDate(
  401. res.data.activityStartTime
  402. );
  403. _this.form.activityEndTime = common.transServDate(
  404. res.data.activityEndTime
  405. );
  406. _this.form.registrationStartTime = common.transServDate(
  407. res.data.registrationStartTime
  408. );
  409. _this.form.registrationEndTime = common.transServDate(
  410. res.data.registrationEndTime
  411. );
  412. console.log(res.data);
  413. }
  414. });
  415. },
  416. goNavigateBack() {
  417. uni.navigateBack();
  418. },
  419. getDictData(codes) {
  420. const _this = this;
  421. const postData = {
  422. codes: JSON.stringify(codes),
  423. };
  424. getByCodes(JSON.stringify(this.dc_key)).then((data) => {
  425. console.log(data);
  426. _this.dic_SelectList = common.handleDicList(data);
  427. _this.activeTypeList = _this.dic_SelectList.activity_type;
  428. console.log(
  429. "_this.dic_SelectList.activity_type",
  430. _this.dic_SelectList.activity_type
  431. );
  432. // if (res.data) {
  433. // _this.dc_key.forEach((key) => {
  434. // const dictValue = _this.getDictValue(res.data, key, false);
  435. // _this.dic_SelectList[key] = dictValue;
  436. // _this.dic_SelectList[key] = _common.transDcMap(dictValue);
  437. // });
  438. // _this.activeTypeList = _this.dic_SelectList.activity_type;
  439. // }
  440. _this.getActivityById();
  441. });
  442. },
  443. deleteFileList(event) {
  444. this.fileList.splice(event.detail.index, 1);
  445. },
  446. commit(val) {
  447. const _this = this;
  448. if (_this.form.activityName === "") {
  449. this.$showToast("请填写活动名称");
  450. return;
  451. }
  452. if (_this.form.activityType === "") {
  453. this.$showToast("请选择活动类型");
  454. return;
  455. }
  456. if (_this.form.integral === "" || _this.form.integral < 1) {
  457. this.$showToast("请填写参与积分");
  458. return;
  459. }
  460. if (_this.form.registrationStartTime === "") {
  461. this.$showToast("请选择报名开始时间");
  462. return;
  463. }
  464. if (_this.form.registrationEndTime === "") {
  465. this.$showToast("请选择报名结束时间");
  466. return;
  467. }
  468. if (_this.form.activityStartTime === "") {
  469. this.$showToast("请选择活动开始时间");
  470. return;
  471. }
  472. if (_this.form.activityEndTime === "") {
  473. this.$showToast("请选择活动结束时间");
  474. return;
  475. }
  476. if (_this.fileUrlList.length === 0) {
  477. this.$showToast("请上传主题图");
  478. return;
  479. }
  480. if (_this.form.activityPhone === "") {
  481. this.$showToast("请输入联系电话");
  482. return;
  483. }
  484. if (_this.form.activityAddress === "") {
  485. this.$showToast("请输入活动地址");
  486. return;
  487. }
  488. if (
  489. compareDate(
  490. _this.form.registrationStartTime,
  491. _this.form.registrationEndTime
  492. )
  493. ) {
  494. this.$showToast("报名开始时间不能大于结束时间");
  495. return;
  496. }
  497. if (
  498. compareDate(_this.form.activityStartTime, _this.form.activityEndTime)
  499. ) {
  500. this.$showToast("活动开始时间不能大于结束时间");
  501. return;
  502. }
  503. if (
  504. compareDate(_this.form.registrationEndTime, _this.form.activityEndTime)
  505. ) {
  506. this.$showToast("报名结束时间不能大于活动结束时间");
  507. return;
  508. }
  509. _this.form.isValid = val;
  510. if (val == "0") {
  511. _this.form.releaseStatus = "1";
  512. }
  513. this.$delete(this.form, "updatedAt");
  514. this.$delete(this.form, "createdAt");
  515. _this.form.annex = JSON.stringify(_this.fileUrlList);
  516. insertHomeCommunityActivity(_this.form).then((res) => {
  517. this.goNavigateBack();
  518. });
  519. },
  520. onConfirm(value) {
  521. this.form.communityId = value.id;
  522. this.communityName = value.label;
  523. this.chose = false;
  524. },
  525. onConfirmType(event) {
  526. let { value } = event.detail;
  527. this.form.activityType = value.value;
  528. this.activeTypeName = value.label;
  529. this.choseActiveType = false;
  530. },
  531. initForm: function () {
  532. return {
  533. id: "",
  534. communityId: "",
  535. activityName: "",
  536. activityType: "",
  537. registrationStartTime: "",
  538. registrationEndTime: "",
  539. activityStartTime: "",
  540. activityEndTime: "",
  541. collectorsNumbers: "",
  542. registrationNumbers: "",
  543. releaseTime: "",
  544. status: "0",
  545. activityQuota: "",
  546. releaseStatus: "",
  547. activityPhone: "",
  548. activityAddress: "",
  549. activityContent: "",
  550. registrationConditions: "",
  551. annex: "",
  552. isValid: "",
  553. integral: "",
  554. createdBy: getUserLocalStorageInfo().user.id,
  555. };
  556. },
  557. // selectCommunityByFrameUser() {
  558. // const _this = this;
  559. // listPubCommunityByFrameUser({
  560. // userId: getUserLocalStorageInfo().user.id,
  561. // }).then((res) => {
  562. // if (res.data) {
  563. // this.communityList = [];
  564. // res.data.forEach((item) => {
  565. // const i = {
  566. // id: item.id,
  567. // text: item.communityName,
  568. // label: item.communityName,
  569. // value: item.id,
  570. // };
  571. // _this.communityList.push(i);
  572. // });
  573. // }
  574. // });
  575. // },
  576. afterRead(event) {
  577. let that = this;
  578. const { file } = event.detail;
  579. uni.uploadFile({
  580. url: that.$constant.BASE_URI + "/wx/fileController/upload2",
  581. filePath: file.url,
  582. name: "file",
  583. formData: { user: "test" },
  584. success(res) {
  585. // 上传完成需要更新 fileList
  586. let data = JSON.parse(res.data);
  587. that.fileList.push({
  588. name: JSON.parse(data.data[0]).name,
  589. size: JSON.parse(data.data[0]).size,
  590. imgUrl: "/FileController/download/" + data.data[1],
  591. url:
  592. that.$constant.BASE_URI +
  593. "/FileController/download/" +
  594. data.data[1],
  595. isImage: true,
  596. });
  597. that.fileUrlList = that.fileList;
  598. },
  599. fail(res) {},
  600. });
  601. },
  602. /**
  603. * 上传图片
  604. */
  605. },
  606. };
  607. </script>
  608. <style lang="scss" scoped></style>
  609. <style lang="scss">
  610. .input-item-box {
  611. textarea {
  612. min-height: 300rpx !important;
  613. }
  614. }
  615. .form-box {
  616. background: #fff;
  617. padding: 12rpx 0;
  618. .van-cell {
  619. padding: 0;
  620. }
  621. .item-box {
  622. display: flex;
  623. padding: 0rpx 30rpx;
  624. .input-tit {
  625. width: 130rpx;
  626. margin-right: 10rpx;
  627. .tit {
  628. font-size: 28rpx;
  629. line-height: 96rpx;
  630. font-weight: bold;
  631. color: #000000;
  632. &.title-warp {
  633. line-height: 56rpx;
  634. }
  635. }
  636. }
  637. .input-item-box {
  638. flex: 1;
  639. .n-input-box {
  640. padding: 12rpx 0;
  641. input {
  642. font-size: 28rpx;
  643. font-weight: 500;
  644. width: 100%;
  645. height: 72rpx;
  646. border: transparent;
  647. padding: 0 24rpx;
  648. color: #000;
  649. box-sizing: border-box;
  650. border-radius: 6rpx;
  651. }
  652. &.inp-x-box {
  653. position: relative;
  654. input {
  655. padding: 0 54rpx 0 24rpx;
  656. }
  657. svg {
  658. position: absolute;
  659. top: 39%;
  660. right: 4%;
  661. width: 24rpx;
  662. height: 24rpx;
  663. color: #868686;
  664. }
  665. }
  666. &.inp-txt-box {
  667. position: relative;
  668. input {
  669. padding: 0 88rpx 0 24rpx;
  670. }
  671. span {
  672. position: absolute;
  673. top: 36%;
  674. right: 4%;
  675. font-weight: 500;
  676. font-size: 28rpx;
  677. color: #3b7aff;
  678. }
  679. }
  680. }
  681. .dis-select-box {
  682. padding: 12rpx 0;
  683. position: relative;
  684. .select-left {
  685. font-size: 28rpx;
  686. font-weight: 500;
  687. width: 248rpx;
  688. height: 72rpx;
  689. border: transparent;
  690. padding: 0 24rpx;
  691. box-sizing: border-box;
  692. border-radius: 6rpx;
  693. }
  694. .select-right {
  695. font-size: 28rpx;
  696. font-weight: 500;
  697. width: 280rpx;
  698. height: 72rpx;
  699. color: #000;
  700. border: transparent;
  701. padding: 0 48rpx 0 24rpx;
  702. box-sizing: border-box;
  703. border-radius: 6rpx;
  704. }
  705. .icon-down {
  706. position: absolute;
  707. top: 36rpx;
  708. right: 22rpx;
  709. color: #767676;
  710. font-size: 24rpx;
  711. }
  712. }
  713. .two-inp-box {
  714. width: 100%;
  715. box-sizing: border-box;
  716. padding: 12rpx 0;
  717. input {
  718. width: 256rpx;
  719. font-size: 28rpx;
  720. font-weight: 500;
  721. height: 72rpx;
  722. border: transparent;
  723. padding: 0 24rpx;
  724. box-sizing: border-box;
  725. border-radius: 6rpx;
  726. &:first-child {
  727. margin-right: 16rpx;
  728. }
  729. }
  730. }
  731. .one-selcet-box {
  732. padding: 12rpx 0;
  733. position: relative;
  734. input {
  735. font-size: 28rpx;
  736. font-weight: 500;
  737. width: 100%;
  738. height: 72rpx;
  739. color: #000;
  740. border: transparent;
  741. padding: 0 48rpx 0 24rpx;
  742. box-sizing: border-box;
  743. border-radius: 6rpx;
  744. }
  745. .icon-down {
  746. position: absolute;
  747. top: 36rpx;
  748. right: 22rpx;
  749. color: #767676;
  750. font-size: 24rpx;
  751. }
  752. }
  753. // 文本框
  754. textarea {
  755. margin: 12rpx 0;
  756. padding: 14rpx 24rpx;
  757. border-radius: 6rpx;
  758. font-size: 28rpx;
  759. font-weight: 500;
  760. line-height: 1.6;
  761. color: #000;
  762. &::-webkit-input-placeholder {
  763. /* WebKit browsers */
  764. color: #999;
  765. }
  766. }
  767. //相机
  768. .xj-box {
  769. padding: 36rpx 0 28rpx;
  770. }
  771. // 删除照片
  772. .img-d-box {
  773. width: 266rpx;
  774. }
  775. // 时间选择
  776. .date-selcet-box {
  777. padding: 12rpx 0;
  778. position: relative;
  779. input {
  780. font-size: 28rpx;
  781. font-weight: 500;
  782. width: 100%;
  783. height: 72rpx;
  784. color: #000;
  785. border: transparent;
  786. padding: 0 24rpx 0 74rpx;
  787. box-sizing: border-box;
  788. border-radius: 6rpx;
  789. }
  790. img {
  791. position: absolute;
  792. top: 32%;
  793. left: 4%;
  794. width: 30rpx;
  795. }
  796. }
  797. // 图片展示
  798. .img-show-box {
  799. width: 100%;
  800. padding: 20rpx;
  801. box-sizing: border-box;
  802. img {
  803. width: 100%;
  804. }
  805. }
  806. // 单选
  807. .radio-box {
  808. display: flex;
  809. align-items: center;
  810. height: 100%;
  811. .van-radio {
  812. flex: 1;
  813. }
  814. .van-radio__label {
  815. font-size: 24rpx;
  816. font-weight: 500;
  817. color: #999999;
  818. }
  819. }
  820. // 按钮
  821. .file-box {
  822. position: relative;
  823. top: 20%;
  824. padding: 0 50rpx;
  825. display: inline-block;
  826. height: 60rpx;
  827. background: #3b7aff;
  828. border-radius: 40rpx;
  829. font-size: 28rpx;
  830. font-weight: 500;
  831. line-height: 60rpx;
  832. color: #ffffff;
  833. }
  834. // 样式
  835. input {
  836. color: #000;
  837. &::-webkit-input-placeholder {
  838. /* WebKit browsers */
  839. color: #999;
  840. }
  841. }
  842. &.gray {
  843. .n-input-box {
  844. input {
  845. background: #f8f8f8 !important;
  846. }
  847. }
  848. .dis-select-box {
  849. .select-left {
  850. background: #f8f8f8;
  851. }
  852. .select-right {
  853. background: #f8f8f8;
  854. }
  855. }
  856. .one-selcet-box {
  857. input {
  858. background: #f8f8f8;
  859. }
  860. }
  861. textarea {
  862. background: #f8f8f8;
  863. }
  864. .date-selcet-box {
  865. input {
  866. background: #f8f8f8;
  867. }
  868. }
  869. }
  870. &.blue {
  871. .n-input-box {
  872. input {
  873. background: #f3f7ff;
  874. }
  875. }
  876. .dis-select-box {
  877. .select-left {
  878. background: #f3f7ff;
  879. }
  880. .select-right {
  881. background: #f3f7ff;
  882. }
  883. }
  884. .one-selcet-box {
  885. input {
  886. background: #f3f7ff;
  887. }
  888. }
  889. textarea {
  890. background: #f3f7ff;
  891. }
  892. .date-selcet-box {
  893. input {
  894. background: #f3f7ff;
  895. }
  896. }
  897. .two-inp-box {
  898. input {
  899. background: #f3f7ff;
  900. }
  901. }
  902. }
  903. &.green {
  904. .n-input-box {
  905. input {
  906. background: #dcffec;
  907. }
  908. }
  909. .dis-select-box {
  910. .select-left {
  911. background: #dcffec;
  912. }
  913. .select-right {
  914. background: #dcffec;
  915. }
  916. }
  917. .one-selcet-box {
  918. input {
  919. background: #dcffec;
  920. }
  921. }
  922. textarea {
  923. background: #dcffec;
  924. }
  925. }
  926. &.red {
  927. .img-show-box {
  928. background: #fff1f1;
  929. }
  930. textarea {
  931. background: #fff1f1;
  932. }
  933. }
  934. }
  935. }
  936. // 详情标题
  937. .detail-title-box {
  938. margin: 0 30rpx;
  939. padding: 30rpx 0;
  940. border-bottom: 1rpx solid #e7e7e7;
  941. }
  942. }
  943. .button-group {
  944. display: flex;
  945. justify-content: space-around;
  946. align-items: center;
  947. padding: 4vw 0 !important;
  948. }
  949. .upload-group {
  950. padding: 0.5rem 0.9rem;
  951. }
  952. .video-name {
  953. white-space: nowrap;
  954. text-overflow: ellipsis;
  955. overflow: hidden;
  956. word-break: break-all;
  957. width: 17em;
  958. font-weight: 700;
  959. font-size: 0.8rem;
  960. }
  961. .upload-group {
  962. padding: 0.5rem 0.9rem;
  963. }
  964. </style>