index.vue 25 KB

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