index.vue 21 KB

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