main.vue 22 KB

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