imgList.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. <!-- 组件 -->
  2. <template>
  3. <div>
  4. <!-- 头部搜索框部分 -->
  5. <div class="title">
  6. <el-row>
  7. <el-col :span="6" class="left">
  8. <div class="searchBox">
  9. <div class="searchTitle">网站名称</div>
  10. <el-input v-model="websiteName" clearable placeholder="请输入网站名称"></el-input>
  11. </div>
  12. </el-col>
  13. <el-col :span="6" class="left">
  14. <div class="searchBox">
  15. <div class="searchTitle">文件名称</div>
  16. <el-input v-model="imgAlias" clearable placeholder="请输入文件名称"></el-input>
  17. </div>
  18. </el-col>
  19. <el-col :span="6" class="left">
  20. <div class="searchBox">
  21. <div class="searchTitle">文件类型</div>
  22. <el-select v-model="imgType" placeholder="请选择文件类型" filterable clearable>
  23. <el-option :key="'jpg'" :label="'jpg'" :value="'jpg'">jpg</el-option>
  24. <el-option :key="'jpeg'" :label="'jpeg'" :value="'jpeg'">jpeg</el-option>
  25. <el-option :key="'png'" :label="'png'" :value="'png'">png</el-option>
  26. </el-select>
  27. </div>
  28. </el-col>
  29. <el-col :span="8" class="right">
  30. <div class="btnList">
  31. <button class="search" @click="goSearch">搜索</button>
  32. <button class="reset" @click="goReset">重置</button>
  33. </div>
  34. </el-col>
  35. </el-row>
  36. </div>
  37. <!--表格内容 start------------------------------------------------------------>
  38. <div class="layerBox">
  39. <tableTitle :name="tableDivTitle" />
  40. <button class="btn" @click="addWebsite">添加组件</button>
  41. <el-row>
  42. <template>
  43. <el-table class="my-table" :data="tableData" style="width: 100%" >
  44. <el-table-column fixed prop="id" label="编号" width="90"></el-table-column>
  45. <el-table-column prop="img_alias" label="图片别名" width=""></el-table-column>
  46. <el-table-column prop="img_type" label="图片类型" width=""></el-table-column>
  47. <el-table-column prop="img_url" label="图片地址" width=""></el-table-column>
  48. <el-table-column prop="img_size" label="文件大小" width=""></el-table-column>
  49. <el-table-column prop="website_name" label="所属网站" width="">
  50. </el-table-column>
  51. <el-table-column fixed="right" label="操作" width="200">
  52. <template slot-scope="scope">
  53. <div class="listBtnBox">
  54. <div class="listDeleteBtn" @click="deleteRow(scope.row.id)">
  55. <i class="el-icon-delete"></i> 删除
  56. </div>
  57. <!-- 改为查看按钮 -->
  58. <!-- 先检查按钮无法点击的常见原因,如样式是否有 pointer-events: none; 或者事件绑定是否正常 -->
  59. <!-- 以下是原代码,可检查 viewImage 方法是否存在,以及 scope.row.id 是否有值 -->
  60. <div class="listViewBtn" @click="handleViewImage(scope.row)">
  61. <i class="el-icon-view"></i> 查看
  62. </div>
  63. </div>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. </template>
  68. </el-row>
  69. </div>
  70. <!--分页 start------------------------------------------------------------>
  71. <div class="alignBox">
  72. <el-row>
  73. <el-col :span="24">
  74. <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
  75. :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
  76. :total="total">
  77. </el-pagination>
  78. </el-col>
  79. </el-row>
  80. </div>
  81. <!--分页 end------------------------------------------------------------>
  82. <!--表格内容 end------------------------------------------------------------>
  83. <!-- 弹出框 编辑 start----------------------------------------------------------->
  84. <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" top="8vh"
  85. :close-on-click-modal="false">
  86. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
  87. <div class="dialogText">
  88. <el-form-item label="关联网站名称:" prop="website_id">
  89. <el-select v-model="ruleForm.website_id" :multiple="false" :multiple-limit="1" filterable remote
  90. reserve-keyword placeholder="请输入关联网站名称" :remote-method="getWebNavList" :loading="webSiteLoading" @change="detectionWebSite">
  91. <el-option v-for="item in webSiteList" :key="item.value" :label="item.label"
  92. :value="item.value">
  93. </el-option>
  94. </el-select>
  95. </el-form-item>
  96. <el-form-item label="文件别名:" prop="img_alias">
  97. <el-input v-model="ruleForm.img_alias" placeholder="请输入文件别名"></el-input>
  98. </el-form-item>
  99. <el-form-item label="组件展示图:" prop="img_url" :label-width="formLabelWidth">
  100. <div class="uploaderBox">
  101. <!-- 图片预览和信息展示 -->
  102. <div v-if="logoUrl" class="image-preview">
  103. <img :src="logoUrl" class="avatar">
  104. <div class="image-meta">
  105. <p>文件名:{{ imageInfo.name }}</p>
  106. <p>文件大小:{{ imageInfo.size }}</p>
  107. </div>
  108. </div>
  109. <!-- 上传组件 -->
  110. <el-upload v-else class="avatar-uploader" action="#" :show-file-list="false" :before-upload="beforeAvatarUpload">
  111. <div class="chooseImgDiv">
  112. <img src="@/assets/public/upload/noImage.png">
  113. <div>选择图片</div>
  114. </div>
  115. </el-upload>
  116. <!-- 删除按钮(仅添加时显示) -->
  117. <div v-if="hovering && logoUrl" class="delete-button" @click="handleDelete">
  118. <i class="el-icon-delete"></i>
  119. </div>
  120. </div>
  121. </el-form-item>
  122. </div>
  123. <div class="dialogBtn">
  124. <el-button type="info" @click="cancelForm">取消</el-button>
  125. <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
  126. </div>
  127. </el-form>
  128. </el-dialog>
  129. <!-- 弹出框 编辑 end----------------------------------------------------------->
  130. <!-- 新增图片查看弹框 -->
  131. <el-dialog title="图片预览" :visible.sync="viewImageVisible" width="80%" top="5vh" :close-on-click-modal="true">
  132. <div style="text-align: center; padding: 30px 0;">
  133. <!-- 显示放大图片 -->
  134. <img
  135. :src="currentImageUrl"
  136. alt="图片预览"
  137. style="max-width: 90%; max-height: 70vh; border-radius: 12px; box-shadow: 0 0 20px rgba(0,0,0,0.1)"
  138. >
  139. <!-- 显示图片地址 -->
  140. <div style="margin-top: 20px; font-size: 14px; color: #666;">
  141. <span>图片地址:</span>
  142. <span style="word-break: break-all; color: #5570F1; margin-left: 10px;">
  143. {{ currentImageUrl }}
  144. </span>
  145. </div>
  146. </div>
  147. </el-dialog>
  148. </div>
  149. </template>
  150. <script>
  151. //表格标题
  152. import tableTitle from './components/tableTitle.vue';
  153. //引入公用样式
  154. import '@/styles/global.less';
  155. import { getComponentList, addComponent, delComponent, updateComponent, getComponentInfo } from '@/api/module'
  156. import { getSectorList } from '@/api/plate'
  157. import { getTemplateClass } from '@/api/style'
  158. export default {
  159. components: {
  160. tableTitle,//表格标题-
  161. },
  162. data() {
  163. const validateEmpty = (rule, value, callback) => {
  164. if (value.length == 0) {
  165. callback(new Error('该项不能为空!'))
  166. } else {
  167. callback()
  168. }
  169. }
  170. return {
  171. webSiteList: [], // 网站列表
  172. // 新增查看弹框相关变量
  173. viewImageVisible: false, // 控制弹框显示状态
  174. currentImageUrl: '', // 当前查看的图片地址
  175. websiteOptions: [], //网站列表
  176. // 新增图片信息字段
  177. imageInfo: { name: '', size: '', type: '' },
  178. // 移除 dialogName、activeid 等编辑相关变量
  179. dialogTableVisible: false, // 仅保留添加弹窗
  180. // 1.1 初始化数据
  181. tableDivTitle: "静态资源管理列表", //列表标题
  182. dialogTableVisible: false, //编辑弹框
  183. dialogName: '编辑', //编辑弹窗名称
  184. moduleLoading: true, //表格数据加载中
  185. tableData: [],//表格数据
  186. options: [],//版块列表
  187. activeid: "", //活动id
  188. styleOptions: [],//关联版块
  189. plateOptions: [],//关联版块
  190. selectedId: '',
  191. selectedOptions: [],
  192. cascaderProps: {
  193. value: "id", // 指定实际表示值的字段为id
  194. label: "name", // 指定实际表示显示文本的字段为name
  195. expandTrigger: 'hover',
  196. checkStrictly: true, // 严格模式,只能选择叶子节点
  197. children: 'children',
  198. },
  199. webSiteLoading: false,
  200. // 1.2 搜索框相关
  201. websiteName: '', //网站名称
  202. imgAlias: '', //文件别名
  203. imgType: '', //文件类型
  204. //3.4 上传logo图片
  205. logoUrl: '',
  206. hovering: false, // 鼠标悬浮状态 悬浮时显示删除
  207. value: '',
  208. // 分页相关
  209. page: 1,
  210. pageSize: 10,
  211. total: 0,
  212. formLabelWidth: '', //广告示例图相关
  213. template_id: '', //关联风格id
  214. sector_id: '', //关联版块id
  215. ruleForm: {
  216. img_alias: '', //组件名称
  217. img_url: '',//组件展示
  218. website_id: '', //关联网站名称
  219. },
  220. rules: {
  221. img_url: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  222. }
  223. }
  224. },
  225. methods: {
  226. // 查看图片方法(修正方法名和参数)
  227. handleViewImage(row) {
  228. // 从行数据中获取图片地址(假设图片地址字段为 img_url,需根据实际数据调整)
  229. this.currentImageUrl = row.img_url;
  230. this.viewImageVisible = true;
  231. },
  232. //1.列表和分页相关 start ------------------------------------------------------------>
  233. //1.1 开始请求列表信息方法
  234. getData() {
  235. this.$store.dispatch('module/getStaticResourceList',{page: this.page,pageSize: this.pageSize}).then(res=> {
  236. console.log("*******************",res.data.row);
  237. this.tableData = res.data.row; //给与内容
  238. this.total = res.data.count; //给与总条数
  239. }).catch(() => {
  240. this.$message({
  241. type: 'info',
  242. message: '网络错误,请重试!'
  243. });
  244. })
  245. },
  246. //获取版块列表
  247. getList() {
  248. this.$store.dispatch('module/getStaticResourceList',{page: this.page,pageSize: this.pageSize}).then(res=> {
  249. console.log("*******************",res.data.row);
  250. this.tableData = res.data.row; //给与内容
  251. this.total = res.data.count; //给与总条数
  252. }).catch(() => {
  253. this.$message({
  254. type: 'info',
  255. message: '网络错误,请重试!'
  256. });
  257. })
  258. },
  259. //1.2 删除内容
  260. deleteRow(id) {
  261. console.log(id);
  262. let data = new FormData()
  263. data.append('id', id)
  264. this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
  265. confirmButtonText: '确定',
  266. cancelButtonText: '取消',
  267. }).then(() => {
  268. console.log("当前删除:" + id)
  269. this.$store.dispatch('module/delStaticResource', { id: id }).then(res => {
  270. console.log(res.data);
  271. if (res.code == 200) {
  272. this.$message({
  273. message: '删除成功',
  274. type: 'success'
  275. })
  276. this.getData()
  277. }
  278. }).catch(error => {
  279. console.error('删除失败:', error);
  280. this.$message({
  281. message: '删除失败',
  282. type: 'error'
  283. });
  284. });
  285. }).catch(() => {
  286. this.$message({
  287. type: 'warning',
  288. message: '已取消删除'
  289. });
  290. });
  291. },
  292. // 1.3 查看图片
  293. viewImage(url) {
  294. // 打开图片放大弹框,这里假设存在一个名为 imageDialogVisible 的变量控制弹框显示,以及一个 imageUrl 变量存储要展示的图片地址
  295. this.dialogTableVisible = true;
  296. this.imageUrl = url;
  297. },
  298. handleChange(value) {
  299. console.log('val', value);
  300. this.template_id = value[0]
  301. this.sector_id = value[1]
  302. console.log("当前选中的父级:", this.template_id);
  303. console.log("当前选中的子级:", this.sector_id);
  304. // 当选中的选项发生变化时触发
  305. if (value.length > 0) {
  306. const selectedValue = value[value.length - 1]; // 获取最后一级选中的值
  307. this.fetchChildren(selectedValue); // 请求对应的子选项
  308. }
  309. },
  310. //1.4 列表内容分页
  311. //直接跳转
  312. handleSizeChange(val) {
  313. this.page = val;
  314. this.getData();
  315. },
  316. //1.5 点击分页
  317. handleCurrentChange(val) {
  318. this.page = val;
  319. this.getData();
  320. },
  321. // 1.6 搜索按钮
  322. goSearch() {
  323. const data = {
  324. website_name: this.websiteName, //网站名称
  325. img_alias: this.imgAlias, //文件别名
  326. img_type: this.imgType, //文件类型
  327. page: 1, //页码
  328. pageSize: 10, //每页条数
  329. }
  330. this.$store.dispatch('module/getStaticResourceList',data).then(res=> {
  331. // console.log("*******************",this.page);
  332. console.log("*******************",res.data.row);
  333. this.tableData = res.data.row; //给与内容
  334. this.total = res.data.count; //给与总条数
  335. }).catch(() => {
  336. this.$message({
  337. type: 'info',
  338. message: '网络错误,请重试!'
  339. });
  340. })
  341. },
  342. //1.7 重置按钮
  343. goReset() {
  344. this.websiteName = ""
  345. this.imgAlias = ""
  346. this.imgType = ""
  347. this.page = 1
  348. this.pageSize = 10
  349. this.getData()
  350. },
  351. //列表和分页相关 end ------------------------------------------------------------>
  352. getWebNavList(query) {
  353. if (query !== '') {
  354. this.webSiteLoading = true;
  355. let data = { keyword: query }
  356. console.log("-----------------",data);
  357. let dataArr = [];
  358. this.$store.dispatch('pool/getNavWebList', data).then(res => {
  359. console.log(res.data)
  360. for (let item of res.data) {
  361. let data = {};
  362. data.key = item.id;
  363. data.value = item.id;
  364. data.label = item.website_name;
  365. dataArr.push(data)
  366. }
  367. this.webSiteList = dataArr;
  368. this.webSiteLoading = false;
  369. }).catch(() => {
  370. this.$message({
  371. type: 'info',
  372. message: '网络错误,请重试!'
  373. });
  374. })
  375. } else {
  376. this.navList = [];
  377. }
  378. },
  379. //1.8 添加
  380. addWebsite() {
  381. this.dialogTableVisible = true
  382. this.dialogName = "添加"
  383. //添加时清空回显回来的数据
  384. this.ruleForm.website_id = '' //网站id
  385. this.ruleForm.img_alias = '' //图片别名
  386. this.ruleForm.img_size = '' //图片大小
  387. this.ruleForm.img_url = '' //图片地址
  388. this.logoUrl = '' //图片展示图
  389. console.log("添加",this.ruleForm);
  390. },
  391. // 弹出层相关方法
  392. // 提交表单
  393. submitForm(formName) {
  394. this.$refs[formName].validate((valid) => {
  395. if (valid) {
  396. console.log('submit!');
  397. } else {
  398. console.log('error submit!!');
  399. return false;
  400. }
  401. });
  402. if (this.dialogName === "添加") {
  403. // 直接从 data 中获取参数
  404. if(this.ruleForm.website_id == 'undefind' || this.ruleForm.website_id == ''){
  405. this.ruleForm.website_id = 0;
  406. }
  407. const data = {
  408. img_alias: this.ruleForm.img_alias,
  409. img_url: this.ruleForm.img_url,
  410. website_id: this.ruleForm.website_id ?? 0,
  411. img_size: this.imageInfo.size,
  412. };
  413. console.log("添加", data);
  414. // 直接传递 data 作为参数,而不是 {data}
  415. this.$store.dispatch('module/addStaticResource', data).then(res => {
  416. console.log("66666666666666666",res.data);
  417. if (res.code === 200) {
  418. this.$message({
  419. message: '添加成功',
  420. type:'success'
  421. });
  422. this.dialogTableVisible = false;
  423. this.getData();
  424. } else if (res.code === 0) {
  425. this.$message({
  426. message: res.data.message,
  427. type: 'error'
  428. });
  429. }
  430. }).catch(error => {
  431. console.error('添加失败:', error);
  432. this.$message({
  433. message: '添加过程中出现错误,请重试',
  434. type: 'error'
  435. });
  436. });
  437. }
  438. if (this.website_id == '') {
  439. this.$message({
  440. message: '请输入并选择网站名称',
  441. type: 'error'
  442. })
  443. this.dialogVisible = true
  444. }
  445. if (this.dialogName == "编辑") {
  446. updateComponent({
  447. id: this.activeid,
  448. img_alias: this.ruleForm.img_alias,
  449. }).then(data => {
  450. console.log(data);
  451. if (data.code == 200) {
  452. this.$message({
  453. message: '编辑成功',
  454. type: 'success'
  455. })
  456. this.dialogTableVisible = false
  457. }
  458. if (data.code == 0) {
  459. this.$message({
  460. message: data.message,
  461. type: 'error'
  462. })
  463. this.dialogTableVisible = true
  464. }
  465. this.getData()
  466. })
  467. }
  468. },
  469. //取消添加或编辑
  470. cancelForm() {
  471. this.dialogTableVisible = false
  472. },
  473. //3.6 上传图片操作
  474. beforeAvatarUpload(file) {
  475. const isJPG = file.type === 'image/jpeg';
  476. const isPNG = file.type === 'image/png';
  477. const isLt2M = file.size / 1024 / 1024 < 2;
  478. if (!isJPG && !isPNG) {
  479. this.$message.error('上传图片只能是 JPG 或 PNG 格式!');
  480. return false;
  481. }
  482. if (!isLt2M) {
  483. this.$message.error('上传图片大小不能超过 2MB!');
  484. return false;
  485. }
  486. // 解析图片信息
  487. this.imageInfo.name = file.name;
  488. this.imageInfo.size = this.formatFileSize(file.size); // 新增格式化方法
  489. this.imageInfo.type = file.type.split('/')[1].toUpperCase(); // 获取文件类型(JPG/PNG)
  490. const formData = new FormData();
  491. formData.append('file', file);
  492. this.$store.dispatch('pool/uploadFile', formData).then(res => {
  493. this.logoUrl = res.data.imgUrl;
  494. this.ruleForm.img_url = res.data.imgUrl;
  495. }).catch(() => {
  496. this.$message({ type: 'info', message: '网络错误,请重试!' });
  497. });
  498. return false;
  499. },
  500. // 新增文件大小格式化方法
  501. formatFileSize(bytes) {
  502. if (bytes === 0) return '0 B';
  503. const units = ['B', 'KB', 'MB', 'GB'];
  504. const i = Math.floor(Math.log(bytes) / Math.log(1024));
  505. return `${parseFloat((bytes / Math.pow(1024, i)).toFixed(2))} ${units[i]}`;
  506. },
  507. handleDelete() {
  508. // 删除图片
  509. this.logoUrl = ''; // 清空图片 URL
  510. },
  511. //搜索部分的输入关键词下拉框
  512. selectWebSite(value) {
  513. this.webSiteName_id = value
  514. },
  515. //添加 / 编辑弹窗中输入关键词下拉框
  516. // 判断是否已经关联了网站
  517. detectionWebSite(value) {
  518. console.log(value);
  519. this.website_id = value
  520. console.log(this.website_id);
  521. },
  522. },
  523. mounted() {
  524. this.getData()
  525. this.getList()
  526. },
  527. }
  528. </script>
  529. <style scoped lang="less">
  530. input[aria-hidden=true] {
  531. display: none !important;
  532. }
  533. // 提示信息
  534. .tips {
  535. margin: 30px;
  536. background-color: #e9ecf9;
  537. border-radius: 11px;
  538. .tipsIcon {
  539. margin: 10px 15px;
  540. display: inline-block;
  541. width: 24px;
  542. height: 24px;
  543. background: url("../../assets/advertise/Info Circle.png") no-repeat;
  544. vertical-align: middle;
  545. }
  546. .tipsText {
  547. font-size: 14px;
  548. color: #666666;
  549. }
  550. }
  551. // 头部
  552. .title {
  553. margin: 30px 30px 20px 30px;
  554. padding: 30px 30px 40px 30px;
  555. background-color: #fff;
  556. border-radius: 20px 20px 20px 20px;
  557. border: 1px solid #E9EDF7;
  558. .left {
  559. float: left;
  560. }
  561. .right {
  562. float: right;
  563. }
  564. .searchBox {
  565. ::v-deep .el-input {
  566. position: relative;
  567. font-size: 14px;
  568. display: inline-block;
  569. width: 80%;
  570. }
  571. .searchTitle {
  572. padding-bottom: 10px;
  573. font-family: Microsoft YaHei, Microsoft YaHei;
  574. font-weight: 400;
  575. font-size: 14px;
  576. color: #999999;
  577. line-height: 16px;
  578. }
  579. .el-select {
  580. width: 100%;
  581. display: inline-block;
  582. position: relative;
  583. }
  584. }
  585. .btnList {
  586. float: right;
  587. padding-top: 28px;
  588. button {
  589. height: 38px;
  590. border: none;
  591. border-radius: 8px;
  592. padding: 0 30px;
  593. }
  594. .search {
  595. background-color: #5570f1;
  596. color: #fff;
  597. margin-right: 20px;
  598. }
  599. .reset {
  600. font-family: Microsoft YaHei, Microsoft YaHei;
  601. font-weight: 400;
  602. font-size: 16px;
  603. color: #333333;
  604. background: #F5F7FB;
  605. border-radius: 8px 8px 8px 8px;
  606. border: 1px solid rgba(85, 112, 241, 0.11);
  607. }
  608. }
  609. }
  610. .layerBox {
  611. padding: 30px 20px;
  612. position: relative;
  613. .btn {
  614. position: absolute;
  615. top: 30px;
  616. right: 20px;
  617. height: 38px;
  618. color: #fff;
  619. background-color: #5570f1;
  620. border: none;
  621. border-radius: 8px;
  622. padding: 8px 28px 9px;
  623. box-sizing: border-box;
  624. }
  625. .listBtnBox {
  626. justify-content: left;
  627. }
  628. .listDeleteBtn,
  629. .listEditBtn {
  630. margin-left: 0px;
  631. padding-left: 0px;
  632. margin-right: 20px;
  633. width: 76px;
  634. height: 36px;
  635. line-height: 36px;
  636. }
  637. .listViewBtn {
  638. margin-left: 0px;
  639. padding-left: 0px;
  640. margin-right: 20px;
  641. width: 76px;
  642. height: 36px;
  643. line-height: 36px;
  644. }
  645. ::v-deep .el-form-item {
  646. margin-bottom: 50px;
  647. }
  648. ::v-deep .el-select {
  649. width: 100%;
  650. }
  651. ::v-deep .el-input--medium,
  652. ::v-deep .el-form-item__label {
  653. line-height: 36px;
  654. font-size: 16px;
  655. }
  656. }
  657. // 弹出层内容
  658. .dialogText {
  659. margin: 0 7px 0 3px;
  660. padding-bottom: 1px;
  661. padding: 30px 60px 1px 20px;
  662. background-color: #f5f7fb;
  663. .el-cascader--medium {
  664. font-size: 14px;
  665. line-height: 36px;
  666. width: 100%;
  667. }
  668. .adImage {
  669. width: 140px;
  670. height: 140px;
  671. line-height: 210px;
  672. border-radius: 12px;
  673. border: 1px solid rgba(85, 112, 241, 0.11);
  674. img {
  675. width: 140px;
  676. height: 80px;
  677. }
  678. }
  679. ::v-deep .avatar {
  680. width: 140px;
  681. height: auto;
  682. }
  683. .price {
  684. ::v-deep .el-input {
  685. width: 29%;
  686. }
  687. }
  688. .example {
  689. font-family: Microsoft YaHei;
  690. color: #5570F1;
  691. }
  692. .el_btnList {
  693. margin-right: 15px;
  694. margin-top: 20px;
  695. }
  696. //日期时间选择器的宽
  697. ::v-deep .el-date-editor.el-input {
  698. width: 48%;
  699. }
  700. ::v-deep .el-button+.el-button {
  701. margin-left: 0px;
  702. }
  703. ::v-deep .el-select {
  704. width: 100%;
  705. }
  706. ::v-deep .el-form-item {
  707. margin-bottom: 50px;
  708. }
  709. }
  710. // 弹出层按钮
  711. .dialogBtn {
  712. text-align: center;
  713. margin: 50px auto 20px;
  714. button {
  715. width: 184px;
  716. padding: 16px;
  717. font-family: Microsoft YaHei, Microsoft YaHei;
  718. font-weight: 400;
  719. font-size: 20px;
  720. border: none;
  721. border-radius: 12px 12px 12px 12px;
  722. }
  723. // 取消
  724. .cancel {
  725. color: #333333;
  726. background-color: #f5f7fb;
  727. border: 2px solid rgba(85, 112, 241, 0.11);
  728. }
  729. // 提交
  730. .submit {
  731. color: #fff;
  732. background-color: #5570F1;
  733. margin-left: 40px;
  734. }
  735. }
  736. //审核弹出框
  737. .radioGroup {
  738. ::v-deep .el-form-item {
  739. margin-top: 40px;
  740. margin-bottom: 0;
  741. }
  742. }
  743. .graph {
  744. background-color: #f5f7fb;
  745. padding: 60px 100px;
  746. overflow: hidden;
  747. li {
  748. float: left;
  749. }
  750. >li:first-child {
  751. margin-right: 100px;
  752. }
  753. }
  754. .dialog-footer {
  755. margin: 0 auto;
  756. }
  757. /* 可选:添加弹框内图片样式 */
  758. .el-dialog__body {
  759. padding: 30px !important;
  760. text-align: center;
  761. }
  762. </style>