index.vue 22 KB

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