index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <template>
  2. <doc-alert title="公众号菜单" url="https://doc.iocoder.cn/mp/menu/" />
  3. <!-- 搜索工作栏 -->
  4. <ContentWrap>
  5. <el-form class="-mb-15px" ref="queryFormRef" :inline="true" label-width="68px">
  6. <el-form-item label="公众号" prop="accountId">
  7. <WxMpSelect @change="onAccountChanged" />
  8. </el-form-item>
  9. </el-form>
  10. </ContentWrap>
  11. <!-- 列表 -->
  12. <ContentWrap>
  13. <div class="public-account-management clearfix" v-loading="loading">
  14. <!--左边配置菜单-->
  15. <div class="left">
  16. <div class="weixin-hd">
  17. <div class="weixin-title">{{ accountName }}</div>
  18. </div>
  19. <div class="weixin-menu menu_main clearfix">
  20. <div class="menu_bottom" v-for="(item, i) of menuList" :key="i">
  21. <!-- 一级菜单 -->
  22. <div @click="menuClick(i, item)" class="menu_item" :class="{ active: isActive === i }"
  23. ><Icon icon="ep:fold" color="black" />{{ item.name }}
  24. </div>
  25. <!-- 以下为二级菜单-->
  26. <div class="submenu" v-if="isSubMenuFlag === i">
  27. <div class="subtitle menu_bottom" v-for="(subItem, k) in item.children" :key="k">
  28. <div
  29. class="menu_subItem"
  30. v-if="item.children"
  31. :class="{ active: isSubMenuActive === i + '' + k }"
  32. @click="subMenuClick(subItem, i, k)"
  33. >
  34. {{ subItem.name }}
  35. </div>
  36. </div>
  37. <!-- 二级菜单加号, 当长度 小于 5 才显示二级菜单的加号 -->
  38. <div
  39. class="menu_bottom menu_addicon"
  40. v-if="!item.children || item.children.length < 5"
  41. @click="addSubMenu(i, item)"
  42. >
  43. <Icon icon="ep:plus" />
  44. </div>
  45. </div>
  46. </div>
  47. <!-- 一级菜单加号 -->
  48. <div class="menu_bottom menu_addicon" v-if="menuList.length < 3" @click="addMenu">
  49. <Icon icon="ep:plus" />
  50. </div>
  51. </div>
  52. <div class="save_div">
  53. <el-button
  54. class="save_btn"
  55. type="success"
  56. @click="handleSave"
  57. v-hasPermi="['mp:menu:save']"
  58. >保存并发布菜单</el-button
  59. >
  60. <el-button
  61. class="save_btn"
  62. type="danger"
  63. @click="handleDelete"
  64. v-hasPermi="['mp:menu:delete']"
  65. >清空菜单</el-button
  66. >
  67. </div>
  68. </div>
  69. <!--右边配置-->
  70. <div v-if="showRightFlag" class="right">
  71. <div class="configure_page">
  72. <div class="delete_btn">
  73. <el-button size="small" type="danger" @click="handleDeleteMenu">
  74. 删除当前菜单<Icon icon="ep:delete" />
  75. </el-button>
  76. </div>
  77. <div>
  78. <span>菜单名称:</span>
  79. <el-input
  80. class="input_width"
  81. v-model="tempObj.name"
  82. placeholder="请输入菜单名称"
  83. :maxlength="nameMaxLength"
  84. clearable
  85. />
  86. </div>
  87. <div v-if="showConfigureContent">
  88. <div class="menu_content">
  89. <span>菜单标识:</span>
  90. <el-input
  91. class="input_width"
  92. v-model="tempObj.menuKey"
  93. placeholder="请输入菜单 KEY"
  94. clearable
  95. />
  96. </div>
  97. <div class="menu_content">
  98. <span>菜单内容:</span>
  99. <el-select v-model="tempObj.type" clearable placeholder="请选择" class="menu_option">
  100. <el-option
  101. v-for="item in menuOptions"
  102. :label="item.label"
  103. :value="item.value"
  104. :key="item.value"
  105. />
  106. </el-select>
  107. </div>
  108. <div class="configur_content" v-if="tempObj.type === 'view'">
  109. <span>跳转链接:</span>
  110. <el-input
  111. class="input_width"
  112. v-model="tempObj.url"
  113. placeholder="请输入链接"
  114. clearable
  115. />
  116. </div>
  117. <div class="configur_content" v-if="tempObj.type === 'miniprogram'">
  118. <div class="applet">
  119. <span>小程序的 appid :</span>
  120. <el-input
  121. class="input_width"
  122. v-model="tempObj.miniProgramAppId"
  123. placeholder="请输入小程序的appid"
  124. clearable
  125. />
  126. </div>
  127. <div class="applet">
  128. <span>小程序的页面路径:</span>
  129. <el-input
  130. class="input_width"
  131. v-model="tempObj.miniProgramPagePath"
  132. placeholder="请输入小程序的页面路径,如:pages/index"
  133. clearable
  134. />
  135. </div>
  136. <div class="applet">
  137. <span>小程序的备用网页:</span>
  138. <el-input
  139. class="input_width"
  140. v-model="tempObj.url"
  141. placeholder="不支持小程序的老版本客户端将打开本网页"
  142. clearable
  143. />
  144. </div>
  145. <p class="blue">tips:需要和公众号进行关联才可以把小程序绑定带微信菜单上哟!</p>
  146. </div>
  147. <div class="configur_content" v-if="tempObj.type === 'article_view_limited'">
  148. <el-row>
  149. <div class="select-item" v-if="tempObj && tempObj.replyArticles">
  150. <WxNews :articles="tempObj.replyArticles" />
  151. <el-row class="ope-row" justify="center" align="middle">
  152. <el-button type="danger" circle @click="deleteMaterial">
  153. <icon icon="ep:delete" />
  154. </el-button>
  155. </el-row>
  156. </div>
  157. <div v-else>
  158. <el-row justify="center">
  159. <el-col :span="24" style="text-align: center">
  160. <el-button type="success" @click="dialogNewsVisible = true">
  161. 素材库选择<Icon icon="ep:circle-check" />
  162. </el-button>
  163. </el-col>
  164. </el-row>
  165. </div>
  166. <el-dialog title="选择图文" v-model="dialogNewsVisible" width="90%">
  167. <WxMaterialSelect
  168. :objData="{ type: 'news', accountId: accountId }"
  169. @select-material="selectMaterial"
  170. />
  171. </el-dialog>
  172. </el-row>
  173. </div>
  174. <div
  175. class="configur_content"
  176. v-if="tempObj.type === 'click' || tempObj.type === 'scancode_waitmsg'"
  177. >
  178. <WxReplySelect :objData="tempObj.reply" v-if="hackResetWxReplySelect" />
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. <!-- 一进页面就显示的默认页面,当点击左边按钮的时候,就不显示了-->
  184. <div v-else class="right">
  185. <p>请选择菜单配置</p>
  186. </div>
  187. </div>
  188. </ContentWrap>
  189. </template>
  190. <script lang="ts" setup name="MpMenu">
  191. import WxReplySelect from '@/views/mp/components/wx-reply/main.vue'
  192. import WxNews from '@/views/mp/components/wx-news/main.vue'
  193. import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
  194. import WxMpSelect from '@/views/mp/components/WxMpSelect.vue'
  195. import * as MpMenuApi from '@/api/mp/menu'
  196. import { handleTree } from '@/utils/tree'
  197. import menuOptions from './menuOptions'
  198. const message = useMessage() // 消息
  199. // ======================== 列表查询 ========================
  200. const loading = ref(false) // 遮罩层
  201. const accountId = ref<number | undefined>()
  202. const accountName = ref<string | undefined>('')
  203. const menuList = ref<any>({ children: [] })
  204. // ======================== 菜单操作 ========================
  205. const isActive = ref(-1) // 一级菜单点中样式
  206. const isSubMenuActive = ref<string | number>(-1) // 一级菜单点中样式
  207. const isSubMenuFlag = ref(-1) // 二级菜单显示标志
  208. // ======================== 菜单编辑 ========================
  209. const showRightFlag = ref(false) // 右边配置显示默认详情还是配置详情
  210. const nameMaxLength = ref(0) // 菜单名称最大长度;1 级是 4 字符;2 级是 7 字符;
  211. const showConfigureContent = ref(true) // 是否展示配置内容;如果有子菜单,就不显示配置内容
  212. const hackResetWxReplySelect = ref(false) // 重置 WxReplySelect 组件
  213. const tempObj = ref<any>({}) // 右边临时变量,作为中间值牵引关系
  214. // 一些临时值放在这里进行判断,如果放在 tempObj,由于引用关系,menu 也会多了多余的参数
  215. const tempSelfObj = ref<any>({})
  216. const dialogNewsVisible = ref(false) // 跳转图文时的素材选择弹窗
  217. /** 侦听公众号变化 **/
  218. const onAccountChanged = (id?: number, name?: string) => {
  219. accountId.value = id
  220. accountName.value = name
  221. getList()
  222. }
  223. /** 查询并转换菜单 **/
  224. const getList = async () => {
  225. loading.value = false
  226. try {
  227. const data = await MpMenuApi.getMenuList(accountId.value)
  228. const menuData = convertMenuList(data)
  229. menuList.value = handleTree(menuData, 'id')
  230. } finally {
  231. loading.value = false
  232. }
  233. }
  234. /** 搜索按钮操作 */
  235. const handleQuery = () => {
  236. resetForm()
  237. getList()
  238. }
  239. // 将后端返回的 menuList,转换成前端的 menuList
  240. const convertMenuList = (list: any[]) => {
  241. if (!list) return []
  242. const result: any[] = []
  243. list.forEach((item) => {
  244. const menu = {
  245. ...item
  246. }
  247. if (item.type === 'click' || item.type === 'scancode_waitmsg') {
  248. delete menu.replyMessageType
  249. delete menu.replyContent
  250. delete menu.replyMediaId
  251. delete menu.replyMediaUrl
  252. delete menu.replyDescription
  253. delete menu.replyArticles
  254. menu.reply = {
  255. type: item.replyMessageType,
  256. accountId: item.accountId,
  257. content: item.replyContent,
  258. mediaId: item.replyMediaId,
  259. url: item.replyMediaUrl,
  260. title: item.replyTitle,
  261. description: item.replyDescription,
  262. thumbMediaId: item.replyThumbMediaId,
  263. thumbMediaUrl: item.replyThumbMediaUrl,
  264. articles: item.replyArticles,
  265. musicUrl: item.replyMusicUrl,
  266. hqMusicUrl: item.replyHqMusicUrl
  267. }
  268. }
  269. result.push(menu)
  270. })
  271. return result
  272. }
  273. // 重置表单,清空表单数据
  274. const resetForm = () => {
  275. // 菜单操作
  276. isActive.value = -1
  277. isSubMenuActive.value = -1
  278. isSubMenuFlag.value = -1
  279. // 菜单编辑
  280. showRightFlag.value = false
  281. nameMaxLength.value = 0
  282. showConfigureContent.value = false
  283. hackResetWxReplySelect.value = false
  284. tempObj.value = {}
  285. tempSelfObj.value = {}
  286. dialogNewsVisible.value = false
  287. }
  288. // ======================== 菜单操作 ========================
  289. // 一级菜单点击事件
  290. const menuClick = (i: number, item: any) => {
  291. // 右侧的表单相关
  292. resetEditor()
  293. showRightFlag.value = true // 右边菜单
  294. tempObj.value = item // 这个如果放在顶部,flag 会没有。因为重新赋值了。
  295. tempSelfObj.value.grand = '1' // 表示一级菜单
  296. tempSelfObj.value.index = i // 表示一级菜单索引
  297. nameMaxLength.value = 4
  298. showConfigureContent.value = !(item.children && item.children.length > 0) // 有子菜单,就不显示配置内容
  299. // 左侧的选中
  300. isActive.value = i // 一级菜单选中样式
  301. isSubMenuFlag.value = i // 二级菜单显示标志
  302. isSubMenuActive.value = -1 // 二级菜单去除选中样式
  303. }
  304. // 二级菜单点击事件
  305. const subMenuClick = (subItem: any, index: number, k: number) => {
  306. // 右侧的表单相关
  307. resetEditor()
  308. showRightFlag.value = true // 右边菜单
  309. tempObj.value = subItem // 将点击的数据放到临时变量,对象有引用作用
  310. tempSelfObj.value.grand = '2' // 表示二级菜单
  311. tempSelfObj.value.index = index // 表示一级菜单索引
  312. tempSelfObj.value.secondIndex = k // 表示二级菜单索引
  313. nameMaxLength.value = 7
  314. showConfigureContent.value = true
  315. // 左侧的选中
  316. isActive.value = -1 // 一级菜单去除样式
  317. isSubMenuActive.value = index + '' + k // 二级菜单选中样式
  318. }
  319. // 添加横向一级菜单
  320. const addMenu = () => {
  321. const menuKeyLength: number = menuList.value.length
  322. const addButton = {
  323. name: '菜单名称',
  324. children: [],
  325. reply: {
  326. // 用于存储回复内容
  327. type: 'text',
  328. accountId: accountId.value // 保证组件里,可以使用到对应的公众号
  329. }
  330. }
  331. menuList.value[menuKeyLength] = addButton
  332. menuClick(menuKeyLength - 1, addButton)
  333. }
  334. // 添加横向二级菜单;item 表示要操作的父菜单
  335. const addSubMenu = (i: number, item: any) => {
  336. // 清空父菜单的属性,因为它只需要 name 属性即可
  337. if (!item.children || item.children.length <= 0) {
  338. item.children = []
  339. delete item['type']
  340. delete item['menuKey']
  341. delete item['miniProgramAppId']
  342. delete item['miniProgramPagePath']
  343. delete item['url']
  344. delete item['reply']
  345. delete item['articleId']
  346. delete item['replyArticles']
  347. // 关闭配置面板
  348. showConfigureContent.value = false
  349. }
  350. const subMenuKeyLength = item.children.length // 获取二级菜单key长度
  351. const addButton = {
  352. name: '子菜单名称',
  353. reply: {
  354. // 用于存储回复内容
  355. type: 'text',
  356. accountId: accountId.value // 保证组件里,可以使用到对应的公众号
  357. }
  358. }
  359. item.children[subMenuKeyLength] = addButton
  360. subMenuClick(item.children[subMenuKeyLength], i, subMenuKeyLength)
  361. }
  362. // 删除当前菜单
  363. const handleDeleteMenu = async () => {
  364. try {
  365. await message.confirm('确定要删除吗?')
  366. if (tempSelfObj.value.grand === '1') {
  367. // 一级菜单的删除方法
  368. menuList.value.splice(tempSelfObj.value.index, 1)
  369. } else if (tempSelfObj.value.grand === '2') {
  370. // 二级菜单的删除方法
  371. menuList.value[tempSelfObj.value.index].children.splice(tempSelfObj.value.secondIndex, 1)
  372. }
  373. // 提示
  374. message.notifySuccess('删除成功')
  375. // 处理菜单的选中
  376. tempObj.value = {}
  377. showRightFlag.value = false
  378. isActive.value = -1
  379. isSubMenuActive.value = -1
  380. } catch {}
  381. }
  382. // ======================== 菜单编辑 ========================
  383. const handleSave = async () => {
  384. try {
  385. await message.confirm('确定要保存吗?')
  386. loading.value = true
  387. await MpMenuApi.saveMenu(accountId.value, convertMenuFormList())
  388. getList()
  389. message.notifySuccess('发布成功')
  390. } finally {
  391. loading.value = false
  392. }
  393. }
  394. // 表单 Editor 重置
  395. const resetEditor = () => {
  396. hackResetWxReplySelect.value = false // 销毁组件
  397. nextTick(() => {
  398. hackResetWxReplySelect.value = true // 重建组件
  399. })
  400. }
  401. const handleDelete = async () => {
  402. try {
  403. await message.confirm('确定要删除吗?')
  404. loading.value = true
  405. await MpMenuApi.deleteMenu(accountId.value)
  406. handleQuery()
  407. message.notifySuccess('清空成功')
  408. } finally {
  409. loading.value = false
  410. }
  411. }
  412. // 将前端的 menuList,转换成后端接收的 menuList
  413. const convertMenuFormList = () => {
  414. const result: any[] = []
  415. menuList.value.forEach((item) => {
  416. const menu = convertMenuForm(item)
  417. result.push(menu)
  418. // 处理子菜单
  419. if (!item.children || item.children.length <= 0) {
  420. return
  421. }
  422. menu.children = []
  423. item.children.forEach((subItem) => {
  424. menu.children.push(convertMenuForm(subItem))
  425. })
  426. })
  427. return result
  428. }
  429. // 将前端的 menu,转换成后端接收的 menu
  430. const convertMenuForm = (menu: any) => {
  431. let result = {
  432. ...menu,
  433. children: undefined, // 不处理子节点
  434. reply: undefined // 稍后复制
  435. }
  436. if (menu.type === 'click' || menu.type === 'scancode_waitmsg') {
  437. result.replyMessageType = menu.reply.type
  438. result.replyContent = menu.reply.content
  439. result.replyMediaId = menu.reply.mediaId
  440. result.replyMediaUrl = menu.reply.url
  441. result.replyTitle = menu.reply.title
  442. result.replyDescription = menu.reply.description
  443. result.replyThumbMediaId = menu.reply.thumbMediaId
  444. result.replyThumbMediaUrl = menu.reply.thumbMediaUrl
  445. result.replyArticles = menu.reply.articles
  446. result.replyMusicUrl = menu.reply.musicUrl
  447. result.replyHqMusicUrl = menu.reply.hqMusicUrl
  448. }
  449. return result
  450. }
  451. // ======================== 菜单编辑(素材选择) ========================
  452. const selectMaterial = (item: any) => {
  453. const articleId = item.articleId
  454. const articles = item.content.newsItem
  455. // 提示,针对多图文
  456. if (articles.length > 1) {
  457. message.alertWarning('您选择的是多图文,将默认跳转第一篇')
  458. }
  459. dialogNewsVisible.value = false
  460. // 设置菜单的回复
  461. tempObj.value.articleId = articleId
  462. tempObj.value.replyArticles = []
  463. articles.forEach((article) => {
  464. tempObj.value.replyArticles.push({
  465. title: article.title,
  466. description: article.digest,
  467. picUrl: article.picUrl,
  468. url: article.url
  469. })
  470. })
  471. }
  472. const deleteMaterial = () => {
  473. delete tempObj.value['articleId']
  474. delete tempObj.value['replyArticles']
  475. }
  476. </script>
  477. <!--本组件样式-->
  478. <style lang="scss" scoped="scoped">
  479. /* 公共颜色变量 */
  480. .clearfix {
  481. *zoom: 1;
  482. }
  483. .clearfix::after {
  484. content: '';
  485. display: table;
  486. clear: both;
  487. }
  488. div {
  489. text-align: left;
  490. }
  491. .weixin-hd {
  492. color: #fff;
  493. text-align: center;
  494. position: relative;
  495. bottom: 426px;
  496. left: 0px;
  497. width: 300px;
  498. height: 64px;
  499. background: transparent url('./assets/menu_head.png') no-repeat 0 0;
  500. background-position: 0 0;
  501. background-size: 100%;
  502. }
  503. .weixin-title {
  504. color: #fff;
  505. font-size: 14px;
  506. width: 100%;
  507. text-align: center;
  508. position: absolute;
  509. top: 33px;
  510. left: 0px;
  511. }
  512. .weixin-menu {
  513. background: transparent url('./assets/menu_foot.png') no-repeat 0 0;
  514. padding-left: 43px;
  515. font-size: 12px;
  516. }
  517. .menu_option {
  518. width: 40% !important;
  519. }
  520. .public-account-management {
  521. min-width: 1200px;
  522. width: 1200px;
  523. margin: 0 auto;
  524. .left {
  525. float: left;
  526. display: inline-block;
  527. width: 350px;
  528. height: 715px;
  529. background: url('./assets/iphone_backImg.png') no-repeat;
  530. background-size: 100% auto;
  531. padding: 518px 25px 88px;
  532. position: relative;
  533. box-sizing: border-box;
  534. /*第一级菜单*/
  535. .menu_main {
  536. .menu_bottom {
  537. position: relative;
  538. float: left;
  539. display: inline-block;
  540. box-sizing: border-box;
  541. width: 85.5px;
  542. text-align: center;
  543. border: 1px solid #ebedee;
  544. background-color: #fff;
  545. cursor: pointer;
  546. &.menu_addicon {
  547. height: 46px;
  548. line-height: 46px;
  549. }
  550. .menu_item {
  551. height: 44px;
  552. line-height: 44px;
  553. // text-align: center;
  554. box-sizing: border-box;
  555. width: 100%;
  556. display: flex;
  557. align-items: center;
  558. justify-content: center;
  559. &.active {
  560. border: 1px solid #2bb673;
  561. }
  562. }
  563. .menu_subItem {
  564. height: 44px;
  565. line-height: 44px;
  566. text-align: center;
  567. box-sizing: border-box;
  568. &.active {
  569. border: 1px solid #2bb673;
  570. }
  571. }
  572. }
  573. i {
  574. color: #2bb673;
  575. }
  576. /*第二级菜单*/
  577. .submenu {
  578. position: absolute;
  579. width: 85.5px;
  580. bottom: 45px;
  581. .subtitle {
  582. background-color: #fff;
  583. box-sizing: border-box;
  584. }
  585. }
  586. }
  587. .save_div {
  588. margin-top: 15px;
  589. text-align: center;
  590. .save_btn {
  591. bottom: 20px;
  592. left: 100px;
  593. }
  594. }
  595. }
  596. /*右边菜单内容*/
  597. .right {
  598. float: left;
  599. width: 63%;
  600. background-color: #e8e7e7;
  601. padding: 20px;
  602. margin-left: 20px;
  603. -webkit-box-sizing: border-box;
  604. box-sizing: border-box;
  605. .configure_page {
  606. .delete_btn {
  607. text-align: right;
  608. margin-bottom: 15px;
  609. }
  610. .menu_content {
  611. margin-top: 20px;
  612. }
  613. .configur_content {
  614. margin-top: 20px;
  615. background-color: #fff;
  616. padding: 20px 10px;
  617. border-radius: 5px;
  618. }
  619. .blue {
  620. color: #29b6f6;
  621. margin-top: 10px;
  622. }
  623. .applet {
  624. margin-bottom: 20px;
  625. span {
  626. width: 20%;
  627. }
  628. }
  629. .input_width {
  630. width: 40%;
  631. }
  632. .material {
  633. .input_width {
  634. width: 30%;
  635. }
  636. .el-textarea {
  637. width: 80%;
  638. }
  639. }
  640. }
  641. }
  642. .el-input {
  643. width: 70%;
  644. margin-right: 2%;
  645. }
  646. }
  647. </style>
  648. <!--素材样式-->
  649. <style lang="scss" scoped>
  650. .pagination {
  651. text-align: right;
  652. margin-right: 25px;
  653. }
  654. .select-item {
  655. width: 280px;
  656. padding: 10px;
  657. margin: 0 auto 10px auto;
  658. border: 1px solid #eaeaea;
  659. }
  660. .select-item2 {
  661. padding: 10px;
  662. margin: 0 auto 10px auto;
  663. border: 1px solid #eaeaea;
  664. }
  665. .ope-row {
  666. padding-top: 10px;
  667. text-align: center;
  668. }
  669. .item-name {
  670. font-size: 12px;
  671. overflow: hidden;
  672. text-overflow: ellipsis;
  673. white-space: nowrap;
  674. text-align: center;
  675. }
  676. </style>