blogroll.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. <template>
  2. <!-- 友情链接列表 -->
  3. <div>
  4. <div class="title">
  5. <el-row>
  6. <el-col :span="6" class="left">
  7. <div class="searchBox">
  8. <div class="searchTitle">所属站点</div>
  9. <el-select v-model="siteName" :multiple="false" :multiple-limit="1" filterable remote
  10. reserve-keyword placeholder="请输入所属站点" :remote-method="getWebNavList"
  11. :loading="webSiteLoading" @change="selectWebSite">
  12. <el-option v-for="item in webSiteList" :key="item.value" :label="item.label"
  13. :value="item.value">
  14. </el-option>
  15. </el-select>
  16. </div>
  17. </el-col>
  18. <el-col :span="6" class="left">
  19. <div class="searchBox">
  20. <div class="searchTitle">链接名称</div>
  21. <el-input v-model="webName" placeholder="请输入链接名称"></el-input>
  22. </div>
  23. </el-col>
  24. <el-col :span="10" class="right">
  25. <div class="btnList">
  26. <button class="search" @click="goSearch">搜索</button>
  27. <button class="reset" @click="reset">重置</button>
  28. </div>
  29. </el-col>
  30. </el-row>
  31. </div>
  32. <!--表格内容 start------------------------------------------------------------>
  33. <div class="layerBox">
  34. <tableTitle :name="tableDivTitle" />
  35. <button class="btn" @click="addWebsite">添加链接</button>
  36. <el-row>
  37. <template>
  38. <el-table class="my-table" :data="tableData" style="width: 100%">
  39. <el-table-column fixed prop="id" label="编号" width="70">
  40. </el-table-column>
  41. <el-table-column prop="website_name" label="关联网站" width="180">
  42. </el-table-column>
  43. <el-table-column prop="title" label="链接名称" width="160">
  44. </el-table-column>
  45. <el-table-column prop="url" label="链接网址" width="180">
  46. </el-table-column>
  47. <el-table-column prop="type" label="类型" width="90">
  48. </el-table-column>
  49. <el-table-column label="网站LOGO" width="150">
  50. <template slot-scope="scope">
  51. <img :src="scope.row.logo_url" alt="" class="uploadImage">
  52. </template>
  53. </el-table-column>
  54. <el-table-column prop="sort" label="排序" width="90">
  55. </el-table-column>
  56. <el-table-column prop="created_at" label="创建时间" width="180">
  57. </el-table-column>
  58. <el-table-column prop="updated_at" label="修改时间" width="180">
  59. </el-table-column>
  60. <el-table-column fixed="right" label="操作" width="220">
  61. <template slot-scope="scope">
  62. <div class="listBtnBox">
  63. <div class="listDeleteBtn" @click="deleteRow(scope.row.id, scope.row)">
  64. <i class="el-icon-delete"></i>删除
  65. </div>
  66. <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)">
  67. <i class="el-icon-edit-outline"></i>编辑
  68. </div>
  69. </div>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. </template>
  74. </el-row>
  75. </div>
  76. <!--分页 start------------------------------------------------------------>
  77. <div class="alignBox">
  78. <el-row>
  79. <el-col :span="24">
  80. <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
  81. :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
  82. :total="total">
  83. </el-pagination>
  84. </el-col>
  85. </el-row>
  86. </div>
  87. <!--分页 end------------------------------------------------------------>
  88. <!--表格内容 end------------------------------------------------------------>
  89. <!-- 弹出框 start------------------------------------------------------------>
  90. <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" :close-on-click-modal="false">
  91. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  92. <div class="dialogText">
  93. <el-form-item label="关联网站:" prop="correlationWeb">
  94. <el-select v-model="ruleForm.correlationWeb" :multiple="false" :multiple-limit="1" filterable
  95. remote reserve-keyword placeholder="请输入关联网站名称" :remote-method="getWebNavList"
  96. :loading="webSiteLoading" @change="detectionWebSite">
  97. <el-option v-for="item in webSiteList" :key="item.value" :label="item.label"
  98. :value="item.value">
  99. </el-option>
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item label="链接名称:" prop="webName">
  103. <el-input v-model="ruleForm.webName" placeholder="请输入链接名称"></el-input>
  104. </el-form-item>
  105. <el-form-item label="链接地址:" prop="webUrl">
  106. <el-input v-model="ruleForm.webUrl" placeholder="请输入链接地址"></el-input>
  107. </el-form-item>
  108. <el-form-item label="类型:" prop="type">
  109. <el-radio v-model="ruleForm.type" label="1">图片</el-radio>
  110. <el-radio v-model="ruleForm.type" label="2">文本</el-radio>
  111. <el-radio v-model="ruleForm.type" label="3">底部</el-radio>
  112. </el-form-item>
  113. <el-form-item label="网站logo:" prop="" :label-width="formLabelWidth" :class="['custom-form-item']"
  114. class="custom-align-right" v-show="this.ruleForm.type != '2'">
  115. <div class="uploaderBox">
  116. <!--图片上传组件 start ------------------------------------------------------------>
  117. <div class="avatar-upload-container" @mouseenter="hovering = true"
  118. @mouseleave="hovering = false">
  119. <!-- 上传组件 -->
  120. <el-upload class="avatar-uploader" action="#" :show-file-list="false"
  121. :before-upload="beforeAvatarUpload">
  122. <!-- 预览图片 -->
  123. <img v-if="logoUrl" :src="logoUrl" class="avatar">
  124. <!-- 上传图标 -->
  125. <div v-else class="chooseImgDiv">
  126. <div>
  127. <img src="@/assets/public/upload/noImage.png">
  128. <div>选择图片</div>
  129. </div>
  130. </div>
  131. <input type="hidden" name="logo" v-model="ruleForm.webLogo">
  132. </el-upload>
  133. <!-- 删除按钮,当鼠标悬浮时显示 -->
  134. <div v-if="hovering && logoUrl" class="delete-button" @click="handleDelete">
  135. <i class="el-icon-delete"></i>
  136. </div>
  137. </div>
  138. <!--图片上传组件 end ------------------------------------------------------------>
  139. </div>
  140. </el-form-item>
  141. <el-form-item label="网站介绍:" prop="">
  142. <el-input v-model="ruleForm.webDesc" type="textarea" :rows="3" placeholder="请输入网站介绍"
  143. resize="none">
  144. </el-input>
  145. </el-form-item>
  146. <el-form-item label="排序:" prop="sort">
  147. <el-input v-model="ruleForm.sort" placeholder="请输入排序"></el-input>
  148. </el-form-item>
  149. </div>
  150. <div class="dialogBtn">
  151. <!-- <button class="cancel" @click="cancelForm">取消</button>
  152. <button class="submit" @click="submitFormTow">提交</button> -->
  153. <el-button type="info" @click="cancelForm">取消</el-button>
  154. <el-button type="primary" @click="submitForm">提交</el-button>
  155. </div>
  156. </el-form>
  157. </el-dialog>
  158. <!-- 弹出框 end------------------------------------------------------------>
  159. </div>
  160. </template>
  161. <script>
  162. //表格标题
  163. import tableTitle from './components/blogroll/tableTitle.vue';
  164. //引入公用样式
  165. import '@/styles/global.less';
  166. // 引入api
  167. import { getLinkInfo, getLinkList, createLink, delLink, updateLink } from '@/api/link.js'
  168. export default {
  169. components: {
  170. tableTitle,//表格标题
  171. },
  172. data() {
  173. const validateEmpty = (rule, value, callback) => {
  174. if (value.length == 0) {
  175. callback(new Error('该项不能为空!'))
  176. } else {
  177. callback()
  178. }
  179. }
  180. return {
  181. tableDivTitle: "友情链接列表", //表格标题
  182. webName: '', // 网站名称
  183. activeId: '', // 被编辑的网站的id
  184. activeType: '', //被编辑网站的type
  185. disabled: true, //是否禁用
  186. //搜索相关
  187. siteName: '', //所属站点
  188. webName: '', //网站名称
  189. //3.4 上传logo图片
  190. logoUrl: '',
  191. hovering: false, // 鼠标悬浮状态 悬浮时显示删除
  192. // 分页器相关
  193. total: 0,
  194. page: 1,
  195. pageSize: 10,
  196. //表格相关
  197. tableData: [],
  198. //弹出框相关
  199. dialogTableVisible: false, //是否显示
  200. dialogName: '', //弹框标题名
  201. // 可以输入的搜索框相关
  202. webSiteList: [],//获取关联网站列表
  203. webSiteLoading: false,
  204. options: [],
  205. value: [],
  206. list: [],
  207. value: '',
  208. radio: '1',
  209. textarea: '',
  210. // 图片相关
  211. formLabelWidth: '120px',//表单的长度
  212. website_id: "",
  213. //表单相关
  214. ruleForm: {
  215. correlationWeb: '', //关联网站
  216. webName: '', //网站名称
  217. webUrl: '', //网站地址
  218. type: '1', //类型
  219. webLogo: '', //网站logo
  220. webDesc: '', //网站介绍
  221. sort: '', //排序
  222. },
  223. rules: { //规则
  224. correlationWeb: [{ required: true, trigger: 'blur', validator: validateEmpty }], //关联网站
  225. webName: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  226. webUrl: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  227. type: [{ required: true, trigger: 'blur', validator: validateEmpty }],
  228. sort: [{ required: true, trigger: 'blur', validator: validateEmpty }]
  229. },
  230. }
  231. },
  232. methods: {
  233. //1.列表和分页相关 start ------------------------------------------------------------>
  234. //1.1 获取网站列表数据
  235. getData() {
  236. getLinkList({
  237. page: this.page,
  238. pageSize: this.pageSize,
  239. }).then(data => {
  240. console.log(data);
  241. this.tableData = data.data.rows
  242. this.total = data.data.count
  243. for (let item of this.tableData) {
  244. if (item.type == '1') {
  245. item.type = '图片'
  246. } else if (item.type == '2') {
  247. item.type = '文字'
  248. } else if (item.type == '3') {
  249. item.type = '底部'
  250. }
  251. }
  252. })
  253. },
  254. //1.2 删除内容
  255. deleteRow(id, val) {
  256. this.activeId = id
  257. this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
  258. confirmButtonText: '确定',
  259. cancelButtonText: '取消',
  260. }).then(() => {
  261. console.log("当前删除:" + id)
  262. delLink({
  263. id: this.activeId,
  264. }).then(data => {
  265. console.log(data);
  266. if (data.code == 200) {
  267. this.$message({
  268. type: 'success',
  269. message: '删除成功!'
  270. });
  271. this.getData()
  272. } else if (data.code == 0) {
  273. this.$message({
  274. type: 'error',
  275. message: data.message
  276. });
  277. }
  278. })
  279. }).catch(() => {
  280. this.$message({
  281. type: 'warning',
  282. message: '已取消'
  283. });
  284. });
  285. },
  286. //1.3 列表内容分页
  287. //直接跳转
  288. handleSizeChange(val) {
  289. this.page = val;
  290. this.getData();
  291. },
  292. //1.4 点击分页
  293. handleCurrentChange(val) {
  294. this.page = val;
  295. this.getData();
  296. },
  297. // 1.5 搜索按钮
  298. goSearch() {
  299. getLinkList({
  300. page: this.page,
  301. pageSize: this.pageSize,
  302. website_id: this.siteName,
  303. title: this.webName
  304. }).then(data => {
  305. console.log(data);
  306. this.tableData = data.data.rows
  307. this.total = data.data.count
  308. for (let item of this.tableData) {
  309. if (item.type == '1') {
  310. item.type = '图片'
  311. } else if (item.type == '2') {
  312. item.type = '文字'
  313. } else if (item.type == '3') {
  314. item.type = '底部'
  315. }
  316. }
  317. })
  318. },
  319. //1.6 重置按钮
  320. reset() {
  321. this.siteName = ''
  322. this.webName = ''
  323. this.getData()
  324. },
  325. //列表和分页相关 end ------------------------------------------------------------>
  326. //1.7 添加
  327. addWebsite() {
  328. this.dialogTableVisible = true //弹窗是否显示
  329. this.dialogName = "添加" //弹窗名称
  330. this.ruleForm.correlationWeb = ''
  331. this.ruleForm.webName = ''
  332. this.ruleForm.webUrl = ''
  333. this.ruleForm.type = '1'
  334. this.logoUrl = 'http://183.131.25.186:9501/image/20241225/17350893036168.png'
  335. this.ruleForm.webLogo = 'http://183.131.25.186:9501/image/20241225/17350893036168.png'
  336. this.ruleForm.webDesc = ''
  337. this.ruleForm.sort = 0
  338. },
  339. //1.8 编辑
  340. goEdit(id, val) {
  341. this.dialogTableVisible = true //弹框显示
  342. this.dialogName = "编辑" //弹框名字
  343. console.log(id, val);
  344. this.activeId = id //活动id
  345. this.website_id = val.website_id //网站id
  346. this.ruleForm.correlationWeb = val.website_name
  347. this.ruleForm.webName = val.title
  348. this.ruleForm.webUrl = val.url
  349. this.ruleForm.webLogo = val.logo_url
  350. this.logoUrl = val.logo_url
  351. this.ruleForm.webDesc = val.describe
  352. this.ruleForm.sort = val.sort
  353. if (val.type == "图片") {
  354. this.ruleForm.type = '1'
  355. } else if (val.type == "文字") {
  356. this.ruleForm.type = '2'
  357. } else if (val.type == "底部") {
  358. this.ruleForm.type = '3'
  359. }
  360. },
  361. // 弹出层相关方法
  362. // 提交表单
  363. submitForm() {
  364. // console.log(123)
  365. if (this.ruleForm.correlationWeb == '') {
  366. this.$message.error("请输入并选择关联网站名称");
  367. return
  368. }
  369. // 添加
  370. if (this.dialogName == "添加") {
  371. if (this.ruleForm.type == '2') {
  372. createLink({
  373. title: this.ruleForm.webName,
  374. website_id: this.website_id,
  375. sort: this.ruleForm.sort,
  376. url: this.ruleForm.webUrl,
  377. type: this.ruleForm.type,
  378. logo_url: '',
  379. describe: this.ruleForm.webDesc
  380. }).then(data => {
  381. console.log(data);
  382. if (data.code == 200) {
  383. this.$message({
  384. message: "添加成功",
  385. type: 'success'
  386. });
  387. this.dialogTableVisible = false
  388. this.getData()
  389. } else {
  390. this.$message.error(data.message)
  391. }
  392. })
  393. } else {
  394. createLink({
  395. title: this.ruleForm.webName,
  396. website_id: this.website_id,
  397. sort: this.ruleForm.sort,
  398. url: this.ruleForm.webUrl,
  399. type: this.ruleForm.type,
  400. logo_url: this.ruleForm.webLogo,
  401. describe: this.ruleForm.webDesc
  402. }).then(data => {
  403. console.log(data);
  404. if (data.code == 200) {
  405. this.$message({
  406. message: "添加成功",
  407. type: 'success'
  408. });
  409. this.dialogTableVisible = false
  410. this.getData()
  411. } else {
  412. this.$message.error(data.message)
  413. }
  414. })
  415. }
  416. }
  417. if (this.dialogName == "编辑") {
  418. if (this.website_id == " ") {
  419. this.$message.error("请输入并选择关联网站");
  420. this.dialogTableVisible = true
  421. return
  422. }
  423. if (this.ruleForm.type == '2') {
  424. updateLink({
  425. title: this.ruleForm.webName,
  426. website_id: this.website_id,
  427. sort: this.ruleForm.sort,
  428. url: this.ruleForm.webUrl,
  429. type: this.ruleForm.type,
  430. logo_url: '',
  431. describe: this.ruleForm.webDesc,
  432. id: this.activeId,
  433. }).then(data => {
  434. console.log(data);
  435. if (data.code == 200) {
  436. this.$message({
  437. message: "修改成功",
  438. type: 'success'
  439. })
  440. this.dialogTableVisible = false
  441. this.getData()
  442. } else {
  443. this.$message({
  444. message: data.message,
  445. type: 'error'
  446. })
  447. }
  448. })
  449. } else {
  450. updateLink({
  451. title: this.ruleForm.webName,
  452. website_id: this.website_id,
  453. sort: this.ruleForm.sort,
  454. url: this.ruleForm.webUrl,
  455. type: this.ruleForm.type,
  456. logo_url: this.ruleForm.webLogo,
  457. describe: this.ruleForm.webDesc,
  458. id: this.activeId,
  459. }).then(data => {
  460. console.log(data);
  461. if (data.code == 200) {
  462. this.$message({
  463. message: "修改成功",
  464. type: 'success'
  465. })
  466. this.dialogTableVisible = false
  467. this.getData()
  468. } else {
  469. this.$message({
  470. message: data.message,
  471. type: 'error'
  472. })
  473. }
  474. })
  475. }
  476. }
  477. },
  478. //取消添加或编辑
  479. cancelForm() {
  480. this.dialogTableVisible = false
  481. },
  482. //3.6 上传图片操作
  483. beforeAvatarUpload(file) {
  484. console.log(file);
  485. // this.ruleForm.webLogo=file
  486. const isJPG = file.type === 'image/jpeg';
  487. const isPNG = file.type === 'image/png';
  488. const isLt2M = file.size / 1024 / 1024 < 2;
  489. if (!isJPG && !isPNG) {
  490. this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
  491. return false;
  492. }
  493. if (!isLt2M) {
  494. this.$message.error('上传头像图片大小不能超过 2MB!');
  495. return false;
  496. }
  497. const formData = new FormData();
  498. formData.append('file', file);
  499. this.$store.dispatch('pool/uploadFile', formData).then(res => {
  500. console.log('res', res);
  501. this.logoUrl = res.data.imgUrl;//显示缩略图
  502. this.ruleForm.webLogo = res.data.imgUrl;//提供表单地址
  503. console.log(res.data.imgUrl)
  504. }).catch(() => {
  505. this.$message({
  506. type: 'info',
  507. message: '网络错误,请重试!'
  508. });
  509. })
  510. // 阻止默认的上传行为
  511. return false;
  512. },
  513. handleDelete() {
  514. // 删除图片
  515. this.logoUrl = ''; // 清空图片 URL
  516. },
  517. //搜索部分的输入关键词下拉框
  518. selectWebSite(value) {
  519. this.siteName = value
  520. },
  521. //添加 / 编辑弹窗中输入关键词下拉框
  522. // 判断是否已经关联了网站
  523. detectionWebSite(value) {
  524. console.log(value);
  525. this.website_id = value
  526. // let data = {
  527. // website_id: value
  528. // }
  529. //验证一下是不是存在了关联网站名称
  530. // this.$store.dispatch('pool/getAdminWebsiteCategory', data).then(res => {
  531. // if (res.data.length > 0) {
  532. // this.ruleForm.webName = "";
  533. // this.$message({
  534. // type: 'warning',
  535. // message: '该网站已经关联了导航,请重新选择!'
  536. // });
  537. // }
  538. // })
  539. },
  540. //
  541. getWebNavList(query) {
  542. if (query !== '') {
  543. this.webSiteLoading = true;
  544. let data = { keyword: query }
  545. let dataArr = [];
  546. this.$store.dispatch('pool/getNavWebList', data).then(res => {
  547. console.log(res.data)
  548. for (let item of res.data) {
  549. let data = {};
  550. data.key = item.id;
  551. data.value = item.id;
  552. data.label = item.website_name;
  553. dataArr.push(data)
  554. }
  555. this.webSiteList = dataArr;
  556. this.webSiteLoading = false;
  557. }).catch(() => {
  558. this.$message({
  559. type: 'info',
  560. message: '网络错误,请重试!'
  561. });
  562. })
  563. } else {
  564. this.navList = [];
  565. }
  566. },
  567. },
  568. mounted() {
  569. //获取网站列表数据
  570. this.getData()
  571. }
  572. }
  573. </script>
  574. <style scoped lang="less">
  575. .title {
  576. margin: 30px 30px 20px 30px;
  577. padding: 30px 30px 40px 30px;
  578. background-color: #fff;
  579. border-radius: 20px 20px 20px 20px;
  580. border: 1px solid #E9EDF7;
  581. .left {
  582. float: left;
  583. }
  584. .right {
  585. float: right;
  586. }
  587. .searchBox {
  588. .searchTitle {
  589. padding-bottom: 10px;
  590. font-family: Microsoft YaHei, Microsoft YaHei;
  591. font-weight: 400;
  592. font-size: 14px;
  593. color: #999999;
  594. line-height: 16px;
  595. }
  596. .el-select {
  597. width: 85%;
  598. display: inline-block;
  599. position: relative;
  600. }
  601. }
  602. .btnList {
  603. float: right;
  604. padding-top: 28px;
  605. button {
  606. width: 120px;
  607. height: 38px;
  608. border: none;
  609. border-radius: 8px;
  610. // padding: 0 30px;
  611. }
  612. .search {
  613. background-color: #5570f1;
  614. color: #fff;
  615. margin-right: 20px;
  616. }
  617. .reset {
  618. font-family: Microsoft YaHei, Microsoft YaHei;
  619. font-weight: 400;
  620. font-size: 16px;
  621. color: #333333;
  622. background: #F5F7FB;
  623. border-radius: 8px 8px 8px 8px;
  624. border: 1px solid rgba(85, 112, 241, 0.11);
  625. }
  626. }
  627. }
  628. .layerBox {
  629. padding: 30px 20px;
  630. position: relative;
  631. .btn {
  632. position: absolute;
  633. top: 30px;
  634. right: 20px;
  635. height: 38px;
  636. color: #fff;
  637. background-color: #5570f1;
  638. border: none;
  639. border-radius: 8px;
  640. padding: 8px 28px 9px;
  641. box-sizing: border-box;
  642. }
  643. .listBtnBox {
  644. justify-content: left;
  645. }
  646. .listDeleteBtn,
  647. .listEditBtn,
  648. .listLookBtn {
  649. margin-left: 0px;
  650. padding-left: 0px;
  651. margin-right: 20px;
  652. width: 76px;
  653. height: 36px;
  654. line-height: 36px;
  655. }
  656. .listLookBtn {
  657. text-align: center;
  658. border-radius: 8px;
  659. cursor: pointer;
  660. color: #55b5f1;
  661. background-color: rgba(85, 181, 241, 0.16);
  662. >i {
  663. padding-right: 8px;
  664. }
  665. }
  666. .uploadImage {
  667. width: 130px;
  668. }
  669. // from表单中每条数据的下外边距
  670. ::v-deep .el-form-item {
  671. margin-bottom: 50px;
  672. }
  673. //下拉框宽度
  674. ::v-deep .el-select {
  675. width: 100%;
  676. }
  677. ::v-deep .el-input--medium,
  678. ::v-deep .el-form-item__label {
  679. line-height: 36px;
  680. font-size: 16px;
  681. }
  682. }
  683. // 弹出层内容
  684. .dialogText {
  685. margin: 0 7px 0 3px;
  686. padding-top: 20px;
  687. padding-bottom: 1px;
  688. padding: 20px 60px 1px 20px;
  689. background-color: #f5f7fb;
  690. // from表单中每条数据的下外边距
  691. ::v-deep .el-form-item {
  692. margin-bottom: 50px;
  693. }
  694. //下拉框宽度
  695. ::v-deep .el-select {
  696. width: 100%;
  697. }
  698. //图片的宽高
  699. ::v-deep .avatar {
  700. width: 140px;
  701. height: auto;
  702. }
  703. .keywords {
  704. position: relative;
  705. i {
  706. position: absolute;
  707. top: 0;
  708. left: -15px;
  709. }
  710. }
  711. }
  712. // 弹出层按钮
  713. .dialogBtn {
  714. text-align: center;
  715. margin: 50px auto 20px;
  716. ::v-deep .avatar {
  717. width: 140px;
  718. height: 50px;
  719. display: block;
  720. }
  721. button {
  722. width: 184px;
  723. padding: 16px;
  724. font-family: Microsoft YaHei, Microsoft YaHei;
  725. font-weight: 400;
  726. font-size: 20px;
  727. border: none;
  728. border-radius: 12px 12px 12px 12px;
  729. }
  730. // 取消
  731. .cancel {
  732. color: #333333;
  733. background-color: #f5f7fb;
  734. border: 2px solid rgba(85, 112, 241, 0.11);
  735. }
  736. // 提交
  737. .submit {
  738. color: #fff;
  739. background-color: #5570F1;
  740. margin-left: 40px;
  741. }
  742. }
  743. </style>