blogroll.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  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. if (this.siteName || this.webName) {
  237. getLinkList({
  238. page: this.page,
  239. pageSize: this.pageSize,
  240. website_id: this.siteName,
  241. title: this.webName
  242. }).then(data => {
  243. console.log(data);
  244. this.tableData = data.data.rows
  245. this.total = data.data.count
  246. for (let item of this.tableData) {
  247. if (item.type == '1') {
  248. item.type = '图片'
  249. } else if (item.type == '2') {
  250. item.type = '文字'
  251. } else if (item.type == '3') {
  252. item.type = '底部'
  253. }
  254. }
  255. })
  256. } else {
  257. getLinkList({
  258. page: this.page,
  259. pageSize: this.pageSize,
  260. }).then(data => {
  261. console.log(data);
  262. this.tableData = data.data.rows
  263. this.total = data.data.count
  264. for (let item of this.tableData) {
  265. if (item.type == '1') {
  266. item.type = '图片'
  267. } else if (item.type == '2') {
  268. item.type = '文字'
  269. } else if (item.type == '3') {
  270. item.type = '底部'
  271. }
  272. }
  273. })
  274. }
  275. },
  276. //1.2 删除内容
  277. deleteRow(id, val) {
  278. this.activeId = id
  279. this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
  280. confirmButtonText: '确定',
  281. cancelButtonText: '取消',
  282. }).then(() => {
  283. console.log("当前删除:" + id)
  284. delLink({
  285. id: this.activeId,
  286. }).then(data => {
  287. console.log(data);
  288. if (data.code == 200) {
  289. this.$message({
  290. type: 'success',
  291. message: '删除成功!'
  292. });
  293. this.getData()
  294. } else if (data.code == 0) {
  295. this.$message({
  296. type: 'error',
  297. message: data.message
  298. });
  299. }
  300. })
  301. }).catch(() => {
  302. this.$message({
  303. type: 'warning',
  304. message: '已取消'
  305. });
  306. });
  307. },
  308. //1.3 列表内容分页
  309. //直接跳转
  310. handleSizeChange(val) {
  311. this.page = val;
  312. this.getData();
  313. },
  314. //1.4 点击分页
  315. handleCurrentChange(val) {
  316. this.page = val;
  317. this.getData();
  318. },
  319. // 1.5 搜索按钮
  320. goSearch() {
  321. getLinkList({
  322. page: this.page,
  323. pageSize: this.pageSize,
  324. website_id: this.siteName,
  325. title: this.webName
  326. }).then(data => {
  327. console.log(data);
  328. this.tableData = data.data.rows
  329. this.total = data.data.count
  330. for (let item of this.tableData) {
  331. if (item.type == '1') {
  332. item.type = '图片'
  333. } else if (item.type == '2') {
  334. item.type = '文字'
  335. } else if (item.type == '3') {
  336. item.type = '底部'
  337. }
  338. }
  339. })
  340. },
  341. //1.6 重置按钮
  342. reset() {
  343. this.siteName = ''
  344. this.webName = ''
  345. this.getData()
  346. },
  347. //列表和分页相关 end ------------------------------------------------------------>
  348. //1.7 添加
  349. addWebsite() {
  350. this.dialogTableVisible = true //弹窗是否显示
  351. this.dialogName = "添加" //弹窗名称
  352. this.ruleForm.correlationWeb = ''
  353. this.ruleForm.webName = ''
  354. this.ruleForm.webUrl = ''
  355. this.ruleForm.type = '1'
  356. this.logoUrl = 'http://183.131.25.186:9501/image/20241225/17350893036168.png'
  357. this.ruleForm.webLogo = 'http://183.131.25.186:9501/image/20241225/17350893036168.png'
  358. this.ruleForm.webDesc = ''
  359. this.ruleForm.sort = 0
  360. },
  361. //1.8 编辑
  362. goEdit(id, val) {
  363. this.dialogTableVisible = true //弹框显示
  364. this.dialogName = "编辑" //弹框名字
  365. console.log(id, val);
  366. this.activeId = id //活动id
  367. this.website_id = val.website_id //网站id
  368. this.ruleForm.correlationWeb = val.website_name
  369. this.ruleForm.webName = val.title
  370. this.ruleForm.webUrl = val.url
  371. this.ruleForm.webLogo = val.logo_url
  372. this.logoUrl = val.logo_url
  373. this.ruleForm.webDesc = val.describe
  374. this.ruleForm.sort = val.sort
  375. if (val.type == "图片") {
  376. this.ruleForm.type = '1'
  377. } else if (val.type == "文字") {
  378. this.ruleForm.type = '2'
  379. } else if (val.type == "底部") {
  380. this.ruleForm.type = '3'
  381. }
  382. },
  383. // 弹出层相关方法
  384. // 提交表单
  385. submitForm() {
  386. // console.log(123)
  387. if (this.ruleForm.correlationWeb == '') {
  388. this.$message.error("请输入并选择关联网站名称");
  389. return
  390. }
  391. // 添加
  392. if (this.dialogName == "添加") {
  393. if (this.ruleForm.type == '2') {
  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: '',
  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. } else {
  416. createLink({
  417. title: this.ruleForm.webName,
  418. website_id: this.website_id,
  419. sort: this.ruleForm.sort,
  420. url: this.ruleForm.webUrl,
  421. type: this.ruleForm.type,
  422. logo_url: this.ruleForm.webLogo,
  423. describe: this.ruleForm.webDesc
  424. }).then(data => {
  425. console.log(data);
  426. if (data.code == 200) {
  427. this.$message({
  428. message: "添加成功",
  429. type: 'success'
  430. });
  431. this.dialogTableVisible = false
  432. this.getData()
  433. } else {
  434. this.$message.error(data.message)
  435. }
  436. })
  437. }
  438. }
  439. if (this.dialogName == "编辑") {
  440. if (this.website_id == " ") {
  441. this.$message.error("请输入并选择关联网站");
  442. this.dialogTableVisible = true
  443. return
  444. }
  445. if (this.ruleForm.type == '2') {
  446. updateLink({
  447. title: this.ruleForm.webName,
  448. website_id: this.website_id,
  449. sort: this.ruleForm.sort,
  450. url: this.ruleForm.webUrl,
  451. type: this.ruleForm.type,
  452. logo_url: '',
  453. describe: this.ruleForm.webDesc,
  454. id: this.activeId,
  455. }).then(data => {
  456. console.log(data);
  457. if (data.code == 200) {
  458. this.$message({
  459. message: "修改成功",
  460. type: 'success'
  461. })
  462. this.dialogTableVisible = false
  463. this.getData()
  464. } else {
  465. this.$message({
  466. message: data.message,
  467. type: 'error'
  468. })
  469. }
  470. })
  471. } else {
  472. updateLink({
  473. title: this.ruleForm.webName,
  474. website_id: this.website_id,
  475. sort: this.ruleForm.sort,
  476. url: this.ruleForm.webUrl,
  477. type: this.ruleForm.type,
  478. logo_url: this.ruleForm.webLogo,
  479. describe: this.ruleForm.webDesc,
  480. id: this.activeId,
  481. }).then(data => {
  482. console.log(data);
  483. if (data.code == 200) {
  484. this.$message({
  485. message: "修改成功",
  486. type: 'success'
  487. })
  488. this.dialogTableVisible = false
  489. this.getData()
  490. } else {
  491. this.$message({
  492. message: data.message,
  493. type: 'error'
  494. })
  495. }
  496. })
  497. }
  498. }
  499. },
  500. //取消添加或编辑
  501. cancelForm() {
  502. this.dialogTableVisible = false
  503. },
  504. //3.6 上传图片操作
  505. beforeAvatarUpload(file) {
  506. console.log(file);
  507. // this.ruleForm.webLogo=file
  508. const isJPG = file.type === 'image/jpeg';
  509. const isPNG = file.type === 'image/png';
  510. const isLt2M = file.size / 1024 / 1024 < 2;
  511. if (!isJPG && !isPNG) {
  512. this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
  513. return false;
  514. }
  515. if (!isLt2M) {
  516. this.$message.error('上传头像图片大小不能超过 2MB!');
  517. return false;
  518. }
  519. const formData = new FormData();
  520. formData.append('file', file);
  521. this.$store.dispatch('pool/uploadFile', formData).then(res => {
  522. console.log('res', res);
  523. this.logoUrl = res.data.imgUrl;//显示缩略图
  524. this.ruleForm.webLogo = res.data.imgUrl;//提供表单地址
  525. console.log(res.data.imgUrl)
  526. }).catch(() => {
  527. this.$message({
  528. type: 'info',
  529. message: '网络错误,请重试!'
  530. });
  531. })
  532. // 阻止默认的上传行为
  533. return false;
  534. },
  535. handleDelete() {
  536. // 删除图片
  537. this.logoUrl = ''; // 清空图片 URL
  538. },
  539. //搜索部分的输入关键词下拉框
  540. selectWebSite(value) {
  541. this.siteName = value
  542. },
  543. //添加 / 编辑弹窗中输入关键词下拉框
  544. // 判断是否已经关联了网站
  545. detectionWebSite(value) {
  546. console.log(value);
  547. this.website_id = value
  548. // let data = {
  549. // website_id: value
  550. // }
  551. //验证一下是不是存在了关联网站名称
  552. // this.$store.dispatch('pool/getAdminWebsiteCategory', data).then(res => {
  553. // if (res.data.length > 0) {
  554. // this.ruleForm.webName = "";
  555. // this.$message({
  556. // type: 'warning',
  557. // message: '该网站已经关联了导航,请重新选择!'
  558. // });
  559. // }
  560. // })
  561. },
  562. //
  563. getWebNavList(query) {
  564. if (query !== '') {
  565. this.webSiteLoading = true;
  566. let data = { keyword: query }
  567. let dataArr = [];
  568. this.$store.dispatch('pool/getNavWebList', data).then(res => {
  569. console.log(res.data)
  570. for (let item of res.data) {
  571. let data = {};
  572. data.key = item.id;
  573. data.value = item.id;
  574. data.label = item.website_name;
  575. dataArr.push(data)
  576. }
  577. this.webSiteList = dataArr;
  578. this.webSiteLoading = false;
  579. }).catch(() => {
  580. this.$message({
  581. type: 'info',
  582. message: '网络错误,请重试!'
  583. });
  584. })
  585. } else {
  586. this.navList = [];
  587. }
  588. },
  589. },
  590. mounted() {
  591. //获取网站列表数据
  592. this.getData()
  593. }
  594. }
  595. </script>
  596. <style scoped lang="less">
  597. .title {
  598. margin: 30px 30px 20px 30px;
  599. padding: 30px 30px 40px 30px;
  600. background-color: #fff;
  601. border-radius: 20px 20px 20px 20px;
  602. border: 1px solid #E9EDF7;
  603. .left {
  604. float: left;
  605. }
  606. .right {
  607. float: right;
  608. }
  609. .searchBox {
  610. .searchTitle {
  611. padding-bottom: 10px;
  612. font-family: Microsoft YaHei, Microsoft YaHei;
  613. font-weight: 400;
  614. font-size: 14px;
  615. color: #999999;
  616. line-height: 16px;
  617. }
  618. .el-select {
  619. width: 85%;
  620. display: inline-block;
  621. position: relative;
  622. }
  623. }
  624. .btnList {
  625. float: right;
  626. padding-top: 28px;
  627. button {
  628. width: 120px;
  629. height: 38px;
  630. border: none;
  631. border-radius: 8px;
  632. // padding: 0 30px;
  633. }
  634. .search {
  635. background-color: #5570f1;
  636. color: #fff;
  637. margin-right: 20px;
  638. }
  639. .reset {
  640. font-family: Microsoft YaHei, Microsoft YaHei;
  641. font-weight: 400;
  642. font-size: 16px;
  643. color: #333333;
  644. background: #F5F7FB;
  645. border-radius: 8px 8px 8px 8px;
  646. border: 1px solid rgba(85, 112, 241, 0.11);
  647. }
  648. }
  649. }
  650. .layerBox {
  651. padding: 30px 20px;
  652. position: relative;
  653. .btn {
  654. position: absolute;
  655. top: 30px;
  656. right: 20px;
  657. height: 38px;
  658. color: #fff;
  659. background-color: #5570f1;
  660. border: none;
  661. border-radius: 8px;
  662. padding: 8px 28px 9px;
  663. box-sizing: border-box;
  664. }
  665. .listBtnBox {
  666. justify-content: left;
  667. }
  668. .listDeleteBtn,
  669. .listEditBtn,
  670. .listLookBtn {
  671. margin-left: 0px;
  672. padding-left: 0px;
  673. margin-right: 20px;
  674. width: 76px;
  675. height: 36px;
  676. line-height: 36px;
  677. }
  678. .listLookBtn {
  679. text-align: center;
  680. border-radius: 8px;
  681. cursor: pointer;
  682. color: #55b5f1;
  683. background-color: rgba(85, 181, 241, 0.16);
  684. >i {
  685. padding-right: 8px;
  686. }
  687. }
  688. .uploadImage {
  689. width: 130px;
  690. }
  691. // from表单中每条数据的下外边距
  692. ::v-deep .el-form-item {
  693. margin-bottom: 50px;
  694. }
  695. //下拉框宽度
  696. ::v-deep .el-select {
  697. width: 100%;
  698. }
  699. ::v-deep .el-input--medium,
  700. ::v-deep .el-form-item__label {
  701. line-height: 36px;
  702. font-size: 16px;
  703. }
  704. }
  705. // 弹出层内容
  706. .dialogText {
  707. margin: 0 7px 0 3px;
  708. padding-top: 20px;
  709. padding-bottom: 1px;
  710. padding: 20px 60px 1px 20px;
  711. background-color: #f5f7fb;
  712. // from表单中每条数据的下外边距
  713. ::v-deep .el-form-item {
  714. margin-bottom: 50px;
  715. }
  716. //下拉框宽度
  717. ::v-deep .el-select {
  718. width: 100%;
  719. }
  720. //图片的宽高
  721. ::v-deep .avatar {
  722. width: 140px;
  723. height: auto;
  724. }
  725. .keywords {
  726. position: relative;
  727. i {
  728. position: absolute;
  729. top: 0;
  730. left: -15px;
  731. }
  732. }
  733. }
  734. // 弹出层按钮
  735. .dialogBtn {
  736. text-align: center;
  737. margin: 50px auto 20px;
  738. ::v-deep .avatar {
  739. width: 140px;
  740. height: 50px;
  741. display: block;
  742. }
  743. button {
  744. width: 184px;
  745. padding: 16px;
  746. font-family: Microsoft YaHei, Microsoft YaHei;
  747. font-weight: 400;
  748. font-size: 20px;
  749. border: none;
  750. border-radius: 12px 12px 12px 12px;
  751. }
  752. // 取消
  753. .cancel {
  754. color: #333333;
  755. background-color: #f5f7fb;
  756. border: 2px solid rgba(85, 112, 241, 0.11);
  757. }
  758. // 提交
  759. .submit {
  760. color: #fff;
  761. background-color: #5570F1;
  762. margin-left: 40px;
  763. }
  764. }
  765. </style>