globalFormDetail.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  1. <template>
  2. <!-- 仿===tabbarDetail -->
  3. <div>
  4. <!--表格内容 start------------------------------------------------------------>
  5. <div class="layerBox">
  6. <tableTitle :name="tableDivTitle" />
  7. <el-row>
  8. <template>
  9. <el-table class="my-table" :data="table_body" style="width: 100%">
  10. <!-- 动态表头 -->
  11. <el-table-column
  12. v-for="(head, index) in table_head"
  13. :key="index"
  14. :prop="head.field"
  15. :label="head.title"
  16. :width="head.width || ''">
  17. <!-- 动态内容 -->
  18. <template slot-scope="scope">
  19. <template v-if="table_head[index].field_type !== '7'">
  20. {{table_per_fun(table_head[index],Object.values(scope.row)[index])}}
  21. </template>
  22. <template v-if="table_head[index].field_type == '7'" >
  23. <div class="listLookBtn" @click="file_fun(table_per_fun(table_head[index],Object.values(scope.row)[index]))">
  24. <i class="el-icon-view"></i>
  25. 预览
  26. </div>
  27. </template>
  28. <template v-if="table_head[index].field_type == '8'">
  29. <img class="img"
  30. style="width:55px;height:55px;"
  31. v-if="Object.values(scope.row).join(',').split(',')[index].trim()"
  32. :src="Object.values(scope.row).join(',').split(',')[index].trim() "
  33. title="" alt=""
  34. >
  35. </template>
  36. </template>
  37. </el-table-column>
  38. <!-- 保留操作列 -->
  39. <el-table-column fixed="right" label="操作" width="200">
  40. <template slot-scope="scope">
  41. <div class="listBtnBox">
  42. <div class="listEditBtn" @click="go_up(scope.row.id,scope.row,scope.$index )">
  43. <i class="el-icon-edit-outline"></i>
  44. 编辑
  45. </div>
  46. <div class="listDeleteBtn" @click="go_cancel(scope.row.id )">
  47. <i class="el-icon-delete"></i>
  48. 删除
  49. </div>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. </template>
  55. </el-row>
  56. </div>
  57. <!--分页 start------------------------------------------------------------>
  58. <div class="alignBox">
  59. <el-row>
  60. <el-col :span="24">
  61. <el-pagination
  62. background
  63. @size-change="handleSizeChange"
  64. @current-change="handleCurrentChange"
  65. :current-page="page"
  66. :page-size="pageSize"
  67. layout="total, prev, pager, next, jumper"
  68. :total="total">
  69. </el-pagination>
  70. </el-col>
  71. </el-row>
  72. </div>
  73. <!--分页 end------------------------------------------------------------>
  74. <!--表格内容 end------------------------------------------------------------>
  75. <!-- 弹出框 编辑 start----------------------------------------------------------->
  76. <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" top="8vh"
  77. :close-on-click-modal="false">
  78. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
  79. <div class="dialogText">
  80. <el-form-item
  81. v-for="(head, index) in table_head"
  82. :key="index"
  83. :label="head.title+':'"
  84. :prop="`field_${index}`"
  85. :rules="getValidationRules(head, index)">
  86. <!-- 文本文字1 -->
  87. <el-input
  88. v-if="head.field_type==1"
  89. v-model="ruleForm[`field_${index}`]"
  90. :disabled="head.title === '编号:' ? true : false"
  91. @blur="handleBlurValidation(head.title, ruleForm[`field_${index}`])">
  92. </el-input>
  93. <!-- 多行textarea 2-->
  94. <el-input
  95. v-if="head.field_type==2"
  96. v-model="ruleForm[`field_${index}`]"
  97. type="textarea"
  98. :autosize="{ minRows: 2, maxRows: 4 }"
  99. @blur="handleBlurValidation(head.title, ruleForm[`field_${index}`])"
  100. >
  101. </el-input>
  102. <!-- 单选按钮 3 -->
  103. <el-radio-group
  104. v-if="head.field_type==3"
  105. v-model="ruleForm[`field_${index}`]"
  106. >
  107. <el-radio
  108. v-for="(per_obj,per_index) in radio_arr_fun(head.option)" :key="per_index"
  109. :label="+per_obj[1]">
  110. {{ per_obj[0] }}
  111. </el-radio>
  112. </el-radio-group>
  113. <!-- 下拉选择 4 -->
  114. <el-select
  115. v-if="head.field_type==4"
  116. placeholder="请选择"
  117. v-model="ruleForm[`field_${index}`]"
  118. style="width: 100%">
  119. <el-option
  120. v-for="(per_obj, per_index) in select_arr_fun(head.option)"
  121. :key="per_index"
  122. :label="per_obj.label"
  123. :value="per_obj.value">
  124. </el-option>
  125. </el-select>
  126. <el-checkbox-group
  127. v-if="head.field_type==5"
  128. v-model="ruleForm[`field_${index}`]">
  129. <el-checkbox
  130. v-for="(per_obj, per_index) in head.option_value"
  131. :key="per_index"
  132. :label="per_index">
  133. {{ per_obj }}
  134. </el-checkbox>
  135. </el-checkbox-group>
  136. <!-- 日期选择器 6 -->
  137. <el-date-picker
  138. v-if="head.field_type==6"
  139. v-model="ruleForm[`field_${index}`]"
  140. type="date"
  141. value-format="yyyy-MM-dd"
  142. placeholder="选择日期"
  143. style="width: 100%">
  144. </el-date-picker>
  145. <!-- 上传单文件 7-->
  146. <template v-if="head.field_type==7">
  147. <el-button
  148. type="primary"
  149. size="small"
  150. class="listLookBtn"
  151. @click="file_fun(table_per_fun(head, ruleForm[`field_${index}`] ))">
  152. <i class="el-icon-view"></i>
  153. 预览
  154. </el-button>
  155. </template>
  156. <!-- 上传img 8-->
  157. <div class="uploaderBox" v-if="head.field_type==8" @mouseenter="hovering = true" @mouseleave="hovering = false">
  158. <el-upload
  159. class="avatar-uploader"
  160. action="#"
  161. :show-file-list="false"
  162. :before-upload="(file) => beforeAvatarUpload(file, index)">
  163. <img v-if="ruleForm[`field_${index}`]" :src="ruleForm[`field_${index}`]" class="avatar">
  164. <div v-else class="chooseImgDiv">
  165. <div>
  166. <img src="@/assets/public/upload/noImage.png">
  167. <div>选择图片</div>
  168. </div>
  169. </div>
  170. <input type="hidden" v-model="ruleForm[`field_${index}`]">
  171. <span class="photo_tips">推荐图片长宽比例为 16:9,大小不能超过 500 K。</span>
  172. <!-- <div v-if="true" -->
  173. <div v-if="hovering && ruleForm[`field_${index}`]"
  174. class="delete-button"
  175. @click="handleDelete(index)">
  176. <i class="el-icon-delete"></i>
  177. </div>
  178. </el-upload>
  179. </div>
  180. </el-form-item>
  181. </div>
  182. <div class="dialogBtn">
  183. <el-button type="info" @click="cancelForm">取消</el-button>
  184. <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
  185. </div>
  186. </el-form>
  187. </el-dialog>
  188. <!-- 弹出框 编辑 end----------------------------------------------------------->
  189. </div>
  190. </template>
  191. <script>
  192. //表格标题
  193. import tableTitle from './components/tableTitle.vue';
  194. //引入公用样式
  195. import '@/styles/global.less';
  196. import { load_img_api,getFooterContent,up_table_api,look_table_api,cancel_table_api } from '@/api/globalFormApi'
  197. //引入富文本编辑器
  198. import myEditor from '../../components/edit/myEditor.vue';
  199. export default {
  200. components: {
  201. tableTitle,//表格标题
  202. myEditor,
  203. },
  204. data() {
  205. const validateEmpty = (rule, value, callback) => {
  206. if (value.length == 0) {
  207. callback(new Error('该项不能为空!'))
  208. } else {
  209. callback()
  210. }
  211. }
  212. return {
  213. checkbox_active_arr:[],//复选选中
  214. checkbox_selected_arr:[],//复选框选中
  215. hovering: false,
  216. imgUrl:"",
  217. arr_1:[1,23,12,3],
  218. up_edit_obj:{},//编辑后提交的数据
  219. ruleForm: {
  220. },
  221. rules: {
  222. listTitle: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  223. contentTitle: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  224. contentDetail: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  225. },
  226. table_head:[],//列表头
  227. table_body:[],//列表内容
  228. tableDivTitle: "查看内容", //列表标题
  229. dialogTableVisible: false, //编辑弹框
  230. dialogName: '编辑', //编辑弹窗名称
  231. tableData: [],//表格数据
  232. tabbarId: '',//底部导航传递的id
  233. tabbarType: 1,//底部导航传递的类型
  234. //活动id
  235. activeid: "",
  236. // 分页相关
  237. page: 1,
  238. pageSize: 10,
  239. total: 0,
  240. // 搜索框相关
  241. listTitle: '', //网站名称id
  242. contentTitle: '', //广告位名称
  243. //弹框相关
  244. activeIndex: 0, // 新增当前操作行索引
  245. }
  246. },
  247. methods: {
  248. convertStringArray(strArray) {
  249. try {
  250. return strArray.map(item => {
  251. if (typeof item === 'string' && /^\[.*\]$/.test(item)) {
  252. return JSON.parse(item.replace(/'/g, '"'));
  253. }
  254. return item;
  255. });
  256. } catch (e) {
  257. console.error('数组转换失败:', e);
  258. return strArray;
  259. }
  260. },
  261. //1.列表和分页相关 start ------------------------------------------------------------>
  262. //1.1 开始请求列表信息方法
  263. getData() {
  264. // 查看内容-列表
  265. look_table_api({//
  266. page: this.page,
  267. pageSize: this.pageSize,
  268. id: this.$route.query.id,
  269. }).then(data => {
  270. this.tableData = data.data.tableFields
  271. this.total = data.data.total
  272. this.table_head = data.data.tableFields//列表头
  273. this.table_body = data.data.list//列表内容
  274. })
  275. },
  276. //1.3 列表内容分页
  277. //直接跳转
  278. handleSizeChange(val) {
  279. this.pageSize = val;
  280. this.getData();
  281. },
  282. //1.4 点击分页
  283. handleCurrentChange(val) {
  284. this.page = val;
  285. this.getData();
  286. },
  287. // 1.5 搜索按钮
  288. goSearch() {
  289. getFooterContent({
  290. fcat_id: this.tabbarId,
  291. page: this.page,
  292. pageSize: this.pageSize,
  293. list_title:this.listTitle,
  294. con_title:this.contentTitle,
  295. }).then(data => {
  296. // console.log(data);
  297. this.tableData = data.data.rows
  298. this.total = data.data.count
  299. })
  300. },
  301. //1.6 重置按钮
  302. goReset() {
  303. this.listTitle = ""
  304. this.contentTitle = ""
  305. this.getData()
  306. },
  307. //列表和分页相关 end ------------------------------------------------------------>
  308. //1.7 编辑
  309. go_up(id, val,the_index) {
  310. this.up_edit_obj = this.table_body[the_index]
  311. // 初始化 ruleForm
  312. this.ruleForm = {}
  313. const values = Object.values(this.table_body[the_index])
  314. values.forEach((value, index) => {
  315. // 将数字字符串转为数值类型(针对radio的label类型)
  316. const convertedValue = typeof value === 'string' && !isNaN(value) ? Number(value) : value
  317. this.$set(this.ruleForm, `field_${index}`, convertedValue)
  318. })
  319. this.dialogName = '全局表单-编辑内容'
  320. this.activeid = id
  321. this.dialogTableVisible = true
  322. // console.log(id, val);
  323. this.activeIndex = the_index//点击的是第几个
  324. },
  325. //1.8 删除
  326. go_cancel(id) {
  327. this.$confirm('确定要删除该记录吗?', '提示', {
  328. confirmButtonText: '确定',
  329. cancelButtonText: '取消',
  330. type: 'warning',
  331. dangerouslyUseHTMLString: true
  332. }).then(() => {
  333. cancel_table_api({
  334. id:id,
  335. table_id:this.$route.query.id,
  336. }).then(res => {
  337. if (res.code === 200) {
  338. this.$message.success('删除成功')
  339. this.getData() // 刷新数据
  340. } else {
  341. this.$message.error(res.message || '删除失败')
  342. }
  343. }).catch(err => {
  344. console.error('删除失败:', err)
  345. this.$message.error('删除失败')
  346. })
  347. }).catch(() => {})
  348. },
  349. // 单选按钮的str转obj
  350. radio_arr_fun(the_str){
  351. let new_arr =[]
  352. let the_arr = the_str.split('\n')
  353. the_arr.forEach(( per_son_obj, index ) => {
  354. new_arr[index] = per_son_obj.split('|')
  355. })
  356. return new_arr
  357. },
  358. // 下拉选择str转obj
  359. select_arr_fun(the_str){
  360. let new_arr =[]
  361. let the_arr = the_str.split('\n')
  362. the_arr.forEach(( per_son_obj, index ) => {
  363. // new_arr[index] = per_son_obj.split('|')
  364. let the_in_arr = per_son_obj.split('|')
  365. let the_in_obj = {}
  366. the_in_obj.label = the_in_arr[0]
  367. the_in_obj.value = +the_in_arr[1]
  368. new_arr.push(the_in_obj)
  369. })
  370. return new_arr
  371. },
  372. // form 里复选框选项处理(与radio_arr_fun类似)
  373. checkbox_arr_fun(the_index, the_str,active_num_arr,all_obj) {
  374. let checkbox_strValue = String(active_num_arr || "").replace(/[\[\]]/g, '');
  375. active_num_arr = checkbox_strValue.split(',').filter(Boolean).map(Number);
  376. let act_label_arr = []//选中的label-arr
  377. active_num_arr.forEach(( per_obj ) => {
  378. act_label_arr.push(all_obj[per_obj])
  379. })
  380. const new_all_arr = Object.values(all_obj || {});
  381. this.ruleForm[`field_${the_index}`]=act_label_arr
  382. return new_all_arr
  383. },
  384. table_per_fun(the_head,the_obj){//判断table是否是图片
  385. if(the_head.field_type == '1'){//文字
  386. return the_obj
  387. }
  388. if(the_head.field_type == '2'){//多行文本
  389. return the_obj
  390. }
  391. if(the_head.field_type == '3'){//单选框
  392. return the_head.option_value[the_obj]
  393. }
  394. if(the_head.field_type == '4'){//下拉选择
  395. return the_head.option_value[+the_obj]
  396. }
  397. if(the_head.field_type == '5'){//复选框
  398. let strValue = String(the_obj || "").replace(/[\[\]]/g, '')
  399. let arr_in = strValue.split(',').filter(Boolean).map(Number)
  400. let the_new_arr = []
  401. arr_in.forEach(( per_obj ) => {
  402. the_new_arr.push(the_head.option_value[per_obj])
  403. })
  404. return the_new_arr.join('-')
  405. }
  406. if(the_head.field_type == '6'){//日期
  407. return the_obj
  408. }
  409. if(the_head.field_type == '7'){//单文件
  410. return the_obj
  411. }
  412. },
  413. file_fun(fileUrl) {
  414. if (!fileUrl) {
  415. this.$message.error('文件路径无效');
  416. return;
  417. }
  418. // 直接在新标签页打开文件链接
  419. window.open(fileUrl, '_blank');
  420. },
  421. //上传img
  422. beforeAvatarUpload(file,index) {
  423. const isJPG = file.type === 'image/jpeg';
  424. const isPNG = file.type === 'image/png';
  425. const isLt2M = file.size / 1024 / 1024 < 2;
  426. if (!isJPG && !isPNG) {
  427. this.$message.error('上传缩略图只能是 JPG 或 PNG 格式!');
  428. return false;
  429. }
  430. if (!isLt2M) {
  431. this.$message.error('上传缩略图大小不能超过 2MB!');
  432. return false;
  433. }
  434. const formData = new FormData();
  435. formData.append('file', file);
  436. load_img_api(formData).then(res => {
  437. if (res.code === 200) {
  438. this.$message.success('上传成功');
  439. this.$set(this.ruleForm, `field_${index}`, res.data.imgUrl); // 使用index更新对应位置
  440. } else {
  441. this.$message.error(res.message || '上传失败');
  442. }
  443. });
  444. return false;
  445. },
  446. // 删除图片
  447. handleDelete(index) {
  448. this.$set(this.ruleForm, `field_${index}`, '');
  449. },
  450. // 弹出层相关方法
  451. // 1.9 提交表单
  452. submitForm(formName) {
  453. // 转换复选框数据(数组转字符串)
  454. const convertedData = this.table_head.map((head, index) => {
  455. const value = this.ruleForm[`field_${index}`];
  456. if (head.field_type === 5) {
  457. return Array.isArray(value) && value.length === 1
  458. ? value[0]
  459. : Array.isArray(value) ? value.join(',') : value;
  460. }
  461. return value;
  462. });
  463. // 使用转换后的数据提交
  464. const the_obj = this.table_body[0];
  465. Object.keys(the_obj).forEach((key, index) => {
  466. the_obj[key] = convertedData[index];
  467. });
  468. the_obj.table_id = +this.$route.query.id;
  469. this.$refs[formName].validate((valid) => {
  470. if (valid) {
  471. // 验证通过后的提交逻辑
  472. up_table_api({
  473. ...the_obj //展开
  474. }).then(res => {
  475. if (res.code === 200) {
  476. this.$message.success('提交成功');
  477. this.dialogTableVisible = false;
  478. this.getData();
  479. } else {
  480. this.$message.error(res.message || '提交失败');
  481. }
  482. });
  483. } else {
  484. this.$message.error('请填写所有必填项');
  485. return false;
  486. }
  487. });
  488. },
  489. //取消
  490. cancelForm() {
  491. this.dialogTableVisible = false
  492. },
  493. handleBlurValidation(fieldName, value) {
  494. if (!value || value.trim() === '') {
  495. this.$message.error(`${fieldName}:不能为空`);
  496. }
  497. },
  498. getValidationRules(head, index) {
  499. const rules = [];
  500. // 调试信息
  501. // console.log(`字段 ${head.title}:`, {
  502. // is_check: head.is_check,
  503. // regular: head.regular,
  504. // field_type: head.field_type
  505. // });
  506. // 检查是否需要验证:is_check 为 1 且有 regular 正则表达式
  507. if ((head.is_check === 1 || head.is_check === '1') && head.regular) {
  508. // console.log(`为字段 ${head.title} 添加验证规则:`, head.regular);
  509. rules.push({
  510. required: true,
  511. message: head.regular_error || `${head.title}格式不正确`,
  512. trigger: 'blur',
  513. validator: (rule, value, callback) => {
  514. // console.log(`验证字段 ${head.title}:`, value, '类型:', typeof value);
  515. // 空值检查
  516. if (!value || value.toString().trim() === '') {
  517. callback(new Error(head.regular_error || `${head.title}不能为空`));
  518. return;
  519. }
  520. // 正则验证
  521. try {
  522. // 处理正则表达式字符串格式
  523. let regexPattern = head.regular;
  524. // 如果正则表达式包含 / 分隔符,需要提取模式部分
  525. if (regexPattern.startsWith('/') && regexPattern.includes('/')) {
  526. const lastSlashIndex = regexPattern.lastIndexOf('/');
  527. regexPattern = regexPattern.substring(1, lastSlashIndex);
  528. }
  529. // console.log(`处理后的正则表达式:`, regexPattern);
  530. const reg = new RegExp(regexPattern);
  531. const testResult = reg.test(value);
  532. // console.log(`正则测试结果:`, testResult, `值: "${value}"`, `正则: ${regexPattern}`);
  533. if (!testResult) {
  534. callback(new Error(head.regular_error || `${head.title}格式不正确`));
  535. } else {
  536. callback();
  537. }
  538. } catch (e) {
  539. console.error('正则表达式错误:', e);
  540. callback(new Error('校验规则配置错误'));
  541. }
  542. }
  543. });
  544. }
  545. return rules;
  546. }
  547. },
  548. mounted() {
  549. // console.log(this.$route.query.id);
  550. this.tabbarId = this.$route.query.id
  551. this.tabbarType = this.$route.query.type
  552. this.getData() //获取数据
  553. },
  554. }
  555. </script>
  556. <style scoped lang="less">
  557. input[aria-hidden=true] {
  558. display: none !important;
  559. }
  560. // 提示信息
  561. .tips {
  562. margin: 30px;
  563. background-color: #e9ecf9;
  564. border-radius: 11px;
  565. .tipsIcon {
  566. margin: 10px 15px;
  567. display: inline-block;
  568. width: 24px;
  569. height: 24px;
  570. background: url("../../assets/advertise/Info Circle.png") no-repeat;
  571. vertical-align: middle;
  572. }
  573. .tipsText {
  574. font-size: 14px;
  575. color: #666666;
  576. }
  577. }
  578. // 头部
  579. .title {
  580. margin: 30px 30px 20px 30px;
  581. padding: 30px 30px 40px 30px;
  582. background-color: #fff;
  583. border-radius: 20px 20px 20px 20px;
  584. border: 1px solid #E9EDF7;
  585. .left {
  586. float: left;
  587. }
  588. .right {
  589. float: right;
  590. }
  591. .searchBox {
  592. ::v-deep .el-input {
  593. position: relative;
  594. font-size: 14px;
  595. display: inline-block;
  596. width: 80%;
  597. }
  598. .searchTitle {
  599. padding-bottom: 10px;
  600. font-family: Microsoft YaHei, Microsoft YaHei;
  601. font-weight: 400;
  602. font-size: 14px;
  603. color: #999999;
  604. line-height: 16px;
  605. }
  606. .el-select {
  607. width: 100%;
  608. display: inline-block;
  609. position: relative;
  610. }
  611. }
  612. .btnList {
  613. float: right;
  614. padding-top: 28px;
  615. button {
  616. height: 38px;
  617. border: none;
  618. border-radius: 8px;
  619. padding: 0 30px;
  620. }
  621. .search {
  622. background-color: #5570f1;
  623. color: #fff;
  624. margin-right: 20px;
  625. }
  626. .reset {
  627. font-family: Microsoft YaHei, Microsoft YaHei;
  628. font-weight: 400;
  629. font-size: 16px;
  630. color: #333333;
  631. background: #F5F7FB;
  632. border-radius: 8px 8px 8px 8px;
  633. border: 1px solid rgba(85, 112, 241, 0.11);
  634. }
  635. }
  636. }
  637. .layerBox {
  638. padding: 30px 20px;
  639. position: relative;
  640. .btn {
  641. position: absolute;
  642. top: 30px;
  643. right: 20px;
  644. height: 38px;
  645. color: #fff;
  646. background-color: #5570f1;
  647. border: none;
  648. border-radius: 8px;
  649. padding: 8px 28px 9px;
  650. box-sizing: border-box;
  651. }
  652. .listBtnBox {
  653. justify-content: left;
  654. }
  655. .listLookBtn {
  656. width:auto!important;
  657. margin-left: 0px;
  658. padding:0px 6px;word-break: keep-all; white-space: nowrap;
  659. margin-right: 20px;
  660. height: 36px;
  661. line-height: 36px;
  662. }
  663. .listLookBtn {
  664. text-align: center;
  665. border-radius: 8px;
  666. cursor: pointer;
  667. color: #55b5f1;
  668. background-color: rgba(85, 181, 241, 0.16);
  669. >i {
  670. padding-right: 8px;
  671. }
  672. }
  673. ::v-deep .el-form-item {
  674. margin-bottom: 10px;
  675. }
  676. ::v-deep .el-select {
  677. width: 100%;
  678. }
  679. ::v-deep .el-input--medium,
  680. ::v-deep .el-form-item__label {
  681. line-height: 36px;
  682. font-size: 16px;
  683. }
  684. }
  685. // 弹出层内容
  686. .dialogText {
  687. margin: 0 7px 0 3px;
  688. padding-bottom: 1px;
  689. padding: 30px 60px 1px 20px;
  690. background-color: #f5f7fb;
  691. .el-form-item{
  692. margin-bottom: 20px!important;
  693. }
  694. .adImage {
  695. width: 140px;
  696. height: 140px;
  697. line-height: 210px;
  698. border-radius: 12px;
  699. border: 1px solid rgba(85, 112, 241, 0.11);
  700. img {
  701. width: 140px;
  702. height: 80px;
  703. }
  704. }
  705. ::v-deep .avatar {
  706. width: 140px;
  707. height: auto;
  708. }
  709. .price {
  710. ::v-deep .el-input {
  711. width: 29%;
  712. }
  713. }
  714. .example {
  715. font-family: Microsoft YaHei;
  716. color: #5570F1;
  717. }
  718. .el_btnList {
  719. margin-right: 15px;
  720. margin-top: 20px;
  721. }
  722. //日期时间选择器的宽
  723. ::v-deep .el-date-editor.el-input {
  724. width: 48%;
  725. }
  726. ::v-deep .el-button+.el-button {
  727. margin-left: 0px;
  728. }
  729. ::v-deep .el-select {
  730. width: 100%;
  731. }
  732. ::v-deep .el-form-item {
  733. margin-bottom: 50px;
  734. }
  735. }
  736. // 弹出层按钮
  737. .dialogBtn {
  738. text-align: center;
  739. margin: 50px auto 20px;
  740. button {
  741. width: 184px;
  742. padding: 16px;
  743. font-family: Microsoft YaHei, Microsoft YaHei;
  744. font-weight: 400;
  745. font-size: 20px;
  746. border: none;
  747. border-radius: 12px 12px 12px 12px;
  748. }
  749. // 取消
  750. .cancel {
  751. color: #333333;
  752. background-color: #f5f7fb;
  753. border: 2px solid rgba(85, 112, 241, 0.11);
  754. }
  755. // 提交
  756. .submit {
  757. color: #fff;
  758. background-color: #5570F1;
  759. margin-left: 40px;
  760. }
  761. }
  762. //审核弹出框
  763. .radioGroup {
  764. ::v-deep .el-form-item {
  765. margin-top: 40px;
  766. margin-bottom: 0;
  767. }
  768. }
  769. .graph {
  770. background-color: #f5f7fb;
  771. padding: 60px 100px;
  772. overflow: hidden;
  773. li {
  774. float: left;
  775. }
  776. >li:first-child {
  777. margin-right: 100px;
  778. }
  779. }
  780. .dialog-footer {
  781. margin: 0 auto;
  782. }
  783. .uploaderBox {
  784. position: relative;
  785. .avatar-uploader {
  786. border: 1px dashed #d9d9d9;
  787. border-radius: 6px;
  788. cursor: pointer;
  789. position: relative;
  790. overflow: hidden;
  791. width: 178px;
  792. height:auto;
  793. &:hover {
  794. border-color: #409EFF;
  795. }
  796. .avatar {
  797. width: 100%;
  798. height: 177px;
  799. display: block;
  800. }
  801. .chooseImgDiv {
  802. display: flex;
  803. justify-content: center;
  804. align-items: center;
  805. height: 100%;
  806. color: #8c939d;
  807. width:100%;
  808. img {
  809. width: 60px;
  810. height: 60px;
  811. margin:10px auto 0;
  812. }
  813. }
  814. }
  815. .delete-button {
  816. position: absolute;
  817. right: 33%;
  818. top: 33%;
  819. color: #fff;
  820. background: rgba(0,0,0,0.5);
  821. padding: 5px;
  822. border-radius: 50%;
  823. cursor: pointer;
  824. width:33%;height: 60px;
  825. }
  826. .delete-button .el-icon-delete{
  827. font-size: 33px;
  828. margin-top: 6px;
  829. }
  830. .photo_tips {
  831. display: block;
  832. margin-top: 10px;
  833. font-size: 12px;
  834. color: #999;
  835. line-height:22px;
  836. }
  837. }
  838. </style>