main.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. <!--
  2. - Copyright (C) 2018-2019
  3. - All rights reserved, Designed By www.joolun.com
  4. 芋道源码:
  5. ① 移除多余的 rep 为前缀的变量,让 message 消息更简单
  6. ② 代码优化,补充注释,提升阅读性
  7. ③ 优化消息的临时缓存策略,发送消息时,只清理被发送消息的 tab,不会强制切回到 text 输入
  8. ④ 支持发送【视频】消息时,支持新建视频
  9. -->
  10. <template>
  11. <el-tabs type="border-card" v-model="objDataRef.type" @tab-click="handleClick">
  12. <!-- 类型 1:文本 -->
  13. <el-tab-pane name="text">
  14. <template #label>
  15. <el-row align="middle">
  16. <icon icon="ep:document" />
  17. 文本
  18. </el-row>
  19. </template>
  20. <el-input
  21. type="textarea"
  22. :rows="5"
  23. placeholder="请输入内容"
  24. v-model="objDataRef.content"
  25. @input="inputContent"
  26. />
  27. </el-tab-pane>
  28. <!-- 类型 2:图片 -->
  29. <el-tab-pane name="image">
  30. <template #label>
  31. <el-row align="middle">
  32. <icon icon="ep:picture" class="mr-5px" />
  33. 图片
  34. </el-row>
  35. </template>
  36. <!-- 情况一:已经选择好素材、或者上传好图片 -->
  37. <div class="select-item" v-if="objDataRef.url">
  38. <img class="material-img" :src="objDataRef.url" />
  39. <p class="item-name" v-if="objDataRef.name">{{ objDataRef.name }}</p>
  40. <el-row class="ope-row">
  41. <el-button type="danger" circle @click="deleteObj">
  42. <icon icon="ep:delete" />
  43. </el-button>
  44. </el-row>
  45. </div>
  46. <!-- 情况二:未做完上述操作 -->
  47. <el-row v-else style="text-align: center" align="middle">
  48. <!-- 选择素材 -->
  49. <el-col :span="12" class="col-select">
  50. <el-button type="success" @click="openMaterial">
  51. 素材库选择
  52. <icon icon="ep:circle-check" />
  53. </el-button>
  54. <el-dialog title="选择图片" v-model="dialogImageVisible" width="90%" append-to-body>
  55. <wx-material-select :obj-data="objDataRef" @selectMaterial="selectMaterial" />
  56. </el-dialog>
  57. </el-col>
  58. <!-- 文件上传 -->
  59. <el-col :span="12" class="col-add">
  60. <el-upload
  61. :action="actionUrl"
  62. :headers="headers"
  63. multiple
  64. :limit="1"
  65. :file-list="fileList"
  66. :data="uploadData"
  67. :before-upload="beforeImageUpload"
  68. :on-success="handleUploadSuccess"
  69. >
  70. <el-button type="primary">上传图片</el-button>
  71. <template #tip>
  72. <span>
  73. <div class="el-upload__tip"
  74. >支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M</div
  75. ></span
  76. >
  77. </template>
  78. </el-upload>
  79. </el-col>
  80. </el-row>
  81. </el-tab-pane>
  82. <!-- 类型 3:语音 -->
  83. <el-tab-pane name="voice">
  84. <template #label>
  85. <el-row align="middle">
  86. <icon icon="ep:phone" />
  87. 语音
  88. </el-row>
  89. </template>
  90. <div class="select-item2" v-if="objDataRef.url">
  91. <p class="item-name">{{ objDataRef.name }}</p>
  92. <div class="item-infos">
  93. <wx-voice-player :url="objDataRef.url" />
  94. </div>
  95. <el-row class="ope-row">
  96. <el-button type="danger" icon="el-icon-delete" circle @click="deleteObj" />
  97. </el-row>
  98. </div>
  99. <el-row v-else style="text-align: center">
  100. <!-- 选择素材 -->
  101. <el-col :span="12" class="col-select">
  102. <el-button type="success" @click="openMaterial">
  103. 素材库选择<i class="el-icon-circle-check el-icon--right"></i>
  104. </el-button>
  105. <el-dialog title="选择语音" v-model="dialogVoiceVisible" width="90%" append-to-body>
  106. <WxMaterialSelect :objData="objData" @selectMaterial="selectMaterial" />
  107. </el-dialog>
  108. </el-col>
  109. <!-- 文件上传 -->
  110. <el-col :span="12" class="col-add">
  111. <el-upload
  112. :action="actionUrl"
  113. :headers="headers"
  114. multiple
  115. :limit="1"
  116. :file-list="fileList"
  117. :data="uploadData"
  118. :before-upload="beforeVoiceUpload"
  119. :on-success="handleUploadSuccess"
  120. >
  121. <el-button type="primary">点击上传</el-button>
  122. <template #tip>
  123. <div class="el-upload__tip"
  124. >格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
  125. </div>
  126. </template>
  127. </el-upload>
  128. </el-col>
  129. </el-row>
  130. </el-tab-pane>
  131. <!-- 类型 4:视频 -->
  132. <el-tab-pane name="video">
  133. <template #label>
  134. <el-row align="middle">
  135. <icon icon="ep:share" />
  136. 视频
  137. </el-row>
  138. </template>
  139. <el-row>
  140. <el-input
  141. v-model="objDataRef.title"
  142. class="input-margin-bottom"
  143. placeholder="请输入标题"
  144. @input="inputContent"
  145. />
  146. <el-input
  147. class="input-margin-bottom"
  148. v-model="objDataRef.description"
  149. placeholder="请输入描述"
  150. @input="inputContent"
  151. />
  152. <div style="text-align: center">
  153. <wx-video-player v-if="objDataRef.url" :url="objDataRef.url" />
  154. </div>
  155. <el-col>
  156. <el-row style="text-align: center" align="middle">
  157. <!-- 选择素材 -->
  158. <el-col :span="12">
  159. <el-button type="success" @click="openMaterial">
  160. 素材库选择
  161. <icon icon="ep:circle-check" />
  162. </el-button>
  163. <el-dialog title="选择视频" v-model="dialogVideoVisible" width="90%" append-to-body>
  164. <wx-material-select :objData="objDataRef" @selectMaterial="selectMaterial" />
  165. </el-dialog>
  166. </el-col>
  167. <!-- 文件上传 -->
  168. <el-col :span="12">
  169. <el-upload
  170. :action="actionUrl"
  171. :headers="headers"
  172. multiple
  173. :limit="1"
  174. :file-list="fileList"
  175. :data="uploadData"
  176. :before-upload="beforeVideoUpload"
  177. :on-success="handleUploadSuccess"
  178. >
  179. <el-button type="primary"
  180. >新建视频
  181. <icon icon="ep:upload" />
  182. </el-button>
  183. </el-upload>
  184. </el-col>
  185. </el-row>
  186. </el-col>
  187. </el-row>
  188. </el-tab-pane>
  189. <!-- 类型 5:图文 -->
  190. <el-tab-pane name="news">
  191. <template #label>
  192. <el-row align="middle">
  193. <icon icon="ep:reading" />
  194. 图文
  195. </el-row>
  196. </template>
  197. <el-row>
  198. <div class="select-item" v-if="objDataRef.articles.size > 0">
  199. <wx-news :articles="objDataRef.articles" />
  200. <el-col class="ope-row">
  201. <el-button type="danger" circle @click="deleteObj">
  202. <icon icon="ep:delete" />
  203. </el-button>
  204. </el-col>
  205. </div>
  206. <!-- 选择素材 -->
  207. <el-col :span="24" v-if="!objDataRef.content">
  208. <el-row style="text-align: center" align="middle">
  209. <el-col :span="24">
  210. <el-button type="success" @click="openMaterial"
  211. >{{ newsType === '1' ? '选择已发布图文' : '选择草稿箱图文' }}
  212. <icon icon="ep:circle-check" />
  213. </el-button>
  214. </el-col>
  215. </el-row>
  216. </el-col>
  217. <el-dialog title="选择图文" v-model="dialogNewsVisible" width="90%" append-to-body>
  218. <wx-material-select
  219. :objData="objDataRef"
  220. @selectMaterial="selectMaterial"
  221. :newsType="newsType"
  222. />
  223. </el-dialog>
  224. </el-row>
  225. </el-tab-pane>
  226. <!-- 类型 6:音乐 -->
  227. <el-tab-pane name="music">
  228. <template #label>
  229. <el-row align="middle">
  230. <icon icon="ep:service" />
  231. 音乐
  232. </el-row>
  233. </template>
  234. <el-row align="middle" justify="center">
  235. <el-col :span="6">
  236. <el-row align="middle" justify="center" class="thumb-div">
  237. <el-col :span="24">
  238. <el-row align="middle" justify="center">
  239. <img
  240. style="width: 100px"
  241. v-if="objDataRef.thumbMediaUrl"
  242. :src="objDataRef.thumbMediaUrl"
  243. />
  244. <icon v-else icon="ep:plus" />
  245. </el-row>
  246. <el-row align="middle" justify="center" style="margin-top: 2%">
  247. <div class="thumb-but">
  248. <el-upload
  249. :action="actionUrl"
  250. :headers="headers"
  251. multiple
  252. :limit="1"
  253. :file-list="fileList"
  254. :data="uploadData"
  255. :before-upload="beforeThumbImageUpload"
  256. :on-success="handleUploadSuccess"
  257. >
  258. <template #trigger>
  259. <el-button type="text">本地上传</el-button>
  260. </template>
  261. <el-button type="text" @click="openMaterial" style="margin-left: 5px"
  262. >素材库选择
  263. </el-button>
  264. </el-upload>
  265. </div>
  266. </el-row>
  267. </el-col>
  268. </el-row>
  269. <el-dialog title="选择图片" v-model="dialogThumbVisible" width="80%" append-to-body>
  270. <wx-material-select
  271. :objData="{ type: 'image', accountId: objDataRef.accountId }"
  272. @selectMaterial="selectMaterial"
  273. />
  274. </el-dialog>
  275. </el-col>
  276. <el-col :span="18">
  277. <el-input v-model="objDataRef.title" placeholder="请输入标题" @input="inputContent" />
  278. <div style="margin: 20px 0"></div>
  279. <el-input
  280. v-model="objDataRef.description"
  281. placeholder="请输入描述"
  282. @input="inputContent"
  283. />
  284. </el-col>
  285. </el-row>
  286. <div style="margin: 20px 0"></div>
  287. <el-input v-model="objDataRef.musicUrl" placeholder="请输入音乐链接" @input="inputContent" />
  288. <div style="margin: 20px 0"></div>
  289. <el-input
  290. v-model="objDataRef.hqMusicUrl"
  291. placeholder="请输入高质量音乐链接"
  292. @input="inputContent"
  293. />
  294. </el-tab-pane>
  295. </el-tabs>
  296. </template>
  297. <script lang="ts" name="WxReplySelect">
  298. import WxNews from '@/views/mp/components/wx-news/main.vue'
  299. import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
  300. import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
  301. import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'
  302. import { getAccessToken } from '@/utils/auth'
  303. import { defineComponent } from 'vue'
  304. export default defineComponent({
  305. components: {
  306. WxNews,
  307. WxMaterialSelect,
  308. WxVoicePlayer,
  309. WxVideoPlayer
  310. },
  311. props: {
  312. objData: {
  313. // 消息对象。
  314. type: Object, // 设置为 Object 的原因,方便属性的传递
  315. required: true
  316. },
  317. newsType: {
  318. // 图文类型:1、已发布图文;2、草稿箱图文
  319. type: String,
  320. default: '1'
  321. }
  322. },
  323. setup(props) {
  324. const objDataRef = reactive(props.objData)
  325. const message = useMessage() // 消息弹窗
  326. const tempObj = new Map().set(objDataRef.type, Object.assign({}, objDataRef))
  327. // ========== 素材选择的弹窗,是否可见 ==========
  328. const dialogNewsVisible = ref(false) // 图文
  329. const dialogImageVisible = ref(false) // 图片
  330. const dialogVoiceVisible = ref(false) // 语音
  331. const dialogVideoVisible = ref(false) // 视频
  332. const dialogThumbVisible = ref(false) // 缩略图
  333. // ========== 文件上传(图片、语音、视频) ==========
  334. const fileList = ref([])
  335. const uploadData = reactive({
  336. accountId: undefined,
  337. type: objDataRef.type,
  338. title: '',
  339. introduction: ''
  340. })
  341. const actionUrl = ref(
  342. import.meta.env.VITE_API_BASEPATH + '/admin-api/mp/material/upload-temporary'
  343. )
  344. const headers = ref({ Authorization: 'Bearer ' + getAccessToken() }) // 设置上传的请求头部
  345. const beforeThumbImageUpload = (file) => {
  346. const isType =
  347. file.type === 'image/jpeg' ||
  348. file.type === 'image/png' ||
  349. file.type === 'image/gif' ||
  350. file.type === 'image/bmp' ||
  351. file.type === 'image/jpg'
  352. if (!isType) {
  353. message.error('上传图片格式不对!')
  354. return false
  355. }
  356. const isLt = file.size / 1024 / 1024 < 2
  357. if (!isLt) {
  358. message.error('上传图片大小不能超过 2M!')
  359. return false
  360. }
  361. uploadData.accountId = objDataRef.accountId
  362. return true
  363. }
  364. const beforeVoiceUpload = (file) => {
  365. // 校验格式
  366. const isType =
  367. file.type === 'audio/mp3' ||
  368. file.type === 'audio/mpeg' ||
  369. file.type === 'audio/wma' ||
  370. file.type === 'audio/wav' ||
  371. file.type === 'audio/amr'
  372. if (!isType) {
  373. message.error('上传语音格式不对!' + file.type)
  374. return false
  375. }
  376. // 校验大小
  377. const isLt = file.size / 1024 / 1024 < 2
  378. if (!isLt) {
  379. message.error('上传语音大小不能超过 2M!')
  380. return false
  381. }
  382. uploadData.accountId = objDataRef.accountId
  383. return true
  384. }
  385. const beforeImageUpload = (file) => {
  386. // 校验格式
  387. const isType =
  388. file.type === 'image/jpeg' ||
  389. file.type === 'image/png' ||
  390. file.type === 'image/gif' ||
  391. file.type === 'image/bmp' ||
  392. file.type === 'image/jpg'
  393. if (!isType) {
  394. message.error('上传图片格式不对!')
  395. return false
  396. }
  397. // 校验大小
  398. const isLt = file.size / 1024 / 1024 < 2
  399. if (!isLt) {
  400. message.error('上传图片大小不能超过 2M!')
  401. return false
  402. }
  403. uploadData.accountId = objDataRef.accountId
  404. return true
  405. }
  406. const beforeVideoUpload = (file) => {
  407. // 校验格式
  408. const isType = file.type === 'video/mp4'
  409. if (!isType) {
  410. message.error('上传视频格式不对!')
  411. return false
  412. }
  413. // 校验大小
  414. const isLt = file.size / 1024 / 1024 < 10
  415. if (!isLt) {
  416. message.error('上传视频大小不能超过 10M!')
  417. return false
  418. }
  419. uploadData.accountId = objDataRef.accountId
  420. return true
  421. }
  422. const handleUploadSuccess = (response) => {
  423. if (response.code !== 0) {
  424. message.error('上传出错:' + response.msg)
  425. return false
  426. }
  427. // 清空上传时的各种数据
  428. fileList.value = []
  429. uploadData.title = ''
  430. uploadData.introduction = ''
  431. // 上传好的文件,本质是个素材,所以可以进行选中
  432. let item = response.data
  433. selectMaterial(item)
  434. }
  435. /**
  436. * 切换消息类型的 tab
  437. *
  438. * @param tab tab 没用 暂时删了tab
  439. */
  440. const handleClick = () => {
  441. // 设置后续文件上传的文件类型
  442. uploadData.type = objDataRef.type
  443. if (uploadData.type === 'music') {
  444. // 【音乐】上传的是缩略图
  445. uploadData.type = 'thumb'
  446. }
  447. // 从 tempObj 临时缓存中,获取对应的数据,并设置回 objDataRef
  448. let tempObjItem = tempObj.get(objDataRef.type)
  449. if (tempObjItem) {
  450. objDataRef.content = tempObjItem.content ? tempObjItem.content : null
  451. objDataRef.mediaId = tempObjItem.mediaId ? tempObjItem.mediaId : null
  452. objDataRef.url = tempObjItem.url ? tempObjItem.url : null
  453. objDataRef.name = tempObjItem.url ? tempObjItem.name : null
  454. objDataRef.title = tempObjItem.title ? tempObjItem.title : null
  455. objDataRef.description = tempObjItem.description ? tempObjItem.description : null
  456. return
  457. }
  458. // 如果获取不到,需要把 objDataRef 复原
  459. // 必须使用 $set 赋值,不然 input 无法输入内容
  460. objDataRef.content = ''
  461. objDataRef.mediaId = ''
  462. objDataRef.url = ''
  463. objDataRef.title = ''
  464. objDataRef.description = ''
  465. }
  466. /**
  467. * 选择素材,将设置设置到 objDataRef 变量
  468. *
  469. * @param item 素材
  470. */
  471. const selectMaterial = (item) => {
  472. // 选择好素材,所以隐藏弹窗
  473. closeMaterial()
  474. // 创建 tempObjItem 对象,并设置对应的值
  475. let tempObjItem = {
  476. type: '',
  477. articles: '',
  478. thumbMediaId: '',
  479. thumbMediaUrl: '',
  480. introduction: '',
  481. title: '',
  482. musicUrl: '',
  483. hqMusicUrl: '',
  484. mediaId: '',
  485. url: '',
  486. name: '',
  487. description: ''
  488. }
  489. tempObjItem.type = objDataRef.type
  490. if (objDataRef.type === 'news') {
  491. tempObjItem.articles = item.content.newsItem
  492. objDataRef.articles = item.content.newsItem
  493. } else if (objDataRef.type === 'music') {
  494. // 音乐需要特殊处理,因为选择的是图片的缩略图
  495. tempObjItem.thumbMediaId = item.mediaId
  496. objDataRef.thumbMediaId = item.mediaId
  497. tempObjItem.thumbMediaUrl = item.url
  498. objDataRef.thumbMediaUrl = item.url
  499. // title、introduction、musicUrl、hqMusicUrl:从 objDataRef 到 tempObjItem,避免上传素材后,被覆盖掉
  500. tempObjItem.title = objDataRef.title || ''
  501. tempObjItem.introduction = objDataRef.introduction || ''
  502. tempObjItem.musicUrl = objDataRef.musicUrl || ''
  503. tempObjItem.hqMusicUrl = objDataRef.hqMusicUrl || ''
  504. } else if (objDataRef.type === 'image' || objDataRef.type === 'voice') {
  505. tempObjItem.mediaId = item.mediaId
  506. objDataRef.mediaId = item.mediaId
  507. tempObjItem.url = item.url
  508. objDataRef.url = item.url
  509. tempObjItem.name = item.name
  510. objDataRef.name = item.name
  511. } else if (objDataRef.type === 'video') {
  512. tempObjItem.mediaId = item.mediaId
  513. objDataRef.mediaId = item.mediaId
  514. tempObjItem.url = item.url
  515. objDataRef.url = item.url
  516. tempObjItem.name = item.name
  517. objDataRef.name = item.name
  518. // title、introduction:从 item 到 tempObjItem,因为素材里有 title、introduction
  519. if (item.title) {
  520. objDataRef.title = item.title || ''
  521. tempObjItem.title = item.title || ''
  522. }
  523. if (item.introduction) {
  524. objDataRef.description = item.introduction || '' // 消息使用的是 description,素材使用的是 introduction,所以转换下
  525. tempObjItem.description = item.introduction || ''
  526. }
  527. } else if (objDataRef.type === 'text') {
  528. objDataRef.content = item.content || ''
  529. }
  530. // 最终设置到临时缓存
  531. tempObj.set(objDataRef.type, tempObjItem)
  532. }
  533. const openMaterial = () => {
  534. if (objDataRef.type === 'news') {
  535. dialogNewsVisible.value = true
  536. } else if (objDataRef.type === 'image') {
  537. dialogImageVisible.value = true
  538. } else if (objDataRef.type === 'voice') {
  539. dialogVoiceVisible.value = true
  540. } else if (objDataRef.type === 'video') {
  541. dialogVideoVisible.value = true
  542. } else if (objDataRef.type === 'music') {
  543. dialogThumbVisible.value = true
  544. }
  545. }
  546. const closeMaterial = () => {
  547. dialogNewsVisible.value = false
  548. dialogImageVisible.value = false
  549. dialogVoiceVisible.value = false
  550. dialogVideoVisible.value = false
  551. dialogThumbVisible.value = false
  552. }
  553. const deleteObj = () => {
  554. if (objDataRef.type === 'news') {
  555. objDataRef.articles = ''
  556. } else if (objDataRef.type === 'image') {
  557. objDataRef.mediaId = null
  558. objDataRef.url = null
  559. objDataRef.name = null
  560. } else if (objDataRef.type === 'voice') {
  561. objDataRef.mediaId = null
  562. objDataRef.url = null
  563. objDataRef.name = null
  564. } else if (objDataRef.type === 'video') {
  565. objDataRef.mediaId = null
  566. objDataRef.url = null
  567. objDataRef.name = null
  568. objDataRef.title = null
  569. objDataRef.description = null
  570. } else if (objDataRef.type === 'music') {
  571. objDataRef.thumbMediaId = null
  572. objDataRef.thumbMediaUrl = null
  573. objDataRef.title = null
  574. objDataRef.description = null
  575. objDataRef.musicUrl = null
  576. objDataRef.hqMusicUrl = null
  577. } else if (objDataRef.type === 'text') {
  578. objDataRef.content = null
  579. }
  580. // 覆盖缓存
  581. tempObj.set(objDataRef.type, Object.assign({}, objDataRef))
  582. }
  583. /**
  584. * 输入时,缓存每次 objDataRef 到 tempObj 中
  585. *
  586. * why?不确定为什么 v-model="objDataRef.content" 不能自动缓存,所以通过这样的方式
  587. */
  588. const inputContent = () => {
  589. // 覆盖缓存
  590. tempObj.set(objDataRef.type, Object.assign({}, objDataRef))
  591. }
  592. return {
  593. inputContent,
  594. dialogNewsVisible,
  595. deleteObj,
  596. openMaterial,
  597. handleClick,
  598. beforeImageUpload,
  599. beforeVoiceUpload,
  600. handleUploadSuccess,
  601. beforeVideoUpload,
  602. selectMaterial,
  603. dialogImageVisible,
  604. dialogVoiceVisible,
  605. dialogThumbVisible,
  606. actionUrl,
  607. objDataRef,
  608. headers,
  609. fileList,
  610. beforeThumbImageUpload,
  611. uploadData,
  612. dialogVideoVisible
  613. }
  614. }
  615. })
  616. </script>
  617. <style lang="scss" scoped>
  618. .public-account-management {
  619. .el-input {
  620. width: 70%;
  621. margin-right: 2%;
  622. }
  623. }
  624. .pagination {
  625. text-align: right;
  626. margin-right: 25px;
  627. }
  628. .select-item {
  629. width: 280px;
  630. padding: 10px;
  631. margin: 0 auto 10px auto;
  632. border: 1px solid #eaeaea;
  633. }
  634. .select-item2 {
  635. padding: 10px;
  636. margin: 0 auto 10px auto;
  637. border: 1px solid #eaeaea;
  638. }
  639. .ope-row {
  640. padding-top: 10px;
  641. text-align: center;
  642. }
  643. .input-margin-bottom {
  644. margin-bottom: 2%;
  645. }
  646. .item-name {
  647. font-size: 12px;
  648. overflow: hidden;
  649. text-overflow: ellipsis;
  650. white-space: nowrap;
  651. text-align: center;
  652. }
  653. .el-form-item__content {
  654. line-height: unset !important;
  655. }
  656. .col-select {
  657. border: 1px solid rgb(234, 234, 234);
  658. padding: 50px 0px;
  659. height: 160px;
  660. width: 49.5%;
  661. }
  662. .col-select2 {
  663. border: 1px solid rgb(234, 234, 234);
  664. padding: 50px 0px;
  665. height: 160px;
  666. }
  667. .col-add {
  668. border: 1px solid rgb(234, 234, 234);
  669. padding: 50px 0px;
  670. height: 160px;
  671. width: 49.5%;
  672. float: right;
  673. }
  674. .avatar-uploader-icon {
  675. border: 1px solid #d9d9d9;
  676. font-size: 28px;
  677. color: #8c939d;
  678. width: 100px !important;
  679. height: 100px !important;
  680. line-height: 100px !important;
  681. text-align: center;
  682. }
  683. .material-img {
  684. width: 100%;
  685. }
  686. .thumb-div {
  687. display: inline-block;
  688. text-align: center;
  689. }
  690. .item-infos {
  691. width: 30%;
  692. margin: auto;
  693. }
  694. </style>