index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <template>
  2. <doc-alert title="公众号菜单" url="https://doc.iocoder.cn/mp/menu/" />
  3. <!-- 搜索工作栏 -->
  4. <ContentWrap>
  5. <!-- TODO @芋艿:调整成 el-form 和 WxAccountSelect -->
  6. <WxAccountSelect @change="accountChanged" />
  7. </ContentWrap>
  8. <!-- 列表 -->
  9. <ContentWrap>
  10. <div class="public-account-management clearfix" v-loading="loading">
  11. <!--左边配置菜单-->
  12. <div class="left">
  13. <div class="weixin-hd">
  14. <div class="weixin-title">{{ name }}</div>
  15. </div>
  16. <div class="weixin-menu menu_main clearfix">
  17. <div class="menu_bottom" v-for="(item, i) of menuList" :key="i">
  18. <!-- 一级菜单 -->
  19. <div @click="menuClick(i, item)" class="menu_item" :class="{ active: isActive === i }"
  20. ><Icon icon="ep:fold" color="black" />{{ item.name }}
  21. </div>
  22. <!-- 以下为二级菜单-->
  23. <div class="submenu" v-if="isSubMenuFlag === i">
  24. <div class="subtitle menu_bottom" v-for="(subItem, k) in item.children" :key="k">
  25. <div
  26. class="menu_subItem"
  27. v-if="item.children"
  28. :class="{ active: isSubMenuActive === i + '' + k }"
  29. @click="subMenuClick(subItem, i, k)"
  30. >
  31. {{ subItem.name }}
  32. </div>
  33. </div>
  34. <!-- 二级菜单加号, 当长度 小于 5 才显示二级菜单的加号 -->
  35. <div
  36. class="menu_bottom menu_addicon"
  37. v-if="!item.children || item.children.length < 5"
  38. @click="addSubMenu(i, item)"
  39. >
  40. <Icon icon="ep:plus" />
  41. </div>
  42. </div>
  43. </div>
  44. <!-- 一级菜单加号 -->
  45. <div class="menu_bottom menu_addicon" v-if="menuList.length < 3" @click="addMenu">
  46. <Icon icon="ep:plus" />
  47. </div>
  48. </div>
  49. <div class="save_div">
  50. <el-button
  51. class="save_btn"
  52. type="success"
  53. @click="handleSave"
  54. v-hasPermi="['mp:menu:save']"
  55. >保存并发布菜单</el-button
  56. >
  57. <el-button
  58. class="save_btn"
  59. type="danger"
  60. @click="handleDelete"
  61. v-hasPermi="['mp:menu:delete']"
  62. >清空菜单</el-button
  63. >
  64. </div>
  65. </div>
  66. <!--右边配置-->
  67. <div v-if="showRightFlag" class="right">
  68. <div class="configure_page">
  69. <div class="delete_btn">
  70. <el-button size="small" type="danger" @click="handleDeleteMenu(tempObj)">
  71. 删除当前菜单<Icon icon="ep:delete" />
  72. </el-button>
  73. </div>
  74. <div>
  75. <span>菜单名称:</span>
  76. <el-input
  77. class="input_width"
  78. v-model="tempObj.name"
  79. placeholder="请输入菜单名称"
  80. :maxlength="nameMaxLength"
  81. clearable
  82. />
  83. </div>
  84. <div v-if="showConfigureContent">
  85. <div class="menu_content">
  86. <span>菜单标识:</span>
  87. <el-input
  88. class="input_width"
  89. v-model="tempObj.menuKey"
  90. placeholder="请输入菜单 KEY"
  91. clearable
  92. />
  93. </div>
  94. <div class="menu_content">
  95. <span>菜单内容:</span>
  96. <el-select v-model="tempObj.type" clearable placeholder="请选择" class="menu_option">
  97. <el-option
  98. v-for="item in menuOptions"
  99. :label="item.label"
  100. :value="item.value"
  101. :key="item.value"
  102. />
  103. </el-select>
  104. </div>
  105. <div class="configur_content" v-if="tempObj.type === 'view'">
  106. <span>跳转链接:</span>
  107. <el-input
  108. class="input_width"
  109. v-model="tempObj.url"
  110. placeholder="请输入链接"
  111. clearable
  112. />
  113. </div>
  114. <div class="configur_content" v-if="tempObj.type === 'miniprogram'">
  115. <div class="applet">
  116. <span>小程序的 appid :</span>
  117. <el-input
  118. class="input_width"
  119. v-model="tempObj.miniProgramAppId"
  120. placeholder="请输入小程序的appid"
  121. clearable
  122. />
  123. </div>
  124. <div class="applet">
  125. <span>小程序的页面路径:</span>
  126. <el-input
  127. class="input_width"
  128. v-model="tempObj.miniProgramPagePath"
  129. placeholder="请输入小程序的页面路径,如:pages/index"
  130. clearable
  131. />
  132. </div>
  133. <div class="applet">
  134. <span>小程序的备用网页:</span>
  135. <el-input
  136. class="input_width"
  137. v-model="tempObj.url"
  138. placeholder="不支持小程序的老版本客户端将打开本网页"
  139. clearable
  140. />
  141. </div>
  142. <p class="blue">tips:需要和公众号进行关联才可以把小程序绑定带微信菜单上哟!</p>
  143. </div>
  144. <div class="configur_content" v-if="tempObj.type === 'article_view_limited'">
  145. <el-row>
  146. <div class="select-item" v-if="tempObj && tempObj.replyArticles">
  147. <WxNews :articles="tempObj.replyArticles" />
  148. <el-row class="ope-row" justify="center" align="middle">
  149. <el-button type="danger" circle @click="deleteMaterial">
  150. <icon icon="ep:delete" />
  151. </el-button>
  152. </el-row>
  153. </div>
  154. <div v-else>
  155. <el-row justify="center">
  156. <el-col :span="24" style="text-align: center">
  157. <el-button type="success" @click="openMaterial">
  158. 素材库选择<Icon icon="ep:circle-check" />
  159. </el-button>
  160. </el-col>
  161. </el-row>
  162. </div>
  163. <el-dialog title="选择图文" v-model="dialogNewsVisible" width="90%">
  164. <WxMaterialSelect
  165. :objData="{ type: 'news', accountId: accountId }"
  166. @select-material="selectMaterial"
  167. />
  168. </el-dialog>
  169. </el-row>
  170. </div>
  171. <div
  172. class="configur_content"
  173. v-if="tempObj.type === 'click' || tempObj.type === 'scancode_waitmsg'"
  174. >
  175. <WxReplySelect :objData="tempObj.reply" v-if="hackResetWxReplySelect" />
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. <!-- 一进页面就显示的默认页面,当点击左边按钮的时候,就不显示了-->
  181. <div v-else class="right">
  182. <p>请选择菜单配置</p>
  183. </div>
  184. </div>
  185. </ContentWrap>
  186. </template>
  187. <script setup name="MpMenu">
  188. import { handleTree } from '@/utils/tree'
  189. import WxReplySelect from '@/views/mp/components/wx-reply/main.vue'
  190. import WxNews from '@/views/mp/components/wx-news/main.vue'
  191. import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
  192. import WxAccountSelect from '@/views/mp/components/wx-account-select/main.vue'
  193. import * as MpMenuApi from '@/api/mp/menu'
  194. import menuOptions from './menuOptions'
  195. const message = useMessage() // 消息
  196. // ======================== 列表查询 ========================
  197. const loading = ref(true) // 遮罩层
  198. const accountId = ref(undefined) // 公众号Id
  199. const menuList = ref({ children: [] })
  200. // ======================== 菜单操作 ========================
  201. const isActive = ref(-1) // 一级菜单点中样式
  202. const isSubMenuActive = ref(-1) // 一级菜单点中样式
  203. const isSubMenuFlag = ref(-1) // 二级菜单显示标志
  204. // ======================== 菜单编辑 ========================
  205. const showRightFlag = ref(false) // 右边配置显示默认详情还是配置详情
  206. const nameMaxLength = ref(0) // 菜单名称最大长度;1 级是 4 字符;2 级是 7 字符;
  207. const showConfigureContent = ref(true) // 是否展示配置内容;如果有子菜单,就不显示配置内容
  208. const hackResetWxReplySelect = ref(false) // 重置 WxReplySelect 组件
  209. const tempObj = ref({}) // 右边临时变量,作为中间值牵引关系
  210. // 一些临时值放在这里进行判断,如果放在 tempObj,由于引用关系,menu 也会多了多余的参数
  211. const tempSelfObj = ref({})
  212. const dialogNewsVisible = ref(false) // 跳转图文时的素材选择弹窗
  213. /** 侦听公众号变化 **/
  214. const accountChanged = (id) => {
  215. accountId.value = id
  216. getList()
  217. }
  218. /** 查询并转换菜单 **/
  219. const getList = async () => {
  220. loading.value = false
  221. try {
  222. const data = await MpMenuApi.getMenuList(accountId.value)
  223. const menuData = convertMenuList(data)
  224. menuList.value = handleTree(menuData, 'id')
  225. } finally {
  226. loading.value = false
  227. }
  228. }
  229. /** 搜索按钮操作 */
  230. const handleQuery = () => {
  231. resetForm()
  232. getList()
  233. }
  234. // 将后端返回的 menuList,转换成前端的 menuList
  235. const convertMenuList = (list) => {
  236. if (!list) return []
  237. const menuList = []
  238. list.forEach((item) => {
  239. const menu = {
  240. ...item
  241. }
  242. if (item.type === 'click' || item.type === 'scancode_waitmsg') {
  243. delete menu.replyMessageType
  244. delete menu.replyContent
  245. delete menu.replyMediaId
  246. delete menu.replyMediaUrl
  247. delete menu.replyDescription
  248. delete menu.replyArticles
  249. menu.reply = {
  250. type: item.replyMessageType,
  251. accountId: item.accountId,
  252. content: item.replyContent,
  253. mediaId: item.replyMediaId,
  254. url: item.replyMediaUrl,
  255. title: item.replyTitle,
  256. description: item.replyDescription,
  257. thumbMediaId: item.replyThumbMediaId,
  258. thumbMediaUrl: item.replyThumbMediaUrl,
  259. articles: item.replyArticles,
  260. musicUrl: item.replyMusicUrl,
  261. hqMusicUrl: item.replyHqMusicUrl
  262. }
  263. }
  264. menuList.push(menu)
  265. })
  266. return menuList
  267. }
  268. // 重置表单,清空表单数据
  269. const resetForm = () => {
  270. // 菜单操作
  271. isActive.value = -1
  272. isSubMenuActive.value = -1
  273. isSubMenuFlag.value = -1
  274. // 菜单编辑
  275. showRightFlag.value = false
  276. nameMaxLength.value = 0
  277. showConfigureContent.value = 0
  278. hackResetWxReplySelect.value = false
  279. tempObj.value = {}
  280. tempSelfObj.value = {}
  281. dialogNewsVisible.value = false
  282. }
  283. // ======================== 菜单操作 ========================
  284. // 一级菜单点击事件
  285. const menuClick = (i, item) => {
  286. // 右侧的表单相关
  287. resetEditor()
  288. showRightFlag.value = true // 右边菜单
  289. tempObj.value = item // 这个如果放在顶部,flag 会没有。因为重新赋值了。
  290. tempSelfObj.value.grand = '1' // 表示一级菜单
  291. tempSelfObj.value.index = i // 表示一级菜单索引
  292. nameMaxLength.value = 4
  293. showConfigureContent.value = !(item.children && item.children.length > 0) // 有子菜单,就不显示配置内容
  294. // 左侧的选中
  295. isActive.value = i // 一级菜单选中样式
  296. isSubMenuFlag.value = i // 二级菜单显示标志
  297. isSubMenuActive.value = -1 // 二级菜单去除选中样式
  298. }
  299. // 二级菜单点击事件
  300. const subMenuClick = (subItem, index, k) => {
  301. // 右侧的表单相关
  302. resetEditor()
  303. showRightFlag.value = true // 右边菜单
  304. console.log(subItem)
  305. tempObj.value = subItem // 将点击的数据放到临时变量,对象有引用作用
  306. tempSelfObj.value.grand = '2' // 表示二级菜单
  307. tempSelfObj.value.index = index // 表示一级菜单索引
  308. tempSelfObj.value.secondIndex = k // 表示二级菜单索引
  309. nameMaxLength.value = 7
  310. showConfigureContent.value = true
  311. // 左侧的选中
  312. isActive.value = -1 // 一级菜单去除样式
  313. isSubMenuActive.value = index + '' + k // 二级菜单选中样式
  314. }
  315. // 添加横向一级菜单
  316. const addMenu = () => {
  317. const menuKeyLength = menuList.value.length
  318. const addButton = {
  319. name: '菜单名称',
  320. children: [],
  321. reply: {
  322. // 用于存储回复内容
  323. type: 'text',
  324. accountId: accountId.value // 保证组件里,可以使用到对应的公众号
  325. }
  326. }
  327. menuList.value[menuKeyLength] = addButton
  328. menuClick(menuKeyLength.value - 1, addButton)
  329. }
  330. // 添加横向二级菜单;item 表示要操作的父菜单
  331. const addSubMenu = (i, item) => {
  332. // 清空父菜单的属性,因为它只需要 name 属性即可
  333. if (!item.children || item.children.length <= 0) {
  334. item.children = []
  335. delete item['type']
  336. delete item['menuKey']
  337. delete item['miniProgramAppId']
  338. delete item['miniProgramPagePath']
  339. delete item['url']
  340. delete item['reply']
  341. delete item['articleId']
  342. delete item['replyArticles']
  343. // 关闭配置面板
  344. showConfigureContent.value = false
  345. }
  346. let subMenuKeyLength = item.children.length // 获取二级菜单key长度
  347. let addButton = {
  348. name: '子菜单名称',
  349. reply: {
  350. // 用于存储回复内容
  351. type: 'text',
  352. accountId: accountId.value // 保证组件里,可以使用到对应的公众号
  353. }
  354. }
  355. item.children[subMenuKeyLength] = addButton
  356. subMenuClick(item.children[subMenuKeyLength], i, subMenuKeyLength)
  357. }
  358. // 删除当前菜单
  359. const handleDeleteMenu = async () => {
  360. try {
  361. await message.confirm('确定要删除吗?')
  362. if (tempSelfObj.value.grand === '1') {
  363. // 一级菜单的删除方法
  364. menuList.value.splice(tempSelfObj.value.index, 1)
  365. } else if (tempSelfObj.value.grand === '2') {
  366. // 二级菜单的删除方法
  367. menuList.value[tempSelfObj.value.index].children.splice(tempSelfObj.value.secondIndex, 1)
  368. }
  369. // 提示
  370. message.notifySuccess('删除成功')
  371. // 处理菜单的选中
  372. tempObj.value = {}
  373. showRightFlag.value = false
  374. isActive.value = -1
  375. isSubMenuActive.value = -1
  376. } catch {}
  377. }
  378. // ======================== 菜单编辑 ========================
  379. const handleSave = async () => {
  380. try {
  381. await message.confirm('确定要删除吗?')
  382. loading.value = true
  383. await MpMenuApi.saveMenu(accountId.value, convertMenuFormList())
  384. getList()
  385. message.notifySuccess('发布成功')
  386. } finally {
  387. loading.value = false
  388. }
  389. }
  390. // 表单 Editor 重置
  391. const resetEditor = () => {
  392. hackResetWxReplySelect.value = false // 销毁组件
  393. nextTick(() => {
  394. console.log('nextTick')
  395. hackResetWxReplySelect.value = true // 重建组件
  396. })
  397. }
  398. const handleDelete = async () => {
  399. try {
  400. await message.confirm('确定要删除吗?')
  401. loading.value = true
  402. await MpMenuApi.deleteMenu(accountId.value)
  403. handleQuery()
  404. message.notifySuccess('清空成功')
  405. } finally {
  406. loading.value = false
  407. }
  408. }
  409. // 将前端的 menuList,转换成后端接收的 menuList
  410. const convertMenuFormList = () => {
  411. const result = []
  412. menuList.value.forEach((item) => {
  413. let menu = convertMenuForm(item)
  414. result.push(menu)
  415. // 处理子菜单
  416. if (!item.children || item.children.length <= 0) {
  417. return
  418. }
  419. menu.children = []
  420. item.children.forEach((subItem) => {
  421. menu.children.push(convertMenuForm(subItem))
  422. })
  423. })
  424. return result
  425. }
  426. // 将前端的 menu,转换成后端接收的 menu
  427. const convertMenuForm = (menu) => {
  428. let result = {
  429. ...menu,
  430. children: undefined, // 不处理子节点
  431. reply: undefined // 稍后复制
  432. }
  433. if (menu.type === 'click' || menu.type === 'scancode_waitmsg') {
  434. result.replyMessageType = menu.reply.type
  435. result.replyContent = menu.reply.content
  436. result.replyMediaId = menu.reply.mediaId
  437. result.replyMediaUrl = menu.reply.url
  438. result.replyTitle = menu.reply.title
  439. result.replyDescription = menu.reply.description
  440. result.replyThumbMediaId = menu.reply.thumbMediaId
  441. result.replyThumbMediaUrl = menu.reply.thumbMediaUrl
  442. result.replyArticles = menu.reply.articles
  443. result.replyMusicUrl = menu.reply.musicUrl
  444. result.replyHqMusicUrl = menu.reply.hqMusicUrl
  445. }
  446. return result
  447. }
  448. // ======================== 菜单编辑(素材选择) ========================
  449. const openMaterial = () => {
  450. dialogNewsVisible.value = true
  451. }
  452. const selectMaterial = (item) => {
  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>