index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. <!--
  2. MIT License
  3. Copyright (c) 2020 www.joolun.com
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated documentation files (the "Software"), to deal
  6. in the Software without restriction, including without limitation the rights
  7. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. copies of the Software, and to permit persons to whom the Software is
  9. furnished to do so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in all
  11. copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  18. SOFTWARE.
  19. 芋道源码:
  20. ① 优化代码,和项目的代码保持一致
  21. ② 清理冗余代码,保证代码整洁
  22. ③ 增加注释,提升可读性
  23. -->
  24. <template>
  25. <div class="app-container">
  26. <!-- 搜索工作栏 -->
  27. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  28. <el-form-item label="公众号" prop="accountId">
  29. <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
  30. <el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item>
  34. <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  35. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  36. </el-form-item>
  37. </el-form>
  38. <!-- 操作工具栏 -->
  39. <el-row :gutter="10" class="mb8">
  40. <el-col :span="1.5">
  41. <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
  42. v-hasPermi="['mp:draft:create']">新增
  43. </el-button>
  44. </el-col>
  45. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  46. </el-row>
  47. <!-- 列表 -->
  48. <div class="waterfall" v-loading="loading">
  49. <div v-if="item.content && item.content.newsItem" class="waterfall-item" v-for="item in list"
  50. :key='item.articleId'>
  51. <wx-news :articles="item.content.newsItem" />
  52. <!-- 操作按钮 -->
  53. <el-row class="ope-row">
  54. <el-button type="success" circle @click="handlePublish(item)" v-hasPermi="['mp:free-publish:submit']">发布</el-button>
  55. <el-button type="primary" icon="el-icon-edit" circle @click="handleUpdate(item)" v-hasPermi="['mp:draft:update']" />
  56. <el-button type="danger" icon="el-icon-delete" circle @click="handleDelete(item)" v-hasPermi="['mp:draft:delete']" />
  57. </el-row>
  58. </div>
  59. </div>
  60. <!-- 分页记录 -->
  61. <div v-if="list.length <= 0 && !loading" class="el-table__empty-block">
  62. <span class="el-table__empty-text">暂无数据</span>
  63. </div>
  64. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
  65. @pagination="getList"/>
  66. <!-- 添加或修改草稿对话框 -->
  67. <el-dialog :title="operateMaterial === 'add' ? '新建图文' : '修改图文'"
  68. append-to-body width="80%" top="20px" :visible.sync="dialogNewsVisible"
  69. :before-close="dialogNewsClose" :close-on-click-modal="false">
  70. <div class="left">
  71. <div class="select-item">
  72. <div v-for="(news, index) in articlesAdd" :key='news.id'>
  73. <div class="news-main father" v-if="index === 0" :class="{'activeAddNews': isActiveAddNews === index}"
  74. @click="activeNews(index)">
  75. <div class="news-content">
  76. <img class="material-img" v-if="news.thumbUrl" :src="news.thumbUrl"/>
  77. <div class="news-content-title">{{news.title}}</div>
  78. </div>
  79. <div class="child" v-if="articlesAdd.length>1">
  80. <el-button type="mini" icon="el-icon-sort-down" @click="downNews(index)">下移</el-button>
  81. <el-button v-if="operateMaterial === 'add'" type="mini" icon="el-icon-delete"
  82. @click="minusNews(index)">删除
  83. </el-button>
  84. </div>
  85. </div>
  86. <div class="news-main-item father" v-if="index>0" :class="{'activeAddNews': isActiveAddNews === index}"
  87. @click="activeNews(index)">
  88. <div class="news-content-item">
  89. <div class="news-content-item-title ">{{news.title}}</div>
  90. <div class="news-content-item-img">
  91. <img class="material-img" v-if="news.thumbUrl" :src="news.thumbUrl" height="100%"/>
  92. </div>
  93. </div>
  94. <div class="child">
  95. <el-button v-if="articlesAdd.length > index+1" type="mini" icon="el-icon-sort-down"
  96. @click="downNews(index)">下移
  97. </el-button>
  98. <el-button type="mini" icon="el-icon-sort-up" @click="upNews(index)">上移</el-button>
  99. <el-button v-if="operateMaterial=== 'add'" type="mini" icon="el-icon-delete"
  100. @click="minusNews(index)">删除
  101. </el-button>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="news-main-plus" @click="plusNews" v-if="articlesAdd.length<8 && operateMaterial==='add'">
  106. <i class="el-icon-circle-plus icon-plus"></i>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="right" v-loading="addMaterialLoading" v-if="articlesAdd.length > 0">
  111. <br /> <br /> <br /> <br />
  112. <!-- 标题、作者、原文地址 -->
  113. <el-input v-model="articlesAdd[isActiveAddNews].title" placeholder="请输入标题(必填)" />
  114. <el-input v-model="articlesAdd[isActiveAddNews].author" placeholder="请输入作者" style="margin-top: 5px;" />
  115. <el-input v-model="articlesAdd[isActiveAddNews].contentSourceUrl" placeholder="请输入原文地址" style="margin-top: 5px;" />
  116. <!-- 封面和摘要 -->
  117. <div class="input-tt">封面和摘要:</div>
  118. <div>
  119. <div class="thumb-div">
  120. <img class="material-img" v-if="articlesAdd[isActiveAddNews].thumbUrl"
  121. :src="articlesAdd[isActiveAddNews].thumbUrl" :class="isActiveAddNews === 0 ? 'avatar':'avatar1'">
  122. <i v-else class="el-icon-plus avatar-uploader-icon"
  123. :class="isActiveAddNews === 0 ? 'avatar':'avatar1'"></i>
  124. <div class="thumb-but">
  125. <el-upload :action="actionUrl" :headers="headers" multiple :limit="1" :file-list="fileList" :data="uploadData"
  126. :before-upload="beforeThumbImageUpload" :on-success="handleUploadSuccess">
  127. <el-button slot="trigger" size="mini" type="primary">本地上传</el-button>
  128. <el-button size="mini" type="primary" @click="openMaterial" style="margin-left: 5px">素材库选择</el-button>
  129. <div slot="tip" class="el-upload__tip">支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M</div>
  130. </el-upload>
  131. </div>
  132. <el-dialog title="选择图片" :visible.sync="dialogImageVisible" width="80%" append-to-body>
  133. <wx-material-select ref="materialSelect" :objData="{type: 'image', accountId: this.queryParams.accountId}"
  134. @selectMaterial="selectMaterial" />
  135. </el-dialog>
  136. </div>
  137. <el-input :rows="8" type="textarea" v-model="articlesAdd[isActiveAddNews].digest" placeholder="请输入摘要"
  138. class="digest" maxlength="120" style="float: right" />
  139. </div>
  140. <!--富文本编辑器组件-->
  141. <el-row>
  142. <wx-editor v-model="articlesAdd[isActiveAddNews].content" :account-id="this.uploadData.accountId"
  143. v-if="hackResetEditor"/>
  144. </el-row>
  145. </div>
  146. <div slot="footer" class="dialog-footer">
  147. <el-button @click="dialogNewsVisible = false">取 消</el-button>
  148. <el-button type="primary" @click="submitForm">提 交</el-button>
  149. </div>
  150. </el-dialog>
  151. </div>
  152. </template>
  153. <script>
  154. import WxEditor from '@/views/mp/components/wx-editor/WxEditor.vue';
  155. import WxNews from '@/views/mp/components/wx-news/main.vue';
  156. import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
  157. import { getAccessToken } from '@/utils/auth'
  158. import {createDraft, deleteDraft, getDraftPage, updateDraft} from "@/api/mp/draft";
  159. import { getSimpleAccounts } from "@/api/mp/account";
  160. import {deleteFreePublish, submitFreePublish} from "@/api/mp/freePublish";
  161. export default {
  162. name: 'mpDraft',
  163. components: {
  164. WxEditor,
  165. WxNews,
  166. WxMaterialSelect
  167. },
  168. data() {
  169. return {
  170. // 遮罩层
  171. loading: false,
  172. // 显示搜索条件
  173. showSearch: true,
  174. // 总条数
  175. total: 0,
  176. // 数据列表
  177. list: [],
  178. queryParams: {
  179. pageNo: 1,
  180. pageSize: 10,
  181. accountId: undefined,
  182. },
  183. // ========== 文件上传 ==========
  184. actionUrl: process.env.VUE_APP_BASE_API + "/admin-api/mp/material/upload-permanent", // 上传永久素材的地址
  185. headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部
  186. fileList: [],
  187. uploadData: {
  188. "type": 'image',
  189. // "accountId": 1,
  190. },
  191. // ========== 草稿新建 or 修改 ==========
  192. dialogNewsVisible: false,
  193. addMaterialLoading: false, // 添加草稿的 loading 标识
  194. articlesAdd: [],
  195. isActiveAddNews: 0,
  196. dialogImageVisible: false,
  197. operateMaterial: 'add',
  198. articlesMediaId: '',
  199. hackResetEditor: false,
  200. // 公众号账号列表
  201. accounts: [],
  202. }
  203. },
  204. created() {
  205. getSimpleAccounts().then(response => {
  206. this.accounts = response.data;
  207. // 默认选中第一个
  208. if (this.accounts.length > 0) {
  209. this.queryParams.accountId = this.accounts[0].id;
  210. this.setAccountId(this.accounts[0].id);
  211. }
  212. // 加载数据
  213. this.getList();
  214. })
  215. },
  216. methods: {
  217. // ======================== 列表查询 ========================
  218. /** 设置账号编号 */
  219. setAccountId(accountId) {
  220. this.queryParams.accountId = accountId;
  221. this.uploadData.accountId = accountId;
  222. },
  223. /** 查询列表 */
  224. getList() {
  225. // 如果没有选中公众号账号,则进行提示。
  226. if (!this.queryParams.accountId) {
  227. this.$message.error('未选中公众号,无法查询草稿箱')
  228. return false
  229. }
  230. this.loading = true
  231. getDraftPage((this.queryParams)).then(response => {
  232. // 将 thumbUrl 转成 picUrl,保证 wx-news 组件可以预览封面
  233. response.data.list.forEach(item => {
  234. const newsItem = item.content.newsItem;
  235. newsItem.forEach(article => {
  236. article.picUrl = article.thumbUrl;
  237. })
  238. })
  239. this.list = response.data.list
  240. this.total = response.data.total
  241. }).finally(() => {
  242. this.loading = false
  243. })
  244. },
  245. /** 搜索按钮操作 */
  246. handleQuery() {
  247. this.queryParams.pageNo = 1
  248. // 默认选中第一个
  249. if (this.queryParams.accountId) {
  250. this.setAccountId(this.queryParams.accountId)
  251. }
  252. this.getList()
  253. },
  254. /** 重置按钮操作 */
  255. resetQuery() {
  256. this.resetForm('queryForm')
  257. // 默认选中第一个
  258. if (this.accounts.length > 0) {
  259. this.setAccountId(this.accounts[0].id)
  260. }
  261. this.handleQuery()
  262. },
  263. // ======================== 新增/修改草稿 ========================
  264. /** 新增按钮操作 */
  265. handleAdd() {
  266. this.resetEditor();
  267. this.reset();
  268. // 打开表单,并设置初始化
  269. this.operateMaterial = 'add'
  270. this.dialogNewsVisible = true
  271. },
  272. /** 更新按钮操作 */
  273. handleUpdate(item){
  274. this.resetEditor();
  275. this.reset();
  276. this.articlesMediaId = item.mediaId
  277. this.articlesAdd = JSON.parse(JSON.stringify(item.content.newsItem))
  278. // 打开表单,并设置初始化
  279. this.operateMaterial = 'edit'
  280. this.dialogNewsVisible = true
  281. },
  282. /** 提交按钮 */
  283. submitForm() {
  284. this.addMaterialLoading = true
  285. if (this.operateMaterial === 'add') {
  286. createDraft(this.queryParams.accountId, this.articlesAdd).then(response => {
  287. this.$modal.msgSuccess("新增成功");
  288. this.dialogNewsVisible = false;
  289. this.getList()
  290. }).finally(() => {
  291. this.addMaterialLoading = false
  292. })
  293. } else {
  294. updateDraft(this.queryParams.accountId, this.articlesMediaId, this.articlesAdd).then(response => {
  295. this.$modal.msgSuccess("更新成功");
  296. this.dialogNewsVisible = false;
  297. this.getList()
  298. }).finally(() => {
  299. this.addMaterialLoading = false
  300. })
  301. }
  302. },
  303. // 关闭弹窗
  304. dialogNewsClose(done) {
  305. this.$modal.confirm('修改内容可能还未保存,确定关闭吗?').then(() => {
  306. this.reset()
  307. this.resetEditor()
  308. done()
  309. }).catch(() => {})
  310. },
  311. // 表单重置
  312. reset() {
  313. this.isActiveAddNews = 0
  314. this.articlesAdd = [this.buildEmptyArticle()]
  315. },
  316. // 表单 Editor 重置
  317. resetEditor() {
  318. this.hackResetEditor = false // 销毁组件
  319. this.$nextTick(() => {
  320. this.hackResetEditor = true // 重建组件
  321. })
  322. },
  323. // 将图文向下移动
  324. downNews(index) {
  325. let temp = this.articlesAdd[index]
  326. this.articlesAdd[index] = this.articlesAdd[index+1]
  327. this.articlesAdd[index + 1] = temp
  328. this.isActiveAddNews = index + 1
  329. },
  330. // 将图文向上移动
  331. upNews(index) {
  332. let temp = this.articlesAdd[index]
  333. this.articlesAdd[index] = this.articlesAdd[index - 1]
  334. this.articlesAdd[index - 1] = temp
  335. this.isActiveAddNews = index - 1
  336. },
  337. // 选中指定 index 的图文
  338. activeNews(index) {
  339. this.resetEditor();
  340. this.isActiveAddNews = index
  341. },
  342. // 删除指定 index 的图文
  343. minusNews(index) {
  344. this.$modal.confirm('确定删除该图文吗?').then(() => {
  345. this.articlesAdd.splice(index,1);
  346. if (this.isActiveAddNews === index) {
  347. this.isActiveAddNews = 0
  348. }
  349. }).catch(() => {})
  350. },
  351. // 添加一个图文
  352. plusNews() {
  353. this.articlesAdd.push(this.buildEmptyArticle())
  354. this.isActiveAddNews = this.articlesAdd.length - 1
  355. },
  356. // 创建空的 article
  357. buildEmptyArticle() {
  358. return {
  359. "title": '',
  360. "thumbMediaId": '',
  361. "author": '',
  362. "digest": '',
  363. "showCoverPic": '',
  364. "content": '',
  365. "contentSourceUrl": '',
  366. "needOpenComment":'',
  367. "onlyFansCanComment":'',
  368. "thumbUrl":''
  369. }
  370. },
  371. // ======================== 文件上传 ========================
  372. beforeThumbImageUpload(file) {
  373. this.addMaterialLoading = true
  374. const isType = file.type === 'image/jpeg'
  375. || file.type === 'image/png'
  376. || file.type === 'image/gif'
  377. || file.type === 'image/bmp'
  378. || file.type === 'image/jpg';
  379. if (!isType) {
  380. this.$message.error('上传图片格式不对!')
  381. this.addMaterialLoading = false
  382. return false;
  383. }
  384. const isLt = file.size / 1024 / 1024 < 2
  385. if (!isLt) {
  386. this.$message.error('上传图片大小不能超过 2M!')
  387. this.addMaterialLoading = false
  388. return false;
  389. }
  390. // 校验通过
  391. return true;
  392. },
  393. handleUploadSuccess(response, file, fileList) {
  394. this.addMaterialLoading = false // 关闭 loading
  395. if (response.code !== 0) {
  396. this.$message.error('上传出错:' + response.msg)
  397. return false;
  398. }
  399. // 重置上传文件的表单
  400. this.fileList = []
  401. // 设置草稿的封面字段
  402. this.articlesAdd[this.isActiveAddNews].thumbMediaId = response.data.mediaId
  403. this.articlesAdd[this.isActiveAddNews].thumbUrl = response.data.url
  404. },
  405. // 选择 or 上传完素材,设置回草稿
  406. selectMaterial(item) {
  407. this.dialogImageVisible = false
  408. this.articlesAdd[this.isActiveAddNews].thumbMediaId = item.mediaId
  409. this.articlesAdd[this.isActiveAddNews].thumbUrl = item.url
  410. },
  411. // 打开素材选择
  412. openMaterial() {
  413. this.dialogImageVisible = true
  414. try {
  415. this.$refs['materialSelect'].queryParams.accountId = this.queryParams.accountId // 强制设置下 accountId,避免二次查询不对
  416. this.$refs['materialSelect'].handleQuery(); // 刷新列表,失败也无所谓
  417. } catch (e) {}
  418. },
  419. // ======================== 草稿箱发布 ========================
  420. handlePublish(item) {
  421. const accountId = this.queryParams.accountId;
  422. const mediaId = item.mediaId;
  423. const content = '你正在通过发布的方式发表内容。 发布不占用群发次数,一天可多次发布。已发布内容不会推送给用户,也不会展示在公众号主页中。 发布后,你可以前往发表记录获取链接,也可以将发布内容添加到自定义菜单、自动回复、话题和页面模板中。';
  424. this.$modal.confirm(content).then(function() {
  425. return submitFreePublish(accountId, mediaId);
  426. }).then(() => {
  427. this.getList();
  428. this.$modal.msgSuccess("发布成功");
  429. }).catch(() => {});
  430. },
  431. handleDelete(item) {
  432. const accountId = this.queryParams.accountId;
  433. const mediaId = item.mediaId;
  434. this.$modal.confirm('此操作将永久删除该草稿, 是否继续?').then(function() {
  435. return deleteDraft(accountId, mediaId);
  436. }).then(() => {
  437. this.getList();
  438. this.$modal.msgSuccess("删除成功");
  439. }).catch(() => {});
  440. },
  441. }
  442. }
  443. </script>
  444. <style lang="scss" scoped>
  445. .pagination {
  446. float: right;
  447. margin-right: 25px;
  448. }
  449. .add_but {
  450. padding: 10px;
  451. }
  452. .ope-row {
  453. margin-top: 5px;
  454. text-align: center;
  455. border-top: 1px solid #eaeaea;
  456. padding-top: 5px;
  457. }
  458. .item-name {
  459. font-size: 12px;
  460. overflow: hidden;
  461. text-overflow: ellipsis;
  462. white-space: nowrap;
  463. text-align: center;
  464. }
  465. .el-upload__tip {
  466. margin-left: 5px;
  467. }
  468. /*新增图文*/
  469. .left {
  470. display: inline-block;
  471. width: 35%;
  472. vertical-align: top;
  473. margin-top: 200px;
  474. }
  475. .right {
  476. display: inline-block;
  477. width: 60%;
  478. margin-top: -40px;
  479. }
  480. .avatar-uploader {
  481. width: 20%;
  482. display: inline-block;
  483. }
  484. .avatar-uploader .el-upload {
  485. border-radius: 6px;
  486. cursor: pointer;
  487. position: relative;
  488. overflow: hidden;
  489. text-align: unset !important;
  490. }
  491. .avatar-uploader .el-upload:hover {
  492. border-color: #165dff;
  493. }
  494. .avatar-uploader-icon {
  495. border: 1px solid #d9d9d9;
  496. font-size: 28px;
  497. color: #8c939d;
  498. width: 120px;
  499. height: 120px;
  500. line-height: 120px;
  501. text-align: center;
  502. }
  503. .avatar {
  504. width: 230px;
  505. height: 120px;
  506. }
  507. .avatar1 {
  508. width: 120px;
  509. height: 120px;
  510. }
  511. .digest {
  512. width: 60%;
  513. display: inline-block;
  514. vertical-align: top;
  515. }
  516. /*新增图文*/
  517. /*瀑布流样式*/
  518. .waterfall {
  519. width: 100%;
  520. column-gap: 10px;
  521. column-count: 5;
  522. margin: 0 auto;
  523. }
  524. .waterfall-item {
  525. padding: 10px;
  526. margin-bottom: 10px;
  527. break-inside: avoid;
  528. border: 1px solid #eaeaea;
  529. }
  530. p {
  531. line-height: 30px;
  532. }
  533. @media (min-width: 992px) and (max-width: 1300px) {
  534. .waterfall {
  535. column-count: 3;
  536. }
  537. p {
  538. color: red;
  539. }
  540. }
  541. @media (min-width: 768px) and (max-width: 991px) {
  542. .waterfall {
  543. column-count: 2;
  544. }
  545. p {
  546. color: orange;
  547. }
  548. }
  549. @media (max-width: 767px) {
  550. .waterfall {
  551. column-count: 1;
  552. }
  553. }
  554. /*瀑布流样式*/
  555. .news-main {
  556. background-color: #FFFFFF;
  557. width: 100%;
  558. margin: auto;
  559. height: 120px;
  560. }
  561. .news-content {
  562. background-color: #acadae;
  563. width: 100%;
  564. height: 120px;
  565. position: relative;
  566. }
  567. .news-content-title {
  568. display: inline-block;
  569. font-size: 15px;
  570. color: #FFFFFF;
  571. position: absolute;
  572. left: 0px;
  573. bottom: 0px;
  574. background-color: black;
  575. width: 98%;
  576. padding: 1%;
  577. opacity: 0.65;
  578. overflow: hidden;
  579. text-overflow: ellipsis;
  580. white-space: nowrap;
  581. height: 25px;
  582. }
  583. .news-main-item {
  584. background-color: #FFFFFF;
  585. padding: 5px 0px;
  586. border-top: 1px solid #eaeaea;
  587. width: 100%;
  588. margin: auto;
  589. }
  590. .news-content-item {
  591. position: relative;
  592. margin-left: -3px
  593. }
  594. .news-content-item-title {
  595. display: inline-block;
  596. font-size: 12px;
  597. width: 70%;
  598. }
  599. .news-content-item-img {
  600. display: inline-block;
  601. width: 25%;
  602. background-color: #acadae
  603. }
  604. .input-tt {
  605. padding: 5px;
  606. }
  607. .activeAddNews {
  608. border: 5px solid #2bb673;
  609. }
  610. .news-main-plus {
  611. width: 280px;
  612. text-align: center;
  613. margin: auto;
  614. height: 50px;
  615. }
  616. .icon-plus {
  617. margin: 10px;
  618. font-size: 25px;
  619. }
  620. .select-item {
  621. width: 60%;
  622. padding: 10px;
  623. margin: 0 auto 10px auto;
  624. border: 1px solid #eaeaea;
  625. }
  626. .father .child {
  627. display: none;
  628. text-align: center;
  629. position: relative;
  630. bottom: 25px;
  631. }
  632. .father:hover .child {
  633. display: block;
  634. }
  635. .thumb-div {
  636. display: inline-block;
  637. width: 30%;
  638. text-align: center;
  639. }
  640. .thumb-but {
  641. margin: 5px;
  642. }
  643. .material-img {
  644. width: 100%;
  645. height: 100%;
  646. }
  647. </style>