Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

form-builder.vue 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <template>
  2. <!-- 通用表单 modify by ht
  3. @submit="formSubmit"-->
  4. <form>
  5. <view v-for="(item, index) in formData" :key="index">
  6. <view v-show="!item.hide">
  7. <!-- 是否显示-->
  8. <view style="min-height: 80rpx" :class="
  9. item.vertical === 2 ? 'as-layout-vertical' : 'as-layout-horizontal'
  10. ">
  11. <!-- 标题 -->
  12. <view class="as-gravity-center-start" :style="{
  13. minWidth: config.titleWidth + 'rpx',
  14. marginTop: `${item.bg || item.vertical === 2 ? '30rpx' : ''}`,
  15. }" style="
  16. margin-left: 20rpx;
  17. flex-direction: row;
  18. display: flex;
  19. flex-direction: row;
  20. ">
  21. <!-- <image class="img-size" mode="aspectFill" :src="item.required ? '../must.png' : ''"></image> -->
  22. <!-- :class="item.vertical === 2 ? 'text-left' : 'text-justify'" -->
  23. <span v-if="item.star" style="color: red">*</span>
  24. <view class="text-title" :style="{
  25. color: `#${item.labelColor ?item.labelColor:'333333'}`,
  26. width: '100%',
  27. }">
  28. {{ item.title }}
  29. </view>
  30. </view>
  31. <!-- 内容 -->
  32. <view class="as-weight as-gravity-center-start">
  33. <!-- 文本内容 -->
  34. <view v-if="item.type === 1" :class="item.bg ? 'bg' : 'notbg'" class="text-hint"
  35. :style="item.style">{{ item[item.value] }}</view>
  36. <!-- 输入框 -->
  37. <view v-if="item.type === 2" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  38. <view class="as-layout-horizontal" style="align-items: center">
  39. <input :disabled="item.disabled" v-model="item[item.value]" :type="item.inputType"
  40. :placeholder="item.hint ? item.hint : '请输入' + item.title"
  41. placeholder-class="text-hint" class="text" :maxlength="item.maxlength"
  42. :style="item.style" style="min-height: 80rpx; word-break: break-all; flex: 1"
  43. @input="inputChange($event, item)" />
  44. <view v-if="item.btn" class="as-gravity-center">
  45. <!-- 验证码 -->
  46. <verification-code v-if="item.btnType === 'code'"
  47. :mobile="item.codeValue"></verification-code>
  48. <button v-else size="mini" style="background-color: #2ce242; color: #fff"
  49. @click="inputBtnClickHandle(item)">
  50. {{ item.btnTitle }}
  51. </button>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 多项选择器 -->
  56. <view v-if="item.type === 3" :class="item.bg ? 'bg' : 'notbg'">
  57. <checkbox-group @change="checkboxChange($event, item)" :disabled="item.disabled">
  58. <view class="as-layout-horizontal" style="justify-content: right">
  59. <label style="
  60. display: flex;
  61. flex-direction: row;
  62. margin-right: 30rpx;
  63. " v-for="(itemData, index) in item.itemData" :key="index">
  64. <checkbox style="transform: scale(0.7)" :value="itemData.value"
  65. :checked="itemData.checked" />
  66. <view>{{ itemData.name }}</view>
  67. </label>
  68. </view>
  69. </checkbox-group>
  70. </view>
  71. <!-- 普通选择器 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容 :range-key="item[item.value]"-->
  72. <view v-if="item.type === 4" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  73. <!-- range[范围] value[初始选择]-->
  74. <view class="as-layout-horizontal" style="align-items: center">
  75. <view v-if="item.mode === 'custom'" :class="item[item.value] ? 'text' : 'text-hint'"
  76. style="flex: 1" @click="emit('pickerCustom', item)">
  77. {{
  78. item[item.value]
  79. ? item.itemKey
  80. ? item[item.value][item.itemKey]
  81. : item[item.value]
  82. : item.hint
  83. ? item.hint
  84. : "请选择" + item.title
  85. }}
  86. </view>
  87. <template v-else-if="item.mode === 'search'">
  88. <view :disabled="item.disabled" :class="item[item.value] ? 'text' : 'text-hint'"
  89. style="flex: 1" @click="item.searchPickerVisible = true">
  90. {{
  91. item[item.value]
  92. ? item.itemKey
  93. ? item[item.value][item.itemKey]
  94. : item[item.value]
  95. : item.hint
  96. ? item.hint
  97. : "请选择" + item.title
  98. }}
  99. </view>
  100. <search-picker :visible="item.searchPickerVisible" :dataSource="item.itemData"
  101. v-model="item[item.value]"
  102. @hidePicker="item.searchPickerVisible = false"></search-picker>
  103. </template>
  104. <picker v-else :disabled="item.disabled" :range-key="item.itemKey"
  105. :mode="item.mode ? item.mode : 'selector'" @change="bindPickerChange($event, item)"
  106. :range="item.itemData" style="flex: 1">
  107. <view :class="item[item.value] ? 'text' : 'text-hint'">
  108. {{
  109. item[item.value]
  110. ? item.itemKey
  111. ? item[item.value][item.itemKey]
  112. : item[item.value]
  113. : item.hint
  114. ? item.hint
  115. : "请选择" + item.title
  116. }}
  117. </view>
  118. </picker>
  119. <image class="arror" mode="aspectFill" :src="`${$imgUrl}common/arror-right.png`">
  120. </image>
  121. </view>
  122. </view>
  123. <!-- 富文本框 -->
  124. <view v-if="item.type === 5" style="width: 100%; margin: 30rpx 25rpx 0rpx">
  125. <view>
  126. <textarea :disabled="item.disabled" v-model="item[item.value]"
  127. @input="textareaInput($event, item)" :class="item.bg ? 'textarea-bg' : 'notbg'"
  128. placeholder-class="text-hint" style="width: 100%" :maxlength="item.maxlength"
  129. :placeholder="item.hint ? item.hint : '请输入' + item.title">
  130. </textarea>
  131. <!-- <view v-if="item.maxlength" class="as-gravity-center-end"
  132. style="display: flex;flex-direction: row;margin-top:120rpx;">
  133. <view class="text-hint">{{!item.num ? '0' : item.num}}</view>
  134. <view class="text-hint">/{{item.maxlength ? item.maxlength : 100}}</view>
  135. </view> -->
  136. </view>
  137. </view>
  138. <!-- 图片选择器 :imgWidth="imgWidth ? imgWidth : 0"-->
  139. <view v-if="item.type === 6" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  140. <form-image @backImg="backImg($event, item)" style="width: 100%" :retract="40"></form-image>
  141. </view>
  142. <!-- 单向选择器 -->
  143. <view v-if="item.type === 7" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  144. <radio-group @change="radioChange($event, item)">
  145. <view class="as-layout-horizontal" style="justify-content: right">
  146. <view style="flex: 1"></view>
  147. <label style="
  148. display: flex;
  149. flex-direction: row;
  150. margin-left: 30rpx;
  151. " v-for="(itemData, index) in item.itemData" :key="index">
  152. <radio style="transform: scale(0.7)" :value="itemData.value"
  153. :checked="itemData.checked" color="#2CE242" />
  154. <view>{{ itemData.name }}</view>
  155. </label>
  156. </view>
  157. </radio-group>
  158. </view>
  159. <!-- 证件照上传 -->
  160. <view v-if="item.type === 8" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  161. <view style="margin: 0 40rpx">
  162. <view class="text-error">{{ item.hint }}</view>
  163. <view class="as-layout-horizontal as-gravity-center"
  164. style="height: 250rpx; margin-top: 20rpx">
  165. <view class="as-layout-vertical" style="width: 90%; height: 100%">
  166. <image :src="
  167. item.placeholderImg1
  168. ? item.placeholderImg1
  169. : `${$imgUrl}license2.png`
  170. " style="width: 100%; height: 80%" @tap="ImageSelection(item, 1)" mode="aspectFill"></image>
  171. <view class="as-gravity-center text-hint" style="margin-top: 5rpx">
  172. {{ item.hint1 }}
  173. </view>
  174. </view>
  175. <view style="width: 40rpx"></view>
  176. <view class="as-layout-vertical" style="width: 90%; height: 100%">
  177. <image :src="
  178. item.placeholderImg2
  179. ? item.placeholderImg2
  180. : `${$imgUrl}license2.png`
  181. " style="width: 100%; height: 80%" @tap="ImageSelection(item, 2)" mode="aspectFill"></image>
  182. <view class="as-gravity-center text-hint" style="margin-top: 5rpx">
  183. {{ item.hint2 }}
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. <!-- 车牌号输入 -->
  190. <view v-if="item.type === 9" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  191. <view style="margin: 20rpx -20rpx 10rpx">
  192. <car-num-ber-input @numberInputResult="numberInputResult($event, item)">
  193. </car-num-ber-input>
  194. </view>
  195. </view>
  196. <!-- 省市区选择 -->
  197. <view v-if="item.type === 10" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  198. <view class="as-layout-horizontal" style="align-items: center">
  199. <pick-regions :defaultRegion="defaultRegionCode"
  200. @getRegion="handleGetRegion($event, item)" style="flex: 1">
  201. <view :class="item[item.value] ? 'text' : 'text-hint'">
  202. {{
  203. item[item.value]
  204. ? item.itemKey
  205. ? item[item.value][item.itemKey]
  206. : item[item.value]
  207. : item.hint
  208. ? item.hint
  209. : "请选择" + item.title
  210. }}
  211. </view>
  212. </pick-regions>
  213. <image class="arror" :src="`${$imgUrl}common/arror-right.png`" mode="aspectFill">
  214. </image>
  215. </view>
  216. </view>
  217. <!-- 车辆图片上传 -->
  218. <view v-if="item.type === 11" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'">
  219. <view class="imgs-box as-layout-horizontal">
  220. <view class="img-box" v-for="(img, index) in item.imgList">
  221. <form-image @backImg="backImg2($event, img, item)" style="width: 100%"
  222. :imgWidth="120" :retract="-10" :showTxt="false" :count="1"
  223. @removeImg="removeImg2($event, img, item)"></form-image>
  224. <view class="img-hint">{{ img.hint }}</view>
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. </view>
  230. <view v-show="index !== formData.length - 1 && !item.underline" class="as-line3"
  231. style="margin: 0rpx 20rpx 0rpx 20rpx"></view>
  232. <view class="divider" v-if="item.divider"></view>
  233. </view>
  234. </view>
  235. <view class="subBtn">
  236. <submit-button :title="config ? config.submitName : '提交'" form-type="submit"
  237. @submit="formSubmit"></submit-button>
  238. </view>
  239. </form>
  240. </template>
  241. <script setup lang="ts">
  242. import { TypeData, ImgData } from "./tools";
  243. import { request } from "@/utils/network/request.js";
  244. import carNumBerInput from "@/components/car-number-input/car-number-input";
  245. import { pathToBase64 } from "@/utils/util/imageTool.js";
  246. import pickRegions from "@/login/pick-regions/pick-regions.vue";
  247. import { onMounted, ref } from "vue";
  248. const defaultRegionCode = "520115";
  249. const props = defineProps({
  250. formData: {
  251. type: Array as () => Array<TypeData>,
  252. default: () => [],
  253. },
  254. config: {
  255. type: Object,
  256. default: function () {
  257. return {
  258. submitName: "提交", //提交按钮名称
  259. titleWidth: 120, //标题宽度
  260. };
  261. },
  262. },
  263. });
  264. //defineEmits
  265. const emit = defineEmits<{
  266. (e : "submit", content : any) : void;
  267. (e : "uploadImg", content : any, item : TypeData, index : Number) : void;
  268. (e : "radioChange", event : any, item : TypeData) : void;
  269. (e : "addressInfo", content : any) : void;
  270. (e : "inputChange", event : any, item : TypeData) : void;
  271. (e : "pickerCustom", item : TypeData) : void;
  272. }>();
  273. //defineExpose 可宏来显式指定在 <script setup> 组件中要暴露出去的属性。
  274. //普通选择器
  275. function bindPickerChange(e : any, item : TypeData) {
  276. let select = e.target.value;
  277. // #ifdef H5
  278. select = e.detail.value;
  279. // #endif
  280. if (item.mode === "date" || item.mode === "time") {
  281. /* 日期选择器*/
  282. item[item.value] = select;
  283. } else {
  284. /* 普通选择器*/
  285. item[item.value] = item.itemData[select];
  286. }
  287. }
  288. //输入框后按钮点击
  289. const inputBtnClickHandle = (item : TypeData) => {
  290. if (item.btnType === "address") {
  291. //#ifdef MP-WEIXIN
  292. uni.chooseAddress({
  293. success: (res) => {
  294. emit("addressInfo", res);
  295. },
  296. fail: (err) => {
  297. showToast("获取失败!");
  298. },
  299. });
  300. //#endif
  301. } else if (item.btnType === "code") {
  302. //获取验证码
  303. showToast("获取验证码");
  304. }
  305. };
  306. // 获取选择的地区
  307. function handleGetRegion(e : any, item : TypeData) {
  308. item[item.value] = e[0].name + "/" + e[1].name + "/" + e[2].name;
  309. }
  310. //多项选择器
  311. function checkboxChange(e : any, item : TypeData) {
  312. item[item.value] = e.detail.value; /* 赋值*/
  313. }
  314. //单项选择器
  315. function radioChange(e : any, item : TypeData) {
  316. item[item.value] = e.detail.value; /* 赋值*/
  317. emit("radioChange", e, item);
  318. }
  319. //文本输入框
  320. function inputChange(e : Event, item : TypeData) {
  321. emit("inputChange", e, item);
  322. }
  323. //富文本框输入内容
  324. function textareaInput(e : Event, item : TypeData) {
  325. item.num = item[item.value].length;
  326. }
  327. //点击图片按钮
  328. function backImg(e : Event, item : TypeData) {
  329. item[item.value] = e;
  330. }
  331. //点击图片按钮2
  332. function backImg2(e : Event, imgItem : ImgData, item : TypeData) {
  333. imgItem[imgItem.value] = e;
  334. let all = true;
  335. let srcUrl = "";
  336. item.imgList.map((temp) => {
  337. if (!temp[temp.value]) {
  338. all = false;
  339. return;
  340. } else {
  341. srcUrl = srcUrl + temp[temp.value] + ",";
  342. }
  343. });
  344. if (all) {
  345. item[item.value] = srcUrl;
  346. // console.log('--------总图片路径------------');
  347. // console.log(item[item.value])
  348. }
  349. }
  350. //删除图片
  351. const removeImg2 = (e : Event, imgItem : ImgData, item : TypeData) => {
  352. imgItem[imgItem.value] = "";
  353. item[item.value] = "";
  354. };
  355. //车牌输入
  356. function numberInputResult(e : Event, item : TypeData) {
  357. item[item.value] = e;
  358. }
  359. //选择图片按钮
  360. function ImageSelection(item : TypeData, index : number) {
  361. uni.chooseImage({
  362. count: 1, //最多可以选择的文件个数
  363. sourceType: ["camera"], //album 从相册选视频,camera 使用相机拍摄,默认为:['album', 'camera']
  364. success(res : any) {
  365. if (res.tempFiles[0].size > 2000000) {
  366. uni.showToast({
  367. title: "图片大于2M,请重新上传",
  368. icon: "none",
  369. duration: 1500,
  370. });
  371. return;
  372. }
  373. // #ifdef MP-WEIXIN
  374. uni.getFileSystemManager().readFile({
  375. filePath: res.tempFiles[0].tempFilePath, //要读取的文件的路径
  376. encoding: "base64", //编码格式
  377. success: (res) => {
  378. let imgBase64 = res.data;
  379. let reqData = {
  380. imageBase: imgBase64,
  381. accountNum: "qtzl_xcx",
  382. secretKey: "4DE47302-EDC7-41D4-888F-59A79DF4EA46",
  383. };
  384. //上传给服务器
  385. uni.showLoading({
  386. title: "正在加载中...",
  387. mask: true,
  388. });
  389. //文件上传
  390. request("", {
  391. baseUrl: "https://etcfile.etcjz.cn/v1/file/uploadImageBaseFile",
  392. data: reqData,
  393. }).then((content) => {
  394. uni.hideLoading();
  395. if (content.rc != "00") {
  396. uni.showModal({
  397. title: "请求错误",
  398. content: "图片上传失败",
  399. showCancel: false,
  400. confirmText: "取消",
  401. });
  402. }
  403. //处理后的 Data
  404. let data = {
  405. source: 2, //来源
  406. imageBase64: imgBase64,
  407. imageType: index,
  408. imageUrl: content.data.fileUrl,
  409. };
  410. emit("uploadImg", data, item, index);
  411. });
  412. },
  413. fail: (err) => {
  414. console.log("错误提示", err);
  415. },
  416. });
  417. // #endif
  418. // #ifdef H5
  419. pathToBase64(res.tempFilePaths[0]).then((data) => {
  420. let base64 = data.replaceAll("data:image/jpeg;base64,", "");
  421. base64 = base64.replaceAll("data:image/png;base64,", "");
  422. base64 = base64.replaceAll("data:image/jpg;base64,", "");
  423. let reqData = {
  424. imageBase: base64,
  425. accountNum: "qtzl_xcx",
  426. secretKey: "4DE47302-EDC7-41D4-888F-59A79DF4EA46",
  427. };
  428. //上传给服务器
  429. uni.showLoading({
  430. title: "文件上传中...",
  431. mask: true,
  432. });
  433. //文件上传
  434. request("", {
  435. baseUrl: "https://etcfile.etcjz.cn/v1/file/uploadImageBaseFile",
  436. data: reqData,
  437. })
  438. .then((content) => {
  439. console.log("上传结果", content);
  440. uni.hideLoading();
  441. if (content.rc != "00" && content.rc != 0) {
  442. uni.showModal({
  443. title: "请求错误",
  444. content: "图片上传失败",
  445. showCancel: false,
  446. confirmText: "取消",
  447. });
  448. }
  449. //展示缩略图
  450. if (index % 2 != 0) {
  451. //奇数第一张 偶数第二张
  452. item.placeholderImg1 = content.data.fileUrl;
  453. item[item.value.split(",")[0]] = content.data.fileUrl;
  454. } else {
  455. item.placeholderImg2 = content.data.fileUrl;
  456. item[item.value.split(",")[1]] = content.data.fileUrl;
  457. }
  458. //只展示缩略图
  459. if (!item.inputType) {
  460. emit("uploadImg", data, item, index);
  461. } else {
  462. //if(item.type === 1)
  463. //证件OCR识别
  464. uni.showLoading({
  465. title: "证件识别中...",
  466. mask: true,
  467. });
  468. let reqData2 = {
  469. imageDriveBase: "",
  470. imageBase64: base64,
  471. imageType: index % 2 != 0 ? 1 : 2, //1代表身份证正面,2代表反面
  472. imageUrl: content.data.fileUrl,
  473. };
  474. //默认身份证
  475. let code = "IF010012019070410001";
  476. if (item.inputType == "2") {
  477. //2为行驶证
  478. code = "IF010012019070410002";
  479. reqData2.imageBase64 = "";
  480. reqData2.imageDriveBase = base64;
  481. }
  482. request(code, {
  483. data: reqData2,
  484. }).then((ocr) => {
  485. uni.hideLoading();
  486. if (ocr.rc !== "00") {
  487. uni.showModal({
  488. title: "请求错误",
  489. content: "证件识别失败",
  490. showCancel: false,
  491. confirmText: "取消",
  492. });
  493. }
  494. let data = ocr.rd;
  495. //[身份证正面]姓名(name) 住址(address) 出生日期(birthday) 身份证号(idno) 民族(nation)
  496. //[身份证反面]证件机关(agency) 有效起始日期(begindate) 有效结束日期(enddate)
  497. emit("uploadImg", data, item, index);
  498. });
  499. }
  500. })
  501. .catch((e) => {
  502. console.log(">>>>", e);
  503. });
  504. });
  505. // #endif
  506. },
  507. fail(res : any) {
  508. if (!res.authSetting["scope.album"]) {
  509. uni.showModal({
  510. title: "授权失败",
  511. content: "需要从您的相机或相册获取图片,请在设置界面打开相关权限",
  512. success: (res) => {
  513. if (res.confirm) {
  514. uni.openSetting();
  515. }
  516. },
  517. });
  518. }
  519. },
  520. });
  521. }
  522. function showToast(hint : string) {
  523. uni.showToast({
  524. icon: "none",
  525. title: hint,
  526. });
  527. }
  528. //内容提交
  529. const formSubmit = () => {
  530. let content = {};
  531. /* 整理数据对象返回内容 */
  532. for (var i = 0; i < props.formData.length; i++) {
  533. let data = props.formData[i];
  534. /* 时间另外判断 */
  535. if (data.required && !data.hide) {
  536. //隐藏的不用进行判断
  537. let reg = new RegExp(":", "g"); //g代表全部
  538. let newMsg = data.title.replace(reg, "");
  539. if (data.value.indexOf(",") != -1 && data.type === 8) {
  540. if (!data[data.value.split(",")[0]]) {
  541. showToast(data.emptyHint ? data.emptyHint : `${data.hint1}不能为空`);
  542. return;
  543. } else if (!data[data.value.split(",")[1]]) {
  544. showToast(data.emptyHint ? data.emptyHint : `${data.hint2}不能为空`);
  545. return;
  546. }
  547. } else if (!data[data.value]) {
  548. showToast(data.emptyHint ? data.emptyHint : `${newMsg}不能为空`);
  549. return;
  550. }
  551. }
  552. if (data.value.indexOf(",") != -1 && data.type === 8) {
  553. if (data[data.value.split(",")[0]]) {
  554. content[data.value.split(",")[0]] = data[data.value.split(",")[0]];
  555. }
  556. if (data[data.value.split(",")[1]]) {
  557. content[data.value.split(",")[1]] = data[data.value.split(",")[1]];
  558. }
  559. } else if (data.type === 10) {
  560. // for (var i = 0; i < data.value.split(',').length; i++) {
  561. // content[data.value.split(',')[i]] = data[data.value].split('-')[i]
  562. // }
  563. content[data.value] = data[data.value];
  564. } else {
  565. if (data.type === 4 && data.name) {
  566. content[data.value] = data[data.value][data.name];
  567. } else {
  568. content[data.value] = data[data.value];
  569. }
  570. }
  571. }
  572. emit("submit", content);
  573. };
  574. </script>
  575. <style lang="scss" scoped>
  576. .img-size {
  577. width: 30rpx;
  578. height: 30rpx;
  579. }
  580. .notbg {
  581. background-color: #ffffff;
  582. border-radius: 20rpx;
  583. min-height: 80rpx;
  584. line-height: 80rpx;
  585. padding: 8rpx 28rpx;
  586. }
  587. .bg {
  588. background-color: #f1f1f1;
  589. border-radius: 20rpx;
  590. min-height: 80rpx;
  591. line-height: 80rpx;
  592. padding: 0 28rpx;
  593. margin-right: 29rpx;
  594. margin-left: 25rpx;
  595. margin-top: 30rpx;
  596. }
  597. .textarea-bg {
  598. background-color: #f1f1f1;
  599. border-radius: 20rpx;
  600. height: 245rpx;
  601. padding: 30rpx;
  602. box-sizing: border-box;
  603. -moz-box-sizing: border-box;
  604. /*Firefox*/
  605. -webkit-box-sizing: border-box;
  606. /*Safari*/
  607. }
  608. .text-hint {
  609. font-size: 28rpx;
  610. color: #999999;
  611. }
  612. .text-title {
  613. font-size: 28rpx;
  614. color: #333333;
  615. }
  616. .subBtn {
  617. margin: 112rpx 30rpx 30rpx;
  618. }
  619. .divider {
  620. border-bottom: 1px solid #dcdcdc;
  621. }
  622. .arror {
  623. width: 35rpx;
  624. height: 35rpx;
  625. }
  626. .imgs-box {
  627. flex-wrap: wrap;
  628. margin-top: 20rpx;
  629. margin-bottom: -35rpx;
  630. padding-right: 110rpx;
  631. justify-content: space-between;
  632. .img-box {
  633. margin-bottom: 35rpx;
  634. }
  635. .img-hint {
  636. font-size: 24rpx;
  637. color: #333333;
  638. text-align: center;
  639. }
  640. }
  641. </style>